binaries should work now
authorChristian Hammacher <bmasterc@gmail.com>
Tue Oct 16 18:43:23 2007 +0000 (2007-10-16)
changeset 4258957217cdfba
parent 424 4a8273c97f82
child 426 58ec7ba2d09c
binaries should work now
installer/Attach.exe
installer/MMS_Installer.cfg
installer/MMS_Installer.exe
installer/UnitPackSystem.pas
     1.1 Binary file installer/Attach.exe has changed
     2.1 --- a/installer/MMS_Installer.cfg	Tue Oct 16 17:57:30 2007 +0000
     2.2 +++ b/installer/MMS_Installer.cfg	Tue Oct 16 18:43:23 2007 +0000
     2.3 @@ -31,8 +31,8 @@
     2.4  -M
     2.5  -$M16384,1048576
     2.6  -K$00400000
     2.7 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
     2.8 --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
     2.9 +-LE"c:\program files\borland\delphi7\Projects\Bpl"
    2.10 +-LN"c:\program files\borland\delphi7\Projects\Bpl"
    2.11  -w-UNSAFE_TYPE
    2.12  -w-UNSAFE_CODE
    2.13  -w-UNSAFE_CAST
     3.1 Binary file installer/MMS_Installer.exe has changed
     4.1 --- a/installer/UnitPackSystem.pas	Tue Oct 16 17:57:30 2007 +0000
     4.2 +++ b/installer/UnitPackSystem.pas	Tue Oct 16 18:43:23 2007 +0000
     4.3 @@ -54,6 +54,8 @@
     4.4            { append the compressed file to the destination file }
     4.5            tmpFile := TFileStream.Create('tmp',fmOpenRead);
     4.6            try
     4.7 +            l := tmpFile.Size;
     4.8 +            outfile.WriteBuffer(l, SizeOf(l));
     4.9              outfile.CopyFrom(tmpFile,0);
    4.10            finally
    4.11              tmpFile.Free;
    4.12 @@ -74,7 +76,7 @@
    4.13    dest,s : String;
    4.14    decompr : TDecompressionStream;
    4.15    outfile : TFilestream;
    4.16 -  i,l,c : Integer;
    4.17 +  i,l,lr,c : Integer;
    4.18  begin
    4.19    // IncludeTrailingPathDelimiter (D6/D7 only)
    4.20    dest := IncludeTrailingPathDelimiter(DestDirectory);
    4.21 @@ -88,22 +90,26 @@
    4.22        Stream.Read(l,SizeOf(l));
    4.23        SetLength(s,l);
    4.24        Stream.Read(s[1],l);
    4.25 +      Stream.Read(l,SizeOf(l));
    4.26 +      Stream.Read(lr,SizeOf(lr));
    4.27        { check if this is the right file }
    4.28 -      if ((Pos('.source', s) <> 0) and (Source)) or ((Pos('.orangebox', s) <> 0) and (not Source)) then begin
    4.29 +      if (s = 'hl2launch.exe') or ((Pos('.source', s) <> 0) and (Source)) or ((Pos('.orangebox', s) <> 0) and (not Source)) then begin
    4.30          { remove extension and read filesize }
    4.31 -        s := ChangeFileExt(s, '');
    4.32 -        Stream.Read(l,SizeOf(l));
    4.33 +        if (s <> 'hl2launch.exe') then
    4.34 +          s := ChangeFileExt(s, '');
    4.35          { decompress the files and store it }
    4.36          s := dest+s; //include the path
    4.37          outfile := TFileStream.Create(s,fmCreate);
    4.38 -        decompr := TDecompressionStream.Create(Stream);
    4.39 +        decompr := TDecompressionStream.Create(Stream);   
    4.40          try
    4.41            outfile.CopyFrom(decompr,l);
    4.42          finally
    4.43            outfile.Free;
    4.44            decompr.Free;
    4.45          end;
    4.46 -      end;
    4.47 +      end
    4.48 +      else
    4.49 +        Stream.Position := Stream.Position + lr;
    4.50      end;
    4.51    finally
    4.52      Result := True;
    4.53 @@ -118,6 +124,7 @@
    4.54    Result := False;
    4.55    if not FileExists(AFileName) then
    4.56      Exit;
    4.57 +
    4.58    try
    4.59      aStream := TFileStream.Create(AFileName, fmOpenWrite or fmShareDenyWrite);
    4.60      MemoryStream.Seek(0, soFromBeginning);