|
@@ -2238,7 +2238,7 @@ begin
|
|
try
|
|
try
|
|
F := TFile.Create(Filename, fdOpenExisting, faRead, fsRead);
|
|
F := TFile.Create(Filename, fdOpenExisting, faRead, fsRead);
|
|
try
|
|
try
|
|
- Size := F.Size.Lo;
|
|
|
|
|
|
+ Size := F.CappedSize;
|
|
SetLength(S, Size);
|
|
SetLength(S, Size);
|
|
F.ReadBuffer(S[1], Size);
|
|
F.ReadBuffer(S[1], Size);
|
|
|
|
|
|
@@ -8251,8 +8251,8 @@ begin
|
|
if not UseSetupLdr then begin
|
|
if not UseSetupLdr then begin
|
|
SetupFile := TFile.Create(ExeFilename, fdCreateAlways, faWrite, fsNone);
|
|
SetupFile := TFile.Create(ExeFilename, fdCreateAlways, faWrite, fsNone);
|
|
try
|
|
try
|
|
- SetupFile.WriteBuffer(SetupE32.Memory^, SetupE32.Size.Lo);
|
|
|
|
- SizeOfExe := SetupFile.Size.Lo;
|
|
|
|
|
|
+ SetupFile.WriteBuffer(SetupE32.Memory^, SetupE32.CappedSize);
|
|
|
|
+ SizeOfExe := SetupFile.Size;
|
|
finally
|
|
finally
|
|
SetupFile.Free;
|
|
SetupFile.Free;
|
|
end;
|
|
end;
|
|
@@ -8292,7 +8292,7 @@ begin
|
|
SetupFile := TFile.Create(ExeFilename, fdOpenExisting, faReadWrite, fsNone);
|
|
SetupFile := TFile.Create(ExeFilename, fdOpenExisting, faReadWrite, fsNone);
|
|
try
|
|
try
|
|
UpdateSetupPEHeaderFields(SetupFile, TerminalServicesAware, DEPCompatible, ASLRCompatible);
|
|
UpdateSetupPEHeaderFields(SetupFile, TerminalServicesAware, DEPCompatible, ASLRCompatible);
|
|
- SizeOfExe := SetupFile.Size.Lo;
|
|
|
|
|
|
+ SizeOfExe := SetupFile.Size;
|
|
finally
|
|
finally
|
|
SetupFile.Free;
|
|
SetupFile.Free;
|
|
end;
|
|
end;
|
|
@@ -8317,7 +8317,7 @@ begin
|
|
SetupLdrOffsetTable.OffsetEXE := ExeFile.Position.Lo;
|
|
SetupLdrOffsetTable.OffsetEXE := ExeFile.Position.Lo;
|
|
CompressSetupE32(SetupE32, ExeFile, SetupLdrOffsetTable.UncompressedSizeEXE,
|
|
CompressSetupE32(SetupE32, ExeFile, SetupLdrOffsetTable.UncompressedSizeEXE,
|
|
SetupLdrOffsetTable.CRCEXE);
|
|
SetupLdrOffsetTable.CRCEXE);
|
|
- SetupLdrOffsetTable.TotalSize := ExeFile.Size.Lo;
|
|
|
|
|
|
+ SetupLdrOffsetTable.TotalSize := ExeFile.Size;
|
|
if DiskSpanning then begin
|
|
if DiskSpanning then begin
|
|
SetupLdrOffsetTable.Offset1 := 0;
|
|
SetupLdrOffsetTable.Offset1 := 0;
|
|
{ Compress the files in Setup-*.bin after we know the size of
|
|
{ Compress the files in Setup-*.bin after we know the size of
|