--- AE/Setup/Windows/AEI.iss 2013/04/13 23:31:58 818 +++ AE/Setup/Windows/AEI.iss 2013/05/03 13:45:16 855 @@ -1,5 +1,5 @@ #define AppId "{{B67333BB-1CF9-4EFD-A40B-E25B5CB4C8A7}}" -#define AppVersion "1" +#define AppVersion "1.1" #define AppLongName "Anniversary Edition of Oni" #define AppShortName "Anniversary-Edition-Setup" @@ -64,12 +64,14 @@ Name: "{group}\AEInstaller 2"; Filename: 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 [Run] -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 -Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; Check: IsJavaInstalled +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 +Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; Check: IsJavaInstalled; BeforeInstall: WriteProxyData [Code] var + PageUseProxy: TInputOptionWizardPage; + PageProxyData: TInputQueryWizardPage; javaPath: String; procedure DecodeVersion (verstr: String; var verint: array of Integer); @@ -184,6 +186,15 @@ begin Components.ItemEnabled[i] := false; Components.Checked[i] := true; end; + + PageUseProxy := CreateInputOptionPage(wpSelectTasks, 'Internet connection type', '', 'Do you require to use a proxy to connect to the internet?', true, false); + PageUseProxy.Add('Direct connection'); + PageUseProxy.Add('Use proxy'); + PageUseProxy.Values[0] := true; + + PageProxyData := CreateInputQueryPage(PageUseProxy.ID, 'Proxy data', '', 'Please enter the data required to connect to your proxy.'); + PageProxyData.Add('Hostname or IP:', False); + PageProxyData.Add('Port:', False); end; function DirOk(Path: String): boolean; @@ -206,16 +217,39 @@ begin end; +function EnterProxyData(): Boolean; +begin + Result := PageUseProxy.SelectedValueIndex = 1; +end; + function ShouldSkipPage(PageID: Integer): Boolean; begin - Result := PageID = wpSelectComponents; + Result := false; + if (PageID = wpSelectComponents) then + Result := true; + if (PageID = PageProxyData.ID) then + Result := not EnterProxyData(); end; + function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String; begin Result := MemoUserInfoInfo + NewLine; Result := Result + MemoDirInfo + NewLine; Result := Result + MemoGroupInfo + NewLine; Result := Result + MemoTasksInfo + NewLine; + + if (EnterProxyData()) then + Result := Result + NewLine + 'Set proxy configuration'; end; + +procedure WriteProxyData(); +begin + if (EnterProxyData()) then + begin + SaveStringToFile(ExpandConstant('{app}') + '\AE\AEInstaller\AEI-ProxySettings.xml', + 'true'+PageProxyData.Values[0]+''+PageProxyData.Values[1]+'', + False); + end; +end;