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= DebugSourceDirs=
UsePackages=0 UsePackages=0
[Parameters] [Parameters]
RunParams= RunParams=-debug
HostApplication= HostApplication=
Launcher= Launcher=
UseLauncher=0 UseLauncher=0

View File

@ -1,6 +1,6 @@
program AMXInstaller; program AMXInstaller;
{ AMXX Installer for AMX Mod X 1.5 { AMXX Installer for AMX Mod X
by the AMXX Development Team by the AMXX Development Team
Used components: Used components:
@ -10,7 +10,7 @@ program AMXInstaller;
- FlatPack Component Pack (www.torry.net) - FlatPack Component Pack (www.torry.net)
- JVCL Lib Pack 3.0 (jvcl.sourceforge.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! and comes WITH ABSOLUTELY NO WARRANTY!
} }
@ -29,6 +29,13 @@ begin
Application.Initialize; Application.Initialize;
Application.Title := 'AMX Mod X Installer'; Application.Title := 'AMX Mod X Installer';
Application.CreateForm(TfrmMain, frmMain); 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(TfrmProxy, frmProxy);
Application.CreateForm(TfrmSelectModPath, frmSelectModPath); Application.CreateForm(TfrmSelectModPath, frmSelectModPath);
Application.Run; Application.Run;

Binary file not shown.

View File

@ -19,7 +19,7 @@ begin
Result := frmMain.Caption; Result := frmMain.Caption;
if (eOld < eNew) and (eOld <> 0) then begin if (eOld < eNew) and (eOld <> 0) then begin
eOld := eNew - eOld; 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'; Result := 'AMX Mod X Installer - Uploading with ' + FloatToStr(RoundTo(eOld / 1024, -2)) + ' kb/s';
end; end;
end; end;

View File

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

View File

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

View File

@ -8,7 +8,8 @@ uses
ExtCtrls, JvExControls, JvComponent, TFlatButtonUnit, jpeg, TFlatEditUnit, ExtCtrls, JvExControls, JvComponent, TFlatButtonUnit, jpeg, TFlatEditUnit,
TFlatGaugeUnit, ImgList, FileCtrl, Registry, CheckLst, TFlatComboBoxUnit, TFlatGaugeUnit, ImgList, FileCtrl, Registry, CheckLst, TFlatComboBoxUnit,
TFlatCheckBoxUnit, IdBaseComponent, IdComponent, IdTCPConnection, TFlatCheckBoxUnit, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, IdException, IdAntiFreezeBase, IdAntiFreeze; IdTCPClient, IdFTP, IdException, IdAntiFreezeBase, IdAntiFreeze,
IdIntercept, IdLogBase, IdLogFile;
type type
TfrmMain = class(TForm) TfrmMain = class(TForm)
@ -100,6 +101,7 @@ type
cboGameAddon: TFlatComboBox; cboGameAddon: TFlatComboBox;
frbStandaloneServer: TFlatRadioButton; frbStandaloneServer: TFlatRadioButton;
tmrSpeed: TTimer; tmrSpeed: TTimer;
IdLogFile: TIdLogFile;
procedure jvwStepsCancelButtonClick(Sender: TObject); procedure jvwStepsCancelButtonClick(Sender: TObject);
procedure cmdCancelClick(Sender: TObject); procedure cmdCancelClick(Sender: TObject);
procedure cmdNextClick(Sender: TObject); procedure cmdNextClick(Sender: TObject);
@ -132,6 +134,8 @@ type
var var
frmMain: TfrmMain; frmMain: TfrmMain;
const VERSION = '1.56';
implementation implementation
uses UnitFunctions, UnitScanMods, UnitfrmProxy, UnitInstall, uses UnitFunctions, UnitScanMods, UnitfrmProxy, UnitInstall,
@ -450,7 +454,7 @@ var i: integer;
eStr: TStringList; eStr: TStringList;
CurNode: TTreeNode; CurNode: TTreeNode;
begin 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) MessageBox(Handle, 'Please fill in each field!', PChar(Application.Title), MB_ICONWARNING)
else if cmdConnect.Caption = 'Connect' then begin else if cmdConnect.Caption = 'Connect' then begin
// ... design stuff ... // ... design stuff ...
@ -472,6 +476,36 @@ begin
// ... connect and check values etc ... // ... connect and check values etc ...
try try
IdFTP.Connect(True, 15000); 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 except
on E: Exception do begin on E: Exception do begin
// reset button properties // reset button properties
@ -484,7 +518,6 @@ begin
cmdProxySettings.Enabled := True; cmdProxySettings.Enabled := True;
cmdNext.Enabled := False; cmdNext.Enabled := False;
cmdConnect.Caption := 'Connect'; cmdConnect.Caption := 'Connect';
Screen.Cursor := crDefault;
// analyze messages // analyze messages
if Pos('Login incorrect.', E.Message) <> 0 then begin // login failed 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); MessageBox(Handle, 'Login incorrect. Check your FTP settings and try again.', PChar(Application.Title), MB_ICONWARNING);
@ -512,36 +545,7 @@ begin
exit; exit;
end; end;
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; Screen.Cursor := crDefault;
end end
else begin else begin
@ -584,6 +588,12 @@ end;
procedure TfrmMain.FormCreate(Sender: TObject); procedure TfrmMain.FormCreate(Sender: TObject);
begin 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 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); 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; Application.Terminate;