mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2024-12-02 14:24:16 +01:00
fixed Source Dedicated Server, added TF2 support and removed Steam check (no longer asks you to close Steam before you install MM:S)
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40507
This commit is contained in:
parent
93ead5a2e0
commit
5c49d4c583
Binary file not shown.
@ -229,7 +229,7 @@ begin
|
|||||||
frmMain.ggeItem.MaxValue := 1;
|
frmMain.ggeItem.MaxValue := 1;
|
||||||
frmMain.ggeItem.Progress := 0;
|
frmMain.ggeItem.Progress := 0;
|
||||||
|
|
||||||
if (GetProcessID('Steam.exe') <> -1) and (SteamInstall) then begin
|
{if (GetProcessID('Steam.exe') <> -1) and (SteamInstall) then begin
|
||||||
if MessageBox(frmMain.Handle, 'Steam is still running. It is necersarry to shut it down before you install Metamod:Source. Shut it down now?', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNO) = mrYes then begin
|
if MessageBox(frmMain.Handle, 'Steam is still running. It is necersarry to shut it down before you install Metamod:Source. Shut it down now?', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNO) = mrYes then begin
|
||||||
AddStatus('Shutting down Steam...', clBlack, False);
|
AddStatus('Shutting down Steam...', clBlack, False);
|
||||||
if GetProcessID('Steam.exe') = -1 then
|
if GetProcessID('Steam.exe') = -1 then
|
||||||
@ -247,7 +247,7 @@ begin
|
|||||||
Application.Terminate;
|
Application.Terminate;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;}
|
||||||
frmMain.ggeAll.Progress := 1;
|
frmMain.ggeAll.Progress := 1;
|
||||||
frmMain.ggeItem.Progress := 1;
|
frmMain.ggeItem.Progress := 1;
|
||||||
{ Unpack }
|
{ Unpack }
|
||||||
|
@ -218,7 +218,40 @@ begin
|
|||||||
Close
|
Close
|
||||||
else if jplWizard.ActivePage = jspSelectMod then begin
|
else if jplWizard.ActivePage = jspSelectMod then begin
|
||||||
{ Dedicated Server }
|
{ Dedicated Server }
|
||||||
if (frbDedicatedServer.Checked) or (frbStandaloneServer.Checked) then begin
|
if frbDedicatedServer.Checked then begin
|
||||||
|
Source := True;
|
||||||
|
ePath := trvMods.Selected.Text;
|
||||||
|
if ePath = 'Counter-Strike:Source' then
|
||||||
|
ePath := trvMods.Selected.Parent.Text + '\source dedicated server\cstrike'
|
||||||
|
else if ePath = 'Day of Defeat:Source' then
|
||||||
|
ePath := trvMods.Selected.Parent.Text + '\source dedicated server\dod'
|
||||||
|
else if ePath = 'Half-Life 2 Deathmatch' then
|
||||||
|
ePath := trvMods.Selected.Parent.Text + '\source dedicated server\hl2mp'
|
||||||
|
else begin
|
||||||
|
{ get games }
|
||||||
|
if ePath = 'Team Fortress 2' then
|
||||||
|
ePath := trvMods.Selected.Parent.Text + '\source 2007 dedicated server\tf';
|
||||||
|
{ ask user, just in case }
|
||||||
|
case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of
|
||||||
|
mrYes: Source := False;
|
||||||
|
mrNo: Source := True;
|
||||||
|
mrCancel: exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
SteamPath := IncludeTrailingPathDelimiter(SteamPath) + 'steamapps\';
|
||||||
|
// install it
|
||||||
|
if DirectoryExists(SteamPath + ePath) then begin
|
||||||
|
jspInstallProgress.Show;
|
||||||
|
InstallDedicated(IncludeTrailingPathDelimiter(SteamPath + ePath), True, Source);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
MessageBox(Handle, 'Error: The directory of the mod you selected doesn''t exist any more. Run Dedicated Server with the chosen mod and try again.', PChar(Application.Title), MB_ICONERROR);
|
||||||
|
jspSelectMod.Show;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
{ Standalone Server }
|
||||||
|
if frbStandaloneServer.Checked then begin
|
||||||
Source := True;
|
Source := True;
|
||||||
ePath := trvMods.Selected.Text;
|
ePath := trvMods.Selected.Text;
|
||||||
if ePath = 'Counter-Strike:Source' then
|
if ePath = 'Counter-Strike:Source' then
|
||||||
@ -230,7 +263,7 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
{ get games }
|
{ get games }
|
||||||
if ePath = 'Team Fortress 2' then
|
if ePath = 'Team Fortress 2' then
|
||||||
ePath := 'orangebox/tf'; // TODO: !HP! check this path
|
ePath := 'orangebox\tf';
|
||||||
{ ask user, just in case }
|
{ ask user, just in case }
|
||||||
case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of
|
case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of
|
||||||
mrYes: Source := False;
|
mrYes: Source := False;
|
||||||
@ -238,20 +271,7 @@ begin
|
|||||||
mrCancel: exit;
|
mrCancel: exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// install it
|
// install it
|
||||||
if frbDedicatedServer.Checked then begin
|
|
||||||
if DirectoryExists(SteamPath + ePath) then begin
|
|
||||||
jspInstallProgress.Show;
|
|
||||||
InstallDedicated(IncludeTrailingPathDelimiter(SteamPath + ePath), True, Source);
|
|
||||||
end
|
|
||||||
else begin
|
|
||||||
MessageBox(Handle, 'Error: The directory of the mod you selected doesn''t exist any more. Run Dedicated Server with the chosen mod and try again.', PChar(Application.Title), MB_ICONERROR);
|
|
||||||
jspSelectMod.Show;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else begin
|
|
||||||
if DirectoryExists(StandaloneServer + ePath) then begin
|
if DirectoryExists(StandaloneServer + ePath) then begin
|
||||||
jspInstallProgress.Show;
|
jspInstallProgress.Show;
|
||||||
InstallDedicated(IncludeTrailingPathDelimiter(StandaloneServer + ePath), False, Source)
|
InstallDedicated(IncludeTrailingPathDelimiter(StandaloneServer + ePath), False, Source)
|
||||||
@ -262,7 +282,6 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
{ Listen Server }
|
{ Listen Server }
|
||||||
if frbListenServer.Checked then begin
|
if frbListenServer.Checked then begin
|
||||||
Source := True;
|
Source := True;
|
||||||
@ -325,7 +344,8 @@ begin
|
|||||||
trvMods.Items.AddChild(CurNode, 'Day of Defeat:Source');
|
trvMods.Items.AddChild(CurNode, 'Day of Defeat:Source');
|
||||||
if DirectoryExists(ePath + eStr[i] + '\source dedicated server\hl2mp') then
|
if DirectoryExists(ePath + eStr[i] + '\source dedicated server\hl2mp') then
|
||||||
trvMods.Items.AddChild(CurNode, 'Half-Life 2 Deatmatch');
|
trvMods.Items.AddChild(CurNode, 'Half-Life 2 Deatmatch');
|
||||||
// TODO: !HP! add "Team Fortress 2" item here
|
if DirectoryExists(ePath + eStr[i] + '\source 2007 dedicated server\tf') then
|
||||||
|
trvMods.Items.AddChild(CurNode, 'Team Fortress 2');
|
||||||
|
|
||||||
if CurNode.Count = 0 then
|
if CurNode.Count = 0 then
|
||||||
CurNode.Free
|
CurNode.Free
|
||||||
@ -417,10 +437,10 @@ begin
|
|||||||
else if frbSelectMod.Checked then begin
|
else if frbSelectMod.Checked then begin
|
||||||
{ Custom mod }
|
{ Custom mod }
|
||||||
if frmSelectModPath.ShowModal = mrOk then begin
|
if frmSelectModPath.ShowModal = mrOk then begin
|
||||||
ePath := IncludeTrailingPathDelimiter(frmSelectModPath.trvDirectory.SelectedFolder.PathName);
|
ePath := frmSelectModPath.trvDirectory.SelectedFolder.PathName;
|
||||||
{ check if this is an orangebox game }
|
{ check if this is an orangebox game }
|
||||||
Source := True;
|
Source := True;
|
||||||
if (Pos('orangebox', LowerCase(ePath)) <> 0) then begin
|
if (AnsiSameText(ExtractFileName(ePath), 'tf')) then begin
|
||||||
case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of
|
case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of
|
||||||
mrYes: Source := False;
|
mrYes: Source := False;
|
||||||
mrNo: Source := True;
|
mrNo: Source := True;
|
||||||
@ -429,7 +449,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{ install now }
|
{ install now }
|
||||||
jspInstallProgress.Show;
|
jspInstallProgress.Show;
|
||||||
InstallCustom(ePath, osWindows, Source);
|
InstallCustom(IncludeTrailingPathDelimiter(ePath), osWindows, Source);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if frbFTP.Checked then // FTP
|
else if frbFTP.Checked then // FTP
|
||||||
|
Loading…
Reference in New Issue
Block a user