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