Reputation: 13
I am working on Java rich client app. with MySQL server and I made it as .jar
file.
I want the user to have one simple .exe
file that when running it, install JRE and MySQL server then he'll have a shortcut for the jar file and simply work on it.
I tried to use more than installer: inno setup, advanced installer, Excelsior Installer, ...
but they're all give me the same result: just put all .exe
files for JRE and MySQL server in the destination folder after installing the product (i.e. just unpack files without installing them).
Can anybody help me?
Upvotes: 1
Views: 2760
Reputation: 957
You can run as many executables as you want (Windows setup installers are executables) under [Run]
in InnoSetup script file when creating you setup file via InnoSetup. But, you shall use Check:
to check whether each installer has been installed or not.
Example installing Java Advanced Imaging (JAI) run-time and Visual C++ 2010 Redistributable Package (x86) with registry check on target system:
[Files]
Source: "install\README.txt"; DestDir: "{app}" Flags: ignoreversion
Source: "install\vcredist_x86.exe"; DestDir: "{app}" Flags: ignoreversion recursesubdirs createsubdirs
Source: "install\jai-1_1_3-lib-windows-i586-jre.exe"; DestDir: "{app}" Flags: ignoreversion recursesubdirs createsubdirs
[Icons]
Name: "{group}\{cm:UninstallProgram, {#MyTitleName}}"; Filename: "{uninstallexe}"; Comment: "Uninstalls {#MyTitleName}"
[Run]
Filename: "{app}\vcredist_x86.exe"; StatusMsg: {cm:RunVCRedist2010x86}; Flags: runhidden shellexec waituntilterminated; Check: IsNotVCRedist2010x86Installed
Filename: "{app}\jai-1_1_3-lib-windows-i586-jre.exe"; StatusMsg: {cm:RunJAIByDefault}; Flags: runhidden shellexec waituntilterminated; Check: IsNotJAIInstalled
[Code]
function IsNotJAIInstalled: Boolean;
begin
Result := not RegKeyExists(HKLM, 'SOFTWARE\SUNW\Java Advanced Imaging');
end;
function IsNotVCRedist2010x86Installed: Boolean;
var
Installed: Cardinal;
begin
Result := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86',
'Installed', Installed) and (Installed <> 1);
end;
Note:
If your installers in [Files]
are located in the "install" folder of your InnoSetup project, they are compressed during Innosetup process to generate your the InnoSetup setup executable. When you run the setup created, it will uncompress the installers in your defined {app}
folder and it will execute whatever defined under [Run]
Upvotes: 3
Reputation: 168815
Java Web Start and deployJava.js
are the obvious choices for this deployment.
deployJava.js
to ensure the user has the right minimum version of the JRE to run the app.ExtensionInstallerService
.PersistenceService
.Note that if you can supply an installer for MySQL on Mac. and *nix, JWS can partition the download by OS.
Upvotes: 0