Updated installer to support new Linux metamod filename and Mac OS X binaries (bug 5601, r=dvander).

Former-commit-id: 0be36403602c16adaddc84881c9613b3f0f9c1ff
This commit is contained in:
Scott Ehlert 2013-02-13 01:20:11 -06:00
parent b318509687
commit 99411af951
6 changed files with 213 additions and 224 deletions

View File

@ -32,8 +32,8 @@
-M -M
-$M16384,1048576 -$M16384,1048576
-K$00400000 -K$00400000
-LE"c:\program files\borland\delphi7\Projects\Bpl" -LE"c:\program files (x86)\delphi7se\Projects\Bpl"
-LN"c:\program files\borland\delphi7\Projects\Bpl" -LN"c:\program files (x86)\delphi7se\Projects\Bpl"
-DmadExcept -DmadExcept
-w-UNSAFE_TYPE -w-UNSAFE_TYPE
-w-UNSAFE_CODE -w-UNSAFE_CODE

View File

@ -105,10 +105,6 @@ HostApplication=
Launcher= Launcher=
UseLauncher=0 UseLauncher=0
DebugCWD= DebugCWD=
[Language]
ActiveLang=
ProjectLang=
RootDir=
[Version Info] [Version Info]
IncludeVerInfo=0 IncludeVerInfo=0
AutoIncBuild=0 AutoIncBuild=0
@ -134,6 +130,3 @@ OriginalFilename=
ProductName= ProductName=
ProductVersion=1.0.0.0 ProductVersion=1.0.0.0
Comments= Comments=
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

Binary file not shown.

View File

@ -6,7 +6,7 @@ uses SysUtils, Classes, Windows, Graphics, Forms, ShellAPI, Controls, Messages,
TlHelp32, IdFTPCommon, ComCtrls, Dialogs, JclFileUtils; TlHelp32, IdFTPCommon, ComCtrls, Dialogs, JclFileUtils;
type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF); type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF);
type TOS = (osWindows, osLinux32{, osLinux64}); type TOS = (osWindows, osLinux, osMac);
procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True); procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True);
procedure AddDone(Additional: String = ''); procedure AddDone(Additional: String = '');
@ -221,25 +221,25 @@ begin
osWindows: begin osWindows: begin
if ExtractFileExt(eFile) = '.so' then if ExtractFileExt(eFile) = '.so' then
Result := True; Result := True;
if ExtractFileExt(eFile) = '.dylib' then
Result := True;
end; end;
osLinux32: begin osLinux: begin
if ExtractFileExt(eFile) = '.dll' then if ExtractFileExt(eFile) = '.dll' then
Result := True; Result := True;
if ExtractFileExt(eFile) = '.exe' then if ExtractFileExt(eFile) = '.exe' then
Result := True; Result := True;
if ExtractFileExt(eFile) = '.dylib' then
if Pos('_amd64', ExtractFileName(eFile)) <> 0 then
Result := True; Result := True;
end; end;
{osLinux64: begin osMac: begin
if ExtractFileExt(eFile) = '.dll' then if ExtractFileExt(eFile) = '.dll' then
Result := True; Result := True;
if ExtractFileExt(eFile) = '.exe' then if ExtractFileExt(eFile) = '.exe' then
Result := True; Result := True;
if ExtractFileExt(eFile) = '.so' then
if Pos('_i386', ExtractFileName(eFile)) <> 0 then
Result := True; Result := True;
end;} end;
end; end;
end; end;
@ -380,10 +380,8 @@ begin
eStr[i] := '//' + eStr[i]; eStr[i] := '//' + eStr[i];
end; end;
eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"'); eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"');
//if OS = osLinux64 then eStr.Add('gamedll_linux "addons/metamod/dlls/metamod.so"');
// eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"') eStr.Add('gamedll_osx "addons/metamod/dlls/metamod.dylib"');
//else
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"');
FileSetAttr(ePath + 'liblist.gam', 0); FileSetAttr(ePath + 'liblist.gam', 0);
eStr.SaveToFile(ePath + 'liblist.gam'); eStr.SaveToFile(ePath + 'liblist.gam');
FileSetAttr(ePath + 'liblist.gam', faReadOnly); // important for listen servers FileSetAttr(ePath + 'liblist.gam', faReadOnly); // important for listen servers
@ -516,13 +514,13 @@ begin
{ metamod } { metamod }
AddStatus('Copying Metamod...', clBlack); AddStatus('Copying Metamod...', clBlack);
FileCopy(ePath + 'addons\amxmodx\dlls\metamod.dll', ePath + '\addons\metamod\dlls\metamod.dll', CopyConfig, False); FileCopy(ePath + 'addons\amxmodx\dlls\metamod.dll', ePath + '\addons\metamod\dlls\metamod.dll', CopyConfig, False);
FileCopy(ePath + '\addons\amxmodx\dlls\metamod_i386.so', ePath + '\addons\metamod\dlls\metamod_i386.so', CopyConfig, False); FileCopy(ePath + '\addons\amxmodx\dlls\metamod.so', ePath + '\addons\metamod\dlls\metamod.so', CopyConfig, False);
FileCopy(ePath + '\addons\amxmodx\dlls\metamod_amd64.so', ePath + '\addons\metamod\dlls\metamod_amd64.so', CopyConfig, False); FileCopy(ePath + '\addons\amxmodx\dlls\metamod.dylib', ePath + '\addons\metamod\dlls\metamod.dylib', CopyConfig, False);
try try
if FileExists(ePath + '\addons\amxmodx\dlls\metamod.dll') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod.dll')); if FileExists(ePath + '\addons\amxmodx\dlls\metamod.dll') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod.dll'));
if FileExists(ePath + '\addons\amxmodx\dlls\metamod_amd64.so') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod_amd64.so')); if FileExists(ePath + '\addons\amxmodx\dlls\metamod.so') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod.so'));
if FileExists(ePath + '\addons\amxmodx\dlls\metamod_i386.so') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod_i386.so')); if FileExists(ePath + '\addons\amxmodx\dlls\metamod.dylib') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod.dylib'));
finally finally
UpdatePluginsIni := True; UpdatePluginsIni := True;
eStr := TStringList.Create; eStr := TStringList.Create;
@ -533,12 +531,12 @@ begin
if (Pos('addons\amxmodx\dlls\amxmodx_mm.dll', eStr.Text) <> 0) then if (Pos('addons\amxmodx\dlls\amxmodx_mm.dll', eStr.Text) <> 0) then
UpdatePluginsIni := False; UpdatePluginsIni := False;
end end
else if OS = osLinux32 then begin else if OS = osLinux then begin
if (Pos('addons/amxmodx/dlls/amxmodx_mm_i386.so', eStr.Text) <> 0) then if (Pos('addons/amxmodx/dlls/amxmodx_mm_i386.so', eStr.Text) <> 0) then
UpdatePluginsIni := False; UpdatePluginsIni := False;
end end
else begin else begin
if (Pos('addons/amxmodx/dlls/amxmodx_mm_amd64.so', eStr.Text) <> 0) then if (Pos('addons/amxmodx/dlls/amxmodx_mm.dylib', eStr.Text) <> 0) then
UpdatePluginsIni := False; UpdatePluginsIni := False;
end; end;
end end
@ -555,7 +553,7 @@ begin
eStr.Add('; Enable this instead for binary logging'); eStr.Add('; Enable this instead for binary logging');
eStr.Add('; win32 addons\amxmodx\dlls\amxmodx_bl_mm.dll'); eStr.Add('; win32 addons\amxmodx\dlls\amxmodx_bl_mm.dll');
end end
else if OS = osLinux32 then begin else if OS = osLinux then begin
eStr.Add(''); eStr.Add('');
eStr.Add('linux addons/amxmodx/dlls/amxmodx_mm_i386.so'); eStr.Add('linux addons/amxmodx/dlls/amxmodx_mm_i386.so');
eStr.Add('; Enable this instead for binary logging'); eStr.Add('; Enable this instead for binary logging');
@ -563,9 +561,9 @@ begin
end end
else begin else begin
eStr.Add(''); eStr.Add('');
eStr.Add('linux addons/amxmodx/dlls/amxmodx_mm_amd64.so'); eStr.Add('osx addons/amxmodx/dlls/amxmodx_mm.dylib');
eStr.Add('; Enable this instead for binary logging'); eStr.Add('; Enable this instead for binary logging');
eStr.Add('; linux addons/amxmodx/dlls/amxmodx_bl_mm_amd64.so'); eStr.Add('; osx addons/amxmodx/dlls/amxmodx_bl_mm.dylib');
end; end;
end; end;
eStr.SaveToFile(ePath + 'addons\metamod\plugins.ini'); eStr.SaveToFile(ePath + 'addons\metamod\plugins.ini');
@ -710,10 +708,10 @@ begin
end; end;
if frmMain.optWindows.Checked then if frmMain.optWindows.Checked then
eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"') eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"')
else if frmMain.optLinux32.Checked then else if frmMain.optLinux.Checked then
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"') eStr.Add('gamedll_linux "addons/metamod/dlls/metamod.so"')
else else
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"'); eStr.Add('gamedll_osx "addons/metamod/dlls/metamod.dylib"');
FileSetAttr(ExtractFilePath(Application.ExeName) + 'temp\liblist.gam', 0); FileSetAttr(ExtractFilePath(Application.ExeName) + 'temp\liblist.gam', 0);
eStr.SaveToFile(ExtractFilePath(Application.ExeName) + 'temp\liblist.gam'); eStr.SaveToFile(ExtractFilePath(Application.ExeName) + 'temp\liblist.gam');
end; end;

View File

@ -5733,7 +5733,7 @@ object frmMain: TfrmMain
BorderColor = clBtnShadow BorderColor = clBtnShadow
Flat = True Flat = True
ShowBorder = True ShowBorder = True
Version = '1.26' Version = '1.24'
end end
object frbAgree: TFlatRadioButton object frbAgree: TFlatRadioButton
Left = 10 Left = 10
@ -6391,21 +6391,20 @@ object frmMain: TfrmMain
TabOrder = 0 TabOrder = 0
TabStop = True TabStop = True
end end
object optLinux32: TFlatRadioButton object optLinux: TFlatRadioButton
Left = 171 Left = 187
Top = 5 Top = 5
Width = 84 Width = 46
Height = 14 Height = 14
Caption = 'Linux (32-bit)' Caption = 'Linux'
TabOrder = 1 TabOrder = 1
end end
object optLinux64: TFlatRadioButton object optMac: TFlatRadioButton
Left = 353 Left = 369
Top = 5 Top = 5
Width = 82 Width = 64
Height = 14 Height = 14
Caption = 'Linux (64-bit)' Caption = 'Mac OS X'
Enabled = False
TabOrder = 2 TabOrder = 2
end end
end end
@ -6554,7 +6553,7 @@ object frmMain: TfrmMain
BorderColor = clBtnShadow BorderColor = clBtnShadow
Flat = True Flat = True
ShowBorder = True ShowBorder = True
Version = '1.26' Version = '1.24'
end end
end end
end end
@ -6758,7 +6757,6 @@ object frmMain: TfrmMain
object IdFTP: TIdFTP object IdFTP: TIdFTP
Intercept = IdLogFile Intercept = IdLogFile
MaxLineAction = maException MaxLineAction = maException
ReadTimeout = 0
RecvBufferSize = 1024 RecvBufferSize = 1024
SendBufferSize = 1024 SendBufferSize = 1024
OnWork = IdFTPWork OnWork = IdFTPWork

View File

@ -107,10 +107,10 @@ type
lblStep3: TLabel; lblStep3: TLabel;
pnlOS: TPanel; pnlOS: TPanel;
optWindows: TFlatRadioButton; optWindows: TFlatRadioButton;
optLinux32: TFlatRadioButton; optLinux: TFlatRadioButton;
lblStep5: TLabel; lblStep5: TLabel;
lblFTP: TLabel; lblFTP: TLabel;
optLinux64: TFlatRadioButton; optMac: TFlatRadioButton;
procedure jvwStepsCancelButtonClick(Sender: TObject); procedure jvwStepsCancelButtonClick(Sender: TObject);
procedure cmdCancelClick(Sender: TObject); procedure cmdCancelClick(Sender: TObject);
procedure cmdNextClick(Sender: TObject); procedure cmdNextClick(Sender: TObject);
@ -149,7 +149,7 @@ var
frmMain: TfrmMain; frmMain: TfrmMain;
gMultiAccount: Boolean; gMultiAccount: Boolean;
const VERSION = '1.8.0'; const VERSION = '1.8.2';
implementation implementation
@ -249,8 +249,8 @@ begin
trvDirectories.Enabled := False; trvDirectories.Enabled := False;
cmdConnect.Enabled := False; cmdConnect.Enabled := False;
optWindows.Enabled := False; optWindows.Enabled := False;
optLinux32.Enabled := False; optLinux.Enabled := False;
//optLinux64.Enabled := False; optMac.Enabled := False;
cboGameAddon.Enabled := False; cboGameAddon.Enabled := False;
// preinstall... // preinstall...
MakeDir(ExtractFilePath(Application.ExeName) + 'temp'); MakeDir(ExtractFilePath(Application.ExeName) + 'temp');
@ -281,10 +281,10 @@ begin
if optWindows.Checked then if optWindows.Checked then
eOS := osWindows eOS := osWindows
else //if optLinux32.Checked then else if optLinux.Checked then
eOS := osLinux32; eOS := osLinux
//else else
// eOS := osLinux64; eOS := osMac;
jspInstallProgress.Show; jspInstallProgress.Show;
frmMain.Height := 382; frmMain.Height := 382;