1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-11-28 10:24:20 +01:00

binaries should work now

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40522
This commit is contained in:
Christian Hammacher 2007-10-16 18:43:23 +00:00
parent e74e244fdb
commit 9e96503b30
4 changed files with 15 additions and 8 deletions

Binary file not shown.

View File

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

Binary file not shown.

View File

@ -54,6 +54,8 @@ begin
{ append the compressed file to the destination file }
tmpFile := TFileStream.Create('tmp',fmOpenRead);
try
l := tmpFile.Size;
outfile.WriteBuffer(l, SizeOf(l));
outfile.CopyFrom(tmpFile,0);
finally
tmpFile.Free;
@ -74,7 +76,7 @@ var
dest,s : String;
decompr : TDecompressionStream;
outfile : TFilestream;
i,l,c : Integer;
i,l,lr,c : Integer;
begin
// IncludeTrailingPathDelimiter (D6/D7 only)
dest := IncludeTrailingPathDelimiter(DestDirectory);
@ -88,22 +90,26 @@ begin
Stream.Read(l,SizeOf(l));
SetLength(s,l);
Stream.Read(s[1],l);
Stream.Read(l,SizeOf(l));
Stream.Read(lr,SizeOf(lr));
{ check if this is the right file }
if ((Pos('.source', s) <> 0) and (Source)) or ((Pos('.orangebox', s) <> 0) and (not Source)) then begin
if (s = 'hl2launch.exe') or ((Pos('.source', s) <> 0) and (Source)) or ((Pos('.orangebox', s) <> 0) and (not Source)) then begin
{ remove extension and read filesize }
s := ChangeFileExt(s, '');
Stream.Read(l,SizeOf(l));
if (s <> 'hl2launch.exe') then
s := ChangeFileExt(s, '');
{ decompress the files and store it }
s := dest+s; //include the path
outfile := TFileStream.Create(s,fmCreate);
decompr := TDecompressionStream.Create(Stream);
decompr := TDecompressionStream.Create(Stream);
try
outfile.CopyFrom(decompr,l);
finally
outfile.Free;
decompr.Free;
end;
end;
end
else
Stream.Position := Stream.Position + lr;
end;
finally
Result := True;
@ -118,6 +124,7 @@ begin
Result := False;
if not FileExists(AFileName) then
Exit;
try
aStream := TFileStream.Create(AFileName, fmOpenWrite or fmShareDenyWrite);
MemoryStream.Seek(0, soFromBeginning);