Reputation: 35
We have an installer that installs two launchers. Each launcher launches one updater, the same for the two launchers. At the end of the update process, so at the end of the installation when the case, we would like to execute the good launcher, i.e. the one which was previously launched.
Is it possible to do that, for exemple with passing a parameter from the launcher to the installer through the updater ?
Or should we create a dedicaced updater for each launcher ?
Upvotes: 2
Views: 255
Reputation: 48070
It depends on which kind of update-downloader you are using:
1. Update downloaders with immediate execution of the new installer
To pass information from the launcher to the new installer, you can call the update downloader with arguments like
-Vname=value
that set installer variables.
You then have to pass that information to the downloaded installer that is executed with a "Run executable" action by passing extra arguments like this:
-Vname=${installer:name}
Then, these installer variables will be available in the new installer.
You have to call the update downloader with the API, the automatic launcher integration does not allow adding these parameters.
2. Background update downloader
If you use the "Background update downloader", you can call
UpdateChecker.executeScheduledUpdate(...)
with the restartLauncher
argument set to true
to restart the same launcher after the update, and with the launcherArguments
argument you can pass additional arguments.
For GUI launchers, you can configure that this call is made automatically at startup on the "Executable info->Auto-update integration" of the launcher wizard.
Upvotes: 2