mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
some bugfixes and changes for the ftp panel
This commit is contained in:
parent
f6c9263940
commit
c91f712363
Binary file not shown.
@ -104,7 +104,7 @@ begin
|
|||||||
frmMain.IdFTP.DirectoryListing.LoadList(eList);
|
frmMain.IdFTP.DirectoryListing.LoadList(eList);
|
||||||
eList.Clear;
|
eList.Clear;
|
||||||
for i := 0 to frmMain.IdFTP.DirectoryListing.Count -1 do begin
|
for i := 0 to frmMain.IdFTP.DirectoryListing.Count -1 do begin
|
||||||
if frmMain.IdFTP.DirectoryListing.Items[i].ItemType = ditDirectory then
|
if (frmMain.IdFTP.DirectoryListing.Items[i].FileName <> '.') and (frmMain.IdFTP.DirectoryListing.Items[i].FileName <> '..') and (frmMain.IdFTP.DirectoryListing.Items[i].ItemType = ditDirectory) then
|
||||||
eList.Add(frmMain.IdFTP.DirectoryListing.Items[i].FileName);
|
eList.Add(frmMain.IdFTP.DirectoryListing.Items[i].FileName);
|
||||||
end;
|
end;
|
||||||
Result := eList;
|
Result := eList;
|
||||||
|
@ -5984,7 +5984,7 @@ object frmMain: TfrmMain
|
|||||||
Height = 119
|
Height = 119
|
||||||
Pen.Color = clBtnShadow
|
Pen.Color = clBtnShadow
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object lblSelectModNote: TLabel
|
||||||
Left = 134
|
Left = 134
|
||||||
Top = 262
|
Top = 262
|
||||||
Width = 234
|
Width = 234
|
||||||
@ -6094,38 +6094,38 @@ object frmMain: TfrmMain
|
|||||||
OnShow = jspFTPShow
|
OnShow = jspFTPShow
|
||||||
object lblStep1: TLabel
|
object lblStep1: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 60
|
Top = 56
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '1. Set your FTP data'
|
Caption = '1. Set your FTP data'
|
||||||
end
|
end
|
||||||
object lblStep2: TLabel
|
object lblStep2: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 148
|
Top = 254
|
||||||
Width = 244
|
Width = 244
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '2. Connect to server and select the mod directory:'
|
Caption = '4. Connect to server and select the mod directory:'
|
||||||
end
|
end
|
||||||
object lblStep5: TLabel
|
object lblStep4: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 295
|
Top = 214
|
||||||
Width = 64
|
Width = 117
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '5. Click Next.'
|
Caption = '3. Select a game addon:'
|
||||||
end
|
end
|
||||||
object lblStep3: TLabel
|
object lblStep3: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 254
|
Top = 142
|
||||||
Width = 223
|
Width = 223
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '3. Select the operating system of your server:'
|
Caption = '2. Select the operating system of your server:'
|
||||||
end
|
end
|
||||||
object lblStep4: TLabel
|
object lblStep5: TLabel
|
||||||
Left = 288
|
Left = 44
|
||||||
Top = 254
|
Top = 358
|
||||||
Width = 117
|
Width = 64
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '4. Select a game addon:'
|
Caption = '5. Click Next.'
|
||||||
end
|
end
|
||||||
object pnlHeader3: TPanel
|
object pnlHeader3: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -6200,7 +6200,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object pnlFTPData: TPanel
|
object pnlFTPData: TPanel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 76
|
Top = 72
|
||||||
Width = 441
|
Width = 441
|
||||||
Height = 64
|
Height = 64
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
@ -6299,7 +6299,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object cmdConnect: TFlatButton
|
object cmdConnect: TFlatButton
|
||||||
Left = 416
|
Left = 416
|
||||||
Top = 165
|
Top = 269
|
||||||
Width = 71
|
Width = 71
|
||||||
Height = 20
|
Height = 20
|
||||||
ColorFocused = 16245198
|
ColorFocused = 16245198
|
||||||
@ -6313,7 +6313,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object pnlDirectory: TPanel
|
object pnlDirectory: TPanel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 164
|
Top = 270
|
||||||
Width = 367
|
Width = 367
|
||||||
Height = 83
|
Height = 83
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
@ -6334,44 +6334,10 @@ object frmMain: TfrmMain
|
|||||||
OnExpanded = trvDirectoriesExpanded
|
OnExpanded = trvDirectoriesExpanded
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pnlOS: TPanel
|
|
||||||
Left = 44
|
|
||||||
Top = 270
|
|
||||||
Width = 237
|
|
||||||
Height = 21
|
|
||||||
BevelOuter = bvLowered
|
|
||||||
TabOrder = 4
|
|
||||||
object optWindows: TFlatRadioButton
|
|
||||||
Left = 1
|
|
||||||
Top = 3
|
|
||||||
Width = 62
|
|
||||||
Height = 14
|
|
||||||
Caption = 'Windows'
|
|
||||||
Checked = True
|
|
||||||
TabOrder = 0
|
|
||||||
TabStop = True
|
|
||||||
end
|
|
||||||
object optLinux32: TFlatRadioButton
|
|
||||||
Left = 67
|
|
||||||
Top = 3
|
|
||||||
Width = 84
|
|
||||||
Height = 14
|
|
||||||
Caption = 'Linux (32-bit)'
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object optLinux64: TFlatRadioButton
|
|
||||||
Left = 153
|
|
||||||
Top = 3
|
|
||||||
Width = 82
|
|
||||||
Height = 14
|
|
||||||
Caption = 'Linux (64-bit)'
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object cboGameAddon: TFlatComboBox
|
object cboGameAddon: TFlatComboBox
|
||||||
Left = 286
|
Left = 44
|
||||||
Top = 270
|
Top = 230
|
||||||
Width = 125
|
Width = 443
|
||||||
Height = 21
|
Height = 21
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
Color = clWindow
|
Color = clWindow
|
||||||
@ -6385,10 +6351,62 @@ object frmMain: TfrmMain
|
|||||||
'The Specialists'
|
'The Specialists'
|
||||||
'Condition Zero'
|
'Condition Zero'
|
||||||
'Earth'#39's Special Forces')
|
'Earth'#39's Special Forces')
|
||||||
TabOrder = 5
|
TabOrder = 4
|
||||||
Text = 'None'
|
Text = 'None'
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
end
|
end
|
||||||
|
object pnlOS: TPanel
|
||||||
|
Left = 44
|
||||||
|
Top = 158
|
||||||
|
Width = 441
|
||||||
|
Height = 50
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 5
|
||||||
|
object lblOSNote: TLabel
|
||||||
|
Left = 4
|
||||||
|
Top = 24
|
||||||
|
Width = 435
|
||||||
|
Height = 22
|
||||||
|
Caption =
|
||||||
|
'Note: Most linux servers run on a 32-bit platform. If you are no' +
|
||||||
|
't sure what platform your server is using, you can still ask you' +
|
||||||
|
'r provider for further information about this topic.'
|
||||||
|
Enabled = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -9
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object optWindows: TFlatRadioButton
|
||||||
|
Left = 5
|
||||||
|
Top = 5
|
||||||
|
Width = 62
|
||||||
|
Height = 14
|
||||||
|
Caption = 'Windows'
|
||||||
|
Checked = True
|
||||||
|
TabOrder = 0
|
||||||
|
TabStop = True
|
||||||
|
end
|
||||||
|
object optLinux32: TFlatRadioButton
|
||||||
|
Left = 171
|
||||||
|
Top = 5
|
||||||
|
Width = 84
|
||||||
|
Height = 14
|
||||||
|
Caption = 'Linux (32-bit)'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object optLinux64: TFlatRadioButton
|
||||||
|
Left = 353
|
||||||
|
Top = 5
|
||||||
|
Width = 82
|
||||||
|
Height = 14
|
||||||
|
Caption = 'Linux (64-bit)'
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object jspInstallProgress: TJvStandardPage
|
object jspInstallProgress: TJvStandardPage
|
||||||
Left = 0
|
Left = 0
|
||||||
|
@ -57,7 +57,6 @@ type
|
|||||||
cmdConnect: TFlatButton;
|
cmdConnect: TFlatButton;
|
||||||
pnlDirectory: TPanel;
|
pnlDirectory: TPanel;
|
||||||
trvDirectories: TTreeView;
|
trvDirectories: TTreeView;
|
||||||
lblStep5: TLabel;
|
|
||||||
jspInstallProgress: TJvStandardPage;
|
jspInstallProgress: TJvStandardPage;
|
||||||
pnlHeader5: TPanel;
|
pnlHeader5: TPanel;
|
||||||
imgIcon5: TImage;
|
imgIcon5: TImage;
|
||||||
@ -82,11 +81,6 @@ type
|
|||||||
bvlSelectMod: TBevel;
|
bvlSelectMod: TBevel;
|
||||||
lblInfo: TLabel;
|
lblInfo: TLabel;
|
||||||
chkPassive: TFlatCheckBox;
|
chkPassive: TFlatCheckBox;
|
||||||
lblStep3: TLabel;
|
|
||||||
pnlOS: TPanel;
|
|
||||||
optWindows: TFlatRadioButton;
|
|
||||||
optLinux32: TFlatRadioButton;
|
|
||||||
optLinux64: TFlatRadioButton;
|
|
||||||
IdFTP: TIdFTP;
|
IdFTP: TIdFTP;
|
||||||
cmdProxySettings: TFlatButton;
|
cmdProxySettings: TFlatButton;
|
||||||
IdAntiFreeze: TIdAntiFreeze;
|
IdAntiFreeze: TIdAntiFreeze;
|
||||||
@ -109,7 +103,14 @@ type
|
|||||||
frbStandaloneServer: TFlatRadioButton;
|
frbStandaloneServer: TFlatRadioButton;
|
||||||
frbSelectMod: TFlatRadioButton;
|
frbSelectMod: TFlatRadioButton;
|
||||||
Shape1: TShape;
|
Shape1: TShape;
|
||||||
Label1: TLabel;
|
lblSelectModNote: TLabel;
|
||||||
|
lblStep3: TLabel;
|
||||||
|
pnlOS: TPanel;
|
||||||
|
optWindows: TFlatRadioButton;
|
||||||
|
optLinux32: TFlatRadioButton;
|
||||||
|
optLinux64: TFlatRadioButton;
|
||||||
|
lblOSNote: TLabel;
|
||||||
|
lblStep5: TLabel;
|
||||||
procedure jvwStepsCancelButtonClick(Sender: TObject);
|
procedure jvwStepsCancelButtonClick(Sender: TObject);
|
||||||
procedure cmdCancelClick(Sender: TObject);
|
procedure cmdCancelClick(Sender: TObject);
|
||||||
procedure cmdNextClick(Sender: TObject);
|
procedure cmdNextClick(Sender: TObject);
|
||||||
@ -198,8 +199,15 @@ var ePath: String;
|
|||||||
i, k: integer;
|
i, k: integer;
|
||||||
begin
|
begin
|
||||||
if jplWizard.ActivePage = jspFTP then begin
|
if jplWizard.ActivePage = jspFTP then begin
|
||||||
|
Screen.Cursor := crHourGlass;
|
||||||
|
try
|
||||||
if not IdFTP.Connected then
|
if not IdFTP.Connected then
|
||||||
IdFTP.Connect;
|
IdFTP.Connect;
|
||||||
|
except
|
||||||
|
MessageBox(Handle, 'Cannot connect to server. Please check your connection and try again.', 'Error', MB_ICONWARNING);
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
{ FTP }
|
{ FTP }
|
||||||
eStr := TStringList.Create;
|
eStr := TStringList.Create;
|
||||||
@ -209,7 +217,14 @@ begin
|
|||||||
ePath := '/' + CurNode.Text + ePath;
|
ePath := '/' + CurNode.Text + ePath;
|
||||||
CurNode := CurNode.Parent;
|
CurNode := CurNode.Parent;
|
||||||
until (not Assigned(CurNode));
|
until (not Assigned(CurNode));
|
||||||
|
|
||||||
|
try
|
||||||
IdFTP.ChangeDir(ePath);
|
IdFTP.ChangeDir(ePath);
|
||||||
|
except
|
||||||
|
MessageBox(Handle, PChar('Cannot change directory to "' + ePath + '". Please check your settings and try again.'), 'Error', MB_ICONWARNING);
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
try
|
try
|
||||||
IdFTP.List(eStr, '', False);
|
IdFTP.List(eStr, '', False);
|
||||||
@ -236,7 +251,6 @@ begin
|
|||||||
DelDir(ExtractFilePath(ParamStr(0)) + 'temp');
|
DelDir(ExtractFilePath(ParamStr(0)) + 'temp');
|
||||||
MakeDir(ExtractFilePath(ParamStr(0)) + 'temp');
|
MakeDir(ExtractFilePath(ParamStr(0)) + 'temp');
|
||||||
DownloadFile('liblist.gam', ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam');
|
DownloadFile('liblist.gam', ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam');
|
||||||
Screen.Cursor := crHourGlass;
|
|
||||||
ChosenMod := modNone;
|
ChosenMod := modNone;
|
||||||
case cboGameAddon.ItemIndex of
|
case cboGameAddon.ItemIndex of
|
||||||
1: ChosenMod := modCS;
|
1: ChosenMod := modCS;
|
||||||
@ -256,6 +270,7 @@ begin
|
|||||||
eOS := osLinux64;
|
eOS := osLinux64;
|
||||||
|
|
||||||
jspInstallProgress.Show;
|
jspInstallProgress.Show;
|
||||||
|
frmMain.Height := 382;
|
||||||
rtfDetails.Lines.Text := 'Starting Pre-Installation, this may take a few minutes...';
|
rtfDetails.Lines.Text := 'Starting Pre-Installation, this may take a few minutes...';
|
||||||
rtfDetails.Lines.Add('');
|
rtfDetails.Lines.Add('');
|
||||||
Sleep(1500);
|
Sleep(1500);
|
||||||
@ -545,6 +560,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if frbFTP.Checked then begin // FTP
|
else if frbFTP.Checked then begin // FTP
|
||||||
|
frmMain.Height := 445;
|
||||||
jspFTP.Show;
|
jspFTP.Show;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -557,8 +573,10 @@ end;
|
|||||||
|
|
||||||
procedure TfrmMain.cmdBackClick(Sender: TObject);
|
procedure TfrmMain.cmdBackClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if jplWizard.ActivePage = jspFTP then
|
if jplWizard.ActivePage = jspFTP then begin
|
||||||
jspInstallMethod.Show
|
frmMain.Height := 382;
|
||||||
|
jspInstallMethod.Show;
|
||||||
|
end
|
||||||
else begin
|
else begin
|
||||||
jplWizard.PrevPage;
|
jplWizard.PrevPage;
|
||||||
cmdBack.Visible := jplWizard.ActivePageIndex <> 0;
|
cmdBack.Visible := jplWizard.ActivePageIndex <> 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user