diff --git a/installer/installer/AMXInstaller.exe b/installer/installer/AMXInstaller.exe index e6b25f98..32696c5f 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 5fe92cbf..31c01de2 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, Dialogs; + TlHelp32, IdFTPCommon, ComCtrls, Dialogs, JclFileUtils; type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF); type TOS = (osWindows, osLinux32, osLinux64); @@ -614,11 +614,13 @@ begin ePath := '/'; CurNode := frmMain.trvDirectories.Selected; - repeat - ePath := '/' + CurNode.Text + ePath; - CurNode := CurNode.Parent; - until (not Assigned(CurNode)); - + if (Assigned(CurNode)) then begin + repeat + ePath := '/' + CurNode.Text + ePath; + CurNode := CurNode.Parent; + until (not Assigned(CurNode)); + end; + Screen.Cursor := crAppStart; frmMain.cmdCancel.Show; frmMain.cmdCancel.Caption := '&Cancel'; diff --git a/installer/installer/UnitfrmMain.dfm b/installer/installer/UnitfrmMain.dfm index 568ba23f..fb2ae1bd 100755 --- a/installer/installer/UnitfrmMain.dfm +++ b/installer/installer/UnitfrmMain.dfm @@ -6340,11 +6340,12 @@ object frmMain: TfrmMain BorderStyle = bsNone Images = ilImages Indent = 19 + ReadOnly = True TabOrder = 0 - OnChange = trvDirectoriesChange OnCollapsing = trvDirectoriesCollapsing OnExpanding = trvDirectoriesExpanding OnExpanded = trvDirectoriesExpanded + OnMouseDown = trvDirectoriesMouseDown end end object cboGameAddon: TFlatComboBox @@ -6769,6 +6770,7 @@ object frmMain: TfrmMain object IdFTP: TIdFTP Intercept = IdLogFile MaxLineAction = maException + ReadTimeout = 0 RecvBufferSize = 1024 SendBufferSize = 1024 OnWork = IdFTPWork diff --git a/installer/installer/UnitfrmMain.pas b/installer/installer/UnitfrmMain.pas index 8ebac3b2..7f7de995 100755 --- a/installer/installer/UnitfrmMain.pas +++ b/installer/installer/UnitfrmMain.pas @@ -123,7 +123,6 @@ type procedure cmdProxySettingsClick(Sender: TObject); procedure txtPortChange(Sender: TObject); procedure trvDirectoriesExpanded(Sender: TObject; Node: TTreeNode); - procedure trvDirectoriesChange(Sender: TObject; Node: TTreeNode); procedure FormDestroy(Sender: TObject); procedure IdFTPWork(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer); @@ -137,6 +136,8 @@ type procedure frbFTPClick(Sender: TObject); procedure frbLocalClick(Sender: TObject); procedure trvModsClick(Sender: TObject); + procedure trvDirectoriesMouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); private OldProgress: Integer; CurrProgress: Integer; @@ -214,11 +215,13 @@ begin eStr := TStringList.Create; ePath := '/'; CurNode := trvDirectories.Selected; - repeat - ePath := '/' + CurNode.Text + ePath; - CurNode := CurNode.Parent; - until (not Assigned(CurNode)); - + if (Assigned(CurNode)) then begin + repeat + ePath := '/' + CurNode.Text + ePath; + CurNode := CurNode.Parent; + until (not Assigned(CurNode)); + end; + try IdFTP.ChangeDir(ePath); except @@ -236,6 +239,7 @@ begin if eStr.IndexOf('liblist.gam') = -1 then begin MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING); eStr.Free; + Screen.Cursor := crDefault; exit; end else @@ -639,6 +643,7 @@ begin cmdConnect.Enabled := True; cmdConnect.Caption := 'Disconnect'; cmdCancel.Caption := '&Close'; + cmdNext.Enabled := True; CurNode := nil; if eStr.Count <> 0 then begin @@ -816,10 +821,12 @@ begin // get complete path ePath := '/'; CurNode := Node; - repeat - ePath := '/' + CurNode.Text + ePath; - CurNode := CurNode.Parent; - until (not Assigned(CurNode)); + if (Assigned(CurNode)) then begin + repeat + ePath := '/' + CurNode.Text + ePath; + CurNode := CurNode.Parent; + until (not Assigned(CurNode)); + end; // change dir and add directories in it try Repaint; @@ -838,11 +845,6 @@ begin end; end; -procedure TfrmMain.trvDirectoriesChange(Sender: TObject; Node: TTreeNode); -begin - cmdNext.Enabled := Assigned(trvDirectories.Selected); -end; - procedure TfrmMain.FormDestroy(Sender: TObject); begin FileList.Free; @@ -936,4 +938,15 @@ begin cmdNext.Enabled := (Assigned(trvMods.Selected)); end; +procedure TfrmMain.trvDirectoriesMouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var Node: TTreeNode; +begin + Node := trvDirectories.GetNodeAt(X, Y); + if (Assigned(Node)) then begin + if (Node.DisplayRect(True).Right < X) then + trvDirectories.Selected := nil; + end; +end; + end.