Skip to content

Commit

Permalink
Improve sign flags handling for merged entries.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Aug 23, 2024
1 parent 59c16a6 commit ed1f132
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions Projects/Src/Compiler.SetupCompiler.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4584,7 +4584,7 @@ procedure TSetupCompiler.EnumFilesProc(const Line: PChar; const Ext: Integer);
'noencryption', 'nocompression', 'dontverifychecksum',
'uninsnosharedfileprompt', 'createallsubdirs', '32bit', '64bit',
'solidbreak', 'setntfscompression', 'unsetntfscompression',
'sortfilesbyname', 'gacinstall', 'sign', 'signonce', 'signcheck');
'sortfilesbyname', 'gacinstall', 'signcheck', 'signonce', 'sign');
SignFlags: array[TSetupFileLocationSign] of String = (
'', 'sign', 'signonce', 'signcheck');
AttribsFlags: array[0..3] of PChar = (
Expand Down Expand Up @@ -4911,7 +4911,8 @@ TDirListRec = record
Exclude(NewFileLocationEntry^.Flags, foChunkCompressed);
if NoEncryption then
Exclude(NewFileLocationEntry^.Flags, foChunkEncrypted);
NewFileLocationEntry.Sign := Sign;
if Sign > NewFileLocationEntry.Sign then
NewFileLocationEntry.Sign := Sign;
end
else begin
NewFileEntry^.SourceFilename := SourceFile;
Expand Down Expand Up @@ -5093,6 +5094,7 @@ TDirListRec = record

procedure ApplyNewSign(const NewSign: TSetupFileLocationSign);
begin
{ Error if there's multiple and different sign flags on the same entry }
if not (Sign in [fsNoSetting, NewSign]) then
AbortCompileOnLineFmt(SCompilerParamErrorBadCombo2,
[ParamCommonFlags, SignFlags[Sign], SignFlags[NewSign]])
Expand Down Expand Up @@ -5182,9 +5184,9 @@ TDirListRec = record
35: Include(Options, foUnsetNTFSCompression);
36: SortFilesByName := True;
37: Include(Options, foGacInstall);
38: ApplyNewSign(fsYes);
38: ApplyNewSign(fsCheck);
39: ApplyNewSign(fsOnce);
40: ApplyNewSign(fsCheck);
40: ApplyNewSign(fsYes);
end;

{ Source }
Expand Down
4 changes: 2 additions & 2 deletions Projects/Src/Shared.Struct.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface
this file it's recommended you change SetupID. Any change will do (like
changing the letters or numbers), as long as your format is
unrecognizable by the standard Inno Setup. }
SetupID: TSetupID = 'Inno Setup Setup Data (6.3.0)';
SetupID: TSetupID = 'Inno Setup Setup Data (6.4.0)';
UninstallLogID: array[Boolean] of TUninstallLogID =
('Inno Setup Uninstall Log (b)', 'Inno Setup Uninstall Log (b) 64-bit');
MessagesHdrID: TMessagesHdrID = 'Inno Setup Messages (6.0.0) (u)';
Expand Down Expand Up @@ -241,7 +241,7 @@ interface
SetupFileLocationEntryStrings = 0;
SetupFileLocationEntryAnsiStrings = 0;
type
TSetupFileLocationSign = (fsNoSetting, fsYes, fsOnce, fsCheck);
TSetupFileLocationSign = (fsNoSetting, fsCheck, fsOnce, fsYes); { Must be ordered }
PSetupFileLocationEntry = ^TSetupFileLocationEntry;
TSetupFileLocationEntry = packed record
FirstSlice, LastSlice: Integer;
Expand Down

0 comments on commit ed1f132

Please sign in to comment.