|
@@ -135,6 +135,7 @@ type
|
|
|
ssMessagesFile,
|
|
|
ssMinVersion,
|
|
|
ssOnlyBelowVersion,
|
|
|
+ ssOutput,
|
|
|
ssOutputBaseFilename,
|
|
|
ssOutputDir,
|
|
|
ssOutputManifestFile,
|
|
@@ -343,7 +344,7 @@ type
|
|
|
|
|
|
OutputDir, OutputBaseFilename, OutputManifestFile, SignedUninstallerDir,
|
|
|
ExeFilename: String;
|
|
|
- FixedOutputDir, FixedOutputBaseFilename: Boolean;
|
|
|
+ Output, FixedOutput, FixedOutputDir, FixedOutputBaseFilename: Boolean;
|
|
|
CompressMethod: TSetupCompressMethod;
|
|
|
InternalCompressLevel, CompressLevel: Integer;
|
|
|
InternalCompressProps, CompressProps: TLZMACompressorProps;
|
|
@@ -3943,23 +3944,19 @@ begin
|
|
|
if not StrToVersionNumbers(Value, SetupHeader.OnlyBelowVersion) then
|
|
|
Invalid;
|
|
|
end;
|
|
|
+ ssOutput: begin
|
|
|
+ if not FixedOutput then
|
|
|
+ Output := StrToBool(Value);
|
|
|
+ end;
|
|
|
ssOutputBaseFilename: begin
|
|
|
- if not FixedOutputBaseFilename then begin
|
|
|
- if Value = '' then
|
|
|
- Invalid;
|
|
|
+ if not FixedOutputBaseFilename then
|
|
|
OutputBaseFilename := Value;
|
|
|
- end;
|
|
|
end;
|
|
|
ssOutputDir: begin
|
|
|
- if not FixedOutputDir then begin
|
|
|
- if Value = '' then
|
|
|
- Invalid;
|
|
|
+ if not FixedOutputDir then
|
|
|
OutputDir := Value;
|
|
|
- end;
|
|
|
end;
|
|
|
ssOutputManifestFile: begin
|
|
|
- if Value = '' then
|
|
|
- Invalid;
|
|
|
OutputManifestFile := Value;
|
|
|
end;
|
|
|
ssPassword: begin
|
|
@@ -7445,36 +7442,40 @@ procedure TSetupCompiler.Compile;
|
|
|
HasNumbers: Boolean;
|
|
|
begin
|
|
|
{ Delete SETUP.* and SETUP-*.BIN if they existed in the output directory }
|
|
|
- DelFile(OutputBaseFilename + '.exe');
|
|
|
- H := FindFirstFile(PChar(OutputDir + OutputBaseFilename + '-*.bin'), FindData);
|
|
|
- if H <> INVALID_HANDLE_VALUE then begin
|
|
|
- try
|
|
|
- repeat
|
|
|
- if FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY = 0 then begin
|
|
|
- N := FindData.cFileName;
|
|
|
- if PathStartsWith(N, OutputBaseFilename) then begin
|
|
|
- I := Length(OutputBaseFilename) + 1;
|
|
|
- if (I <= Length(N)) and (N[I] = '-') then begin
|
|
|
- Inc(I);
|
|
|
- HasNumbers := False;
|
|
|
- while (I <= Length(N)) and CharInSet(N[I], ['0'..'9']) do begin
|
|
|
- HasNumbers := True;
|
|
|
- Inc(I);
|
|
|
- end;
|
|
|
- if HasNumbers then begin
|
|
|
- if (I <= Length(N)) and CharInSet(UpCase(N[I]), ['A'..'Z']) then
|
|
|
- Inc(I);
|
|
|
- if CompareText(Copy(N, I, Maxint), '.bin') = 0 then
|
|
|
- DelFile(N);
|
|
|
- end;
|
|
|
- end;
|
|
|
- end;
|
|
|
- end;
|
|
|
- until not FindNextFile(H, FindData);
|
|
|
- finally
|
|
|
- Windows.FindClose(H);
|
|
|
- end;
|
|
|
- end;
|
|
|
+ if OutputBaseFilename <> '' then begin
|
|
|
+ DelFile(OutputBaseFilename + '.exe');
|
|
|
+ if OutputDir <> '' then begin
|
|
|
+ H := FindFirstFile(PChar(OutputDir + OutputBaseFilename + '-*.bin'), FindData);
|
|
|
+ if H <> INVALID_HANDLE_VALUE then begin
|
|
|
+ try
|
|
|
+ repeat
|
|
|
+ if FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY = 0 then begin
|
|
|
+ N := FindData.cFileName;
|
|
|
+ if PathStartsWith(N, OutputBaseFilename) then begin
|
|
|
+ I := Length(OutputBaseFilename) + 1;
|
|
|
+ if (I <= Length(N)) and (N[I] = '-') then begin
|
|
|
+ Inc(I);
|
|
|
+ HasNumbers := False;
|
|
|
+ while (I <= Length(N)) and CharInSet(N[I], ['0'..'9']) do begin
|
|
|
+ HasNumbers := True;
|
|
|
+ Inc(I);
|
|
|
+ end;
|
|
|
+ if HasNumbers then begin
|
|
|
+ if (I <= Length(N)) and CharInSet(UpCase(N[I]), ['A'..'Z']) then
|
|
|
+ Inc(I);
|
|
|
+ if CompareText(Copy(N, I, Maxint), '.bin') = 0 then
|
|
|
+ DelFile(N);
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+ until not FindNextFile(H, FindData);
|
|
|
+ finally
|
|
|
+ Windows.FindClose(H);
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
procedure FreeListItems(const List: TList; const NumStrings, NumAnsiStrings: Integer);
|
|
@@ -8038,7 +8039,6 @@ var
|
|
|
var
|
|
|
TempFilename, E32Filename, ConvertFilename: String;
|
|
|
begin
|
|
|
- AddStatus(SCompilerStatusPreparingSetupExe);
|
|
|
TempFilename := '';
|
|
|
try
|
|
|
E32Filename := CompilerDir + 'SETUP.E32';
|
|
@@ -8215,6 +8215,8 @@ begin
|
|
|
|
|
|
{ Initialize defaults }
|
|
|
OriginalSourceDir := AddBackslash(PathExpand(SourceDir));
|
|
|
+ if not FixedOutput then
|
|
|
+ Output := True;
|
|
|
if not FixedOutputDir then
|
|
|
OutputDir := 'Output';
|
|
|
if not FixedOutputBaseFilename then
|
|
@@ -8410,6 +8412,20 @@ begin
|
|
|
CheckCheckOrInstall('CreateUninstallRegKey', SetupHeader.CreateUninstallRegKey, cikDirectiveCheck);
|
|
|
LineNumber := SetupDirectiveLines[ssUninstallable];
|
|
|
CheckCheckOrInstall('Uninstallable', SetupHeader.Uninstallable, cikDirectiveCheck);
|
|
|
+ if Output then begin
|
|
|
+ if OutputDir = '' then begin
|
|
|
+ LineNumber := SetupDirectiveLines[ssOutput];
|
|
|
+ AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputDir']);
|
|
|
+ end;
|
|
|
+ if OutputBaseFileName = '' then begin
|
|
|
+ LineNumber := SetupDirectiveLines[ssOutputBaseFileName];
|
|
|
+ AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputBaseFileName']);
|
|
|
+ end;
|
|
|
+ if (SetupDirectiveLines[ssOutputManifestfile] <> 0) and (OutputManifestFile = '') then begin
|
|
|
+ LineNumber := SetupDirectiveLines[ssOutputManifestFile];
|
|
|
+ AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputManifestFile']);
|
|
|
+ end;
|
|
|
+ end;
|
|
|
|
|
|
LineNumber := 0;
|
|
|
|
|
@@ -8465,7 +8481,11 @@ begin
|
|
|
LineNumber := 0;
|
|
|
|
|
|
{ Prepare Setup executable & signed uninstaller data }
|
|
|
- PrepareSetupE32(SetupE32);
|
|
|
+ if Output then begin
|
|
|
+ AddStatus(SCompilerStatusPreparingSetupExe);
|
|
|
+ PrepareSetupE32(SetupE32);
|
|
|
+ end else
|
|
|
+ AddStatus(SCompilerStatusSkippingPreparingSetupExe);
|
|
|
|
|
|
{ Read languages:
|
|
|
|
|
@@ -8670,142 +8690,148 @@ begin
|
|
|
CompileCode;
|
|
|
CallIdleProc;
|
|
|
|
|
|
- { Clear any existing setup* files out of the output directory first }
|
|
|
+ { Clear any existing setup* files out of the output directory first (even
|
|
|
+ if output is disabled. }
|
|
|
EmptyOutputDir(True);
|
|
|
if OutputManifestFile <> '' then
|
|
|
DeleteFile(PrependDirName(OutputManifestFile, OutputDir));
|
|
|
|
|
|
{ Create setup files }
|
|
|
- AddStatus(SCompilerStatusCreateSetupFiles);
|
|
|
- ExeFilename := OutputDir + OutputBaseFilename + '.exe';
|
|
|
- try
|
|
|
- if not UseSetupLdr then begin
|
|
|
- SetupFile := TFile.Create(ExeFilename, fdCreateAlways, faWrite, fsNone);
|
|
|
- try
|
|
|
- SetupFile.WriteBuffer(SetupE32.Memory^, SetupE32.Size.Lo);
|
|
|
- SizeOfExe := SetupFile.Size.Lo;
|
|
|
- finally
|
|
|
- SetupFile.Free;
|
|
|
- end;
|
|
|
- CallIdleProc;
|
|
|
-
|
|
|
- if not DiskSpanning then begin
|
|
|
- { Create SETUP-0.BIN and SETUP-1.BIN }
|
|
|
- CompressFiles('', 0);
|
|
|
- CreateSetup0File;
|
|
|
- end
|
|
|
- else begin
|
|
|
- { Create SETUP-0.BIN and SETUP-*.BIN }
|
|
|
- SizeOfHeaders := CreateSetup0File;
|
|
|
- CompressFiles('', RoundToNearestClusterSize(SizeOfExe) +
|
|
|
- RoundToNearestClusterSize(SizeOfHeaders) +
|
|
|
- RoundToNearestClusterSize(ReserveBytes));
|
|
|
- { CompressFiles modifies setup header data, so go back and
|
|
|
- rewrite it }
|
|
|
- if CreateSetup0File <> SizeOfHeaders then
|
|
|
- { Make sure new and old size match. No reason why they
|
|
|
- shouldn't but check just in case }
|
|
|
- AbortCompile(SCompilerSetup0Mismatch);
|
|
|
- end;
|
|
|
- end
|
|
|
- else begin
|
|
|
- CopyFileOrAbort(CompilerDir + 'SETUPLDR.E32', ExeFilename);
|
|
|
- { if there was a read-only attribute, remove it }
|
|
|
- SetFileAttributes(PChar(ExeFilename), FILE_ATTRIBUTE_ARCHIVE);
|
|
|
- if SetupIconFilename <> '' then begin
|
|
|
- { update icons }
|
|
|
- AddStatus(Format(SCompilerStatusUpdatingIcons, ['SETUP.EXE']));
|
|
|
- LineNumber := SetupDirectiveLines[ssSetupIconFile];
|
|
|
- UpdateIcons(ExeFilename, PrependSourceDirName(SetupIconFilename));
|
|
|
- LineNumber := 0;
|
|
|
- end;
|
|
|
- SetupFile := TFile.Create(ExeFilename, fdOpenExisting, faReadWrite, fsNone);
|
|
|
- try
|
|
|
- UpdateSetupPEHeaderFields(SetupFile, TerminalServicesAware);
|
|
|
- SizeOfExe := SetupFile.Size.Lo;
|
|
|
- finally
|
|
|
- SetupFile.Free;
|
|
|
- end;
|
|
|
- CallIdleProc;
|
|
|
-
|
|
|
- { When disk spanning isn't used, place the compressed files inside
|
|
|
- SETUP.EXE }
|
|
|
- if not DiskSpanning then
|
|
|
- CompressFiles(ExeFilename, 0);
|
|
|
-
|
|
|
- ExeFile := TFile.Create(ExeFilename, fdOpenExisting, faReadWrite, fsNone);
|
|
|
- try
|
|
|
- ExeFile.SeekToEnd;
|
|
|
-
|
|
|
- { Move the data from SETUP.E?? into the SETUP.EXE, and write
|
|
|
- header data }
|
|
|
- FillChar(SetupLdrOffsetTable, SizeOf(SetupLdrOffsetTable), 0);
|
|
|
- SetupLdrOffsetTable.ID := SetupLdrOffsetTableID;
|
|
|
- SetupLdrOffsetTable.Version := SetupLdrOffsetTableVersion;
|
|
|
- SetupLdrOffsetTable.Offset0 := ExeFile.Position.Lo;
|
|
|
- SizeOfHeaders := WriteSetup0(ExeFile);
|
|
|
- SetupLdrOffsetTable.OffsetEXE := ExeFile.Position.Lo;
|
|
|
- CompressSetupE32(SetupE32, ExeFile, SetupLdrOffsetTable.UncompressedSizeEXE,
|
|
|
- SetupLdrOffsetTable.CRCEXE);
|
|
|
- SetupLdrOffsetTable.TotalSize := ExeFile.Size.Lo;
|
|
|
- if DiskSpanning then begin
|
|
|
- SetupLdrOffsetTable.Offset1 := 0;
|
|
|
- { Compress the files in SETUP-*.BIN after we know the size of
|
|
|
- SETUP.EXE }
|
|
|
- CompressFiles('',
|
|
|
- RoundToNearestClusterSize(SetupLdrOffsetTable.TotalSize) +
|
|
|
- RoundToNearestClusterSize(ReserveBytes));
|
|
|
- { CompressFiles modifies setup header data, so go back and
|
|
|
- rewrite it }
|
|
|
- ExeFile.Seek(SetupLdrOffsetTable.Offset0);
|
|
|
- if WriteSetup0(ExeFile) <> SizeOfHeaders then
|
|
|
- { Make sure new and old size match. No reason why they
|
|
|
- shouldn't but check just in case }
|
|
|
- AbortCompile(SCompilerSetup0Mismatch);
|
|
|
- end
|
|
|
- else
|
|
|
- SetupLdrOffsetTable.Offset1 := SizeOfExe;
|
|
|
- SetupLdrOffsetTable.TableCRC := GetCRC32(SetupLdrOffsetTable,
|
|
|
- SizeOf(SetupLdrOffsetTable) - SizeOf(SetupLdrOffsetTable.TableCRC));
|
|
|
-
|
|
|
- { Write SetupLdrOffsetTable to SETUP.EXE }
|
|
|
- if SeekToResourceData(ExeFile, Cardinal(RT_RCDATA), SetupLdrOffsetTableResID) <> SizeOf(SetupLdrOffsetTable) then
|
|
|
- AbortCompile('Wrong offset table resource size');
|
|
|
- ExeFile.WriteBuffer(SetupLdrOffsetTable, SizeOf(SetupLdrOffsetTable));
|
|
|
-
|
|
|
- { Update version info }
|
|
|
- AddStatus(SCompilerStatusUpdatingVersionInfo);
|
|
|
- UpdateVersionInfo(ExeFile, VersionInfoVersion, VersionInfoProductVersion, VersionInfoCompany,
|
|
|
- VersionInfoDescription, VersionInfoTextVersion,
|
|
|
- VersionInfoCopyright, VersionInfoProductName, VersionInfoProductTextVersion);
|
|
|
-
|
|
|
- { For some reason, on Win95 the date/time of the EXE sometimes
|
|
|
- doesn't get updated after it's been written to so it has to
|
|
|
- manually set it. (I don't get it!!) }
|
|
|
- UpdateTimeStamp(ExeFile.Handle);
|
|
|
- finally
|
|
|
- ExeFile.Free;
|
|
|
- end;
|
|
|
- end;
|
|
|
-
|
|
|
- { Sign }
|
|
|
- SignToolIndex := FindSignToolIndexByName(SignTool);
|
|
|
- if SignToolIndex <> -1 then begin
|
|
|
- AddStatus(SCompilerStatusSigningSetup);
|
|
|
- Sign(TSignTool(SignToolList[SignToolIndex]).Command, SignToolParams, ExeFilename);
|
|
|
- end;
|
|
|
- except
|
|
|
- EmptyOutputDir(False);
|
|
|
- raise;
|
|
|
- end;
|
|
|
- CallIdleProc;
|
|
|
-
|
|
|
- { Create manifest file }
|
|
|
- if OutputManifestFile <> '' then begin
|
|
|
- AddStatus(SCompilerStatusCreateManifestFile);
|
|
|
- CreateManifestFile;
|
|
|
- CallIdleProc;
|
|
|
- end;
|
|
|
+ if Output then begin
|
|
|
+ AddStatus(SCompilerStatusCreateSetupFiles);
|
|
|
+ ExeFilename := OutputDir + OutputBaseFilename + '.exe';
|
|
|
+ try
|
|
|
+ if not UseSetupLdr then begin
|
|
|
+ SetupFile := TFile.Create(ExeFilename, fdCreateAlways, faWrite, fsNone);
|
|
|
+ try
|
|
|
+ SetupFile.WriteBuffer(SetupE32.Memory^, SetupE32.Size.Lo);
|
|
|
+ SizeOfExe := SetupFile.Size.Lo;
|
|
|
+ finally
|
|
|
+ SetupFile.Free;
|
|
|
+ end;
|
|
|
+ CallIdleProc;
|
|
|
+
|
|
|
+ if not DiskSpanning then begin
|
|
|
+ { Create SETUP-0.BIN and SETUP-1.BIN }
|
|
|
+ CompressFiles('', 0);
|
|
|
+ CreateSetup0File;
|
|
|
+ end
|
|
|
+ else begin
|
|
|
+ { Create SETUP-0.BIN and SETUP-*.BIN }
|
|
|
+ SizeOfHeaders := CreateSetup0File;
|
|
|
+ CompressFiles('', RoundToNearestClusterSize(SizeOfExe) +
|
|
|
+ RoundToNearestClusterSize(SizeOfHeaders) +
|
|
|
+ RoundToNearestClusterSize(ReserveBytes));
|
|
|
+ { CompressFiles modifies setup header data, so go back and
|
|
|
+ rewrite it }
|
|
|
+ if CreateSetup0File <> SizeOfHeaders then
|
|
|
+ { Make sure new and old size match. No reason why they
|
|
|
+ shouldn't but check just in case }
|
|
|
+ AbortCompile(SCompilerSetup0Mismatch);
|
|
|
+ end;
|
|
|
+ end
|
|
|
+ else begin
|
|
|
+ CopyFileOrAbort(CompilerDir + 'SETUPLDR.E32', ExeFilename);
|
|
|
+ { if there was a read-only attribute, remove it }
|
|
|
+ SetFileAttributes(PChar(ExeFilename), FILE_ATTRIBUTE_ARCHIVE);
|
|
|
+ if SetupIconFilename <> '' then begin
|
|
|
+ { update icons }
|
|
|
+ AddStatus(Format(SCompilerStatusUpdatingIcons, ['SETUP.EXE']));
|
|
|
+ LineNumber := SetupDirectiveLines[ssSetupIconFile];
|
|
|
+ UpdateIcons(ExeFilename, PrependSourceDirName(SetupIconFilename));
|
|
|
+ LineNumber := 0;
|
|
|
+ end;
|
|
|
+ SetupFile := TFile.Create(ExeFilename, fdOpenExisting, faReadWrite, fsNone);
|
|
|
+ try
|
|
|
+ UpdateSetupPEHeaderFields(SetupFile, TerminalServicesAware);
|
|
|
+ SizeOfExe := SetupFile.Size.Lo;
|
|
|
+ finally
|
|
|
+ SetupFile.Free;
|
|
|
+ end;
|
|
|
+ CallIdleProc;
|
|
|
+
|
|
|
+ { When disk spanning isn't used, place the compressed files inside
|
|
|
+ SETUP.EXE }
|
|
|
+ if not DiskSpanning then
|
|
|
+ CompressFiles(ExeFilename, 0);
|
|
|
+
|
|
|
+ ExeFile := TFile.Create(ExeFilename, fdOpenExisting, faReadWrite, fsNone);
|
|
|
+ try
|
|
|
+ ExeFile.SeekToEnd;
|
|
|
+
|
|
|
+ { Move the data from SETUP.E?? into the SETUP.EXE, and write
|
|
|
+ header data }
|
|
|
+ FillChar(SetupLdrOffsetTable, SizeOf(SetupLdrOffsetTable), 0);
|
|
|
+ SetupLdrOffsetTable.ID := SetupLdrOffsetTableID;
|
|
|
+ SetupLdrOffsetTable.Version := SetupLdrOffsetTableVersion;
|
|
|
+ SetupLdrOffsetTable.Offset0 := ExeFile.Position.Lo;
|
|
|
+ SizeOfHeaders := WriteSetup0(ExeFile);
|
|
|
+ SetupLdrOffsetTable.OffsetEXE := ExeFile.Position.Lo;
|
|
|
+ CompressSetupE32(SetupE32, ExeFile, SetupLdrOffsetTable.UncompressedSizeEXE,
|
|
|
+ SetupLdrOffsetTable.CRCEXE);
|
|
|
+ SetupLdrOffsetTable.TotalSize := ExeFile.Size.Lo;
|
|
|
+ if DiskSpanning then begin
|
|
|
+ SetupLdrOffsetTable.Offset1 := 0;
|
|
|
+ { Compress the files in SETUP-*.BIN after we know the size of
|
|
|
+ SETUP.EXE }
|
|
|
+ CompressFiles('',
|
|
|
+ RoundToNearestClusterSize(SetupLdrOffsetTable.TotalSize) +
|
|
|
+ RoundToNearestClusterSize(ReserveBytes));
|
|
|
+ { CompressFiles modifies setup header data, so go back and
|
|
|
+ rewrite it }
|
|
|
+ ExeFile.Seek(SetupLdrOffsetTable.Offset0);
|
|
|
+ if WriteSetup0(ExeFile) <> SizeOfHeaders then
|
|
|
+ { Make sure new and old size match. No reason why they
|
|
|
+ shouldn't but check just in case }
|
|
|
+ AbortCompile(SCompilerSetup0Mismatch);
|
|
|
+ end
|
|
|
+ else
|
|
|
+ SetupLdrOffsetTable.Offset1 := SizeOfExe;
|
|
|
+ SetupLdrOffsetTable.TableCRC := GetCRC32(SetupLdrOffsetTable,
|
|
|
+ SizeOf(SetupLdrOffsetTable) - SizeOf(SetupLdrOffsetTable.TableCRC));
|
|
|
+
|
|
|
+ { Write SetupLdrOffsetTable to SETUP.EXE }
|
|
|
+ if SeekToResourceData(ExeFile, Cardinal(RT_RCDATA), SetupLdrOffsetTableResID) <> SizeOf(SetupLdrOffsetTable) then
|
|
|
+ AbortCompile('Wrong offset table resource size');
|
|
|
+ ExeFile.WriteBuffer(SetupLdrOffsetTable, SizeOf(SetupLdrOffsetTable));
|
|
|
+
|
|
|
+ { Update version info }
|
|
|
+ AddStatus(SCompilerStatusUpdatingVersionInfo);
|
|
|
+ UpdateVersionInfo(ExeFile, VersionInfoVersion, VersionInfoProductVersion, VersionInfoCompany,
|
|
|
+ VersionInfoDescription, VersionInfoTextVersion,
|
|
|
+ VersionInfoCopyright, VersionInfoProductName, VersionInfoProductTextVersion);
|
|
|
+
|
|
|
+ { For some reason, on Win95 the date/time of the EXE sometimes
|
|
|
+ doesn't get updated after it's been written to so it has to
|
|
|
+ manually set it. (I don't get it!!) }
|
|
|
+ UpdateTimeStamp(ExeFile.Handle);
|
|
|
+ finally
|
|
|
+ ExeFile.Free;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
+ { Sign }
|
|
|
+ SignToolIndex := FindSignToolIndexByName(SignTool);
|
|
|
+ if SignToolIndex <> -1 then begin
|
|
|
+ AddStatus(SCompilerStatusSigningSetup);
|
|
|
+ Sign(TSignTool(SignToolList[SignToolIndex]).Command, SignToolParams, ExeFilename);
|
|
|
+ end;
|
|
|
+ except
|
|
|
+ EmptyOutputDir(False);
|
|
|
+ raise;
|
|
|
+ end;
|
|
|
+ CallIdleProc;
|
|
|
+
|
|
|
+ { Create manifest file }
|
|
|
+ if OutputManifestFile <> '' then begin
|
|
|
+ AddStatus(SCompilerStatusCreateManifestFile);
|
|
|
+ CreateManifestFile;
|
|
|
+ CallIdleProc;
|
|
|
+ end;
|
|
|
+ end else begin
|
|
|
+ AddStatus(SCompilerStatusSkippingCreateSetupFiles);
|
|
|
+ ExeFilename := '';
|
|
|
+ end;
|
|
|
|
|
|
{ Finalize debug info }
|
|
|
FinalizeDebugInfo;
|
|
@@ -8814,8 +8840,8 @@ begin
|
|
|
AddStatus('');
|
|
|
for I := 0 to WarningsList.Count-1 do
|
|
|
AddStatus(SCompilerStatusWarning + WarningsList[I]);
|
|
|
- asm jmp @1; db 0,'Inno Setup Compiler, Copyright (C) 1997-2010 Jordan Russell, '
|
|
|
- db 'Portions Copyright (C) 2000-2010 Martijn Laan',0; @1: end;
|
|
|
+ asm jmp @1; db 0,'Inno Setup Compiler, Copyright (C) 1997-2014 Jordan Russell, '
|
|
|
+ db 'Portions Copyright (C) 2000-2014 Martijn Laan',0; @1: end;
|
|
|
{ Note: Removing or modifying the copyright text is a violation of the
|
|
|
Inno Setup license agreement; see LICENSE.TXT. }
|
|
|
finally
|
|
@@ -8888,7 +8914,16 @@ begin
|
|
|
if (Params.Size <> SizeOf(TCompileScriptParams)) and Assigned(Params.Options) then begin
|
|
|
P := Params.Options;
|
|
|
while P^ <> #0 do begin
|
|
|
- if StrLIComp(P, 'OutputDir=', Length('OutputDir=')) = 0 then begin
|
|
|
+ if StrLIComp(P, 'Output=', Length('Output=')) = 0 then begin
|
|
|
+ Inc(P, Length('Output='));
|
|
|
+ if TryStrToBoolean(P, SetupCompiler.Output) then
|
|
|
+ SetupCompiler.FixedOutput := True
|
|
|
+ else begin
|
|
|
+ { Bad option }
|
|
|
+ Result := isceInvalidParam;
|
|
|
+ end;
|
|
|
+ end
|
|
|
+ else if StrLIComp(P, 'OutputDir=', Length('OutputDir=')) = 0 then begin
|
|
|
Inc(P, Length('OutputDir='));
|
|
|
SetupCompiler.OutputDir := P;
|
|
|
SetupCompiler.FixedOutputDir := True;
|