installer/UnitInstall.pas
changeset 411 7c1526f514b3
parent 274 4461dca354a5
child 416 ce19c95e3f93
     1.1 --- a/installer/UnitInstall.pas	Wed Oct 10 08:56:00 2007 +0000
     1.2 +++ b/installer/UnitInstall.pas	Wed Oct 10 21:48:44 2007 +0000
     1.3 @@ -13,11 +13,11 @@
     1.4  procedure AddNotFound;
     1.5  procedure DownloadFile(eFile: String; eDestination: String);
     1.6  
     1.7 -procedure BasicInstallation(ePath: String; SteamInstall, ListenInstall: Boolean; OS: TOS);
     1.8 -procedure InstallDedicated(eModPath: String; UseSteam: Boolean);
     1.9 -procedure InstallListen(ePath: String);
    1.10 -procedure InstallCustom(ePath: String; eOS: TOS);
    1.11 -procedure InstallFTP(OS: TOS);
    1.12 +procedure BasicInstallation(ePath: String; SteamInstall, ListenInstall: Boolean; OS: TOS; const Source: Boolean);
    1.13 +procedure InstallDedicated(eModPath: String; const UseSteam, Source: Boolean);
    1.14 +procedure InstallListen(ePath: String; const Source: Boolean);
    1.15 +procedure InstallCustom(ePath: String; eOS: TOS; const Source: Boolean);
    1.16 +procedure InstallFTP(OS: TOS; const Source: Boolean);
    1.17  
    1.18  var StartTime: TDateTime;
    1.19      SteamPath: String;
    1.20 @@ -218,7 +218,7 @@
    1.21  
    1.22  { Basic Installation }   
    1.23  
    1.24 -procedure BasicInstallation(ePath: String; SteamInstall, ListenInstall: Boolean; OS: TOS);
    1.25 +procedure BasicInstallation(ePath: String; SteamInstall, ListenInstall: Boolean; OS: TOS; const Source: Boolean);
    1.26  var eStr: TStringList;
    1.27      i: integer;
    1.28      CopyConfig: Boolean;
    1.29 @@ -253,7 +253,7 @@
    1.30    { Unpack }
    1.31    frmMain.ggeItem.Progress := 0;
    1.32    AddStatus('Unpacking files...', clBlack);
    1.33 -  if not Unpack() then begin
    1.34 +  if not Unpack(Source) then begin
    1.35      AddStatus('No files attached!', clRed);
    1.36      Screen.Cursor := crDefault;
    1.37      exit;
    1.38 @@ -370,37 +370,37 @@
    1.39  
    1.40  { Dedicated Server }
    1.41  
    1.42 -procedure InstallDedicated(eModPath: String; UseSteam: Boolean);
    1.43 +procedure InstallDedicated(eModPath: String; const UseSteam, Source: Boolean);
    1.44  begin
    1.45    StartTime := Now;
    1.46    Screen.Cursor := crHourGlass;
    1.47    AddStatus('Starting Metamod:Source installation on dedicated server...', clBlack, False);
    1.48 -  BasicInstallation(eModPath, UseSteam, False, osWindows);
    1.49 +  BasicInstallation(eModPath, UseSteam, False, osWindows, Source);
    1.50  end;
    1.51  
    1.52  { Listen Server }
    1.53  
    1.54 -procedure InstallListen(ePath: String);
    1.55 +procedure InstallListen(ePath: String; const Source: Boolean);
    1.56  begin
    1.57    StartTime := Now;
    1.58    Screen.Cursor := crHourGlass;
    1.59    AddStatus('Starting Metamod:Source installation on the listen server...', clBlack);
    1.60 -  BasicInstallation(ePath, True, True, osWindows);
    1.61 +  BasicInstallation(ePath, True, True, osWindows, Source);
    1.62  end;
    1.63  
    1.64  { Custom mod }
    1.65  
    1.66 -procedure InstallCustom(ePath: String; eOS: TOS);
    1.67 +procedure InstallCustom(ePath: String; eOS: TOS; const Source: Boolean);
    1.68  begin
    1.69    StartTime := Now;
    1.70    Screen.Cursor := crHourGlass;
    1.71    AddStatus('Starting Metamod:Source installation...', clBlack);
    1.72 -  BasicInstallation(ePath, False, False, eOS);
    1.73 +  BasicInstallation(ePath, False, False, eOS, Source);
    1.74  end;
    1.75  
    1.76  { FTP }
    1.77  
    1.78 -procedure InstallFTP(OS: TOS);
    1.79 +procedure InstallFTP(OS: TOS; const Source: Boolean);
    1.80  function DoReconnect: Boolean;
    1.81  begin
    1.82    Result := False;
    1.83 @@ -432,7 +432,7 @@
    1.84    { Unpack }
    1.85    frmMain.ggeItem.Progress := 0;
    1.86    AddStatus('Unpacking files...', clBlack);
    1.87 -  if not Unpack() then begin
    1.88 +  if not Unpack(Source) then begin
    1.89      AddStatus('No files attached!', clRed);
    1.90      Screen.Cursor := crDefault;
    1.91      exit;