From e93af7d1d61ba9dbe4df1940bebe33dc7662d67c Mon Sep 17 00:00:00 2001 From: Avery King Date: Thu, 12 Sep 2024 13:25:26 -0700 Subject: [PATCH] innosetup: Fix user install - Use {autopf} instead of {commonpf} to install to the right user directory. - Use HKA instead of HKCR. Fixes #472 Reference-to: https://codeberg.org/tenacityteam/tenacity/issues/472 Co-authored-by: Rosalie Signed-off-by: Avery King --- win/Inno_Setup_Wizard/tenacity.iss.in | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/win/Inno_Setup_Wizard/tenacity.iss.in b/win/Inno_Setup_Wizard/tenacity.iss.in index 1dd9e3c8b..027c882c6 100644 --- a/win/Inno_Setup_Wizard/tenacity.iss.in +++ b/win/Inno_Setup_Wizard/tenacity.iss.in @@ -39,7 +39,7 @@ VersionInfoVersion={#GetVersionNumbersString(AppExe)} VersionInfoCopyright={#GetFileCopyright(AppExe)} ; Default install location -DefaultDirName={commonpf}\Tenacity +DefaultDirName={autopf}\Tenacity ; Tells explorer to refresh file assocations to pickup any changes ChangesAssociations=yes @@ -146,8 +146,8 @@ begin end; [Icons] -Name: "{commonprograms}\Tenacity"; Filename: "{app}\tenacity.exe" -Name: "{commondesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon +Name: "{autoprograms}\Tenacity"; Filename: "{app}\tenacity.exe" +Name: "{autodesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon [InstallDelete] @@ -206,17 +206,17 @@ 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; +; Root: HKA; Subkey: "Software\Classes\.AUP"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey; Tasks: associate_aup +Root: HKA; Subkey: "Software\Classes\.AUP"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey; +Root: HKA; Subkey: "Software\Classes\.AUP3"; ValueType: string; ValueData: "Tenacity.Project"; Flags: createvalueifdoesntexist uninsdeletekey; +Root: HKA; Subkey: "Software\Classes\Tenacity.Project\OpenWithList\tenacity.exe"; Flags: createvalueifdoesntexist uninsdeletekey; +Root: HKA; Subkey: "Software\Classes\Tenacity.Project"; ValueType: string; ValueData: "Tenacity Project File"; Flags: createvalueifdoesntexist uninsdeletekey; +Root: HKA; Subkey: "Software\Classes\Tenacity.Project\shell"; ValueType: string; ValueData: ""; Flags: createvalueifdoesntexist uninsdeletekey; +Root: HKA; Subkey: "Software\Classes\Tenacity.Project\shell\open"; Flags: createvalueifdoesntexist uninsdeletekey; +Root: HKA; Subkey: "Software\Classes\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; +;Root: HKA; Subkey: "Software\Classes\Tenacity.Project\Path"; ValueType: string; ValueData: {app}; Flags: createvalueifdoesntexist uninsdeletekey; [Run] Filename: "{app}\tenacity.exe"; Description: "{cm:LaunchProgram,Tenacity}"; Flags: nowait postinstall skipifsilent