Can we install launcher selectively based on check at installation time - install4j

I have multiple launcher in an application and I want to install it selectively based on a flag provided at installation time, like in GUI mode install one and in unattended mode install another. Can we achieve in Install4j?

You can put the launchers into different file sets and select the file sets programmatically at runtime.
You create file sets on the "Files->Define Distribution Tree" step.
In the launcher wizard, on the "Executable info" step you can select the file set for the launcher.
At runtime, call
context.getFileSetById("123").setSelected(false)
to prevent the installation of the file set with ID "123".

Related

AppImage on Github Releases - Executable Permission

I'm hosting an AppImage file on github releases
https://github.com/Gilad-Kutiel-App/jumpfm/releases.
The file does not have an execution permission when downloaded and it is needed to set it manually.
Is there anything I can do about it ?
Thank you,
Gilad
Before you can run an AppImage (or really any executable for that matter), you need to make it executable. This is a Linux security feature. There are three main ways to make an AppImage executable:
1. With the GUI
Open your file manager and browse to the location of the AppImage
Right-click on the AppImage and click the ‘Properties’ entry
Switch to the Permissions tab and
Click the ‘Allow executing file as program’ checkbox if you are using a Nautilus-based file manager (Files, Nemo, Caja), or click the ‘Is executable’ checkbox if you are using Dolphin, or change the ‘Execute’ drop down list to ‘Anyone’ if you are using PCManFM
Close the dialog
Double-click on the AppImage file to run
2. On the command line
chmod a+x Some.Appimage
3. Automatically with the optional appimaged daemon
If you would like to have all AppImages be executable automatically, you can install the optional appimaged daemon. It will automatically add downloaded AppImages to the menu and make them executable for you. It can be downloaded from https://github.com/AppImage/AppImageKit/releases or installed from your distribution.
On your download page, you can link to the image and/or to http://discourse.appimage.org/t/how-to-make-an-appimage-executable/80
Note: Please DO NOT put an AppImage into another archive like a .zip or .tar.gz. While it may be tempting to avoid users having to set permission, this breaks desktop integration with the optional `appimaged daemon, among other things. Besides, the beauty of the AppImage format is that you never need to unpack anything

install4j uninstall previous installation

I am creating an update for an application built in install4j and I want to overwrite the files in the installation directory but keeping the configutation files. I manually edited some of them to never be overwriten but I cannot keep the files created by user input when installing it for the first time.
Is it possible to set a condition in the "Uninstall previous installation" so that it keeps the user's input? The user's input does not exist in the distribution tree. This means that I cannot manually edit it so that it is never uninstalled.
Why would you want to move the file? The response file you either load if it is an update or leave install4j to delete it.
The file is usually loaded on updates to use some variable the user set in the initial install, like a username, so you won't have to ask him again.

Modify Eclipse RCP startup args in protected directory

I am enabling internationalization for my RCP application. The preferences tab allows the user to select between languages. I understand that Eclipse (3.7) has to load the language at start-up and can not dynamically change languages.
I know of three approaches to accomplish this:
1) Modify the OS level shortcut to pass in -nl XX
2) Change the app.ini file to have -nl XX (on separate lines)
3) Change the config.ini to have osgi.nl = XX
The issue with these approaches is that they all require write permission to the application directory. When running under Vista / Windows 7 and Linux implementations that do not provide write access to programs, a normal user does not have permissions to modify these files.
Is there another approach to pass in arguments that change the VM language? Is there a workaround for the file protection provided by the OS?
In Windows the application directory is write-protected for a good reason. Fortunately one can set Eclipse Runtime Options to configure where the RCP application should store
configuration data
workspace data
This can be accomplished in two ways:
setting command line arguments (-configuration , -data)
defining system properties (osgi.configuration.area to , osgi.instance.area to ) for example in config.ini
For further information see Runtime Options in official Eclipse Help.
In Windows such data should be stored in the user directory.
By the way you should be able to locate these settings in the Installation Details pane of the standard About dialog.
However setting these properties is a bit tricky. In my case the application installer evaluates the location of the user directory at installation time and modifies the config.ini file accordingly.

how to execute and read from a command line during installation of installShield exe

I am new to Install Shield, and i have a really critical requirement. In between the installation steps, the installer should run a clearcase command in the backend and then that command output should be given as an input to the next installer panel.
To be more specific, i have to give the user to select a ClearCase storage location of his choice. For this, i need to run "cleartool lsstgloc" command in the back end. This command retrieves a list of available storage locations. I should read this list and show to user in the next panel, from where he can chose the storage location of his choice.
How is this possible using installshield. Please help me.
You could write a custom action to run your command and store the output to an MSI property. You could run the custom action when navigating from the first dialog to the second and use the property on the second dialog to present some kind of list.
Or how about if the command line to the installer be assigned an MSI property which is the path. For ex, create an installer property named CCPATH. Then whatever launches the installer include that as an arg:
SETUP.EXE CCPATH=E:\CCSTORE\CASE12...
The installer properties can be used within the setup process as needed.

How to properly force a Blackberry Java application to install using Loader.exe

I want to include the Application Loader process in a software installation, to ensure that users get our software installed on their Blackberry by the time our installer software finishes.
I know this is possible, because Aerize Card Loader (http://aerize.com/blackberry/software/loader/) does this. When you install their software, if your Blackberry is connected the Application Loader will come up and force the .COD file to install to the device.
I can't make it work. Looking at RIM's own documentation, I need to:
Place the ALX and COD files into a subfolder here: C:\Program Files\Common Files\Research In Motion\Shared\Applications\
Add a path to the ALX file in HKCU\Software\Research In Motion\Blackberry\Loader\Packages
Index the application, by executing this at the command line: loader.exe /index
Start the force load, by doing this: loader.exe /defaultUSB /forceload
When I execute that last command, the Application Loader comes up and says that all applications are up to date and nothing needs to be done.
If I execute loader.exe by double-clicking on it (or typing in the command with no parameters), I get the regular Application Loader wizard. It shows my program as listed, but un-checked. If I check it and click next, it will install to the Blackberry. (This is the part that I want to avoid, and that Aerize Card Loader's install process avoids.)
What am I missing? It appears that the Aerize installer is doing something different but I haven't been able to ascertain what.
You can do it easily with the following command:
C:\RIM\JDE_4.7.0\bin\JavaLoader.exe -u load <.cod file>
With this command you don't need an alx at all, just the cod file. Look at JavaLoader usage help to see full options.
JavaLoader.exe can upload one code file. What about two or more cod files?