diff --git a/installer/installer/AMXInstaller.exe b/installer/installer/AMXInstaller.exe index 2bfc7207..ba1e6945 100755 Binary files a/installer/installer/AMXInstaller.exe and b/installer/installer/AMXInstaller.exe differ diff --git a/installer/installer/UnitInstall.pas b/installer/installer/UnitInstall.pas index efa41813..f3f302ea 100755 --- a/installer/installer/UnitInstall.pas +++ b/installer/installer/UnitInstall.pas @@ -3,7 +3,7 @@ unit UnitInstall; interface uses SysUtils, Classes, Windows, Graphics, Forms, ShellAPI, Controls, Messages, - TlHelp32, IdFTPCommon, ComCtrls, JclFileUtils; + TlHelp32, IdFTPCommon, ComCtrls, JclFileUtils, Dialogs; type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF); type TOS = (osWindows, osLinux32, osLinux64); @@ -500,15 +500,15 @@ begin if (FileExists(ePath + 'addons\metamod\plugins.ini')) then begin eStr.LoadFromFile(ePath + 'addons\metamod\plugins.ini'); if OS = osWindows then begin - if (Pos(eStr.Text, 'addons\amxmodx\dlls\amxmodx_mm.dll') <> 0) then + if (Pos('addons\amxmodx\dlls\amxmodx_mm.dll', eStr.Text) <> 0) then UpdatePluginsIni := False; end else if OS = osLinux32 then begin - if (Pos(eStr.Text, 'addons/amxmodx/dlls/amxmodx_mm_i386.so') <> 0) then + if (Pos('addons/amxmodx/dlls/amxmodx_mm_i386.so', eStr.Text) <> 0) then UpdatePluginsIni := False; end else begin - if (Pos(eStr.Text, 'addons/amxmodx/dlls/amxmodx_mm_amd64.so') <> 0) then + if (Pos('addons/amxmodx/dlls/amxmodx_mm_amd64.so', eStr.Text) <> 0) then UpdatePluginsIni := False; end; end @@ -804,8 +804,9 @@ begin frmMain.ggeItem.Progress := 0; end; AddStatus('', clBlack, False); - AddStatus('Cleaning installation...', clBlack, False); - DelTree(ExtractFilePath(ParamStr(0)) + 'temp'); + AddStatus('Cleaning up installation...', clBlack, False); + if (DirectoryExists(ExtractFilePath(ParamStr(0)) + 'temp')) then + DelTree(ExtractFilePath(ParamStr(0)) + 'temp'); AddDone; frmMain.ggeAll.Progress := frmMain.ggeAll.MaxValue; diff --git a/installer/installer/UnitfrmMain.dfm b/installer/installer/UnitfrmMain.dfm index 5d275785..568ba23f 100755 --- a/installer/installer/UnitfrmMain.dfm +++ b/installer/installer/UnitfrmMain.dfm @@ -6433,6 +6433,8 @@ object frmMain: TfrmMain Width = 509 Height = 24 AdvColorBorder = 0 + Color = clBtnFace + ColorBorder = 8623776 Progress = 0 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -6455,6 +6457,8 @@ object frmMain: TfrmMain Width = 509 Height = 24 AdvColorBorder = 0 + Color = clBtnFace + ColorBorder = 8623776 Progress = 0 Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText diff --git a/installer/installer/UnitfrmMain.pas b/installer/installer/UnitfrmMain.pas index 4f517931..c4692e37 100755 --- a/installer/installer/UnitfrmMain.pas +++ b/installer/installer/UnitfrmMain.pas @@ -763,6 +763,7 @@ begin rtfDetails.Clear; end; + // delete files, then directories if (DirectoryExists(ExtractFilePath(ParamStr(0)) + 'temp')) then DelTree(ExtractFilePath(ParamStr(0)) + 'temp'); end; @@ -874,9 +875,14 @@ begin if IdFTP.Connected then IdFTP.Quit; end - else + else begin Action := caNone; + exit; + end; end; + + if (DirectoryExists(ExtractFilePath(ParamStr(0)) + 'temp')) then + DelTree(ExtractFilePath(ParamStr(0)) + 'temp'); end; procedure TfrmMain.ExceptionHandler(Sender: TObject; E: Exception);