Replace Audacity branding in Innosetup, support HiDPI
Reference-to: https://github.com/tenacityteam/tenacity/issues/502 Signed-off-by: Lucas Fugmann <lucas@fugi.dev>
@ -1,4 +1,4 @@
|
|||||||
; Tenacity: A Digital Audio Editor
|
; Tenacity: A Digital Audio Editor
|
||||||
; Tenacity(R) is copyright (c) 1999-2021 Tenacity Team.
|
; Tenacity(R) is copyright (c) 1999-2021 Tenacity Team.
|
||||||
; License: GPL v2. See License.txt.
|
; License: GPL v2. See License.txt.
|
||||||
;
|
;
|
||||||
@ -25,8 +25,9 @@ Filename: "{app}\unins*.*";
|
|||||||
; compiler-related directives
|
; compiler-related directives
|
||||||
OutputBaseFilename=tenacity-win-{#AppVersion}-@INSTALLER_SUFFIX@
|
OutputBaseFilename=tenacity-win-{#AppVersion}-@INSTALLER_SUFFIX@
|
||||||
|
|
||||||
WizardImageFile=".\tenacity_InnoWizardImage.bmp"
|
; Use 100% images by default
|
||||||
WizardSmallImageFile=".\tenacity_InnoWizardSmallImage.bmp"
|
WizardImageFile=".\tenacity_InnoWizardImage_100.bmp"
|
||||||
|
WizardSmallImageFile=".\tenacity_InnoWizardSmallImage_100.bmp"
|
||||||
|
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
|
|
||||||
@ -114,6 +115,49 @@ Source: "Package\nyquist\*"; DestDir: "{app}\Nyquist\"; Flags: ignoreversion rec
|
|||||||
Source: "Package\plug-ins\*"; DestDir: "{app}\Plug-Ins\"; Flags: ignoreversion
|
Source: "Package\plug-ins\*"; DestDir: "{app}\Plug-Ins\"; Flags: ignoreversion
|
||||||
Source: "Package\modules\*"; DestDir: "{app}\modules\"; Flags: ignoreversion recursesubdirs
|
Source: "Package\modules\*"; DestDir: "{app}\modules\"; Flags: ignoreversion recursesubdirs
|
||||||
|
|
||||||
|
; Include scaled WizardImages
|
||||||
|
Source: "tenacity_InnoWizardImage_*.bmp"; Excludes: "*100.bmp"; Flags: dontcopy
|
||||||
|
Source: "tenacity_InnoWizardSmallImage_*.bmp"; Excludes: "*100.bmp"; Flags: dontcopy
|
||||||
|
|
||||||
|
; load images based on monitor scale
|
||||||
|
; by Martin Prikryl (CC BY-SA 3.0)
|
||||||
|
; https://stackoverflow.com/a/31003152/13384771
|
||||||
|
|
||||||
|
[Code]
|
||||||
|
|
||||||
|
function GetScalingFactor: Integer;
|
||||||
|
begin
|
||||||
|
if WizardForm.Font.PixelsPerInch >= 192 then Result := 200
|
||||||
|
else
|
||||||
|
if WizardForm.Font.PixelsPerInch >= 144 then Result := 150
|
||||||
|
else
|
||||||
|
if WizardForm.Font.PixelsPerInch >= 120 then Result := 125
|
||||||
|
else Result := 100;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure LoadEmbededScaledBitmap(Image: TBitmapImage; NameBase: string);
|
||||||
|
var
|
||||||
|
Name: String;
|
||||||
|
FileName: String;
|
||||||
|
begin
|
||||||
|
Name := Format('%s_%d.bmp', [NameBase, GetScalingFactor]);
|
||||||
|
ExtractTemporaryFile(Name);
|
||||||
|
FileName := ExpandConstant('{tmp}\' + Name);
|
||||||
|
Image.Bitmap.LoadFromFile(FileName);
|
||||||
|
DeleteFile(FileName);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure InitializeWizard;
|
||||||
|
begin
|
||||||
|
{ If using larger scaling, load the correct size of images }
|
||||||
|
if GetScalingFactor > 100 then
|
||||||
|
begin
|
||||||
|
LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage, 'tenacity_InnoWizardImage');
|
||||||
|
LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage2, 'tenacity_InnoWizardImage');
|
||||||
|
LoadEmbededScaledBitmap(WizardForm.WizardSmallBitmapImage, 'tenacity_InnoWizardSmallImage');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{commonprograms}\Tenacity"; Filename: "{app}\tenacity.exe"
|
Name: "{commonprograms}\Tenacity"; Filename: "{app}\tenacity.exe"
|
||||||
Name: "{commondesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon
|
Name: "{commondesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon
|
||||||
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 201 KiB |
BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardImage_125.bmp
Normal file
After Width: | Height: | Size: 315 KiB |
BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardImage_150.bmp
Normal file
After Width: | Height: | Size: 453 KiB |
BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardImage_200.bmp
Normal file
After Width: | Height: | Size: 805 KiB |
Before Width: | Height: | Size: 3.1 KiB |
BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_100.bmp
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_125.bmp
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_150.bmp
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_200.bmp
Normal file
After Width: | Height: | Size: 16 KiB |