diff --git a/.github/workflows/build-basilisk-windows.yml b/.github/workflows/build-basilisk-windows.yml index 509f4ff4..ef923f06 100644 --- a/.github/workflows/build-basilisk-windows.yml +++ b/.github/workflows/build-basilisk-windows.yml @@ -24,6 +24,9 @@ jobs: arch: i686 steps: + - name: List available VC Redist folders (for debugging) + run: tree /f "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\redist" + - name: Install MozillaBuild run: | Invoke-WebRequest -Uri https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.4.exe -OutFile MozillaBuildSetup-3.4.exe diff --git a/basilisk/components/downloads/DownloadsCommon.jsm b/basilisk/components/downloads/DownloadsCommon.jsm index 27851e2a..b928289e 100644 --- a/basilisk/components/downloads/DownloadsCommon.jsm +++ b/basilisk/components/downloads/DownloadsCommon.jsm @@ -659,18 +659,6 @@ XPCOMUtils.defineLazyGetter(this.DownloadsCommon, "error", () => { return DownloadsLogger.error.bind(DownloadsLogger); }); -/** - * Returns true if we are executing on Windows Vista or a later version. - */ -XPCOMUtils.defineLazyGetter(DownloadsCommon, "isWinVistaOrHigher", function () { - let os = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).OS; - if (os != "WINNT") { - return false; - } - let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2); - return parseFloat(sysInfo.getProperty("version")) >= 6; -}); - //////////////////////////////////////////////////////////////////////////////// //// DownloadsData diff --git a/basilisk/components/nsBrowserContentHandler.js b/basilisk/components/nsBrowserContentHandler.js index 9d8dc2d0..c3ab6dcd 100644 --- a/basilisk/components/nsBrowserContentHandler.js +++ b/basilisk/components/nsBrowserContentHandler.js @@ -428,7 +428,7 @@ nsBrowserContentHandler.prototype = { } #ifdef XP_WIN - // Handle "? searchterm" for Windows Vista start menu integration + // Handle "? searchterm" for Windows start menu integration for (var i = cmdLine.length - 1; i >= 0; --i) { var param = cmdLine.getArgument(i); if (param.match(/^\? /)) { diff --git a/basilisk/components/shell/nsWindowsShellService.cpp b/basilisk/components/shell/nsWindowsShellService.cpp index 879b0c7f..550eeaa8 100644 --- a/basilisk/components/shell/nsWindowsShellService.cpp +++ b/basilisk/components/shell/nsWindowsShellService.cpp @@ -110,7 +110,7 @@ OpenKeyForReading(HKEY aKeyRoot, const nsAString& aKeyName, HKEY* aKey) // shell\open\command (default) REG_SZ -osint -url "%1" // shell\open\ddeexec (default) REG_SZ // -// - Windows Vista and above Protocol Handler +// - Windows 7 and above Protocol Handler // // HKCU\SOFTWARE\Classes\BasiliskURL\ (default) REG_SZ URL // EditFlags REG_DWORD 2 @@ -184,7 +184,7 @@ static SETTING gSettings[] = { // it will skip over this check.*** { MAKE_KEY_NAME1("BasiliskHTML", SOC), VAL_OPEN, OLD_VAL_OPEN }, - // Protocol Handler Class - for Vista and above + // Protocol Handler Class - for Windows 7 and above { MAKE_KEY_NAME1("BasiliskURL", SOC), VAL_OPEN, OLD_VAL_OPEN }, // Protocol Handlers @@ -201,7 +201,7 @@ static SETTING gDDESettings[] = { // File Handler Class { MAKE_KEY_NAME1("Software\\Classes\\BasiliskHTML", SOD) }, - // Protocol Handler Class - for Vista and above + // Protocol Handler Class - for Windows 7 and above { MAKE_KEY_NAME1("Software\\Classes\\BasiliskURL", SOD) }, // Protocol Handlers @@ -376,7 +376,7 @@ IsDefaultBrowserWin8(bool aCheckAllTypes, bool* aIsDefaultBrowser) * by all Basilisk browsers. */ bool -nsWindowsShellService::IsDefaultBrowserVista(bool aCheckAllTypes, +nsWindowsShellService::IsDefaultBrowserWin7(bool aCheckAllTypes, bool* aIsDefaultBrowser) { RefPtr pAAR; @@ -489,10 +489,10 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck, } } - // Only check if Basilisk is the default browser on Vista and above if the + // Only check if Basilisk is the default browser on Windows 7 and above if the // previous checks show that Basilisk is the default browser. if (*aIsDefaultBrowser) { - IsDefaultBrowserVista(aForAllTypes, aIsDefaultBrowser); + IsDefaultBrowserWin7(aForAllTypes, aIsDefaultBrowser); if (IsWin8OrLater()) { IsDefaultBrowserWin8(aForAllTypes, aIsDefaultBrowser); } diff --git a/basilisk/components/shell/nsWindowsShellService.h b/basilisk/components/shell/nsWindowsShellService.h index 06c6c3c9..afdbfc04 100644 --- a/basilisk/components/shell/nsWindowsShellService.h +++ b/basilisk/components/shell/nsWindowsShellService.h @@ -26,7 +26,7 @@ class nsWindowsShellService : public nsIWindowsShellService NS_DECL_NSIWINDOWSSHELLSERVICE protected: - bool IsDefaultBrowserVista(bool aCheckAllTypes, bool* aIsDefaultBrowser); + bool IsDefaultBrowserWin7(bool aCheckAllTypes, bool* aIsDefaultBrowser); nsresult LaunchControlPanelDefaultsSelectionUI(); nsresult LaunchControlPanelDefaultPrograms(); nsresult LaunchModernSettingsDialogDefaultApps(); diff --git a/basilisk/installer/windows/nsis/installer.nsi b/basilisk/installer/windows/nsis/installer.nsi index 6b4b5ab9..157735e8 100644 --- a/basilisk/installer/windows/nsis/installer.nsi +++ b/basilisk/installer/windows/nsis/installer.nsi @@ -46,7 +46,7 @@ Var PreventRebootRequired ; StartMenuDir variable can use the common InstallOnInitCommon macro. !define NO_STARTMENU_DIR -; On Vista and above attempt to elevate Standard Users in addition to users that +; Attempt to elevate Standard Users in addition to users that ; are a member of the Administrators group. !define NONADMIN_ELEVATE @@ -247,7 +247,7 @@ Section "-InstallStartCleanup" ; setup the application model id registration value ${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs" - ; Remove the updates directory for Vista and above + ; Remove the updates directory ${CleanUpdateDirectories} "Mozilla\Basilisk" "Mozilla\updates" ${RemoveDeprecatedFiles} @@ -314,12 +314,7 @@ Section "-Application" APP_IDX ; Default for creating Quick Launch shortcut (1 = create, 0 = don't create) ${If} $AddQuickLaunchSC == "" - ; Don't install the quick launch shortcut on Windows 7 - ${If} ${AtLeastWin7} - StrCpy $AddQuickLaunchSC "0" - ${Else} - StrCpy $AddQuickLaunchSC "1" - ${EndIf} + StrCpy $AddQuickLaunchSC "0" ${EndIf} ; Default for creating Desktop shortcut (1 = create, 0 = don't create) @@ -385,7 +380,7 @@ Section "-Application" APP_IDX ; For pre win8, the following keys should only be set if we can write to HKLM. ; For post win8, the keys below get set in both HKLM and HKCU. ${If} $TmpVal == "HKLM" - ; Set the Start Menu Internet and Vista Registered App HKLM registry keys. + ; Set the Start Menu Internet and Registered App HKLM registry keys. ${SetStartMenuInternet} "HKLM" ${FixShellIconHandler} "HKLM" @@ -404,7 +399,7 @@ Section "-Application" APP_IDX ${EndIf} ${If} ${AtLeastWin8} - ; Set the Start Menu Internet and Vista Registered App HKCU registry keys. + ; Set the Start Menu Internet and Registered App HKCU registry keys. ${SetStartMenuInternet} "HKCU" ${FixShellIconHandler} "HKCU" @@ -434,7 +429,7 @@ Section "-Application" APP_IDX ${CreateRegKey} "$TmpVal" "$0" 0 ${If} $TmpVal == "HKLM" - ; Set the permitted LSP Categories for WinVista and above + ; Set the permitted LSP Categories ${SetAppLSPCategories} ${LSP_CATEGORIES} ${EndIf} @@ -486,8 +481,7 @@ Section "-Application" APP_IDX ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true" ${EndIf} ${LogMsg} "Added Shortcut: $SMPROGRAMS\${BrandFullName}.lnk" @@ -508,8 +502,7 @@ Section "-Application" APP_IDX ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" \ "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID" "true" ${EndIf} ${LogMsg} "Added Shortcut: $DESKTOP\${BrandFullName}.lnk" @@ -517,27 +510,6 @@ Section "-Application" APP_IDX ${LogMsg} "** ERROR Adding Shortcut: $DESKTOP\${BrandFullName}.lnk" ${EndIf} ${EndIf} - - ; If elevated the Quick Launch shortcut must be added from the unelevated - ; original process. - ${If} $AddQuickLaunchSC == 1 - ${Unless} ${AtLeastWin7} - ClearErrors - ${GetParameters} $0 - ${GetOptions} "$0" "/UAC:" $0 - ${If} ${Errors} - Call AddQuickLaunchShortcut - ${LogMsg} "Added Shortcut: $QUICKLAUNCH\${BrandFullName}.lnk" - ${Else} - ; It is not possible to add a log entry from the unelevated process so - ; add the log entry without the path since there is no simple way to - ; know the correct full path. - ${LogMsg} "Added Quick Launch Shortcut: ${BrandFullName}.lnk" - GetFunctionAddress $0 AddQuickLaunchShortcut - UAC::ExecCodeSegment $0 - ${EndIf} - ${EndUnless} - ${EndIf} SectionEnd ; Cleanup operations to perform at the end of the installation. @@ -555,15 +527,13 @@ Section "-InstallEndCleanup" ; value was before we changed it. To do so, we read it here and store it ; in our own registry key. StrCpy $0 "" - ${If} ${AtLeastWinVista} - AppAssocReg::QueryCurrentDefault "http" "protocol" "effective" - Pop $1 - ; If the method hasn't failed, $1 will contain the progid. Check: - ${If} "$1" != "method failed" - ${AndIf} "$1" != "method not available" - ; Read the actual command from the progid - ReadRegStr $0 HKCR "$1\shell\open\command" "" - ${EndIf} + AppAssocReg::QueryCurrentDefault "http" "protocol" "effective" + Pop $1 + ; If the method hasn't failed, $1 will contain the progid. Check: + ${If} "$1" != "method failed" + ${AndIf} "$1" != "method not available" + ; Read the actual command from the progid + ReadRegStr $0 HKCR "$1\shell\open\command" "" ${EndIf} ; If using the App Association Registry didn't happen or failed, fall back ; to the effective http default: @@ -891,11 +861,6 @@ Function leaveShortcuts ${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State" ${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State" - ; Don't install the quick launch shortcut on Windows 7 - ${Unless} ${AtLeastWin7} - ${MUI_INSTALLOPTIONS_READ} $AddQuickLaunchSC "shortcuts.ini" "Field 4" "State" - ${EndUnless} - ${If} $InstallType == ${INSTALLTYPE_CUSTOM} Call CheckExistingInstall ${EndIf} @@ -1123,12 +1088,7 @@ Function .onInit WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Bottom "87" ; Setup the shortcuts.ini file for the Custom Shortcuts Page - ; Don't offer to install the quick launch shortcut on Windows 7 - ${If} ${AtLeastWin7} - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Settings" NumFields "3" - ${Else} - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Settings" NumFields "4" - ${EndIf} + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Settings" NumFields "3" WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Type "label" WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Text "$(CREATE_ICONS_DESC)" diff --git a/basilisk/installer/windows/nsis/shared.nsh b/basilisk/installer/windows/nsis/shared.nsh index 0ab40b74..818a4f85 100644 --- a/basilisk/installer/windows/nsis/shared.nsh +++ b/basilisk/installer/windows/nsis/shared.nsh @@ -36,7 +36,7 @@ ; setup the application model id registration value ${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs" - ; Win7 taskbar and start menu link maintenance + ; Windows taskbar and start menu link maintenance Call FixShortcutAppModelIDs ClearErrors @@ -53,7 +53,7 @@ ${FixShellIconHandler} "HKLM" ${SetAppLSPCategories} ${LSP_CATEGORIES} - ; Win7 taskbar and start menu link maintenance + ; Windows taskbar and start menu link maintenance Call FixShortcutAppModelIDs ; Add the Firewall entries after an update @@ -218,8 +218,7 @@ CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID" "true" ${EndIf} ${Else} @@ -229,8 +228,7 @@ ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" \ "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID" "true" ${EndIf} ${EndIf} @@ -244,8 +242,7 @@ ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true" ${EndIf} ${Else} @@ -256,8 +253,7 @@ ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true" ${EndIf} ${EndIf} @@ -265,16 +261,6 @@ ${EndIf} ${EndUnless} - ; Windows 7 doesn't use the QuickLaunch directory - ${Unless} ${AtLeastWin7} - ${AndUnless} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" \ - "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" \ - "$INSTDIR" - ${EndIf} - ${EndUnless} !macroend !define ShowShortcuts "!insertmacro ShowShortcuts" @@ -399,7 +385,7 @@ WriteRegStr ${RegKey} "$0\shell\safemode" "" "$(CONTEXT_SAFE_MODE)" WriteRegStr ${RegKey} "$0\shell\safemode\command" "" "$\"$8$\" -safe-mode" - ; Vista Capabilities registry keys + ; Capabilities registry keys WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationDescription" "$(REG_APP_DESC)" WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationIcon" "$8,0" WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationName" "${BrandShortName}" @@ -416,7 +402,7 @@ WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "http" "BasiliskURL" WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "https" "BasiliskURL" - ; Vista Registered Application + ; Registered Application WriteRegStr ${RegKey} "Software\RegisteredApplications" "${AppRegName}" "$0\Capabilities" !macroend !define SetStartMenuInternet "!insertmacro SetStartMenuInternet" @@ -828,7 +814,7 @@ !macroend !define FixDistributionsINI "!insertmacro FixDistributionsINI" -; Adds a pinned shortcut to Task Bar on update for Windows 7 and above if this +; Adds a pinned shortcut to Task Bar on update if this ; macro has never been called before and the application is default (see ; PinToTaskBar for more details). ; Since defaults handling is handled by Windows in Win8 and later, we always @@ -843,34 +829,32 @@ ${If} ${Errors} ClearErrors WriteIniStr "$0" "TASKBAR" "Migrated" "true" - ${If} ${AtLeastWin7} - ; If we didn't run the stub installer, AddTaskbarSC will be empty. - ; We determine whether to pin based on whether we're the default - ; browser, or if we're on win8 or later, we always pin. - ${If} $AddTaskbarSC == "" - ; No need to check the default on Win8 and later - ${If} ${AtMostWin2008R2} - ; Check if the Basilisk is the http handler for this user - SetShellVarContext current ; Set SHCTX to the current user - ${IsHandlerForInstallDir} "http" $R9 - ${If} $TmpVal == "HKLM" - SetShellVarContext all ; Set SHCTX to all users - ${EndIf} - ${EndIf} - ${If} "$R9" == "true" - ${OrIf} ${AtLeastWin8} - ${PinToTaskBar} + ; If we didn't run the stub installer, AddTaskbarSC will be empty. + ; We determine whether to pin based on whether we're the default + ; browser, or if we're on win8 or later, we always pin. + ${If} $AddTaskbarSC == "" + ; No need to check the default on Win8 and later + ${If} ${AtMostWin2008R2} + ; Check if the Basilisk is the http handler for this user + SetShellVarContext current ; Set SHCTX to the current user + ${IsHandlerForInstallDir} "http" $R9 + ${If} $TmpVal == "HKLM" + SetShellVarContext all ; Set SHCTX to all users ${EndIf} - ${ElseIf} $AddTaskbarSC == "1" + ${EndIf} + ${If} "$R9" == "true" + ${OrIf} ${AtLeastWin8} ${PinToTaskBar} ${EndIf} + ${ElseIf} $AddTaskbarSC == "1" + ${PinToTaskBar} ${EndIf} ${EndIf} ${EndIf} !macroend !define MigrateTaskBarShortcut "!insertmacro MigrateTaskBarShortcut" -; Adds a pinned Task Bar shortcut on Windows 7 if there isn't one for the main +; Adds a pinned Task Bar shortcut if there isn't one for the main ; application executable already. Existing pinned shortcuts for the same ; application model ID must be removed first to prevent breaking the pinned ; item's lists but multiple installations with the same application model ID is @@ -878,72 +862,70 @@ ; model ID removes a pinned pinned Start Menu shortcut this will also add a ; pinned Start Menu shortcut. !macro PinToTaskBar - ${If} ${AtLeastWin7} - StrCpy $8 "false" ; Whether a shortcut had to be created - ${IsPinnedToTaskBar} "$INSTDIR\${FileMainEXE}" $R9 - ${If} "$R9" == "false" - ; Find an existing Start Menu shortcut or create one to use for pinning - ${GetShortcutsLogPath} $0 - ${If} ${FileExists} "$0" - ClearErrors - ReadINIStr $1 "$0" "STARTMENU" "Shortcut0" - ${Unless} ${Errors} - SetShellVarContext all ; Set SHCTX to all users + StrCpy $8 "false" ; Whether a shortcut had to be created + ${IsPinnedToTaskBar} "$INSTDIR\${FileMainEXE}" $R9 + ${If} "$R9" == "false" + ; Find an existing Start Menu shortcut or create one to use for pinning + ${GetShortcutsLogPath} $0 + ${If} ${FileExists} "$0" + ClearErrors + ReadINIStr $1 "$0" "STARTMENU" "Shortcut0" + ${Unless} ${Errors} + SetShellVarContext all ; Set SHCTX to all users + ${Unless} ${FileExists} "$SMPROGRAMS\$1" + SetShellVarContext current ; Set SHCTX to the current user ${Unless} ${FileExists} "$SMPROGRAMS\$1" - SetShellVarContext current ; Set SHCTX to the current user - ${Unless} ${FileExists} "$SMPROGRAMS\$1" - StrCpy $8 "true" - CreateShortCut "$SMPROGRAMS\$1" "$INSTDIR\${FileMainEXE}" - ${If} ${FileExists} "$SMPROGRAMS\$1" - ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\$1" \ - "$INSTDIR" - ${If} "$AppUserModelID" != "" - ApplicationID::Set "$SMPROGRAMS\$1" "$AppUserModelID" "true" - ${EndIf} + StrCpy $8 "true" + CreateShortCut "$SMPROGRAMS\$1" "$INSTDIR\${FileMainEXE}" + ${If} ${FileExists} "$SMPROGRAMS\$1" + ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\$1" \ + "$INSTDIR" + ${If} "$AppUserModelID" != "" + ApplicationID::Set "$SMPROGRAMS\$1" "$AppUserModelID" "true" ${EndIf} - ${EndUnless} + ${EndIf} ${EndUnless} + ${EndUnless} - ${If} ${FileExists} "$SMPROGRAMS\$1" - ; Count of Start Menu pinned shortcuts before unpinning. - ${PinnedToStartMenuLnkCount} $R9 - - ; Having multiple shortcuts pointing to different installations with - ; the same AppUserModelID (e.g. side by side installations of the - ; same version) will make the TaskBar shortcut's lists into an bad - ; state where the lists are not shown. To prevent this first - ; uninstall the pinned item. - ApplicationID::UninstallPinnedItem "$SMPROGRAMS\$1" - - ; Count of Start Menu pinned shortcuts after unpinning. - ${PinnedToStartMenuLnkCount} $R8 - - ; If there is a change in the number of Start Menu pinned shortcuts - ; assume that unpinning unpinned a side by side installation from - ; the Start Menu and pin this installation to the Start Menu. - ${Unless} $R8 == $R9 - ; Pin the shortcut to the Start Menu. 5381 is the shell32.dll - ; resource id for the "Pin to Start Menu" string. - InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5381" - ${EndUnless} - - ; Pin the shortcut to the TaskBar. 5386 is the shell32.dll resource - ; id for the "Pin to Taskbar" string. - InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5386" - - ; Delete the shortcut if it was created - ${If} "$8" == "true" - Delete "$SMPROGRAMS\$1" - ${EndIf} - ${EndIf} + ${If} ${FileExists} "$SMPROGRAMS\$1" + ; Count of Start Menu pinned shortcuts before unpinning. + ${PinnedToStartMenuLnkCount} $R9 + + ; Having multiple shortcuts pointing to different installations with + ; the same AppUserModelID (e.g. side by side installations of the + ; same version) will make the TaskBar shortcut's lists into an bad + ; state where the lists are not shown. To prevent this first + ; uninstall the pinned item. + ApplicationID::UninstallPinnedItem "$SMPROGRAMS\$1" + + ; Count of Start Menu pinned shortcuts after unpinning. + ${PinnedToStartMenuLnkCount} $R8 + + ; If there is a change in the number of Start Menu pinned shortcuts + ; assume that unpinning unpinned a side by side installation from + ; the Start Menu and pin this installation to the Start Menu. + ${Unless} $R8 == $R9 + ; Pin the shortcut to the Start Menu. 5381 is the shell32.dll + ; resource id for the "Pin to Start Menu" string. + InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5381" + ${EndUnless} - ${If} $TmpVal == "HKCU" - SetShellVarContext current ; Set SHCTX to the current user - ${Else} - SetShellVarContext all ; Set SHCTX to all users + ; Pin the shortcut to the TaskBar. 5386 is the shell32.dll resource + ; id for the "Pin to Taskbar" string. + InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5386" + + ; Delete the shortcut if it was created + ${If} "$8" == "true" + Delete "$SMPROGRAMS\$1" ${EndIf} - ${EndUnless} - ${EndIf} + ${EndIf} + + ${If} $TmpVal == "HKCU" + SetShellVarContext current ; Set SHCTX to the current user + ${Else} + SetShellVarContext all ; Set SHCTX to all users + ${EndIf} + ${EndUnless} ${EndIf} ${EndIf} !macroend @@ -980,8 +962,7 @@ ${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk" ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \ "$INSTDIR" - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" \ "$AppUserModelID" "true" ${EndIf} @@ -1108,7 +1089,7 @@ System::Call 'advapi32::OpenSCManagerW(n, n, i ${SC_MANAGER_ALL_ACCESS}) i.R6' ${If} $R6 != 0 - ; MpsSvc is the Firewall service on Windows Vista and above. + ; MpsSvc is the Firewall service on modern Windows versions. ; When opening the service with SERVICE_QUERY_CONFIG the return value will ; be 0 if the service is not installed. System::Call 'advapi32::OpenServiceW(i R6, t "MpsSvc", i ${SERVICE_QUERY_CONFIG}) i.R7' @@ -1148,9 +1129,9 @@ ; Sets this installation as the default browser by setting the registry keys ; under HKEY_CURRENT_USER via registry calls and using the AppAssocReg NSIS -; plugin for Vista and above. This is a function instead of a macro so it is -; easily called from an elevated instance of the binary. Since this can be -; called by an elevated instance logging is not performed in this function. +; plugin. This is a function instead of a macro so it is easily called from +; an elevated instance of the binary. Since this can be called by an +; elevated instance logging is not performed in this function. Function SetAsDefaultAppUserHKCU ; Only set as the user's StartMenuInternet browser if the StartMenuInternet ; registry keys are for this install. @@ -1183,27 +1164,24 @@ Function SetAsDefaultAppUserHKCU ${SetHandlers} - ${If} ${AtLeastWinVista} - ; Only register as the handler on Vista and above if the app registry name - ; exists under the RegisteredApplications registry key. The protocol and - ; file handlers set previously at the user level will associate this install - ; as the default browser. - ClearErrors - ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegName}" - ${Unless} ${Errors} - ; This is all protected by a user choice hash in Windows 8 so it won't - ; help, but it also won't hurt. - AppAssocReg::SetAppAsDefaultAll "${AppRegName}" - ${EndUnless} - ${EndIf} + ; Only register as the handler if the app registry name exists under the + ; RegisteredApplications registry key. The protocol and file handlers + ; set previously at the user level will associate this install as the + ; default browser. + ClearErrors + ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegName}" + ${Unless} ${Errors} + ; This is all protected by a user choice hash in Windows 8 so it won't + ; help, but it also won't hurt. + AppAssocReg::SetAppAsDefaultAll "${AppRegName}" + ${EndUnless} ${RemoveDeprecatedKeys} ${MigrateTaskBarShortcut} FunctionEnd ; Helper for updating the shortcut application model IDs. Function FixShortcutAppModelIDs - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ${If} "$AppUserModelID" != "" ${UpdateShortcutAppModelIDs} "$INSTDIR\${FileMainEXE}" "$AppUserModelID" $0 ${EndIf} FunctionEnd @@ -1277,8 +1255,7 @@ Function SetAsDefaultAppUser ${EndIf} ${EndUnless} - ; The code after ElevateUAC won't be executed on Vista and above when the - ; user: + ; The code after ElevateUAC won't be executed when the user: ; a) is a member of the administrators group (e.g. elevation is required) ; b) is not a member of the administrators group and chooses to elevate ${ElevateUAC} diff --git a/basilisk/installer/windows/nsis/uninstaller.nsi b/basilisk/installer/windows/nsis/uninstaller.nsi index 7f577d27..f8a0b46a 100644 --- a/basilisk/installer/windows/nsis/uninstaller.nsi +++ b/basilisk/installer/windows/nsis/uninstaller.nsi @@ -29,7 +29,7 @@ RequestExecutionLevel user !addplugindir ./ -; On Vista and above attempt to elevate Standard Users in addition to users that +; Attempt to elevate Standard Users in addition to users that ; are a member of the Administrators group. !define NONADMIN_ELEVATE @@ -250,13 +250,12 @@ Section "Uninstall" ${un.RegCleanUninstall} ${un.DeleteShortcuts} - ; Unregister resources associated with Win7 taskbar jump lists. - ${If} ${AtLeastWin7} - ${AndIf} "$AppUserModelID" != "" + ; Unregister resources associated with Windows taskbar jump lists. + ${If} "$AppUserModelID" != "" ApplicationID::UninstallJumpLists "$AppUserModelID" ${EndIf} - ; Remove the updates directory for Vista and above + ; Remove the updates directory ${un.CleanUpdateDirectories} "Mozilla\Basilisk" "Mozilla\updates" ; Remove any app model id's stored in the registry for this install path @@ -591,9 +590,7 @@ Function un.onInit ; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be ; removed after we require NSIS 3.0a2 or greater. !ifndef NSIS_PACKEDVERSION - ${If} ${AtLeastWinVista} - System::Call 'user32::SetProcessDPIAware()' - ${EndIf} + System::Call 'user32::SetProcessDPIAware()' !endif !insertmacro InitInstallOptionsFile "unconfirm.ini" diff --git a/basilisk/locales/en-US/chrome/browser/downloads/downloads.properties b/basilisk/locales/en-US/chrome/browser/downloads/downloads.properties index e95b723b..14e6477f 100644 --- a/basilisk/locales/en-US/chrome/browser/downloads/downloads.properties +++ b/basilisk/locales/en-US/chrome/browser/downloads/downloads.properties @@ -23,7 +23,7 @@ stateCanceled=Canceled # with the display of this feature in Windows. The following article can # provide a reference for the translation of "Parental Controls" in various # languages: -# http://windows.microsoft.com/en-US/windows-vista/Set-up-Parental-Controls +# https://web.archive.org/web/20160404025836/http://windows.microsoft.com/en-us/windows/set-parental-controls#1TC=windows-7 stateBlockedParentalControls=Blocked by Parental Controls # LOCALIZATION NOTE (stateBlockedPolicy): # Indicates that the download was blocked on Windows because of the "Launching diff --git a/basilisk/modules/WindowsPreviewPerTab.jsm b/basilisk/modules/WindowsPreviewPerTab.jsm index 81c2f229..b0306b70 100644 --- a/basilisk/modules/WindowsPreviewPerTab.jsm +++ b/basilisk/modules/WindowsPreviewPerTab.jsm @@ -772,7 +772,7 @@ this.AeroPeek = { }, onOpenWindow: function (win) { - // This occurs when the taskbar service is not available (xp, vista) + // This occurs when the taskbar service is not available if (!this.available || !this._prefenabled) return; @@ -780,7 +780,7 @@ this.AeroPeek = { }, onCloseWindow: function (win) { - // This occurs when the taskbar service is not available (xp, vista) + // This occurs when the taskbar service is not available if (!this.available || !this._prefenabled) return; diff --git a/basilisk/themes/shared/tab-selected.svg b/basilisk/themes/shared/tab-selected.svg index ca66d811..581a99a4 100644 --- a/basilisk/themes/shared/tab-selected.svg +++ b/basilisk/themes/shared/tab-selected.svg @@ -20,8 +20,7 @@ width: 100%; } %ifdef XP_WIN - @media (-moz-windows-default-theme) and (-moz-os-version: windows-vista), - (-moz-windows-default-theme) and (-moz-os-version: windows-win7) { + @media (-moz-windows-default-theme) and (-moz-os-version: windows-win7) { #tab-background-fill { background-color: @customToolbarColor@; } diff --git a/basilisk/themes/windows/browser.css b/basilisk/themes/windows/browser.css index 3f214788..d448314e 100644 --- a/basilisk/themes/windows/browser.css +++ b/basilisk/themes/windows/browser.css @@ -1582,21 +1582,19 @@ html|span.ac-emphasize-text-url { } } -@media not all and (-moz-os-version: windows-vista) and (-moz-windows-default-theme) { - @media not all and (-moz-os-version: windows-win7) and (-moz-windows-default-theme) { - .autocomplete-treebody::-moz-tree-image(selected, current, bookmark, treecolAutoCompleteImage) { - -moz-image-region: rect(0 32px 16px 16px); - } +@media not all and (-moz-os-version: windows-win7) and (-moz-windows-default-theme) { + .autocomplete-treebody::-moz-tree-image(selected, current, bookmark, treecolAutoCompleteImage) { + -moz-image-region: rect(0 32px 16px 16px); + } - @media (min-resolution: 1.1dppx) { - .autocomplete-treebody::-moz-tree-image(selected, current, bookmark, treecolAutoCompleteImage) { - -moz-image-region: rect(0 64px 32px 32px); - } + @media (min-resolution: 1.1dppx) { + .autocomplete-treebody::-moz-tree-image(selected, current, bookmark, treecolAutoCompleteImage) { + -moz-image-region: rect(0 64px 32px 32px); } + } - .autocomplete-treebody::-moz-tree-image(keyword, treecolAutoCompleteImage, selected) { - list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg#search-icon-inverted); - } + .autocomplete-treebody::-moz-tree-image(keyword, treecolAutoCompleteImage, selected) { + list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg#search-icon-inverted); } } diff --git a/platform b/platform index 89e88ca6..df16df56 160000 --- a/platform +++ b/platform @@ -1 +1 @@ -Subproject commit 89e88ca6a055ed560da7bda9ad3c448c41cf4295 +Subproject commit df16df56938b09d6156712aeb4d8efc13cd5dc98