Updated AMXx version 1.56

This commit is contained in:
Christian Hammacher 2005-09-01 17:11:48 +00:00
parent 0232b0abee
commit 8c17be27dd
7 changed files with 82 additions and 58 deletions

View File

@ -100,7 +100,7 @@ Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
RunParams=-debug
HostApplication=
Launcher=
UseLauncher=0

View File

@ -1,6 +1,6 @@
program AMXInstaller;
{ AMXX Installer for AMX Mod X 1.5
{ AMXX Installer for AMX Mod X
by the AMXX Development Team
Used components:
@ -10,7 +10,7 @@ program AMXInstaller;
- FlatPack Component Pack (www.torry.net)
- JVCL Lib Pack 3.0 (jvcl.sourceforge.net)
AMXX Installer for AMX Mod X 1.5 is developed under GNU Public License
AMXX Installer for AMX Mod X is developed under GNU Public License
and comes WITH ABSOLUTELY NO WARRANTY!
}
@ -29,6 +29,13 @@ begin
Application.Initialize;
Application.Title := 'AMX Mod X Installer';
Application.CreateForm(TfrmMain, frmMain);
frmMain.lblWelcome.Caption := 'Welcome to the AMX Mod X Installer ' + VERSION + ' Setup Wizard';
frmMain.lblInfo1.Caption := 'This wizard will guide you through the installation of AMX Mod X ' + VERSION + '.';
frmMain.lblSubTitle1.Caption := 'Please review the following license terms before installing AMX Mod X ' + VERSION + '.';
frmMain.lblSelectModInfo.Caption := 'Please select the mod AMX Mod X ' + VERSION + ' shall be installed to.';
frmMain.lblTitle3.Caption := 'Installing AMX Mod X ' + VERSION + ' via FTP';
frmMain.lblTitle5.Caption := 'Installing AMX Mod X ' + VERSION;
frmMain.lblSubTitle5.Caption := 'Please wait while AMX Mod X ' + VERSION + ' is being installed.';
Application.CreateForm(TfrmProxy, frmProxy);
Application.CreateForm(TfrmSelectModPath, frmSelectModPath);
Application.Run;

Binary file not shown.

View File

@ -19,7 +19,7 @@ begin
Result := frmMain.Caption;
if (eOld < eNew) and (eOld <> 0) then begin
eOld := eNew - eOld;
eOld := eOld *2; // twice per second, higher frequency is too inaccurate...
//eOld := eOld *2; // this is only used for faster updates...
Result := 'AMX Mod X Installer - Uploading with ' + FloatToStr(RoundTo(eOld / 1024, -2)) + ' kb/s';
end;
end;

View File

@ -499,7 +499,7 @@ begin
finally
eStr := TStringList.Create;
eStr.Add(';;Metamod plugins.ini');
eStr.Add(';;AMX Mod X 1.5');
eStr.Add(';;AMX Mod X ' + VERSION);
if OS = osWindows then
eStr.Add('win32 addons\amxmodx\dlls\amxmodx_mm.dll')
else if OS = osLinux32 then
@ -701,10 +701,12 @@ begin
UploadAgain:
try
eGoBack := False;
if FileList[i] = 'liblist.gam' then
frmMain.IdFTP.Site('CHMOD 744 liblist.gam');
UploadFile(ExtractFilePath(ParamStr(0)) + 'temp\' + FileList[i], ePath + FileList[i], CopyConfig);
if FileList[i] = 'liblist.gam' then
frmMain.IdFTP.Size('CHMOD 444 liblist.gam');
except

View File

@ -4911,7 +4911,7 @@ object frmMain: TfrmMain
Top = 10
Width = 343
Height = 50
Caption = 'Welcome to the AMX Mod X Installer 1.5 Setup Wizard'
Caption = 'Welcome to the AMX Mod X Installer (version) Setup Wizard'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -21
@ -4923,11 +4923,11 @@ object frmMain: TfrmMain
object lblInfo1: TLabel
Left = 172
Top = 82
Width = 326
Height = 13
Width = 353
Height = 26
Caption =
'This wizard will guide you through the installation of AMX Mod X' +
' 1.5.'
' (version).'
WordWrap = True
end
object lblInfo2: TLabel
@ -5012,11 +5012,11 @@ object frmMain: TfrmMain
object lblSubTitle1: TLabel
Left = 22
Top = 28
Width = 353
Width = 380
Height = 13
Caption =
'Please review the following license terms before installing AMX ' +
'Mod X 1.5.'
'Mod X (version).'
end
object bvlSpacer1: TBevel
Left = 0
@ -5947,9 +5947,9 @@ object frmMain: TfrmMain
object lblSelectModInfo: TLabel
Left = 22
Top = 28
Width = 277
Width = 304
Height = 13
Caption = 'Please select the mod AMX Mod X 1.5 shall be installed to.'
Caption = 'Please select the mod AMX Mod X (version) shall be installed to.'
end
object bvlSelectMod: TBevel
Left = 0
@ -6060,9 +6060,9 @@ object frmMain: TfrmMain
object lblTitle3: TLabel
Left = 12
Top = 8
Width = 202
Width = 236
Height = 14
Caption = 'Installing AMX Mod X 1.5 via FTP'
Caption = 'Installing AMX Mod X (version) via FTP'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
@ -6380,9 +6380,9 @@ object frmMain: TfrmMain
object lblTitle5: TLabel
Left = 12
Top = 8
Width = 156
Width = 190
Height = 14
Caption = 'Installing AMX Mod X 1.5'
Caption = 'Installing AMX Mod X (version)'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
@ -6393,9 +6393,9 @@ object frmMain: TfrmMain
object lblSubTitle5: TLabel
Left = 22
Top = 28
Width = 241
Width = 268
Height = 13
Caption = 'Please wait while AMX Mod X 1.5 is being installed.'
Caption = 'Please wait while AMX Mod X (version) is being installed.'
end
object bvlSpacer5: TBevel
Left = 0
@ -6477,8 +6477,8 @@ object frmMain: TfrmMain
end
end
object ilImages: TImageList
Left = 488
Top = 10
Left = 492
Top = 8
Bitmap = {
494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000001000000001002000000000000010
@ -6620,25 +6620,30 @@ object frmMain: TfrmMain
000000000000}
end
object IdFTP: TIdFTP
Intercept = IdLogFile
MaxLineAction = maException
RecvBufferSize = 1024
SendBufferSize = 1024
OnWork = IdFTPWork
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
Left = 454
Left = 462
Top = 8
end
object IdAntiFreeze: TIdAntiFreeze
IdleTimeOut = 150
Left = 424
Left = 432
Top = 8
end
object tmrSpeed: TTimer
Enabled = False
Interval = 500
OnTimer = tmrSpeedTimer
Left = 394
Left = 402
Top = 8
end
object IdLogFile: TIdLogFile
LogTime = False
Left = 372
Top = 8
end
end

View File

@ -8,7 +8,8 @@ uses
ExtCtrls, JvExControls, JvComponent, TFlatButtonUnit, jpeg, TFlatEditUnit,
TFlatGaugeUnit, ImgList, FileCtrl, Registry, CheckLst, TFlatComboBoxUnit,
TFlatCheckBoxUnit, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, IdException, IdAntiFreezeBase, IdAntiFreeze;
IdTCPClient, IdFTP, IdException, IdAntiFreezeBase, IdAntiFreeze,
IdIntercept, IdLogBase, IdLogFile;
type
TfrmMain = class(TForm)
@ -100,6 +101,7 @@ type
cboGameAddon: TFlatComboBox;
frbStandaloneServer: TFlatRadioButton;
tmrSpeed: TTimer;
IdLogFile: TIdLogFile;
procedure jvwStepsCancelButtonClick(Sender: TObject);
procedure cmdCancelClick(Sender: TObject);
procedure cmdNextClick(Sender: TObject);
@ -132,6 +134,8 @@ type
var
frmMain: TfrmMain;
const VERSION = '1.56';
implementation
uses UnitFunctions, UnitScanMods, UnitfrmProxy, UnitInstall,
@ -450,7 +454,7 @@ var i: integer;
eStr: TStringList;
CurNode: TTreeNode;
begin
if (Trim(txtHost.Text) = '') or (Trim(txtUsername.Text) = '') or (Trim(txtPassword.Text) = '') then
if (Trim(txtHost.Text) = '') or (Trim(txtUsername.Text) = '') then
MessageBox(Handle, 'Please fill in each field!', PChar(Application.Title), MB_ICONWARNING)
else if cmdConnect.Caption = 'Connect' then begin
// ... design stuff ...
@ -472,6 +476,36 @@ begin
// ... connect and check values etc ...
try
IdFTP.Connect(True, 15000);
// ... scan for initial directory ...
eStr := TStringList.Create;
eStr.Text := StringReplace(IdFTP.RetrieveCurrentDir, '/', #13, [rfReplaceAll]);
for i := eStr.Count -1 downto 0 do begin
if eStr[i] = '' then
eStr.Delete(i);
end;
// ... connect successful, change captions ...
trvDirectories.Enabled := True;
cmdConnect.Enabled := True;
cmdConnect.Caption := 'Disconnect';
CurNode := nil;
if eStr.Count <> 0 then begin
for i := 0 to eStr.Count -1 do
CurNode := trvDirectories.Items.AddChild(CurNode, eStr[i]);
end;
if trvDirectories.Items.Count <> 0 then
trvDirectories.Items.Item[0].Expand(True);
eStr.Free;
// ... scan for directories ...
with GetAllDirs do begin
for i := 0 to Count -1 do
trvDirectories.Items.AddChild(trvDirectories.Items.AddChild(CurNode, Strings[i]), 'Scanning...');
Free;
end;
if Assigned(CurNode) then
CurNode.Expand(False);
except
on E: Exception do begin
// reset button properties
@ -484,7 +518,6 @@ begin
cmdProxySettings.Enabled := True;
cmdNext.Enabled := False;
cmdConnect.Caption := 'Connect';
Screen.Cursor := crDefault;
// analyze messages
if Pos('Login incorrect.', E.Message) <> 0 then begin // login failed
MessageBox(Handle, 'Login incorrect. Check your FTP settings and try again.', PChar(Application.Title), MB_ICONWARNING);
@ -512,36 +545,7 @@ begin
exit;
end;
end;
// ... connect successful, change captions ...
trvDirectories.Enabled := True;
cmdConnect.Enabled := True;
cmdConnect.Caption := 'Disconnect';
// ... scan for initial directory ...
eStr := TStringList.Create;
eStr.Text := StringReplace(IdFTP.RetrieveCurrentDir, '/', #13, [rfReplaceAll]);
for i := eStr.Count -1 downto 0 do begin
if eStr[i] = '' then
eStr.Delete(i);
end;
CurNode := nil;
if eStr.Count <> 0 then begin
for i := 0 to eStr.Count -1 do
CurNode := trvDirectories.Items.AddChild(CurNode, eStr[i]);
end;
if trvDirectories.Items.Count <> 0 then
trvDirectories.Items.Item[0].Expand(True);
eStr.Free;
// ... scan for directories ...
with GetAllDirs do begin
for i := 0 to Count -1 do
trvDirectories.Items.AddChild(trvDirectories.Items.AddChild(CurNode, Strings[i]), 'Scanning...');
Free;
end;
if Assigned(CurNode) then
CurNode.Expand(False);
Screen.Cursor := crDefault;
end
else begin
@ -584,6 +588,12 @@ end;
procedure TfrmMain.FormCreate(Sender: TObject);
begin
if LowerCase(ParamStr(1)) = '-logftp' then begin
MessageBox(Handle, 'FTP installation will be logged to FTP.log!', PChar(Application.Title), MB_ICONINFORMATION);
IdLogFile.Filename := ExtractFilePath(ParamStr(0)) + 'FTP.log';
IdLogFile.Active := True;
end;
if not DirectoryExists(ExtractFilePath(ParamStr(0)) + 'files') then begin
MessageBox(Handle, 'The files-folder couldn''t be found. Run the Pre-Installer of AMX Mod X and try again.', 'Error', MB_ICONERROR);
Application.Terminate;