I am trying to integrate install4j updater application to be part of start menu (in Windows). So that user can go to Start->Programs->AppName->Update and start updater.
I tried with "Launcher integration" option (I created launcher who points to batch file with only one echo command which is doing nothing) and setup my updater to be invoked whenever this launcher is invoked (launcher exists in the Start menu).
But when I start launcher from the Start menu, updater doesn't appear, no errors, no logs and launcher is executed (echo message).
Is there any other way or I miss something?
I am trying to integrate install4j updater application to be part of
start menu (in Windows). So that user can go to
Start->Programs->AppName->Update and start updater.
Presumably you have a "Create program group" action in your "Installation" screen. In the configuration of that action, activate the "Windows program group entries" tab and add a file link to the updater.
Related
I have an RCP app which exposes the menu contribution for OpenWorkspaceAction which launches the workspace chooser dialog. I launch it as a stand-alone app (i.e. not from the IDE), use the workspace switcher to select another workspace, and the app exits and does not restart again.
My app runs application org.eclispe.ui.ide.workbench, which uses IDEApplication for its IApplication implementation. To see what's going on, I created my application with an IApplication instance that simply extends IDEApplication and duplicates the code from IDEApplication#start in the subclass. I verify that when restarting after selecting a new workspace, it returns exit code EXIT_RELAUNCH. I also verified that the system property eclipse.exitdata is set as expected, i.e. it has the original launch args with the value of -data replaced with the new workspace location. I also see that system property eclipse.exitcode is set to 24. This is all done in OpenWorkspaceAction, and I'm just verifying it before the app exits.
This seems to indicate that the launcher executable is defective. It comes from the eclipse IDE, I presume, as I selected the box to use native launcher artifacts in the product editor, and then I build the product in tycho using the tycho-p2-director plug-in. But I tried replacing the launcher executable with the launcher from my IDE (which handles relaunch properly), and also with the launcher executable from an RCP app made by someone else, which also handles relaunch properly.
I don't know where to go from here. All the system properties are being set properly to cause the launcher to re-launch, so it really seems to be a problem with the launcher. But then replacing the launcher with one that works in other apps doesn't help. I also tried replacing the launcher and native GTK launcher plug-ins with ones from the IDE and working RCP app. Nothing I do makes it relaunch.
I modified the exit code in IDEApplication.start() to return EXIT_RESTART, and the app does re-start. But then it doesn't respect the exit data, because it re-starts with the same args used originally, without replacing the -data value.
My app is based on Luna, and I tried replacing the launcher artifacts with files from from Luna as well as Mars installations. I'm running on CentOS 6.7
EDIT: to clarify what's happening, the launcher executable exits when IDEApplication returns EXIT_RELAUNCH from the start() method. The launcher program is supposed to invoke the JVM again with the args found in system property eclipse.exitdata, but it terminates execution instead. If start() returns EXIT_RESTART, the launcher invokes the JVM again, but with the original command arguments, without a new value for -data, as it's designed to do when it sees that exit status. So the problem is that the launcher terminates instead of re-launching the JVM when exit status is EXIT_RELAUNCH.
I have set up Auto-update and launcher integration within my project ( Update with silent version check). In my Launcher integration I select "start automatically when launcher is executed" and select my launcher ( which is an external launcher) from the list of launchers but when I select the launcher from the Start Menu after installation no update screen is displayed.
I get no error and no logs indicating the issue. I have confirmed there are updates available as when I run the updater exe on its own the appropriate update screen is dispalyed showing the version change.
I have selected Launch schedule: Always and Launch mode: Blocking on startup.
I cannot see what I am doing wrong? Is it possible to set auto update with an external launcher?
Launcher integration for updaters is only supported for generated launchers. For external launchers, install4j has no hook to insert the auto-update check.
You can call the updater yourself, though. On the "Launcher integration" tab, click on "Start integration wizard" and add the code snippet to your your own code.
Using Eclipse, I'm launching an external program through an "External Tool Configuration".
My program has a "bin/launch-program" executable, but also a "bin/stop-program" which is the only way to stop the program.
In my Eclipse's External Tool Configuration, tab "Main", I set:
Location: <PROGRAM_HOME>/bin/launch-program
Working Directory: <PROGRAM_HOME>
But I'm looking a way to handle the stop event.
In other words, launching an external program works well: I get the output in the Eclipse's console. The question is: how to handle the click on the Terminate button of the console, to launch a specific command line?
terminating the program from the terminate button of the eclipse console is equivalent to kill it by using a task manager.
It's not safe to edit the command on the red terminate button, but you can make the program to do things before exiting
shutdown hook
It is Possible with install4j to do an uninstall Force a Reboot And Continue with the Installation with Admin rights if they were granted with the Invocation for the uninstaller.
Any hints are welcome. Thanks
You can force a reboot by calling
context.triggerReboot(false);
in a "Run script" action. However, there is no feature that lets you call the installer again after the reboot and continue at the next screen.
What I would suggest in this case is to add a custom installer application for the post-processing on Installer->Screens & Actions and add a "Add a startup executable on Windows and OS X" action for this custom application to the installer.
After successful completion of the post-processing, you would have to delete the auto-start link. The link is in the directory
new File(FolderInfo.getSpecialFolder(FolderInfo.FOLDER_STARTUP, false)
has the name of the executable and a ".lnk" extension. If you use a "Delete files and directories" action, set its "Action elevation type" property to "Do not elevate".
Is there an integrated feature that will enable me to auto-start the program after Install4J installer is finished? Ideally to add "Start after installation is finished" button.
I see that there is field "Post-activation script" property on the finish form in the installer, but not sure if this can be used.
Just add an "Execute launcher" action to your "Finish screen". When you do that, the install4j IDE will also ask you if you want to add a confirmation question to the finish screen.