Browse Source

Replace Audacity branding in Innosetup, support HiDPI

Reference-to: https://github.com/tenacityteam/tenacity/issues/502
Signed-off-by: Lucas Fugmann <lucas@fugi.dev>
pull/527/head
Lucas Fugmann 9 months ago
committed by Sol Fisher Romanoff
parent
commit
3d826b0d43
No known key found for this signature in database GPG Key ID: E0ACA5D1C244E1F
  1. 50
      win/Inno_Setup_Wizard/tenacity.iss.in
  2. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardImage_100.bmp
  3. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardImage_125.bmp
  4. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardImage_150.bmp
  5. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardImage_200.bmp
  6. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage.bmp
  7. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_100.bmp
  8. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_125.bmp
  9. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_150.bmp
  10. BIN
      win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_200.bmp

50
win/Inno_Setup_Wizard/tenacity.iss.in

@ -1,4 +1,4 @@
; Tenacity: A Digital Audio Editor
; Tenacity: A Digital Audio Editor
; Tenacity(R) is copyright (c) 1999-2021 Tenacity Team.
; License: GPL v2. See License.txt.
;
@ -25,8 +25,9 @@ Filename: "{app}\unins*.*";
; compiler-related directives
OutputBaseFilename=tenacity-win-{#AppVersion}-@INSTALLER_SUFFIX@
WizardImageFile=".\tenacity_InnoWizardImage.bmp"
WizardSmallImageFile=".\tenacity_InnoWizardSmallImage.bmp"
; Use 100% images by default
WizardImageFile=".\tenacity_InnoWizardImage_100.bmp"
WizardSmallImageFile=".\tenacity_InnoWizardSmallImage_100.bmp"
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\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]
Name: "{commonprograms}\Tenacity"; Filename: "{app}\tenacity.exe"
Name: "{commondesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardImage.bmp → win/Inno_Setup_Wizard/tenacity_InnoWizardImage_100.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardImage_125.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardImage_150.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardImage_200.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_100.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_125.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_150.bmp

BIN
win/Inno_Setup_Wizard/tenacity_InnoWizardSmallImage_200.bmp

Loading…
Cancel
Save