On the "Check for running processes" activity, the "Include launchers" option does nothing - install4j

I am using install4j Windows Edition 6.1.1 (build 6254).
I have an installer that installs (up to) 3 components, each with a Launcher (exe).
In the uninstall process, I use a "Check for running processes" activity, as suggested here. The "Include launchers" option is checked, but no processes are detected.
When I add the exe files manually to "Additional executables", it works as expected.
Is this a bug, or did I miss something?
Additional question: When I list the "Additional executables", can I give them names by which they are reported to the user when they are running, rather than just filename with path?
In case it matters: The components are Eclipse RCP application, and they are not placed in the installation root, but each in its own subdirectory.

As of install4j 7.0.9, the "Include launchers" option of the "Check for processes" action only handles generated launchers and you have to pass the external launchers explicitly in the "Additional executables" property.

Related

How to change the location of a shared JRE in install4j?

I want to share the JRE of my main application with add-ons which will be installed using a separate installer. Main application an add-ons belong to the same product line. The JRE should be shared among all products of this line but not with other products.
Is it possible to define the path of the shared JRE instead of using "...\common files\i4j_jres"?
I'd like to use something like
"...\common files\my company\product line1\jre"
and
"...\common files\my company\product line2\jre"
The installation directory for shared JREs cannot be customized.
If you use add-on installers (Installer->Update Options), they will pick up the JRE of the main product automatically. In that case you don't set to select "Install as a shared JRE bundle" in the media wizard. The add-ons cannot have a separate installation directory in that case and they cannot be uninstalled separately.
Another option is to set an environment variable with a "Modify an environment variable on Windows" action and a value of ${installer:sys.preferredJre}. In the installers for your add-on products, add a corresponding environment variable entry to the Java search sequence (General Settings->Java version).

Eclipse project-wide error: Warning: The environment variable HOME is not set. The following directory will be used to store the Git

Started Eclipse and got this error. How do I fix it?
Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Documents and Settings\Wizard'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
If any additional information is needed, let me know and I will provide it.
The other answers don't contemplate that if you don't use Git, then you can entirely ignore this warning, along with the "EGit could not detect" one.
But I know... obsessive minds can't just ignore... they NEED to fix it anyway, right?
Then proceed:
Go to "Window --> Preferences" menu
Expand: "Team --> Git --> Confirmations and warnings"
Uncheck the "Home directory" and "Git prefix" boxes
Ok
In the Workspace log, delete the old warnings (red cross icon)
Restart Eclipse
Feel the peace spreading through your mind... :)
You need to set the JAVA_HOME variable in your system.
Depends on your Operating system you can check for "How to set Environment variable?" and from that point you need to set environment variable
Variable Name : JAVA_HOME
Value : Path of Java upto bin folder
In Windows 7, type "environment" at the start menu
Select "Edit environment variables for your account"
Click the "New" button.
Enter "HOME" in the name field
Enter "%USERPROFILE%" or some other path in the value field.
Click OK, and OK again. You have just added the Home directory on Windows.
This is a warning because the HOME environment is not defined, whereas EGit (plugin for Git) need it to know where to locate the Git configuration and repository. By default it will use the current user base directory but the risk is that if you have Git installed at a different location, EGit and Git may have different behaviors. If you don't use Git, just deactivate the warning as explained.
Here is the EGit user guide : https://wiki.eclipse.org/EGit/User_Guide#Setting_up_the_Home_Directory_on_Windows
It explains that you have to set the HOME variable with the %USERPROFILE% as value.
You may check that too http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup
and Changing .gitconfig location on Windows
You should study the official documentation
Setting up the Home Directory on Windows
Add the environment variable HOME to your environment variables.
In Windows 7:
type "environment" at the start menu.
Select "Edit environment variables for your account".
Under "User Variables", click the "New" button.
Enter "HOME" in the name field.
Enter "%USERPROFILE%" or some other path in the value field.
Click OK, and OK again. You have just added the Home directory on Windows.
File > Exit, then restart the application.
This is because JEE package is lacking the Platform SDK. (there is "Eclipse Platform Plug-in Developer Resources" in Eclipse IDE for Eclipse Committers(former Eclipse Standard), but not in Eclipse IDE for Java EE Developers.)
You can solve this bug by installing it manually from "The Eclipse Project Updates" site. (Help->Install New Software->choose "The Eclipse Project Updates"->uncheck "Group items by category"->select "Eclipse Platform Plug-in Developer Resources")
(for EGit warnings, they are just warnings and have no relation to this problem)
There is no need to set an environment variable HOME or JAVA_HOME for the system or for any user. The required data can easily be given to eclipse or Git or EGit in a small script:
- Use your brain to make out where the HOME for ecilpse or Git or EGit should be. You
can choose any directory accessible for these programs.
For example the directory is N:\somewhere\eclipse\HOME.
- Examine the location of the executable eclipse file.
- Open a new text file with the Editor or with your favourite text editor app
on your desktop or in any directory you like.
- Write the following text of 3 lines
SET HOME=N:\somewhere\eclipse\HOME
start "Run Eclipse" "F:\ProgramFiles\eclipse\java-2019-03\eclipse\eclipse.exe"
EXIT
Here N:\somewhere\eclipse\HOME is just an exmaple for any existing directory
you choose.
"Run Eclipse" is an example for the title of the script window.
"F:\ProgramFiles\eclipse\java-2019-03\eclipse\eclipse.exe" is an example for
the exclipe app to start.
save the text file as "RunEclipse.cmd"
By executing RunEclipse.cmd you set the HOME environment variable only for this
script. eclipse.exe can get it from the script environment and the Error does
not occur anymore.

How to specify two JREs in a single installer for different launchers?

I have an install4j (v4.x) project that has 2 different launchers (for 2 different tasks) created on application install. Is there any way to specify a separate (2nd) JRE for the 2nd launcher (not the one specified in the final media file)?
A bit an offtopic but...
Why would i need that? Actually i need a full copy of the JRE from the media file for the 2nd launcher (which is an updater-type application) so that it could update main application's JRE. If updater would works on the same JRE as the application it wouldn't be able to do so.
Maybe there is a better way to update application's JRE with the one i need?
P.S. I know about new update features of install4j 5.x, but we re not using it for several reasons, so its out of question for now.
How about this:
On General Settings->Java version you add an environment variable MY_UPDATER_JAVA_HOME
to the search sequence and move it to the the top of the list.
In the installer, use a "Copy files and directories" action to duplicate the JRE to some other directory
On Installer->Screens & Actions, add an empty custom installer application, set its "Default execution mode" property to "Unattended mode"
Add a "Run executable or batch file" action to the "Startup" node of the new installer application. With that action, you call your updater launcher. In the "Specific environment variables" property, you set MY_UPDATER_JAVA_HOME to the location of the copied JRE.
You would then call the installer application and not your updater directly and it would run with the duplicated JRE.
If you do not want to keep two JREs around in the installation directory, you could change the "Default execution mode" property to "Unattended mode with progress dialog" and add a "Copy files and directories" action to copy the JRE to a specific directory in the temp directory if it does not already exist.

Eclipse + CDT: How to batch build several build configurations

I have an eclipse CDT project that builds static and shared libraries. I have created several build configurations for them.
I want to know if there is any way to do a batch build i.e. build all configurations at once with single operation. I tried "Build All" (ctrl+B) but it seems to be building only the current configuration (just that it applies "all" as the target for the current configuration).
One of the earlier posts suggest making use of CMake(http://stackoverflow.com/questions/5204180/how-to-build-several-configurations-at-once-with-cmake) .
Is this the way, or is there any other alternative without getting into CMake.
regards,
Ravi
If you have CDT installed, then there is also a launch configuration type called Launch group. You can create one of that to list all your other already configured launch configurations and to execute one after the other. Make sure to set the post build action in the list dialog to "wait until terminate".
put all your projects into a tree (symlinks), e.g. my/Projects and run a headless build (ref http://gnuarmeclipse.livius.net/blog/headless-builds/)
eclipse -application org.eclipse.cdt.managedbuilder.core.headlessbuild -importAll my/Projects -cleanBuild all -nosplash -data ./eclipse_ws_dir --launcher.suppressErrors -vmargs -Xmx7g

Eclipse "Waiting for virtual machine to exit"

I'm working on a blackberry project using eclipse and bb-ant tools. I've created a build.xml file to perform the build. Everytime I try to run an Ant build, eclipse pops up the progress dialog and it hangs stating "Waiting for virtual machine to exit."
I downloaded an open source Blackberry project that has an ant build and it is showing the same behavior.
Does anyone have any suggestions?
Edit:
I used the command line to build my xml file and it built fine. However, when I tried from Eclipse it still hangs.
I've tried both the standard eclipse plugin directory and the path I downloaded ant to.
You could check if your ANT_HOME settings are correct (see also this blog post).
"Window > Preference > Ant > Runtime": "Ant Home Entries".
if the jars files are from a plugin directory (beside the default 'org.apache.ant_1.7.1.v20090120-1145' one) and not an independent ant installation, that might explain the problem.
Try clicking the "Ant Home" button on the right side and setting up ant home such as "C:\path\to\apache-ant-1.7.0"
There are similar bugs to this kind of situation (bug 173419, ticket 91).
It is worth checking the JVM used for the project.
It can also occurs when a ant task is poorly implemented.
You had the problem because the java version ant tries to run with is incorrect.
By default, eclipse will try to run the ant build with the java version it uses to compile the java files (Blackberry JRE), which won't work! You need to change the jre version by choosing "Run As... > Ant build". Before clicking run, go to the JRE tab, choose "Separate JRE:" and change "Blackberry JRE " to a standard java JRE. Press the run button and everything should work correctly.
I hit this problem also. Although I never used the same solution, you pointed me in the same direction.
I was using a ant file as a builder in my project, and I disabled the Allocate Console build option. This is when I hit the 'Waiting for virtual machine to exit'.
So I simply enabled the Launch in background option and it worked.