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

  1. ; Tenacity: A Digital Audio Editor
  2. ; Tenacity(R) is copyright (c) 1999-2021 Tenacity Team.
  3. ; License: GPL v2. See License.txt.
  4. ;
  5. ; tenacity.iss
  6. #define AppExe "Package\tenacity.exe"
  7. #define AppMajor ""
  8. #define AppMinor ""
  9. #define AppRev ""
  10. #define AppBuild ""
  11. #define FullVersion GetVersionComponents(AppExe, AppMajor, AppMinor, AppRev, AppBuild)
  12. #define AppVersion Str(AppMajor) + "." + Str(AppMinor) + "." + Str(AppRev)
  13. #define AppName GetStringFileInfo(AppExe, PRODUCT_NAME)
  14. [UninstallRun]
  15. ; Uninstall prior installations.
  16. Filename: "{app}\unins*.*"; RunOnceId: "UninstallPrior"
  17. [Setup]
  18. ; Icons
  19. SetupIconFile="Additional\tenacity.ico"
  20. UninstallDisplayIcon="{app}\tenacity.exe"
  21. WizardImageFile=".\tenacity_InnoWizardImage_100.bmp"
  22. WizardSmallImageFile=".\tenacity_InnoWizardSmallImage_100.bmp"
  23. ; App/Version information
  24. AppName={#AppName}
  25. AppVerName=Tenacity {#AppVersion}
  26. AppVersion={#AppVersion}
  27. AppPublisher="Tenacity Team"
  28. AppPublisherURL=https://tenacityaudio.org/
  29. AppSupportURL=https://tenacityaudio.org/
  30. AppUpdatesURL=https://tenacityaudio.org/
  31. VersionInfoProductName={#AppName}
  32. VersionInfoProductTextVersion={#GetFileProductVersion(AppExe)}
  33. VersionInfoDescription={#AppName + " " + AppVersion + " Setup"}
  34. VersionInfoVersion={#GetVersionNumbersString(AppExe)}
  35. VersionInfoCopyright={#GetFileCopyright(AppExe)}
  36. ; Default install location
  37. DefaultDirName={commonpf}\Tenacity
  38. ; Tells explorer to refresh file assocations to pickup any changes
  39. ChangesAssociations=yes
  40. ; Does package->compress instead of compress->package
  41. SolidCompression=yes
  42. ; Don't disable the "Select Destination Location" wizard, even if
  43. ; Tenacity is already installed.
  44. DisableDirPage=no
  45. ; Always warn if dir exists, because we'll overwrite previous Tenacity.
  46. DirExistsWarning=yes
  47. DisableProgramGroupPage=yes
  48. ; Always show welcome page
  49. DisableWelcomePage=no
  50. ; Display license information before install
  51. InfoBeforeFile=".\tenacity_InnoWizard_InfoBefore.rtf"
  52. ; Display README after install
  53. InfoAfterFile=Additional\README.rtf
  54. ; Directives using information passed by CMake
  55. @INSTALLER_X64_MODE@
  56. @SIGN_TOOL@
  57. OutputBaseFilename=tenacity-win-{#AppVersion}-@INSTALLER_SUFFIX@
  58. [INI]
  59. Filename: "{app}\FirstTime.ini"; Section: "FromInno"; Key: "ResetPrefs"; String: "1"; Tasks: resetPrefs;
  60. Filename: "{app}\FirstTime.ini"; Section: "FromInno"; Key: "Language"; String: "{language}"
  61. [Tasks]
  62. Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
  63. Name: resetPrefs; Description: "{cm:ResetPrefs}"; Flags: unchecked
  64. ; No longer allow user to choose whether to associate AUP file type with Tenacity.
  65. ; Name: associate_aup; Description: "&Associate Tenacity project files"; GroupDescription: "Other tasks:"; Flags: checkedonce
  66. [Files]
  67. ; Prime the first time .ini file so the permissions can be set
  68. Source: ".\FirstTimeModel.ini"; DestDir: "{app}"; DestName: "FirstTime.ini"; Permissions: users-modify
  69. ; Manually create RTF version of README
  70. Source: "Additional\README.rtf"; DestDir: "{app}"; Flags: ignoreversion
  71. Source: "Additional\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
  72. Source: "{#AppExe}"; DestDir: "{app}"; Flags: ignoreversion
  73. ; Manual, which should be got from the manual wiki using ..\scripts\mw2html_tenacity\wiki2htm.bat
  74. @MANUAL@
  75. Source: "Additional\presets\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
  76. ; We include all dll files from the Adacity root directory. This script is now executed as a part of CI build process,
  77. ; so we controll which dll files are present in the directory.
  78. Source: "Package\*.dll"; DestDir: "{app}"; Flags: ignoreversion
  79. Source: "Package\languages\*"; DestDir: "{app}\Languages\"; Flags: ignoreversion recursesubdirs
  80. ; We don't ship all modules, so the next line is commented out
  81. ; Source: "Package\modules\*"; DestDir: "{app}\Modules\"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
  82. Source: "Package\nyquist\*"; DestDir: "{app}\Nyquist\"; Flags: ignoreversion recursesubdirs
  83. Source: "Package\plug-ins\*"; DestDir: "{app}\Plug-Ins\"; Flags: ignoreversion
  84. Source: "Package\modules\*"; DestDir: "{app}\modules\"; Flags: ignoreversion recursesubdirs
  85. ; Include scaled WizardImages
  86. Source: "tenacity_InnoWizardImage_*.bmp"; Excludes: "*100.bmp"; Flags: dontcopy
  87. Source: "tenacity_InnoWizardSmallImage_*.bmp"; Excludes: "*100.bmp"; Flags: dontcopy
  88. ; load images based on monitor scale
  89. ; by Martin Prikryl (CC BY-SA 3.0)
  90. ; https://stackoverflow.com/a/31003152/13384771
  91. [Code]
  92. function GetScalingFactor: Integer;
  93. begin
  94. if WizardForm.Font.PixelsPerInch >= 192 then Result := 200
  95. else
  96. if WizardForm.Font.PixelsPerInch >= 144 then Result := 150
  97. else
  98. if WizardForm.Font.PixelsPerInch >= 120 then Result := 125
  99. else Result := 100;
  100. end;
  101. procedure LoadEmbededScaledBitmap(Image: TBitmapImage; NameBase: string);
  102. var
  103. Name: String;
  104. FileName: String;
  105. begin
  106. Name := Format('%s_%d.bmp', [NameBase, GetScalingFactor]);
  107. ExtractTemporaryFile(Name);
  108. FileName := ExpandConstant('{tmp}\' + Name);
  109. Image.Bitmap.LoadFromFile(FileName);
  110. DeleteFile(FileName);
  111. end;
  112. procedure InitializeWizard;
  113. begin
  114. { If using larger scaling, load the correct size of images }
  115. if GetScalingFactor > 100 then
  116. begin
  117. LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage, 'tenacity_InnoWizardImage');
  118. LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage2, 'tenacity_InnoWizardImage');
  119. LoadEmbededScaledBitmap(WizardForm.WizardSmallBitmapImage, 'tenacity_InnoWizardSmallImage');
  120. end;
  121. end;
  122. [Icons]
  123. Name: "{commonprograms}\Tenacity"; Filename: "{app}\tenacity.exe"
  124. Name: "{commondesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon
  125. [InstallDelete]
  126. ; Get rid of previous versions of MSVC runtimes
  127. ; Currently MSVC runtime versions 8, 9, 10, 11, 12, 13
  128. Type: files; Name: "{app}\Microsoft.VC80.CRT.manifest"
  129. Type: files; Name: "{app}\msvcp80.dll"
  130. Type: files; Name: "{app}\msvcr80.dll"
  131. Type: files; Name: "{app}\Microsoft.VC90.CRT.manifest"
  132. Type: files; Name: "{app}\msvcp90.dll"
  133. Type: files; Name: "{app}\msvcr90.dll"
  134. Type: files; Name: "{app}\Microsoft.VC100.CRT.manifest"
  135. Type: files; Name: "{app}\msvcp100.dll"
  136. Type: files; Name: "{app}\msvcr100.dll"
  137. Type: files; Name: "{app}\Microsoft.VC110.CRT.manifest"
  138. Type: files; Name: "{app}\msvcp110.dll"
  139. Type: files; Name: "{app}\msvcr110.dll"
  140. Type: files; Name: "{app}\Microsoft.VC120.CRT.manifest"
  141. Type: files; Name: "{app}\msvcp120.dll"
  142. Type: files; Name: "{app}\msvcr120.dll"
  143. Type: files; Name: "{app}\Microsoft.VC130.CRT.manifest"
  144. Type: files; Name: "{app}\msvcp130.dll"
  145. Type: files; Name: "{app}\msvcr130.dll"
  146. ; Get rid of previous help folder.
  147. Type: filesandordirs; Name: "{app}\help"
  148. ;Get rid of previous uninstall item
  149. Type: files; Name: "{app}\unins*.*"
  150. ; Get rid of no longer used test.lsp.
  151. Type: files; Name: "{app}\Nyquist\test.lsp"
  152. ; Get rid of specific LADSPA plug-ins that we now ship with different names.
  153. Type: files; Name: "{app}\Plug-Ins\GVerb.dll"
  154. Type: files; Name: "{app}\Plug-Ins\Hard Limiter.dll"
  155. Type: files; Name: "{app}\Plug-Ins\hard_limiter_1413.dll"
  156. Type: files; Name: "{app}\Plug-Ins\sc4.dll"
  157. ;Get rid of any modules that we have ever installed
  158. Type: files; Name: "{app}\Modules\mod-script-pipe.dll"
  159. Type: files; Name: "{app}\Modules\mod-script-pipe.exp"
  160. Type: files; Name: "{app}\Modules\mod-script-pipe.lib"
  161. Type: files; Name: "{app}\Modules\mod-nyq-bench.dll"
  162. ;get rid of the Modules dir, if it is empty
  163. Type: dirifempty; Name: "{app}\Modules"
  164. ; Get rid of gverb that we no longer ship
  165. Type: files; Name: "{app}\Plug-Ins\gverb_1216.dll"
  166. ; Get rid of old nyquist plugins that we no longer ship
  167. Type: files; Name: "{app}\Plug-Ins\crossfadein.ny"
  168. Type: files; Name: "{app}\Plug-Ins\crossfadeout.ny"
  169. Type: files; Name: "{app}\Plug-Ins\clicktrack.ny"
  170. [Registry]
  171. ; No longer allow user to choose whether to associate AUP file type with Tenacity.
  172. ; Leaving this one commented out example of the old way.
  173. ; Root: HKCR; Subkey: ".AUP"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey; Tasks: associate_aup
  174. Root: HKCR; Subkey: ".AUP"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey;
  175. Root: HKCR; Subkey: ".AUP3"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey;
  176. Root: HKCR; Subkey: "Tenacity.Project\OpenWithList\tenacity.exe"; Flags: createvalueifdoesntexist uninsdeletekey;
  177. Root: HKCR; Subkey: "Tenacity.Project"; ValueType: string; ValueData: "Tenacity Project File"; Flags: createvalueifdoesntexist uninsdeletekey;
  178. Root: HKCR; Subkey: "Tenacity.Project\shell"; ValueType: string; ValueData: ""; Flags: createvalueifdoesntexist uninsdeletekey;
  179. Root: HKCR; Subkey: "Tenacity.Project\shell\open"; Flags: createvalueifdoesntexist uninsdeletekey;
  180. Root: HKCR; Subkey: "Tenacity.Project\shell\open\command"; ValueType: string; ValueData: """{app}\tenacity.exe"" ""%1"""; Flags: uninsdeletekey;
  181. ;The following would allow a following 'help' installer to know where to put the 'help' files.
  182. ;Root: HKCR; Subkey: "Tenacity.Project\Path"; ValueType: string; ValueData: {app}; Flags: createvalueifdoesntexist uninsdeletekey;
  183. [Run]
  184. Filename: "{app}\tenacity.exe"; Description: "{cm:LaunchProgram,Tenacity}"; Flags: nowait postinstall skipifsilent
  185. [Languages]
  186. ; NOTE: "0" in locale name will be translated to "@" when read by Tenacity.
  187. ; Create subdirectories where we'll store the unofficial and dummy translation files
  188. {#expr Exec("cmd", "/c mkdir """ + "Languages\dummy""", '.\', , SW_HIDE), \
  189. Exec("cmd", "/c mkdir """ + "Languages\unofficial""", '.\', , SW_HIDE)}
  190. ; Download Additional Inno Setup translations from:
  191. ;
  192. ; http://www.jrsoftware.org/files/istrans/
  193. ;
  194. ; Set this to the base of the unofficial Inno Setup translations
  195. #define UrlBase "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/"
  196. ; This macro will use the Windows PowerShell to download the given translation into
  197. ; the Inno Setup Languages folder if it hasn't already been downloaded.
  198. ; (Sorry, it's not a quick process, but it only happens once.)
  199. #define Get(URL) \
  200. Local[0] = ".\Languages\unofficial\" + Copy(URL, RPos("/", URL) + 1), \
  201. Local[1] = (FileExists(Local[0]) \
  202. ? "alreadyexists" \
  203. : Exec("powershell", "echo 'Downloading: " + URL + "'; $wc = new-object System.Net.WebClient; $wc.DownloadFile('" + URLBase + URL + "', '" + Local[0] + "')", '.\', , SW_NORMAL)), \
  204. Local[0]
  205. ; This macro will define a dummy translation based on the Defaults.isl
  206. #define Dummy(NAME, ID) \
  207. Local[0] = ".\Languages\dummy\", \
  208. Local[1] = Local[0] + NAME + ".isl", \
  209. Local[2] = SourcePath + Local[1], \
  210. Local[3] = (FileExists(Local[2]) \
  211. ? "alreadyexists" \
  212. : (CopyFile(CompilerPath + "Default.isl", Local[2]), \
  213. WriteIni(Local[2], "LangOptions", "LanguageName", NAME), \
  214. WriteIni(Local[2], "LangOptions", "LanguageID", "$" + ID))), \
  215. Local[1]
  216. Name: "af"; MessagesFile: "{#Get('Afrikaans.isl')}"
  217. Name: "ar"; MessagesFile: "{#Get('Arabic.isl')}"
  218. Name: "be"; MessagesFile: "{#Get('Belarusian.isl')}"
  219. Name: "bg"; MessagesFile: "compiler:Languages\Bulgarian.isl"
  220. Name: "bn"; MessagesFile: "{#Get('Bengali.islu')}"
  221. Name: "bs"; MessagesFile: "{#Get('Bosnian.isl')}"
  222. Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl"
  223. Name: "ca_ES0valencia"; MessagesFile: "{#Get('Valencian.isl')}"
  224. Name: "co"; MessagesFile: "compiler:Languages\Corsican.isl"
  225. Name: "cs"; MessagesFile: "compiler:Languages\Czech.isl"
  226. Name: "cy"; MessagesFile: "{#Dummy('Welsh', '0452')}"
  227. Name: "da"; MessagesFile: "compiler:Languages\Danish.isl"
  228. Name: "de"; MessagesFile: "compiler:Languages\German.isl"
  229. Name: "el"; MessagesFile: "{#Get('Greek.isl')}"
  230. Name: "en"; MessagesFile: "compiler:Default.isl"
  231. Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
  232. Name: "eu"; MessagesFile: "{#Get('Basque.isl')}"
  233. Name: "fa"; MessagesFile: "{#Get('Farsi.isl')}"
  234. Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl"
  235. Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
  236. Name: "ga"; MessagesFile: "{#Dummy('Gaeilge', '083C')}"
  237. Name: "gl"; MessagesFile: "{#Get('Galician.isl')}"
  238. Name: "he"; MessagesFile: "compiler:Languages\Hebrew.isl"
  239. Name: "hi"; MessagesFile: "{#Get('Hindi.islu')}"
  240. Name: "hr"; MessagesFile: "{#Get('Croatian.isl')}"
  241. Name: "hu"; MessagesFile: "{#Get('Hungarian.isl')}"
  242. Name: "hy"; MessagesFile: "compiler:Languages\Armenian.isl"
  243. Name: "id"; MessagesFile: "{#Get('Indonesian.isl')}"
  244. Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
  245. Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"
  246. Name: "ka"; MessagesFile: "{#Get('Georgian.isl')}"
  247. Name: "km"; MessagesFile: "{#Dummy('Khmer', '0409')}"
  248. Name: "ko"; MessagesFile: "{#Dummy('Korean', '0412')}"
  249. Name: "lt"; MessagesFile: "{#Get('Lithuanian.isl')}"
  250. Name: "mk"; MessagesFile: "{#Get('Macedonian.isl')}"
  251. Name: "my"; MessagesFile: "{#Dummy('Burmese', '0409')}"
  252. Name: "nb"; MessagesFile: "compiler:Languages\Norwegian.isl"
  253. Name: "ne"; MessagesFile: "{#Get('Nepali.islu')}"
  254. Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
  255. Name: "oc"; MessagesFile: "{#Get('Occitan.isl')}"
  256. Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
  257. Name: "pt_PT"; MessagesFile: "compiler:Languages\Portuguese.isl"
  258. Name: "pt_BR"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
  259. Name: "ro"; MessagesFile: "{#Get('Romanian.isl')}"
  260. Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
  261. Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
  262. Name: "sl"; MessagesFile: "compiler:Languages\Slovenian.isl"
  263. Name: "sr_RS"; MessagesFile: "{#Get('SerbianCyrillic.isl')}"
  264. Name: "sr_RS0latin"; MessagesFile: "{#Get('SerbianLatin.isl')}"
  265. Name: "sv"; MessagesFile: "{#Get('Swedish.isl')}"
  266. Name: "ta"; MessagesFile: "{#Dummy('Tamil', '0449')}"
  267. Name: "tg"; MessagesFile: "{#Dummy('Tajik', '0428')}"
  268. Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl"
  269. Name: "uk"; MessagesFile: "compiler:Languages\Ukrainian.isl"
  270. Name: "vi"; MessagesFile: "{#Get('Vietnamese.isl')}"
  271. Name: "zh_CN"; MessagesFile: "{#Get('ChineseSimplified.isl')}"
  272. Name: "zh_TW"; MessagesFile: "{#Get('ChineseTraditional.isl')}"
  273. ; To include additional translations add it to the win/InnoSetupLanguages directory.
  274. ; The filename must be the locale name and the ".isl" extension. For example, "af.isl"
  275. ; would have the "Afrikaans" translation.
  276. ; Pull in additional translations from the win/InnoSetupLanguages directory
  277. #define FindHandle
  278. #define FindResult
  279. #sub AddLanguage
  280. #define FileName FindGetFileName(FindHandle)
  281. #define LangCode Local[0] = Copy(FileName, 1, Pos(".", FileName) - 1)
  282. Name: {#LangCode}; MessagesFile: "InnoSetupLanguages\{#FileName}"
  283. #endsub
  284. #for {FindHandle = FindResult = FindFirst("InnoSetupLanguages\*.isl", 0); FindResult; FindResult = FindNext(FindHandle)} AddLanguage
  285. #if FindHandle
  286. #expr FindClose(FindHandle)
  287. #endif
  288. ; These could be included from a different file to make it easier to update...
  289. [CustomMessages]
  290. af.ResetPrefs=Reset Preferences
  291. ar.ResetPrefs=Reset Preferences
  292. be.ResetPrefs=Reset Preferences
  293. bg.ResetPrefs=Да се нулират ли настройките?
  294. bn.ResetPrefs=Reset Preferences
  295. bs.ResetPrefs=Reset Preferences
  296. ca.ResetPrefs=Voleu restablir les preferències?
  297. ca_ES0valencia.ResetPrefs=Reset Preferences
  298. co.ResetPrefs=Reinizià e preferenze ?
  299. cs.ResetPrefs=Vynulovat nastavení?
  300. cy.ResetPrefs=Reset Preferences
  301. da.ResetPrefs=Gendan indstillinger?
  302. de.ResetPrefs=Einstellungen zurücksetzen?
  303. el.ResetPrefs=Επαναφορά προτιμήσεων;
  304. en.ResetPrefs=Reset Preferences
  305. es.ResetPrefs=¿Desea restablecer las preferencias?
  306. eu.ResetPrefs=Berrezarri Hobespenak?
  307. fa.ResetPrefs=Reset Preferences
  308. fi.ResetPrefs=Reset Preferences
  309. fr.ResetPrefs=Réinitialiser les préférences ?
  310. ga.ResetPrefs=Reset Preferences
  311. gl.ResetPrefs=Restabelecer as preferencias?
  312. he.ResetPrefs=?אתה רוצה לשחזר העדפות
  313. hi.ResetPrefs=वरीयताएँ रीसेट करें?
  314. hr.ResetPrefs=Resetirati Postavke?
  315. hu.ResetPrefs=Alapra állítja a beállításokat?
  316. hy.ResetPrefs=Վերափոխե՞լ կարգավորումները:
  317. id.ResetPrefs=Reset Preferences
  318. it.ResetPrefs=Ripristino Preferenze?
  319. ja.ResetPrefs=環境設定をリセットする
  320. ka.ResetPrefs=Reset Preferences
  321. km.ResetPrefs=Reset Preferences
  322. ko.ResetPrefs=기본 설정을 재설정하시겠습니까?
  323. lt.ResetPrefs=Reset Preferences
  324. mk.ResetPrefs=Reset Preferences
  325. my.ResetPrefs=Reset Preferences
  326. nb.ResetPrefs=Reset Preferences
  327. ne.ResetPrefs=Reset Preferences
  328. nl.ResetPrefs=Voorkeuren herstellen?
  329. oc.ResetPrefs=Reset Preferences
  330. pl.ResetPrefs=Zresetować ustawienia?
  331. pt_PT.ResetPrefs=Reconfigurar as Preferências?
  332. pt_BR.ResetPrefs=Repor Preferências?
  333. ro.ResetPrefs=Reset Preferences
  334. ru.ResetPrefs=Сбросить Параметры?
  335. sk.ResetPrefs=Obnoviť nastavenia?
  336. sl.ResetPrefs=Želite ponastaviti možnosti?
  337. sr_RS.ResetPrefs=Да вратим на старе поставке?
  338. sr_RS0latin.ResetPrefs=Da vratim na stare postavke?
  339. sv.ResetPrefs=Återställ inställningar?
  340. ta.ResetPrefs="விருப்பங்களை மீட்டமைக்க?
  341. tg.ResetPrefs=Reset Preferences
  342. tr.ResetPrefs=Ayarlar Sıfırlansın mı?
  343. uk.ResetPrefs=Відновити початкові значення параметрів?
  344. ;vi.ResetPrefs=Reset Preferences
  345. zh_CN.ResetPrefs=重置偏好设置
  346. zh_TW.ResetPrefs=重置偏好設定