Changeset 1015 for AE


Ignore:
Timestamp:
Mar 23, 2015, 4:48:06 PM (10 years ago)
Author:
alloc
Message:

AEI2-Setup Win 1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • AE/Setup/Windows/AEI.iss

    r855 r1015  
    11#define AppId "{{B67333BB-1CF9-4EFD-A40B-E25B5CB4C8A7}}"
    2 #define AppVersion "1.1"
     2#define AppVersion "1.2"
    33#define AppLongName "Anniversary Edition of Oni"
    44#define AppShortName "Anniversary-Edition-Setup"
     
    4242Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    4343
    44 [Components]
    45 Name: "JRE"; Description: "JRE"
    46 Name: "AEI"; Description: "AEI"
    47 
    4844[Dirs]
    4945Name: "{app}\AE"; Permissions: users-modify
    5046 
    5147[Files]
    52 Source: "AEInstaller2Updater.jar"; DestDir: "{app}\AE\AEInstaller"; Components: AEI
    53 Source: "JRE\*"; DestDir: "{app}\AE\AEInstaller\JRE"; Excludes: ".svn"; Flags: createallsubdirs recursesubdirs onlyifdoesntexist; Components: JRE
    54 Source: "AElogo.ico"; DestDir: "{app}\AE\AEInstaller"; Components: AEI
     48Source: "AEInstaller2Updater.jar"; DestDir: "{app}\AE\AEInstaller"
     49Source: "JRE\*"; DestDir: "{app}\AE\AEInstaller\JRE"; Excludes: ".svn"; Flags: createallsubdirs recursesubdirs onlyifdoesntexist
     50Source: "AElogo.ico"; DestDir: "{app}\AE\AEInstaller"
    5551
    5652[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
     53Name: "{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"
     54Name: "{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"
     55Name: "{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"
     56Name: "{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
    6557
    6658[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
     59Filename: "{app}\AE\AEInstaller\JRE\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; BeforeInstall: WriteProxyData
    6960
    7061
     
    7364  PageUseProxy: TInputOptionWizardPage;
    7465  PageProxyData: TInputQueryWizardPage;
    75   javaPath: String;
    7666
    77 procedure DecodeVersion (verstr: String; var verint: array of Integer);
    78 var
    79   i,p: Integer; s: string;
    80 begin
    81   // initialize array
    82   verint := [0,0,0,0];
    83   i := 0;
    84   while ((Length(verstr) > 0) and (i < 4)) do
    85   begin
    86     p := pos ('.', verstr);
    87     if p > 0 then
    88     begin
    89       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     end
    94     else
    95     begin
    96       verint[i] := StrToInt (verstr);
    97       verstr := '';
    98     end;
    99   end;
    100 
    101 end;
    102 
    103 function CompareVersion (ver1, ver2: String) : Integer;
    104 var
    105   verint1, verint2: array of Integer;
    106   i: integer;
    107 begin
    108   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 )) do
    116   begin
    117     if verint1[i] > verint2[i] then
    118       Result := 1
    119     else
    120       if verint1[i] < verint2[i] then
    121         Result := -1;
    122     i := i + 1;
    123   end;
    124 
    125 end;
    126 
    127 procedure CheckJavaRuntime();
    128 var
    129   W6432: Boolean;
    130   Res: Boolean;
    131   JavaVer: String;
    132 begin
    133   W6432 := False;
    134   Res := RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', JavaVer);
    135   if (Res = False) and IsWin64() then
    136   begin
    137     Res := RegQueryStringValue(HKLM32, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', JavaVer);
    138     W6432 := Res;
    139   end;
    140   if Res = True then
    141   begin
    142     if Length( JavaVer ) > 0 then
    143     begin
    144         if CompareVersion(JavaVer, '{#MinJavaVersion}') >= 0 then
    145         begin
    146         if W6432 then
    147           Res := RegQueryStringValue(HKLM32, 'SOFTWARE\JavaSoft\Java Runtime Environment\'+JavaVer, 'JavaHome', javaPath)
    148         else
    149           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 begin
    157   Result := Length(javaPath) > 0;
    158 end;
    159 
    160 function GetJavaPath(Param: String): String;
    161 begin
    162   Result := javaPath;
    163 end;
    164 
    165 function InitializeSetup(): Boolean;
    166 begin
    167   CheckJavaRuntime();
    168   Result := True;
    169 end;
    17067
    17168procedure InitializeWizard();
    172 var
    173   Components : TNewCheckListbox;
    174   i : integer;
    17569begin
    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);
    19171  PageUseProxy.Add('Direct connection');
    19272  PageUseProxy.Add('Use proxy');
     
    226106begin
    227107  Result := false;
    228   if (PageID = wpSelectComponents) then
    229     Result := true;
    230108  if (PageID = PageProxyData.ID) then
    231109    Result := not EnterProxyData();
Note: See TracChangeset for help on using the changeset viewer.