1 ;This file will be executed next to the application bundle image
   2 ;I.e. current directory will contain folder INSTALLER_NAME with application files
   3 [Setup]
   4 AppId={{PRODUCT_APP_IDENTIFIER}}
   5 AppName=INSTALLER_NAME
   6 AppVersion=APPLICATION_VERSION
   7 AppVerName=INSTALLER_NAME APPLICATION_VERSION
   8 AppPublisher=APPLICATION_VENDOR
   9 AppComments=APPLICATION_COMMENTS
  10 AppCopyright=APPLICATION_COPYRIGHT
  11 DefaultDirName=APPLICATION_INSTALL_ROOT\INSTALLER_NAME
  12 DisableStartupPrompt=Yes
  13 DisableDirPage=DISABLE_DIR_PAGE
  14 DisableProgramGroupPage=Yes
  15 DisableReadyPage=Yes
  16 DisableFinishedPage=Yes
  17 DisableWelcomePage=Yes
  18 DefaultGroupName=APPLICATION_GROUP
  19 ;Optional License
  20 LicenseFile=APPLICATION_LICENSE_FILE
  21 ;WinXP or above
  22 MinVersion=0,5.1 
  23 OutputBaseFilename=INSTALLER_FILE_NAME
  24 Compression=lzma
  25 SolidCompression=yes
  26 PrivilegesRequired=APPLICATION_INSTALL_PRIVILEGE
  27 SetupIconFile=INSTALLER_NAME\LAUNCHER_NAME.ico
  28 UninstallDisplayIcon={app}\LAUNCHER_NAME.ico
  29 UninstallDisplayName=INSTALLER_NAME
  30 WizardImageStretch=No
  31 WizardSmallImageFile=INSTALLER_NAME-setup-icon.bmp   
  32 ArchitecturesInstallIn64BitMode=ARCHITECTURE_BIT_MODE
  33 FILE_ASSOCIATIONS
  34 
  35 [Languages]
  36 Name: "english"; MessagesFile: "compiler:Default.isl"
  37 
  38 [Files]
  39 Source: "INSTALLER_NAME\LAUNCHER_NAME.exe"; DestDir: "{app}"; Flags: ignoreversion
  40 Source: "INSTALLER_NAME\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
  41 
  42 [Icons]
  43 Name: "{group}\INSTALLER_NAME"; Filename: "{app}\LAUNCHER_NAME.exe"; IconFilename: "{app}\LAUNCHER_NAME.ico"; Check: APPLICATION_MENU_SHORTCUT()
  44 Name: "{commondesktop}\INSTALLER_NAME"; Filename: "{app}\LAUNCHER_NAME.exe";  IconFilename: "{app}\LAUNCHER_NAME.ico"; Check: APPLICATION_DESKTOP_SHORTCUT()
  45 SECONDARY_LAUNCHERS
  46 
  47 [Run]
  48 Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-Xappcds:generatecache"; Check: APPLICATION_APP_CDS_INSTALL()
  49 Filename: "{app}\RUN_FILENAME.exe"; Description: "{cm:LaunchProgram,INSTALLER_NAME}"; Flags: nowait postinstall skipifsilent; Check: APPLICATION_NOT_SERVICE()
  50 Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-install -svcName ""INSTALLER_NAME"" -svcDesc ""APPLICATION_DESCRIPTION"" -mainExe ""APPLICATION_LAUNCHER_FILENAME"" START_ON_INSTALL RUN_AT_STARTUP"; Check: APPLICATION_SERVICE()
  51 
  52 [UninstallRun]
  53 Filename: "{app}\RUN_FILENAME.exe "; Parameters: "-uninstall -svcName INSTALLER_NAME STOP_ON_UNINSTALL"; Check: APPLICATION_SERVICE()
  54 
  55 [Code]
  56 function returnTrue(): Boolean;
  57 begin
  58   Result := True;
  59 end;
  60 
  61 function returnFalse(): Boolean;
  62 begin
  63   Result := False;
  64 end;
  65 
  66 function InitializeSetup(): Boolean;
  67 begin
  68 // Possible future improvements:
  69 //   if version less or same => just launch app
  70 //   if upgrade => check if same app is running and wait for it to exit
  71   Result := True;
  72 end;