Add high DPI versions of the built-in WizardSmallImage.

This commit is contained in:
Martijn Laan 2021-04-11 17:23:55 +02:00
parent 132b095d2d
commit e9a8810ddc
No known key found for this signature in database
GPG Key ID: 9F8C8C5DDA579626
3 changed files with 9 additions and 8 deletions

View File

@ -359,7 +359,7 @@ type
procedure WriteCompiledCodeText(const CompiledCodeText: Ansistring);
procedure WriteCompiledCodeDebugInfo(const CompiledCodeDebugInfo: AnsiString);
function CreateMemoryStreamsFromFiles(const ADirectiveName, AFiles: String): TObjectList<TCustomMemoryStream>;
function CreateMemoryStreamsFromResources(const AResourceNames: array of String): TObjectList<TCustomMemoryStream>;
function CreateMemoryStreamsFromResources(const AResourceNamesPrefixes, AResourceNamesPostfixes: array of String): TObjectList<TCustomMemoryStream>;
public
AppData: Longint;
CallbackProc: TCompilerCallbackProc;
@ -629,14 +629,15 @@ begin
end;
end;
function TSetupCompiler.CreateMemoryStreamsFromResources(const AResourceNames: array of String): TObjectList<TCustomMemoryStream>;
function TSetupCompiler.CreateMemoryStreamsFromResources(const AResourceNamesPrefixes, AResourceNamesPostfixes: array of String): TObjectList<TCustomMemoryStream>;
var
I: Integer;
I, J: Integer;
begin
Result := TObjectList<TCustomMemoryStream>.Create;
try
for I := 0 to Length(AResourceNames)-1 do
Result.Add(TResourceStream.Create(HInstance, AResourceNames[I], RT_RCDATA));
for I := 0 to Length(AResourceNamesPrefixes)-1 do
for J := 0 to Length(AResourceNamesPostfixes)-1 do
Result.Add(TResourceStream.Create(HInstance, AResourceNamesPrefixes[I]+AResourceNamesPostfixes[J], RT_RCDATA));
except
Result.Free;
raise;
@ -8722,13 +8723,13 @@ begin
if WizardImageFile <> '' then
WizardImages := CreateMemoryStreamsFromFiles('WizardImageFile', WizardImageFile)
else
WizardImages := CreateMemoryStreamsFromResources(['WizardImage']);
WizardImages := CreateMemoryStreamsFromResources(['WizardImage'], ['']);
LineNumber := SetupDirectiveLines[ssWizardSmallImageFile];
AddStatus(Format(SCompilerStatusReadingFile, ['WizardSmallImageFile']));
if WizardSmallImageFile <> '' then
WizardSmallImages := CreateMemoryStreamsFromFiles('WizardSmallImage', WizardSmallImageFile)
else
WizardSmallImages := CreateMemoryStreamsFromResources(['WizardSmallImage']);
WizardSmallImages := CreateMemoryStreamsFromResources(['WizardSmallImage'], ['100', '125', '150', '175', '200', '225', '250']);
LineNumber := 0;
{ Prepare Setup executable & signed uninstaller data }

Binary file not shown.

View File

@ -44,7 +44,7 @@ For conditions of distribution and use, see <a href="https://jrsoftware.org/file
<li>Updated all Compiler IDE toolbar icons and the wizard images used by the Compiler IDE's New Script Wizard wizard.</li>
<li>Updated the default application icon used by Setup and Uninstall if [Setup] section directive <tt>SetupIconFile</tt> is not set.</li>
<li>Updated the small wizard image used by Uninstall if [Setup] section directive <tt>SetupIconFile</tt> is not set.</li>
<li>[Setup] section directives <tt>WizardImageFile</tt> and <tt>WizardSmallImageFile</tt> now default to a blank value which makes Setup use new more modern built-in wizard images.</li>
<li>[Setup] section directives <tt>WizardImageFile</tt> and <tt>WizardSmallImageFile</tt> now default to a blank value which makes Setup use new built-in wizard images which are more modern and include versions for higher DPI settings.</li>
<li>Updated the folder, group, and stop icons used by Setup's <i>Select Destination Location</i>, <i>Select Start Menu Folder</i>, and <i>Preparing to Install</i> wizard pages.</li>
<li>Updated the disk icon used by Setup's <i>Setup Needs the Next Disk</i> form.</li>
</ul>