1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-02 14:24:16 +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 -M
-$M16384,1048576 -$M16384,1048576
-K$00400000 -K$00400000
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" -LE"c:\program files\borland\delphi7\Projects\Bpl"
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" -LN"c:\program files\borland\delphi7\Projects\Bpl"
-w-UNSAFE_TYPE -w-UNSAFE_TYPE
-w-UNSAFE_CODE -w-UNSAFE_CODE
-w-UNSAFE_CAST -w-UNSAFE_CAST

Binary file not shown.

View File

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