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.
Related
I am working with STS based on Eclipse
About Run Configurations
I have some Maven configurations for Main executions defined through the Maven Build section. I need execute some of them together, for this goal I am working with the Launch Group section as follows:
From above I added three configurations to run together.
When I added each one, or even if I need update/edit each one - exists the following (observe the bottom part):
From above I did do some experiments about the Post launch action options and I understand clearly how works each one. Until here all is fine.
The situation is about the Launch mode options as follows:
From above I understand run option, it is the common or simplest execution.
But I am not able to figure out - what do or how work the rest of the options:
Inherit
Profile
Database Debug (Not sure if this option/item appears because I have the Dbeaver plugin installed)
Question: therefore how Inherit, Profile and Database Debug work? (Mostly the two first). If some scenarios or situations can be shared about when to use each one, it is appreciate to have a better perspective.
BTW if I choice Profile, appears the following error message (see blue square), as follows, so not sure when would be used (it is confuse)
The launch mode must be supported by the type of the launch configuration to be able to select it without an error.
Maven launch configurations support the launch mode Run only.
For launch configurations that supports the launch mode Run and Debug (like e.g. Java Application launch configurations), also Inherit can be chosen. Inherit means the launch mode of the launch group. Use the drop-down of the Debug button in the main toolbar to launch the launch group in Debug mode or the drop-down of the Run button to launch the launch group in Run mode. Alternatively, a launch group can be executed via the menu Run > Run Configurations... respectively Run > Debug Configurations... in the Run respectively Debug mode.
Launch groups exist since Eclipse Oxygen (4.7). This short video shows them in action. Run and Debug are the basic launch modes. All others with the exception of Inherit are contributed by additional plug-ins. For example, the Profile launch mode comes with Eclipse EclEmma for Java code coverage which is built-in in all Java IDE packages.
The dialog should not offer the option to choose a not supported mode. Maybe this is because plug-ins can add additional launch modes (in your case Database Debug) or maybe because nobody has implemented it yet (Eclipse is open source and contributions like this are welcome).
I have tried to run launch groups in coverage mode but have not been able to make it work. This seems to be a limitation in Eclipse. It would be useful to run a group of unit tests in coverage mode.
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 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.
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.
Back in 2008, around version 3.4, Eclipse changed the default behavior of the Run button to attempt to launch the file with focus, rather than launching the same run configuration that was run the last time. How do I get the old behavior back?
According to a post on Loving Software Blog, you change the following preference:
Run/Debug -> Launching panel; Launch Operation section; change radio button to "Always launch the previously launched application".
I've verified that this works in Indigo, the current version.