You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

399 lines
17 KiB

; Tenacity: A Digital Audio Editor
; Tenacity(R) is copyright (c) 1999-2022 Tenacity Team.
; License: GPL v2. See License.txt.
;
; tenacity.iss
#define AppExe "Package\tenacity.exe"
#define AppMajor ""
#define AppMinor ""
#define AppRev ""
#define AppBuild ""
#define FullVersion GetVersionComponents(AppExe, AppMajor, AppMinor, AppRev, AppBuild)
#define AppVersion Str(AppMajor) + "." + Str(AppMinor) + "." + Str(AppRev)
#define AppName GetStringFileInfo(AppExe, PRODUCT_NAME)
[UninstallRun]
; Uninstall prior installations.
Filename: "{app}\unins*.*"; RunOnceId: "UninstallPrior"
[Setup]
; Icons
SetupIconFile="Additional\tenacity.ico"
UninstallDisplayIcon="{app}\tenacity.exe"
WizardImageFile=".\tenacity_InnoWizardImage_100.bmp"
WizardSmallImageFile=".\tenacity_InnoWizardSmallImage_100.bmp"
; App/Version information
AppName={#AppName}
AppVerName=Tenacity {#AppVersion}
AppVersion={#AppVersion}
AppPublisher="Tenacity Team"
AppPublisherURL=https://tenacityaudio.org/
AppSupportURL=https://tenacityaudio.org/
AppUpdatesURL=https://tenacityaudio.org/
VersionInfoProductName={#AppName}
VersionInfoProductTextVersion={#GetFileProductVersion(AppExe)}
VersionInfoDescription={#AppName + " " + AppVersion + " Setup"}
VersionInfoVersion={#GetVersionNumbersString(AppExe)}
VersionInfoCopyright={#GetFileCopyright(AppExe)}
; Default install location
DefaultDirName={commonpf}\Tenacity
; Tells explorer to refresh file assocations to pickup any changes
ChangesAssociations=yes
; Does package->compress instead of compress->package
SolidCompression=yes
; Don't disable the "Select Destination Location" wizard, even if
; Tenacity is already installed.
DisableDirPage=no
; Always warn if dir exists, because we'll overwrite previous Tenacity.
DirExistsWarning=yes
DisableProgramGroupPage=yes
; Always show welcome page
DisableWelcomePage=no
; Display license information before install
InfoBeforeFile=".\tenacity_InnoWizard_InfoBefore.rtf"
; Display README after install
InfoAfterFile=Additional\README.rtf
; Directives using information passed by CMake
@INSTALLER_X64_MODE@
@SIGN_TOOL@
OutputBaseFilename=tenacity-win-{#AppVersion}-@INSTALLER_SUFFIX@
[INI]
Filename: "{app}\FirstTime.ini"; Section: "FromInno"; Key: "ResetPrefs"; String: "1"; Tasks: resetPrefs;
Filename: "{app}\FirstTime.ini"; Section: "FromInno"; Key: "Language"; String: "{language}"
[Tasks]
Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: resetPrefs; Description: "{cm:ResetPrefs}"; Flags: unchecked
; No longer allow user to choose whether to associate AUP file type with Tenacity.
; Name: associate_aup; Description: "&Associate Tenacity project files"; GroupDescription: "Other tasks:"; Flags: checkedonce
[Files]
; Prime the first time .ini file so the permissions can be set
Source: ".\FirstTimeModel.ini"; DestDir: "{app}"; DestName: "FirstTime.ini"; Permissions: users-modify
; Manually create RTF version of README
Source: "Additional\README.rtf"; DestDir: "{app}"; Flags: ignoreversion
Source: "Additional\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppExe}"; DestDir: "{app}"; Flags: ignoreversion
; Manual, which should be got from the manual wiki using ..\scripts\mw2html_tenacity\wiki2htm.bat
@MANUAL@
Source: "Additional\presets\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
; We include all dll files from the Adacity root directory. This script is now executed as a part of CI build process,
; so we controll which dll files are present in the directory.
Source: "Package\*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "Package\languages\*"; DestDir: "{app}\Languages\"; Flags: ignoreversion recursesubdirs
; We don't ship all modules, so the next line is commented out
; Source: "Package\modules\*"; DestDir: "{app}\Modules\"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
Source: "Package\nyquist\*"; DestDir: "{app}\Nyquist\"; Flags: ignoreversion recursesubdirs
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
[InstallDelete]
; Get rid of previous versions of MSVC runtimes
; Currently MSVC runtime versions 8, 9, 10, 11, 12, 13
Type: files; Name: "{app}\Microsoft.VC80.CRT.manifest"
Type: files; Name: "{app}\msvcp80.dll"
Type: files; Name: "{app}\msvcr80.dll"
Type: files; Name: "{app}\Microsoft.VC90.CRT.manifest"
Type: files; Name: "{app}\msvcp90.dll"
Type: files; Name: "{app}\msvcr90.dll"
Type: files; Name: "{app}\Microsoft.VC100.CRT.manifest"
Type: files; Name: "{app}\msvcp100.dll"
Type: files; Name: "{app}\msvcr100.dll"
Type: files; Name: "{app}\Microsoft.VC110.CRT.manifest"
Type: files; Name: "{app}\msvcp110.dll"
Type: files; Name: "{app}\msvcr110.dll"
Type: files; Name: "{app}\Microsoft.VC120.CRT.manifest"
Type: files; Name: "{app}\msvcp120.dll"
Type: files; Name: "{app}\msvcr120.dll"
Type: files; Name: "{app}\Microsoft.VC130.CRT.manifest"
Type: files; Name: "{app}\msvcp130.dll"
Type: files; Name: "{app}\msvcr130.dll"
; Get rid of previous help folder.
Type: filesandordirs; Name: "{app}\help"
;Get rid of previous uninstall item
Type: files; Name: "{app}\unins*.*"
; Get rid of no longer used test.lsp.
Type: files; Name: "{app}\Nyquist\test.lsp"
; Get rid of specific LADSPA plug-ins that we now ship with different names.
Type: files; Name: "{app}\Plug-Ins\GVerb.dll"
Type: files; Name: "{app}\Plug-Ins\Hard Limiter.dll"
Type: files; Name: "{app}\Plug-Ins\hard_limiter_1413.dll"
Type: files; Name: "{app}\Plug-Ins\sc4.dll"
;Get rid of any modules that we have ever installed
Type: files; Name: "{app}\Modules\mod-script-pipe.dll"
Type: files; Name: "{app}\Modules\mod-script-pipe.exp"
Type: files; Name: "{app}\Modules\mod-script-pipe.lib"
Type: files; Name: "{app}\Modules\mod-nyq-bench.dll"
;get rid of the Modules dir, if it is empty
Type: dirifempty; Name: "{app}\Modules"
; Get rid of gverb that we no longer ship
Type: files; Name: "{app}\Plug-Ins\gverb_1216.dll"
; Get rid of old nyquist plugins that we no longer ship
Type: files; Name: "{app}\Plug-Ins\crossfadein.ny"
Type: files; Name: "{app}\Plug-Ins\crossfadeout.ny"
Type: files; Name: "{app}\Plug-Ins\clicktrack.ny"
[Registry]
; No longer allow user to choose whether to associate AUP file type with Tenacity.
; Leaving this one commented out example of the old way.
; Root: HKCR; Subkey: ".AUP"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey; Tasks: associate_aup
Root: HKCR; Subkey: ".AUP"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey;
Root: HKCR; Subkey: ".AUP3"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey;
Root: HKCR; Subkey: "Tenacity.Project\OpenWithList\tenacity.exe"; Flags: createvalueifdoesntexist uninsdeletekey;
Root: HKCR; Subkey: "Tenacity.Project"; ValueType: string; ValueData: "Tenacity Project File"; Flags: createvalueifdoesntexist uninsdeletekey;
Root: HKCR; Subkey: "Tenacity.Project\shell"; ValueType: string; ValueData: ""; Flags: createvalueifdoesntexist uninsdeletekey;
Root: HKCR; Subkey: "Tenacity.Project\shell\open"; Flags: createvalueifdoesntexist uninsdeletekey;
Root: HKCR; Subkey: "Tenacity.Project\shell\open\command"; ValueType: string; ValueData: """{app}\tenacity.exe"" ""%1"""; Flags: uninsdeletekey;
;The following would allow a following 'help' installer to know where to put the 'help' files.
;Root: HKCR; Subkey: "Tenacity.Project\Path"; ValueType: string; ValueData: {app}; Flags: createvalueifdoesntexist uninsdeletekey;
[Run]
Filename: "{app}\tenacity.exe"; Description: "{cm:LaunchProgram,Tenacity}"; Flags: nowait postinstall skipifsilent
[Languages]
; NOTE: "0" in locale name will be translated to "@" when read by Tenacity.
; Create subdirectories where we'll store the unofficial and dummy translation files
{#expr Exec("cmd", "/c mkdir """ + "Languages\dummy""", '.\', , SW_HIDE), \
Exec("cmd", "/c mkdir """ + "Languages\unofficial""", '.\', , SW_HIDE)}
; Download Additional Inno Setup translations from:
;
; http://www.jrsoftware.org/files/istrans/
;
; Set this to the base of the unofficial Inno Setup translations
#define UrlBase "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/"
; This macro will use the Windows PowerShell to download the given translation into
; the Inno Setup Languages folder if it hasn't already been downloaded.
; (Sorry, it's not a quick process, but it only happens once.)
#define Get(URL) \
Local[0] = ".\Languages\unofficial\" + Copy(URL, RPos("/", URL) + 1), \
Local[1] = (FileExists(Local[0]) \
? "alreadyexists" \
: Exec("powershell", "echo 'Downloading: " + URL + "'; $wc = new-object System.Net.WebClient; $wc.DownloadFile('" + URLBase + URL + "', '" + Local[0] + "')", '.\', , SW_NORMAL)), \
Local[0]
; This macro will define a dummy translation based on the Defaults.isl
#define Dummy(NAME, ID) \
Local[0] = ".\Languages\dummy\", \
Local[1] = Local[0] + NAME + ".isl", \
Local[2] = SourcePath + Local[1], \
Local[3] = (FileExists(Local[2]) \
? "alreadyexists" \
: (CopyFile(CompilerPath + "Default.isl", Local[2]), \
WriteIni(Local[2], "LangOptions", "LanguageName", NAME), \
WriteIni(Local[2], "LangOptions", "LanguageID", "$" + ID))), \
Local[1]
Name: "af"; MessagesFile: "{#Get('Afrikaans.isl')}"
Name: "ar"; MessagesFile: "{#Get('Arabic.isl')}"
Name: "be"; MessagesFile: "{#Get('Belarusian.isl')}"
Name: "bg"; MessagesFile: "compiler:Languages\Bulgarian.isl"
Name: "bn"; MessagesFile: "{#Get('Bengali.islu')}"
Name: "bs"; MessagesFile: "{#Get('Bosnian.isl')}"
Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "ca_ES0valencia"; MessagesFile: "{#Get('Valencian.isl')}"
Name: "co"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "cs"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "cy"; MessagesFile: "{#Dummy('Welsh', '0452')}"
Name: "da"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
Name: "el"; MessagesFile: "{#Get('Greek.isl')}"
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "eu"; MessagesFile: "{#Get('Basque.isl')}"
Name: "fa"; MessagesFile: "{#Get('Farsi.isl')}"
Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "ga"; MessagesFile: "{#Dummy('Gaeilge', '083C')}"
Name: "gl"; MessagesFile: "{#Get('Galician.isl')}"
Name: "he"; MessagesFile: "compiler:Languages\Hebrew.isl"
Name: "hi"; MessagesFile: "{#Get('Hindi.islu')}"
Name: "hr"; MessagesFile: "{#Get('Croatian.isl')}"
Name: "hu"; MessagesFile: "{#Get('Hungarian.isl')}"
Name: "hy"; MessagesFile: "compiler:Languages\Armenian.isl"
Name: "id"; MessagesFile: "{#Get('Indonesian.isl')}"
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "ka"; MessagesFile: "{#Get('Georgian.isl')}"
Name: "km"; MessagesFile: "{#Dummy('Khmer', '0409')}"
Name: "ko"; MessagesFile: "{#Dummy('Korean', '0412')}"
Name: "lt"; MessagesFile: "{#Get('Lithuanian.isl')}"
Name: "mk"; MessagesFile: "{#Get('Macedonian.isl')}"
Name: "my"; MessagesFile: "{#Dummy('Burmese', '0409')}"
Name: "nb"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "ne"; MessagesFile: "{#Get('Nepali.islu')}"
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "oc"; MessagesFile: "{#Get('Occitan.isl')}"
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "pt_PT"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "pt_BR"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "ro"; MessagesFile: "{#Get('Romanian.isl')}"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "sl"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "sr_RS"; MessagesFile: "{#Get('SerbianCyrillic.isl')}"
Name: "sr_RS0latin"; MessagesFile: "{#Get('SerbianLatin.isl')}"
Name: "sv"; MessagesFile: "{#Get('Swedish.isl')}"
Name: "ta"; MessagesFile: "{#Dummy('Tamil', '0449')}"
Name: "tg"; MessagesFile: "{#Dummy('Tajik', '0428')}"
Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "uk"; MessagesFile: "compiler:Languages\Ukrainian.isl"
Name: "vi"; MessagesFile: "{#Get('Vietnamese.isl')}"
Name: "zh_CN"; MessagesFile: "{#Get('ChineseSimplified.isl')}"
Name: "zh_TW"; MessagesFile: "{#Get('ChineseTraditional.isl')}"
; To include additional translations add it to the win/InnoSetupLanguages directory.
; The filename must be the locale name and the ".isl" extension. For example, "af.isl"
; would have the "Afrikaans" translation.
; Pull in additional translations from the win/InnoSetupLanguages directory
#define FindHandle
#define FindResult
#sub AddLanguage
#define FileName FindGetFileName(FindHandle)
#define LangCode Local[0] = Copy(FileName, 1, Pos(".", FileName) - 1)
Name: {#LangCode}; MessagesFile: "InnoSetupLanguages\{#FileName}"
#endsub
#for {FindHandle = FindResult = FindFirst("InnoSetupLanguages\*.isl", 0); FindResult; FindResult = FindNext(FindHandle)} AddLanguage
#if FindHandle
#expr FindClose(FindHandle)
#endif
; These could be included from a different file to make it easier to update...
[CustomMessages]
af.ResetPrefs=Reset Preferences
ar.ResetPrefs=Reset Preferences
be.ResetPrefs=Reset Preferences
bg.ResetPrefs=Да се нулират ли настройките?
bn.ResetPrefs=Reset Preferences
bs.ResetPrefs=Reset Preferences
ca.ResetPrefs=Voleu restablir les preferències?
ca_ES0valencia.ResetPrefs=Reset Preferences
co.ResetPrefs=Reinizià e preferenze ?
cs.ResetPrefs=Vynulovat nastavení?
cy.ResetPrefs=Reset Preferences
da.ResetPrefs=Gendan indstillinger?
de.ResetPrefs=Einstellungen zurücksetzen?
el.ResetPrefs=Επαναφορά προτιμήσεων;
en.ResetPrefs=Reset Preferences
es.ResetPrefs=¿Desea restablecer las preferencias?
eu.ResetPrefs=Berrezarri Hobespenak?
fa.ResetPrefs=Reset Preferences
fi.ResetPrefs=Reset Preferences
fr.ResetPrefs=Réinitialiser les préférences ?
ga.ResetPrefs=Reset Preferences
gl.ResetPrefs=Restabelecer as preferencias?
he.ResetPrefs=?אתה רוצה לשחזר העדפות
hi.ResetPrefs=वरीयताएँ रीसेट करें?
hr.ResetPrefs=Resetirati Postavke?
hu.ResetPrefs=Alapra állítja a beállításokat?
hy.ResetPrefs=Վերափոխե՞լ կարգավորումները:
id.ResetPrefs=Reset Preferences
it.ResetPrefs=Ripristino Preferenze?
ja.ResetPrefs=環境設定をリセットする
ka.ResetPrefs=Reset Preferences
km.ResetPrefs=Reset Preferences
ko.ResetPrefs=기본 설정을 재설정하시겠습니까?
lt.ResetPrefs=Reset Preferences
mk.ResetPrefs=Reset Preferences
my.ResetPrefs=Reset Preferences
nb.ResetPrefs=Reset Preferences
ne.ResetPrefs=Reset Preferences
nl.ResetPrefs=Voorkeuren herstellen?
oc.ResetPrefs=Reset Preferences
pl.ResetPrefs=Zresetować ustawienia?
pt_PT.ResetPrefs=Reconfigurar as Preferências?
pt_BR.ResetPrefs=Repor Preferências?
ro.ResetPrefs=Reset Preferences
ru.ResetPrefs=Сбросить Параметры?
sk.ResetPrefs=Obnoviť nastavenia?
sl.ResetPrefs=Želite ponastaviti možnosti?
sr_RS.ResetPrefs=Да вратим на старе поставке?
sr_RS0latin.ResetPrefs=Da vratim na stare postavke?
sv.ResetPrefs=Återställ inställningar?
ta.ResetPrefs="விருப்பங்களை மீட்டமைக்க?
tg.ResetPrefs=Reset Preferences
tr.ResetPrefs=Ayarlar Sıfırlansın mı?
uk.ResetPrefs=Відновити початкові значення параметрів?
;vi.ResetPrefs=Reset Preferences
zh_CN.ResetPrefs=重置偏好设置
zh_TW.ResetPrefs=重置偏好設定