Make branding more flexible

This commit is contained in:
K4sum1 2025-04-26 22:40:17 -07:00
commit 0f85813996
25 changed files with 89 additions and 118 deletions

View file

@ -121,9 +121,9 @@ VIAddVersionKey "OriginalFilename" "helper.exe"
Name "${BrandFullName}"
OutFile "helper.exe"
!ifdef HAVE_64BIT_BUILD
InstallDir "$PROGRAMFILES64\${BrandFullName}\"
InstallDir "$PROGRAMFILES64\${CompanyName}\${BrandShortName}\"
!else
InstallDir "$PROGRAMFILES32\${BrandFullName}\"
InstallDir "$PROGRAMFILES32\${CompanyName}\${BrandShortName}\"
!endif
ShowUnInstDetails nevershow
@ -193,10 +193,10 @@ Section "Uninstall"
${EndIf}
; setup the application model id registration value
${un.InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs"
${un.InitHashAppModelId} "$INSTDIR" "Software\${CompanyName}\${BrandShortName}\TaskBarIDs"
SetShellVarContext current ; Set SHCTX to HKCU
${un.RegCleanMain} "Software\Mozilla"
${un.RegCleanMain} "Software\${CompanyName}"
${un.RegCleanUninstall}
${un.DeleteShortcuts}
@ -207,21 +207,21 @@ Section "Uninstall"
${EndIf}
; Remove the updates directory for Vista and above
${un.CleanUpdateDirectories} "Mozilla\Basilisk" "Mozilla\updates"
${un.CleanUpdateDirectories} "${CompanyName}\${BrandShortName}" "${CompanyName}\updates"
; Remove any app model id's stored in the registry for this install path
DeleteRegValue HKCU "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
DeleteRegValue HKLM "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
DeleteRegValue HKCU "Software\${CompanyName}\${BrandShortName}\TaskBarIDs" "$INSTDIR"
DeleteRegValue HKLM "Software\${CompanyName}\${BrandShortName}\TaskBarIDs" "$INSTDIR"
ClearErrors
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
WriteRegStr HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest" "Write Test"
${If} ${Errors}
StrCpy $TmpVal "HKCU" ; used primarily for logging
${Else}
SetShellVarContext all ; Set SHCTX to HKLM
DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
DeleteRegValue HKLM "Software\${CompanyName}" "${BrandShortName}InstallerTest"
StrCpy $TmpVal "HKLM" ; used primarily for logging
${un.RegCleanMain} "Software\Mozilla"
${un.RegCleanMain} "Software\${CompanyName}"
${un.RegCleanUninstall}
${un.DeleteShortcuts}
${un.SetAppLSPCategories}
@ -251,10 +251,10 @@ Section "Uninstall"
${EndIf}
SetShellVarContext all ; Set SHCTX to HKLM
${un.GetSecondInstallPath} "Software\Mozilla" $R9
${un.GetSecondInstallPath} "Software\${CompanyName}" $R9
${If} $R9 == "false"
SetShellVarContext current ; Set SHCTX to HKCU
${un.GetSecondInstallPath} "Software\Mozilla" $R9
${un.GetSecondInstallPath} "Software\${CompanyName}" $R9
${EndIf}
StrCpy $0 "Software\Clients\StartMenuInternet\${FileMainEXE}\shell\open\command"
@ -300,7 +300,7 @@ Section "Uninstall"
StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\plugin-container.exe"
DeleteRegKey HKLM "$0"
DeleteRegKey HKCU "$0"
StrCpy $0 "Software\Classes\MIME\Database\Content Type\application/x-xpinstall;app=Basilisk"
StrCpy $0 "Software\Classes\MIME\Database\Content Type\application/x-xpinstall;app=${FileMainEXE}"
DeleteRegKey HKLM "$0"
DeleteRegKey HKCU "$0"
${Else}
@ -397,7 +397,7 @@ Section "Uninstall"
; subsequently deleted after checking. If the value is found during startup
; the browser will offer to Reset Basilisk. We use the UpdateChannel to match
; uninstalls of Basilisk-release with reinstalls of Basilisk-release, for example.
WriteRegStr HKCU "Software\Mozilla\Basilisk" "Uninstalled-${UpdateChannel}" "True"
WriteRegStr HKCU "Software\${CompanyName}\${BrandShortName}" "Uninstalled-${UpdateChannel}" "True"
${un.IsFirewallSvcRunning}
Pop $0