I run an open source project that normally distributes our code in a universal zip format. In addition to the core software, we also have several community developed add-ons for the software.
Rather that getting the user to download all of the options from disparate locations and websites, I’d like to provide a small footprint installer that would
- Download and install java as needed. If the user is on 64bit OS, it would need to download both 32 and 64 bit.
- Download and unpack the core software zip file
- Allow the user to choose the latest stable version or the development version (two different websites)
- Choose the additional software options (multiple options)
- Download each one individually (different websites)
- Unpack/Install as necessary
- Write configuration files (plain text)
- Clean up directory as needed depending on the configuration options.
- E.g. if I select optional software “1”, delete directory “X”
I don’t necessarily want to provide all of those additional software options in the core installation file (in fact, if I could just provide an installation program with a small footprint that could determine the latest versions of all the available software (probably have to screen scrape some websites, others might provide a text file with the version number in it)
Is Install4j suitable for this?
I know that I would have to write some code to do the version identification, but mostly I want a GUI with a guided path for the user to choose the options and for it to download them as needed.
Once I’ve written the script, I’d prefer to leave it be and not have to compile new versions all the time (if possible), excepting the instances where the URL information might change.
You can use “Download file” actions to download ZIP files from arbitrary sites and then “Install contents of ZIP file” actions to install them as needed.
As for the presentation to the user, you can use the standard installation components facility where you can order installations components into a tree which is displayed on the “Installation components” screen. You can leave all the installation components empty in your case. Another advantage is that you can specify dependencies for installation components.
In the “Installation screen”, I would add action groups that contain pairs of “Download file”/”Install contents of ZIP file” actions (and whatever other action are required for each component). The condition expression of each action group should be set to
where “123” is the ID of the corresponding installation component.
As for 64-bit/32-bit: On Windows, I would propose to only create an installer for 32-bit with a bundled 32-bit JRE. This works just as well on a 64-bit JRE. If necessary, a separate 64-bit media file has to be created. The bundled JRE can be downloaded on demand.
On Linux I would not really recommend to bundle a JRE. If necessary, provide two separate media files for 32-bit Linux and 64-bit Linux.
As for the “guided path for the user”, you can create custom screens in install4j.