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
-$M16384,1048576
-K$00400000
-LE"c:\program files\borland\delphi7\Projects\Bpl"
-LN"c:\program files\borland\delphi7\Projects\Bpl"
-LE"c:\program files (x86)\delphi7se\Projects\Bpl"
-LN"c:\program files (x86)\delphi7se\Projects\Bpl"
-DmadExcept
-w-UNSAFE_TYPE
-w-UNSAFE_CODE

View File

@ -105,10 +105,6 @@ HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Language]
ActiveLang=
ProjectLang=
RootDir=
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
@ -134,6 +130,3 @@ OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
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;
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 AddDone(Additional: String = '');
@ -221,25 +221,25 @@ begin
osWindows: begin
if ExtractFileExt(eFile) = '.so' then
Result := True;
if ExtractFileExt(eFile) = '.dylib' then
Result := True;
end;
osLinux32: begin
osLinux: begin
if ExtractFileExt(eFile) = '.dll' then
Result := True;
if ExtractFileExt(eFile) = '.exe' then
Result := True;
if Pos('_amd64', ExtractFileName(eFile)) <> 0 then
if ExtractFileExt(eFile) = '.dylib' then
Result := True;
end;
{osLinux64: begin
osMac: begin
if ExtractFileExt(eFile) = '.dll' then
Result := True;
if ExtractFileExt(eFile) = '.exe' then
Result := True;
if Pos('_i386', ExtractFileName(eFile)) <> 0 then
if ExtractFileExt(eFile) = '.so' then
Result := True;
end;}
end;
end;
end;
@ -380,10 +380,8 @@ begin
eStr[i] := '//' + eStr[i];
end;
eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"');
//if OS = osLinux64 then
// eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"')
//else
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"');
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod.so"');
eStr.Add('gamedll_osx "addons/metamod/dlls/metamod.dylib"');
FileSetAttr(ePath + 'liblist.gam', 0);
eStr.SaveToFile(ePath + 'liblist.gam');
FileSetAttr(ePath + 'liblist.gam', faReadOnly); // important for listen servers
@ -516,13 +514,13 @@ begin
{ metamod }
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_i386.so', ePath + '\addons\metamod\dlls\metamod_i386.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.so', ePath + '\addons\metamod\dlls\metamod.so', CopyConfig, False);
FileCopy(ePath + '\addons\amxmodx\dlls\metamod.dylib', ePath + '\addons\metamod\dlls\metamod.dylib', CopyConfig, False);
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_amd64.so') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod_amd64.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.so') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod.so'));
if FileExists(ePath + '\addons\amxmodx\dlls\metamod.dylib') then DeleteFile(PChar(ePath + '\addons\amxmodx\dlls\metamod.dylib'));
finally
UpdatePluginsIni := True;
eStr := TStringList.Create;
@ -533,12 +531,12 @@ begin
if (Pos('addons\amxmodx\dlls\amxmodx_mm.dll', eStr.Text) <> 0) then
UpdatePluginsIni := False;
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
UpdatePluginsIni := False;
end
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;
end;
end
@ -555,7 +553,7 @@ begin
eStr.Add('; Enable this instead for binary logging');
eStr.Add('; win32 addons\amxmodx\dlls\amxmodx_bl_mm.dll');
end
else if OS = osLinux32 then begin
else if OS = osLinux then begin
eStr.Add('');
eStr.Add('linux addons/amxmodx/dlls/amxmodx_mm_i386.so');
eStr.Add('; Enable this instead for binary logging');
@ -563,9 +561,9 @@ begin
end
else begin
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('; linux addons/amxmodx/dlls/amxmodx_bl_mm_amd64.so');
eStr.Add('; osx addons/amxmodx/dlls/amxmodx_bl_mm.dylib');
end;
end;
eStr.SaveToFile(ePath + 'addons\metamod\plugins.ini');
@ -710,10 +708,10 @@ begin
end;
if frmMain.optWindows.Checked then
eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"')
else if frmMain.optLinux32.Checked then
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"')
else if frmMain.optLinux.Checked then
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod.so"')
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);
eStr.SaveToFile(ExtractFilePath(Application.ExeName) + 'temp\liblist.gam');
end;

View File

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

View File

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