Smart Client with Standalone-Bootstrapper IzPack Installer

Questions, answers, tips and ideas on Servoy Client

Smart Client with Standalone-Bootstrapper IzPack Installer

Postby LXS » Mon Feb 08, 2021 1:49 pm

Hi,

does anyone use Servoy Smart Client with the Standalone Bootstrapper (start with bootstrapper.jar) and built an installer package for it?

Without Java WebStart there is no more automatic Desktop Shortcut created on the first startup.

So i thought to enhance user experience it would be nice to bundle a JRE (11) and the bootstrapper in an installer (for example izpack).
The installer should copy all data to a specified folder and create a start menu / desktop shortcut.

Questions:

1) Has anybody already created such an installer?
2) Or do you have other solutions to get the same user experience like Java WebStart?
3) When bundling the JRE in the installer - what about updating the JRE?

Thanks for your feedback!
Alex
Alexander Stefan
Dr. Maison & Partner GmbH
www.servoy-plugins.de
www.maison-partner.de
LXS
 
Posts: 138
Joined: Thu Mar 01, 2007 12:00 am

Re: Smart Client with Standalone-Bootstrapper IzPack Install

Postby Ruben79 » Tue Feb 09, 2021 6:33 pm

Hi,

Yes we have created an installer with standalone bootstrap.jar and embedded OpenJDK using Inno Setup. It can also create a desktop icon and a Start menu entry like a full fledged windows app.
We simply make the installer available via the downloadpage. If we want to update the JRE - which doesn't happen very often - a new installer is made and can be run without uninstalling the old one.

Inno Setup uses a config file (.iss) that allows for easy parametrizing and can also be used in scripting. We use scripting because we need to build installers for every unique bootstrap.jar (each customer has its own).

Our config looks like this:
Code: Select all
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Stb CRM"
#define MyAppVersion "8.0"
#define MyAppPublisher "Eudonet Stb"
#define MyAppURL "https://www.stb.nl"
#define MyAppExeName "stbCRM.exe"
#define MyAppIcoName "stbCRM-8.ico"
#define MyJarName "bootstrap.jar"
#define MyJREDir "jdk8u275-b01-jre"

[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={{F99ECF46-E5FC-4AF2-A561-A4ABEB6D94B7}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
PrivilegesRequired=admin
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=output
OutputBaseFilename=stbCRM-install-{#MyJREDir}
SetupIconFile=stbCRM-8.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
WizardImageFile=stb-logo.bmp
WizardImageStretch=false
WizardSmallImageFile=stbCRM-55x55.bmp,stbCRM-64x64.bmp
VersionInfoVersion=1.2

[InstallDelete]
Type: filesandordirs; Name: "{app}\runtime\*.*"

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";

[Files]
Source: "app\*"; DestDir: "{app}\app"; Flags: ignoreversion
Source: "runtime\{#MyJREDir}\*"; DestDir: "{app}\runtime\{#MyJREDir}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autodesktop}\{#MyAppName}"; \
  IconFilename: "{app}\app\{#MyAppIcoName}"; \
  Filename: "{app}\runtime\{#MyJREDir}\bin\javaw.exe"; Parameters: " -Xms768m -Xmx768m -jar {#MyJarName}"; \
  WorkingDir: "{app}\app\"; \
  Tasks: desktopicon

Name: "{autostartmenu}\{#MyAppName}"; \
  IconFilename: "{app}\app\{#MyAppIcoName}"; \
  Filename: "{app}\runtime\{#MyJREDir}\bin\javaw.exe"; Parameters: "-Xms768m -Xmx768m -jar {#MyJarName}"; \
  WorkingDir: "{app}\app\"; \

[Run]
Filename: "{app}\runtime\{#MyJREDir}\bin\javaw.exe"; Parameters: "-Xms768m -Xmx768m -jar {#MyJarName}"; \
  WorkingDir: "{app}\app\"; \
  Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; \
  Flags: nowait postinstall skipifsilent

It relies on 2 subdirectories in the same directory where the .iss is:
  • app - contains bootstrap.jar and .ico
  • runtime - contains the jre director
Ruben de Jong
Stb Software Development
SAN Partner

Stb Software Development - http://www.stb.nl
User avatar
Ruben79
 
Posts: 93
Joined: Wed Apr 18, 2007 12:43 pm

Re: Smart Client with Standalone-Bootstrapper IzPack Install

Postby LXS » Tue Feb 09, 2021 6:43 pm

Hi Ruben,

cool, thank you very much for sharing your installer solution with Inno Setup!

I'll have a look on it!

This is a Windows only installer - right?
Do you also have Mac customers?

Alex
Alexander Stefan
Dr. Maison & Partner GmbH
www.servoy-plugins.de
www.maison-partner.de
LXS
 
Posts: 138
Joined: Thu Mar 01, 2007 12:00 am

Re: Smart Client with Standalone-Bootstrapper IzPack Install

Postby robert.edelmann » Wed Feb 10, 2021 7:44 pm

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.
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 18
Joined: Wed Aug 14, 2013 6:12 pm

Re: Smart Client with Standalone-Bootstrapper IzPack Install

Postby LXS » Thu Feb 11, 2021 10:08 am

Good Morning,

i've tried to create an installer with InnoSetup for Windows and it works excellent! Thanks again!
It really behaves like a native Windows application. You can also stick the icon to the task bar and start the solution with it - great!

@Robert: Thank you Robert for your Mac solution! I'll also try packr!
I think on MacOS is the common way to copy an app to the /Applications folder, so a zip file should do the job.

Alex
Alexander Stefan
Dr. Maison & Partner GmbH
www.servoy-plugins.de
www.maison-partner.de
LXS
 
Posts: 138
Joined: Thu Mar 01, 2007 12:00 am

Re: Smart Client with Standalone-Bootstrapper IzPack Install

Postby Mark Voorboom » Fri Feb 12, 2021 11:48 am

Hi Alex,

We created also an .app file that consist the bootstrap.jar, together with this .app we created a .dmg file that also has an OpenJDK installer so that the installation are two steps. Step 1: Install the OpenJDK and Step 2: Drag the .app to the application folder. For creating the .app file i've used this http://www.zitnik.si/wordpress/2016/02/21/creating-a-mac-os-app-from-a-runnable-jar-file/ documentation. For creating the dmg we are using DropDMG.

Mark
Attachments
dmg_crm.png
dmg_crm.png (44.49 KiB) Viewed 862 times
Stb Software Development
SAN Partner
User avatar
Mark Voorboom
 
Posts: 15
Joined: Wed Aug 26, 2009 9:55 am
Location: Houten


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 2 guests

cron