Changeset 855 for AE


Ignore:
Timestamp:
May 3, 2013, 3:45:16 PM (6 years ago)
Author:
alloc
Message:

AEI-Setup Win: Added proxy dialog

File:
1 edited

Legend:

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

    r818 r855  
    11#define AppId "{{B67333BB-1CF9-4EFD-A40B-E25B5CB4C8A7}}"
    2 #define AppVersion "1"
     2#define AppVersion "1.1"
    33#define AppLongName "Anniversary Edition of Oni"
    44#define AppShortName "Anniversary-Edition-Setup"
     
    6565
    6666[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
    68 Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; Check: IsJavaInstalled
     67Filename: "{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
     68Filename: "{code:GetJavaPath}\bin\javaw.exe"; WorkingDir: "{app}\AE\AEInstaller"; Parameters: "-Dsun.java2d.d3d=false -jar AEInstaller2Updater.jar"; Flags: runasoriginaluser; Check: IsJavaInstalled; BeforeInstall: WriteProxyData
    6969
    7070
    7171[Code]
    7272var
     73  PageUseProxy: TInputOptionWizardPage;
     74  PageProxyData: TInputQueryWizardPage;
    7375  javaPath: String;
    7476
     
    185187        Components.Checked[i] := true;
    186188      end;
     189
     190  PageUseProxy := CreateInputOptionPage(wpSelectTasks, 'Internet connection type', '', 'Do you require to use a proxy to connect to the internet?', true, false);
     191  PageUseProxy.Add('Direct connection');
     192  PageUseProxy.Add('Use proxy');
     193  PageUseProxy.Values[0] := true;
     194
     195  PageProxyData := CreateInputQueryPage(PageUseProxy.ID, 'Proxy data', '', 'Please enter the data required to connect to your proxy.');
     196  PageProxyData.Add('Hostname or IP:', False);
     197  PageProxyData.Add('Port:', False);
    187198end;
    188199
     
    207218
    208219
     220function EnterProxyData(): Boolean;
     221begin
     222  Result := PageUseProxy.SelectedValueIndex = 1;
     223end;
     224
    209225function ShouldSkipPage(PageID: Integer): Boolean;
    210226begin
    211   Result := PageID = wpSelectComponents;
    212 end;
     227  Result := false;
     228  if (PageID = wpSelectComponents) then
     229    Result := true;
     230  if (PageID = PageProxyData.ID) then
     231    Result := not EnterProxyData();
     232end;
     233
    213234
    214235function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
     
    218239  Result := Result + MemoGroupInfo + NewLine;
    219240  Result := Result + MemoTasksInfo + NewLine;
    220 end;
    221 
     241
     242  if (EnterProxyData()) then
     243    Result := Result + NewLine + 'Set proxy configuration';
     244end;
     245
     246
     247procedure WriteProxyData();
     248begin
     249  if (EnterProxyData()) then
     250  begin
     251    SaveStringToFile(ExpandConstant('{app}') + '\AE\AEInstaller\AEI-ProxySettings.xml',
     252        '<?xml version="1.0" ?><Proxy><useProxy>true</useProxy><hostOrIp>'+PageProxyData.Values[0]+'</hostOrIp><port>'+PageProxyData.Values[1]+'</port></Proxy>',
     253        False);
     254  end;
     255end;
Note: See TracChangeset for help on using the changeset viewer.