123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- ;This file will be executed next to the application bundle image
- ;I.e. current directory will contain folder APPLICATION_NAME with application files
- [Setup]
- AppId={{PRODUCT_APP_IDENTIFIER}}
- AppName=APPLICATION_NAME
- AppVersion=APPLICATION_VERSION
- AppVerName=APPLICATION_NAME APPLICATION_VERSION
- AppPublisher=APPLICATION_VENDOR
- AppComments=APPLICATION_COMMENTS
- AppCopyright=APPLICATION_COPYRIGHT
- ;AppPublisherURL=http://java.com/
- ;AppSupportURL=http://java.com/
- ;AppUpdatesURL=http://java.com/
- DefaultDirName=APPLICATION_INSTALL_ROOT\APPLICATION_NAME
- DisableStartupPrompt=Yes
- DisableDirPage=DISABLE_DIR_PAGE
- DisableProgramGroupPage=Yes
- DisableReadyPage=Yes
- DisableFinishedPage=Yes
- DisableWelcomePage=Yes
- DefaultGroupName=APPLICATION_GROUP
- ;Optional License
- LicenseFile=APPLICATION_LICENSE_FILE
- ;(Windows 2000/XP/Server 2003 are no longer supported.)
- MinVersion=6.0
- OutputBaseFilename=INSTALLER_FILE_NAME
- Compression=lzma
- SolidCompression=yes
- PrivilegesRequired=APPLICATION_INSTALL_PRIVILEGE
- SetupIconFile=APPLICATION_NAME\APPLICATION_NAME.ico
- UninstallDisplayIcon={app}\APPLICATION_NAME.ico
- UninstallDisplayName=APPLICATION_NAME
- WizardImageStretch=No
- WizardSmallImageFile=APPLICATION_NAME-setup-icon.bmp
- ArchitecturesInstallIn64BitMode=ARCHITECTURE_BIT_MODE
- FILE_ASSOCIATIONS
- [Languages]
- ; update 2
- ;Name: "english"; MessagesFile: "compiler:Default.isl"
- Name: "chinesesimplifiedfor5"; MessagesFile: "compiler:Languages\ChineseSimplifiedFor5.isl"
- ;
- [Files]
- Source: "APPLICATION_NAME\APPLICATION_NAME.exe"; DestDir: "{app}"; Flags: ignoreversion
- Source: "APPLICATION_NAME\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
- [Icons]
- Name: "{group}\APPLICATION_NAME"; Filename: "{app}\APPLICATION_NAME.exe"; IconFilename: "{app}\APPLICATION_NAME.ico"; Check: APPLICATION_MENU_SHORTCUT()
- Name: "{commondesktop}\APPLICATION_NAME"; Filename: "{app}\APPLICATION_NAME.exe"; IconFilename: "{app}\APPLICATION_NAME.ico"; Check: APPLICATION_DESKTOP_SHORTCUT()
- SECONDARY_LAUNCHERS
- [Run]
- Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-Xappcds:generatecache"; Check: APPLICATION_APP_CDS_INSTALL()
- Filename: "{app}\RUN_FILENAME.exe"; Description: "{cm:LaunchProgram,APPLICATION_NAME}"; Flags: nowait postinstall skipifsilent; Check: APPLICATION_NOT_SERVICE()
- 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()
- [UninstallRun]
- ; update 3
- Filename: taskkill;Parameters:"/t /f /im RUN_FILENAME.exe";Flags: runhidden
- ;
- Filename: "{app}\RUN_FILENAME.exe "; Parameters: "-uninstall -svcName APPLICATION_NAME STOP_ON_UNINSTALL"; Check: APPLICATION_SERVICE()
- ; update 4
- [UninstallDelete]
- Type: filesandordirs; Name: "{app}"
- ;
- ; update 5
- [Registry]
- Root: HKCU; Subkey:"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "RUN_FILENAME";ValueData: "{app}\RUN_FILENAME.exe /start"; Flags: deletevalue uninsdeletevalue
- ;Root: HKLM; Subkey:"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "RUN_FILENAME";ValueData: "{app}\RUN_FILENAME.exe /start"; Flags: deletevalue uninsdeletevalue
- ;Root: HKLM; Subkey:"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "RUN_FILENAME";ValueData: "{app}\RUN_FILENAME.exe /start"; Flags: deletevalue uninsdeletevalue; Check:IsWin64
- ;
- [Code]
- function returnTrue(): Boolean;
- begin
- Result := True;
- end;
- function returnFalse(): Boolean;
- begin
- Result := False;
- end;
- function InitializeSetup(): Boolean;
- begin
- // Possible future improvements:
- // if version less or same => just launch app
- // if upgrade => check if same app is running and wait for it to exit
- // Add pack200/unpack200 support?
- Result := True;
- end;
- procedure InitializeWizard();
- begin
- WizardForm.BorderStyle:=bsNone;
- end;
- function ShouldSkipPage(PageID: Integer): Boolean;
- begin
- Result := True
- end;
- procedure CurPageChanged(CurPageID: Integer);
- var
- indexpageid3:Integer;
- begin
- WizardForm.ClientWidth := ScaleX(0);
- WizardForm.ClientHeight := ScaleY(0);
- if CurPageID = wpWelcome then
- WizardForm.NextButton.OnClick(WizardForm);
- if CurPageID >= wpInstalling then
- WizardForm.Visible := False
- else
- WizardForm.Visible := True;
- end;
|