src/jdk.packager/windows/classes/jdk/packager/internal/resources/windows/template.iss
author herrick
Wed, 17 Oct 2018 13:50:11 -0400
branchJDK-8200758-branch
changeset 56982 e094d5483bd6
parent 56941 20568f1e1aa7
child 57013 0ece1b6f0958
permissions -rw-r--r--
8212048: Cleanup source code and fix issues discussed in preliminary review Reviewed-by: almatvee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56941
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     1
;This file will be executed next to the application bundle image
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     2
;I.e. current directory will contain folder APPLICATION_NAME with application files
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     3
[Setup]
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     4
AppId={{PRODUCT_APP_IDENTIFIER}}
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     5
AppName=APPLICATION_NAME
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     6
AppVersion=APPLICATION_VERSION
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     7
AppVerName=APPLICATION_NAME APPLICATION_VERSION
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     8
AppPublisher=APPLICATION_VENDOR
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
     9
AppComments=APPLICATION_COMMENTS
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    10
AppCopyright=APPLICATION_COPYRIGHT
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    11
DefaultDirName=APPLICATION_INSTALL_ROOT\APPLICATION_NAME
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    12
DisableStartupPrompt=Yes
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    13
DisableDirPage=DISABLE_DIR_PAGE
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    14
DisableProgramGroupPage=Yes
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    15
DisableReadyPage=Yes
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    16
DisableFinishedPage=Yes
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    17
DisableWelcomePage=Yes
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    18
DefaultGroupName=APPLICATION_GROUP
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    19
;Optional License
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    20
LicenseFile=APPLICATION_LICENSE_FILE
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    21
;WinXP or above
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    22
MinVersion=0,5.1 
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    23
OutputBaseFilename=INSTALLER_FILE_NAME
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    24
Compression=lzma
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    25
SolidCompression=yes
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    26
PrivilegesRequired=APPLICATION_INSTALL_PRIVILEGE
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    27
SetupIconFile=APPLICATION_NAME\APPLICATION_NAME.ico
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    28
UninstallDisplayIcon={app}\APPLICATION_NAME.ico
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    29
UninstallDisplayName=APPLICATION_NAME
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    30
WizardImageStretch=No
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    31
WizardSmallImageFile=APPLICATION_NAME-setup-icon.bmp   
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    32
ArchitecturesInstallIn64BitMode=ARCHITECTURE_BIT_MODE
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    33
FILE_ASSOCIATIONS
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    34
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    35
[Languages]
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    36
Name: "english"; MessagesFile: "compiler:Default.isl"
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    37
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    38
[Files]
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    39
Source: "APPLICATION_NAME\APPLICATION_NAME.exe"; DestDir: "{app}"; Flags: ignoreversion
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    40
Source: "APPLICATION_NAME\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    41
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    42
[Icons]
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    43
Name: "{group}\APPLICATION_NAME"; Filename: "{app}\APPLICATION_NAME.exe"; IconFilename: "{app}\APPLICATION_NAME.ico"; Check: APPLICATION_MENU_SHORTCUT()
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    44
Name: "{commondesktop}\APPLICATION_NAME"; Filename: "{app}\APPLICATION_NAME.exe";  IconFilename: "{app}\APPLICATION_NAME.ico"; Check: APPLICATION_DESKTOP_SHORTCUT()
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    45
SECONDARY_LAUNCHERS
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    46
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    47
[Run]
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    48
Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-Xappcds:generatecache"; Check: APPLICATION_APP_CDS_INSTALL()
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    49
Filename: "{app}\RUN_FILENAME.exe"; Description: "{cm:LaunchProgram,APPLICATION_NAME}"; Flags: nowait postinstall skipifsilent; Check: APPLICATION_NOT_SERVICE()
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    50
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()
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    51
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    52
[UninstallRun]
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    53
Filename: "{app}\RUN_FILENAME.exe "; Parameters: "-uninstall -svcName APPLICATION_NAME STOP_ON_UNINSTALL"; Check: APPLICATION_SERVICE()
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    54
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    55
[Code]
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    56
function returnTrue(): Boolean;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    57
begin
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    58
  Result := True;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    59
end;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    60
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    61
function returnFalse(): Boolean;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    62
begin
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    63
  Result := False;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    64
end;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    65
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    66
function InitializeSetup(): Boolean;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    67
begin
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    68
// Possible future improvements:
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    69
//   if version less or same => just launch app
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    70
//   if upgrade => check if same app is running and wait for it to exit
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    71
  Result := True;
20568f1e1aa7 JDK-8211282: Support creation of 'exe' installers on Windows.
herrick
parents:
diff changeset
    72
end;