On Windows, we are using Launch4J
http://launch4j.sourceforge.net (on Mac) to build executables (32 and 64Bit), that have to be shipped with the corresponding JRE in a subfolder.
We use innosetup to install the folder + create icons for the correct executables (and a link to the webclient/documentation).
The script for innosetup looks like this:
- Code: Select all
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "BauProCheck 3"
#define MyAppVersion "1.1"
#define MyAppPublisher "ADS Gesellschaft für angewandte Datensysteme mbH"
#define MyAppURL "http://app.bauprocheck.de/"
#define MyAppExeName "BauProCheck3.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{95933581-D818-4BDB-8E3A-7739C35D34AA}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\BPC3
DefaultGroupName={#MyAppName}
OutputDir=c:\BPC3-Installer\
OutputBaseFilename=BauProCheck3_-_Setup
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64
SetupIconFile=c:\Bootstrap\BauProCheck.ico
WizardStyle=modern
VersionInfoVersion=1.1
VersionInfoCompany=ADS Gesellschaft fuer angewandte Datensystem mbH
VersionInfoCopyright=2019 / ADS GmbH
VersionInfoProductName=BauProCheck 3 - Client
VersionInfoProductVersion=1.1
[Languages]
;Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce
[Files]
Source: "c:\Bootstrap\bootstrap.jar"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Bootstrap\32Bit\BauProCheck3.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "C:\Bootstrap\32Bit\jre\*"; DestDir: "{app}\jre"; Flags: ignoreversion recursesubdirs replacesameversion; Check: not Is64BitInstallMode
Source: "C:\Bootstrap\64Bit\BauProCheck3.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "C:\Bootstrap\64Bit\jre\*"; DestDir: "{app}\jre"; Flags: ignoreversion recursesubdirs replacesameversion; Check: Is64BitInstallMode
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\BauProCheck3.exe"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\BauProCheck3.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
If we need an update for the JRE we have to uninstall the old client and reinstall the new version.
The effect is basically the user doesn't see anything about Java. It's a normal installer, a normal exe-file, and no prerequisites.
On the Mac-side of things we use Packr
https://github.com/libgdx/packr to create an app which includes the jre, at the moment we ship just this file as a zip and let the user copy it to /Applications/, I couldn't be bothered to create a dmg.