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)
This commit is contained in:
Christian Hammacher 2005-08-01 00:19:25 +00:00
parent 13ed6ed2d6
commit 8234977fa9
4 changed files with 33 additions and 3 deletions

View File

@ -140,7 +140,7 @@ end;
procedure UploadFile(eFile: String; eDestination: String; CopyConfig: Boolean = True); procedure UploadFile(eFile: String; eDestination: String; CopyConfig: Boolean = True);
var TransferType: TIdFTPTransferType; var TransferType: TIdFTPTransferType;
begin begin
if Pos('config', eFile) > 0 then exit; if (Pos('config', eFile) > 0) and (not CopyConfig) then exit;
eDestination := StringReplace(eDestination, '\', '/', [rfReplaceAll]); eDestination := StringReplace(eDestination, '\', '/', [rfReplaceAll]);
// the same as in DownloadFile() // the same as in DownloadFile()
@ -521,6 +521,7 @@ var eStr: TStringList;
i: integer; i: integer;
ePath: String; ePath: String;
CurNode: TTreeNode; CurNode: TTreeNode;
CopyConfig: Boolean;
begin begin
frmMain.cmdCancel.Show; frmMain.cmdCancel.Show;
frmMain.cmdNext.Hide; frmMain.cmdNext.Hide;
@ -548,6 +549,7 @@ begin
FileList[i] := Copy(FileList[i], Length(ExtractFilePath(ParamStr(0))) + 6, Length(FileList[i])); FileList[i] := Copy(FileList[i], Length(ExtractFilePath(ParamStr(0))) + 6, Length(FileList[i]));
// liblist.gam // liblist.gam
CopyConfig := True;
AddStatus('Editing liblist.gam...', clBlack); AddStatus('Editing liblist.gam...', clBlack);
eStr := TStringList.Create; eStr := TStringList.Create;
eStr.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam'); eStr.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam');
@ -567,7 +569,17 @@ begin
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"'); eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"');
FileSetAttr(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam', 0); FileSetAttr(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam', 0);
eStr.SaveToFile(ExtractFilePath(ParamStr(0)) + 'temp\liblist.gam'); 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; end;
eStr.Free; eStr.Free;
AddDone; AddDone;
@ -606,7 +618,7 @@ begin
try try
if LowerCase(FileList[i]) = 'liblist.gam' then if LowerCase(FileList[i]) = 'liblist.gam' then
frmMain.IdFTP.Site('CHMOD 744 ' + FileList[i]); 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 if LowerCase(FileList[i]) = 'liblist.gam' then
frmMain.IdFTP.Size('CHMOD 444 ' + FileList[i]); frmMain.IdFTP.Size('CHMOD 444 ' + FileList[i]);
except except

View File

@ -118,6 +118,10 @@ type
const AWorkCount: Integer); const AWorkCount: Integer);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure tmrSpeedTimer(Sender: TObject); procedure tmrSpeedTimer(Sender: TObject);
procedure trvDirectoriesExpanding(Sender: TObject; Node: TTreeNode;
var AllowExpansion: Boolean);
procedure trvDirectoriesCollapsing(Sender: TObject; Node: TTreeNode;
var AllowCollapse: Boolean);
private private
OldProgress: Integer; OldProgress: Integer;
CurrProgress: Integer; CurrProgress: Integer;
@ -719,4 +723,18 @@ begin
OldProgress := CurrProgress; OldProgress := CurrProgress;
end; 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. end.

Binary file not shown.

View File

@ -9,7 +9,7 @@ uses
type type
TfrmProxy = class(TForm) TfrmProxy = class(TForm)
cmdCancel: TFlatButton; cmdClose: TFlatButton;
lblProxy: TLabel; lblProxy: TLabel;
txtHost: TFlatEdit; txtHost: TFlatEdit;
cboProxy: TFlatComboBox; cboProxy: TFlatComboBox;