diff --git a/installer/Attach.exe b/installer/Attach.exe index b978367..e28edcb 100644 Binary files a/installer/Attach.exe and b/installer/Attach.exe differ diff --git a/installer/MMS_Installer.cfg b/installer/MMS_Installer.cfg index e9c1cc1..6c57635 100644 --- a/installer/MMS_Installer.cfg +++ b/installer/MMS_Installer.cfg @@ -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 diff --git a/installer/MMS_Installer.exe b/installer/MMS_Installer.exe index ae1e122..242aa1a 100644 Binary files a/installer/MMS_Installer.exe and b/installer/MMS_Installer.exe differ diff --git a/installer/UnitPackSystem.pas b/installer/UnitPackSystem.pas index c1d6810..db98ca9 100644 --- a/installer/UnitPackSystem.pas +++ b/installer/UnitPackSystem.pas @@ -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);