1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-26 19:54:14 +01:00

now overwrites VDF plugin even if it already exists

--HG--
branch : sourcemm-1.4.3
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/sourcemm-1.4.3%40616
This commit is contained in:
Christian Hammacher 2008-01-13 23:19:44 +00:00
parent f600fde8a2
commit f09aaee393
2 changed files with 19 additions and 16 deletions

Binary file not shown.

View File

@ -448,7 +448,7 @@ begin
except
AddSkipped;
end;
{ Create/Edit VDF Plugin }
{ Check VDF Plugin }
CopyConfig := True;
frmMain.ggeAll.Progress := 3;
@ -464,10 +464,11 @@ begin
eStr.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'metamod.vdf');
frmMain.ggeItem.Progress := 2;
if (((Pos('server.dll', eStr.Text) <> 0) and (OS = osWindows)) or ((Pos('server_i486.so', eStr.Text) <> 0) and (OS = osLinux))) then begin
AddSkipped;
case MessageBox(frmMain.Handle, 'A Metamod:Source installation was already detected. If you choose to reinstall, your configuration files will be erased. Click Yes to continue, No to Upgrade, or Cancel to abort the install.', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNOCANCEL) of
mrNo: CopyConfig := False;
mrNo: begin
AddSkipped;
CopyConfig := False;
end;
mrCancel: begin
Application.Terminate;
eStr.Free;
@ -476,6 +477,9 @@ begin
end;
end;
except
// bacon
end;
{ Create and Upload plugin here }
frmMain.ggeItem.Progress := 2;
eStr.Add('"Plugin"');
eStr.Add('{');
@ -487,7 +491,6 @@ begin
eStr.SaveToFile(ExtractFilePath(ParamStr(0)) + 'metamod.vdf');
UploadFile(ExtractFilePath(ParamStr(0)) + 'metamod.vdf', 'metamod.vdf');
frmMain.ggeItem.Progress := 3;
end;
{ Upload metaplugins.ini }
frmMain.ggeAll.Progress := 4;
frmMain.ggeItem.MaxValue := 1;