From 8234977fa9ec2fc9d8e895a5fae78984f0c3432b Mon Sep 17 00:00:00 2001 From: Christian Hammacher Date: Mon, 1 Aug 2005 00:19:25 +0000 Subject: [PATCH] the editor unindents now on pressing }. have fun! - fixed bugs... lalala - updated debug-list - fixed comment-bug - now final edition... - updated captions - fixed configs-bug (configs weren't uploaded during FTP installations) --- installer/installer/UnitInstall.pas | 16 ++++++++++++++-- installer/installer/UnitfrmMain.pas | 18 ++++++++++++++++++ installer/installer/UnitfrmProxy.dfm | Bin 1585 -> 1584 bytes installer/installer/UnitfrmProxy.pas | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/installer/installer/UnitInstall.pas b/installer/installer/UnitInstall.pas index a526cacc..76c38968 100755 --- a/installer/installer/UnitInstall.pas +++ b/installer/installer/UnitInstall.pas @@ -140,7 +140,7 @@ end; procedure UploadFile(eFile: String; eDestination: String; CopyConfig: Boolean = True); var TransferType: TIdFTPTransferType; begin - if Pos('config', eFile) > 0 then exit; + if (Pos('config', eFile) > 0) and (not CopyConfig) then exit; eDestination := StringReplace(eDestination, '\', '/', [rfReplaceAll]); // the same as in DownloadFile() @@ -521,6 +521,7 @@ var eStr: TStringList; i: integer; ePath: String; CurNode: TTreeNode; + CopyConfig: Boolean; begin frmMain.cmdCancel.Show; frmMain.cmdNext.Hide; @@ -548,6 +549,7 @@ begin FileList[i] := Copy(FileList[i], Length(ExtractFilePath(ParamStr(0))) + 6, Length(FileList[i])); // liblist.gam + CopyConfig := True; AddStatus('Editing liblist.gam...', clBlack); eStr := TStringList.Create; eStr.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam'); @@ -567,7 +569,17 @@ begin eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"'); FileSetAttr(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam', 0); eStr.SaveToFile(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam'); + end + else begin + case MessageBox(frmMain.Handle, 'An AMX Mod X installation was already detected. If you choose to reinstall, your configuration files will be erased. Click Yes to continue, No to Upgrade, or Cancel to abort the install.', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNOCANCEL) of + mrNo: CopyConfig := False; + mrCancel: begin + Application.Terminate; + exit; + end; + end; end; + eStr.Free; AddDone; @@ -606,7 +618,7 @@ begin try if LowerCase(FileList[i]) = 'liblist.gam' then frmMain.IdFTP.Site('CHMOD 744 ' + FileList[i]); - UploadFile(ExtractFilePath(ParamStr(0)) + 'temp\' + FileList[i], ePath + FileList[i], True); + UploadFile(ExtractFilePath(ParamStr(0)) + 'temp\' + FileList[i], ePath + FileList[i], CopyConfig); if LowerCase(FileList[i]) = 'liblist.gam' then frmMain.IdFTP.Size('CHMOD 444 ' + FileList[i]); except diff --git a/installer/installer/UnitfrmMain.pas b/installer/installer/UnitfrmMain.pas index ffccda8d..07f8baa7 100755 --- a/installer/installer/UnitfrmMain.pas +++ b/installer/installer/UnitfrmMain.pas @@ -118,6 +118,10 @@ type const AWorkCount: Integer); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure tmrSpeedTimer(Sender: TObject); + procedure trvDirectoriesExpanding(Sender: TObject; Node: TTreeNode; + var AllowExpansion: Boolean); + procedure trvDirectoriesCollapsing(Sender: TObject; Node: TTreeNode; + var AllowCollapse: Boolean); private OldProgress: Integer; CurrProgress: Integer; @@ -719,4 +723,18 @@ begin OldProgress := CurrProgress; end; +procedure TfrmMain.trvDirectoriesExpanding(Sender: TObject; + Node: TTreeNode; var AllowExpansion: Boolean); +begin + Node.ImageIndex := 1; + Node.SelectedIndex := 1; +end; + +procedure TfrmMain.trvDirectoriesCollapsing(Sender: TObject; + Node: TTreeNode; var AllowCollapse: Boolean); +begin + Node.ImageIndex := 0; + Node.SelectedIndex := 0; +end; + end. diff --git a/installer/installer/UnitfrmProxy.dfm b/installer/installer/UnitfrmProxy.dfm index d94620c5f7c734423da5ec6122e0630aad2dfd15..7ba9c06c5cae79c3827a3d1d98e81d212d147e8a 100755 GIT binary patch delta 69 zcmV-L0J{IN46qCk{|W$9Mp8{sQcqY}05A|8u@J2S2?%3tWJ7Fkb7hmq0<{4JvwZ_C b0RaG$s|1w+0+T@ne*puN!3Ast1ONa4&JYsv delta 70 zcmV-M0J;CL46zIl{|W$9Mp8{sQcqY}05A|9u@J2S3JGIvWJ6(YV`XfU#sakg0JD4p cEdc=nld1%j0Rxjj1%CkqlfVUR1O)&90OJD_KmY&$ diff --git a/installer/installer/UnitfrmProxy.pas b/installer/installer/UnitfrmProxy.pas index 46265309..1556226d 100755 --- a/installer/installer/UnitfrmProxy.pas +++ b/installer/installer/UnitfrmProxy.pas @@ -9,7 +9,7 @@ uses type TfrmProxy = class(TForm) - cmdCancel: TFlatButton; + cmdClose: TFlatButton; lblProxy: TLabel; txtHost: TFlatEdit; cboProxy: TFlatComboBox;