Changeset 1015
- Timestamp:
- Mar 23, 2015, 4:48:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/Setup/Windows/AEI.iss
r855 r1015 1 1 #define AppId "{{B67333BB-1CF9-4EFD-A40B-E25B5CB4C8A7}}" 2 #define AppVersion "1. 1"2 #define AppVersion "1.2" 3 3 #define AppLongName "Anniversary Edition of Oni" 4 4 #define AppShortName "Anniversary-Edition-Setup" … … 42 42 Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 43 43 44 [Components]45 Name: "JRE"; Description: "JRE"46 Name: "AEI"; Description: "AEI"47 48 44 [Dirs] 49 45 Name: "{app}\AE"; Permissions: users-modify 50 46 51 47 [Files] 52 Source: "AEInstaller2Updater.jar"; DestDir: "{app}\AE\AEInstaller" ; Components: AEI53 Source: "JRE\*"; DestDir: "{app}\AE\AEInstaller\JRE"; Excludes: ".svn"; Flags: createallsubdirs recursesubdirs onlyifdoesntexist ; Components: JRE54 Source: "AElogo.ico"; DestDir: "{app}\AE\AEInstaller" ; Components: AEI48 Source: "AEInstaller2Updater.jar"; DestDir: "{app}\AE\AEInstaller" 49 Source: "JRE\*"; DestDir: "{app}\AE\AEInstaller\JRE"; Excludes: ".svn"; Flags: createallsubdirs recursesubdirs onlyifdoesntexist 50 Source: "AElogo.ico"; DestDir: "{app}\AE\AEInstaller" 55 51 56 52 [Icons] 57 Name: "{app}\AE\AEInstaller2"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar"; Check: not IsJavaInstalled 58 Name: "{app}\AE\AEInstaller2Updater"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Check: not IsJavaInstalled 59 Name: "{group}\AEInstaller 2"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar"; Check: not IsJavaInstalled 60 Name: "{commondesktop}\AEInstaller 2"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar"; Tasks: desktopicon; Check: not IsJavaInstalled 61 Name: "{app}\AE\AEInstaller2"; Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar"; Check: IsJavaInstalled 62 Name: "{app}\AE\AEInstaller2Updater"; Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Check: IsJavaInstalled 63 Name: "{group}\AEInstaller 2"; Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar"; Check: IsJavaInstalled 64 Name: "{commondesktop}\AEInstaller 2"; Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar"; Tasks: desktopicon; Check: IsJavaInstalled 53 Name: "{app}\AE\AEInstaller2"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar" 54 Name: "{app}\AE\AEInstaller2Updater"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar" 55 Name: "{group}\AEInstaller 2"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar" 56 Name: "{commondesktop}\AEInstaller 2"; Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; IconFilename: "{app}\AE\AEInstaller\AElogo.ico"; Parameters: "-Dsun.java2d.d3d=false -jar bin\AEInstaller2.jar"; Tasks: desktopicon 65 57 66 58 [Run] 67 Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; Check: not IsJavaInstalled; BeforeInstall: WriteProxyData 68 Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; Check: IsJavaInstalled; BeforeInstall: WriteProxyData 59 Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; BeforeInstall: WriteProxyData 69 60 70 61 … … 73 64 PageUseProxy: TInputOptionWizardPage; 74 65 PageProxyData: TInputQueryWizardPage; 75 javaPath: String;76 66 77 procedure DecodeVersion (verstr: String; var verint: array of Integer);78 var79 i,p: Integer; s: string;80 begin81 // initialize array82 verint := [0,0,0,0];83 i := 0;84 while ((Length(verstr) > 0) and (i < 4)) do85 begin86 p := pos ('.', verstr);87 if p > 0 then88 begin89 if p = 1 then s:= '0' else s:= Copy (verstr, 1, p - 1);90 verint[i] := StrToInt(s);91 i := i + 1;92 verstr := Copy (verstr, p+1, Length(verstr));93 end94 else95 begin96 verint[i] := StrToInt (verstr);97 verstr := '';98 end;99 end;100 101 end;102 103 function CompareVersion (ver1, ver2: String) : Integer;104 var105 verint1, verint2: array of Integer;106 i: integer;107 begin108 SetArrayLength (verint1, 4);109 DecodeVersion (ver1, verint1);110 111 SetArrayLength (verint2, 4);112 DecodeVersion (ver2, verint2);113 114 Result := 0; i := 0;115 while ((Result = 0) and ( i < 4 )) do116 begin117 if verint1[i] > verint2[i] then118 Result := 1119 else120 if verint1[i] < verint2[i] then121 Result := -1;122 i := i + 1;123 end;124 125 end;126 127 procedure CheckJavaRuntime();128 var129 W6432: Boolean;130 Res: Boolean;131 JavaVer: String;132 begin133 W6432 := False;134 Res := RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', JavaVer);135 if (Res = False) and IsWin64() then136 begin137 Res := RegQueryStringValue(HKLM32, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', JavaVer);138 W6432 := Res;139 end;140 if Res = True then141 begin142 if Length( JavaVer ) > 0 then143 begin144 if CompareVersion(JavaVer, '{#MinJavaVersion}') >= 0 then145 begin146 if W6432 then147 Res := RegQueryStringValue(HKLM32, 'SOFTWARE\JavaSoft\Java Runtime Environment\'+JavaVer, 'JavaHome', javaPath)148 else149 Res := RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment\'+JavaVer, 'JavaHome', javaPath);150 end;151 end;152 end;153 end;154 155 function IsJavaInstalled(): Boolean;156 begin157 Result := Length(javaPath) > 0;158 end;159 160 function GetJavaPath(Param: String): String;161 begin162 Result := javaPath;163 end;164 165 function InitializeSetup(): Boolean;166 begin167 CheckJavaRuntime();168 Result := True;169 end;170 67 171 68 procedure InitializeWizard(); 172 var173 Components : TNewCheckListbox;174 i : integer;175 69 begin 176 Components := WizardForm.ComponentsList; 177 i := Components.Items.IndexOf('JRE'); 178 if i <> -1 then 179 begin 180 Components.ItemEnabled[i] := false; 181 Components.Checked[i] := not IsJavaInstalled(); 182 end; 183 i := Components.Items.IndexOf('AEI'); 184 if i <> -1 then 185 begin 186 Components.ItemEnabled[i] := false; 187 Components.Checked[i] := true; 188 end; 189 190 PageUseProxy := CreateInputOptionPage(wpSelectTasks, 'Internet connection type', '', 'Do you require to use a proxy to connect to the internet?', true, false); 70 PageUseProxy := CreateInputOptionPage(wpSelectTasks, 'Internet connection type', '', 'Do you require a proxy to connect to the internet?', true, false); 191 71 PageUseProxy.Add('Direct connection'); 192 72 PageUseProxy.Add('Use proxy'); … … 226 106 begin 227 107 Result := false; 228 if (PageID = wpSelectComponents) then229 Result := true;230 108 if (PageID = PageProxyData.ID) then 231 109 Result := not EnterProxyData();
Note:
See TracChangeset
for help on using the changeset viewer.