Skip to content

Commit

Permalink
Rename installer and related directives to Waterfox.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Kontos committed May 6, 2019
1 parent d432495 commit bbe37ac
Show file tree
Hide file tree
Showing 19 changed files with 214 additions and 214 deletions.
4 changes: 2 additions & 2 deletions browser/components/BrowserGlue.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -1334,11 +1334,11 @@ BrowserGlue.prototype = {
if (updateChannel) {
let uninstalledValue =
WindowsRegistry.readRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
"Software\\Mozilla\\Firefox",
"Software\\Waterfox\\Waterfox",
`Uninstalled-${updateChannel}`);
let removalSuccessful =
WindowsRegistry.removeRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
"Software\\Mozilla\\Firefox",
"Software\\Waterfox\\Waterfox",
`Uninstalled-${updateChannel}`);
if (removalSuccessful && uninstalledValue == "True") {
this._resetProfileNotification("uninstall");
Expand Down
2 changes: 1 addition & 1 deletion browser/components/migration/MigrationUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ var MigrationUtils = Object.freeze({
key = gPreviousDefaultBrowserKey;
} else {
// We didn't have a saved value, so check the registry.
const kRegPath = "Software\\Mozilla\\Firefox";
const kRegPath = "Software\\Waterfox\\Waterfox";
let oldDefault = WindowsRegistry.readRegKey(
Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER, kRegPath, "OldDefaultBrowserCommand");
if (oldDefault) {
Expand Down
4 changes: 2 additions & 2 deletions browser/components/shell/ShellService.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ let ShellServiceInternal = {

if (AppConstants.platform == "win") {
let optOutValue = WindowsRegistry.readRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
"Software\\Mozilla\\Firefox",
"Software\\Waterfox\\Waterfox",
"DefaultBrowserOptOut");
WindowsRegistry.removeRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
"Software\\Mozilla\\Firefox",
"Software\\Waterfox\\Waterfox",
"DefaultBrowserOptOut");
if (optOutValue == "True") {
Services.prefs.setBoolPref("browser.shell.checkDefaultBrowser", false);
Expand Down
4 changes: 2 additions & 2 deletions browser/components/shell/nsWindowsShellService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

#define REG_FAILED(val) (val != ERROR_SUCCESS)

#define APP_REG_NAME_BASE L"Firefox-"
#define APP_REG_NAME_BASE L"Waterfox-"

using mozilla::IsWin8OrLater;
using namespace mozilla;
Expand Down Expand Up @@ -136,7 +136,7 @@ static bool IsPathDefaultForClass(
return false;
}

LPCWSTR progID = isProtocol ? L"FirefoxURL" : L"FirefoxHTML";
LPCWSTR progID = isProtocol ? L"WaterfoxURL" : L"WaterfoxHTML";
bool isDefault = !wcsnicmp(registeredApp, progID, wcslen(progID));

nsAutoString regAppName(registeredApp);
Expand Down
2 changes: 1 addition & 1 deletion browser/installer/windows/app.tag
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;!@Install@!UTF-8!
Title="Mozilla Firefox"
Title="Waterfox"
RunProgram="setup.exe"
;!@InstallEnd@!
18 changes: 9 additions & 9 deletions browser/installer/windows/nsis/defines.nsi.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
!endif

# These defines should match application.ini settings
!define AppName "Firefox"
!define AppName "Waterfox"
!define AppVersion "@APP_VERSION@"
!define GREVersion @MOZILLA_VERSION@
!define AB_CD "@AB_CD@"

!define FileMainEXE "@[email protected]"
!define WindowClass "FirefoxMessageWindow"
!define WindowClass "WaterfoxMessageWindow"
!define MainWindowClass "MozillaWindowClass"
!define DialogWindowClass "MozillaDialogClass"
!define DDEApplication "Firefox"
!define AppRegName "Firefox"
!define DDEApplication "Waterfox"
!define AppRegName "Waterfox"

!ifndef DEV_EDITION
!define BrandShortName "@MOZ_APP_DISPLAYNAME@"
Expand All @@ -40,11 +40,11 @@
!define BrandFullName "${BrandFullNameInternal}"
!endif

!define CERTIFICATE_NAME "Mozilla Corporation"
!define CERTIFICATE_NAME "Waterfox Limited"
!define CERTIFICATE_ISSUER "DigiCert SHA2 Assured ID Code Signing CA"
; Changing the name or issuer requires us to have both the old and the new
; in the registry at the same time, temporarily.
!define CERTIFICATE_NAME_PREVIOUS "Mozilla Corporation"
!define CERTIFICATE_NAME_PREVIOUS "Waterfox Limited"
!define CERTIFICATE_ISSUER_PREVIOUS "DigiCert Assured ID Code Signing CA-1"

# LSP_CATEGORIES is the permitted LSP categories for the application. Each LSP
Expand Down Expand Up @@ -94,7 +94,7 @@
!define BETA_UPDATE_CHANNEL
!endif

!define BaseURLStubPing "http://download-stats.mozilla.org/stub"
!define BaseURLStubPing ""

# ARCH is used when it is necessary to differentiate the x64 registry keys from
# the x86 registry keys (e.g. the uninstall registry key).
Expand Down Expand Up @@ -159,7 +159,7 @@ VIAddVersionKey "ProductVersion" "${AppVersion}"
!define APPNAME_BMP_TOP_DU 12u

# Constants for parts of the telemetry submission URL
!define TELEMETRY_BASE_URL https://incoming.telemetry.mozilla.org/submit
!define TELEMETRY_BASE_URL
!define TELEMETRY_NAMESPACE firefox-installer
!define TELEMETRY_INSTALL_PING_VERSION 1
!define TELEMETRY_INSTALL_PING_VERSION 0
!define TELEMETRY_INSTALL_PING_DOCTYPE install
44 changes: 22 additions & 22 deletions browser/installer/windows/nsis/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ Section "-InstallStartCleanup"
${EndIf}

; setup the application model id registration value
${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs"
${InitHashAppModelId} "$INSTDIR" "Software\Waterfox\${AppName}\TaskBarIDs"

; Remove the updates directory
${CleanUpdateDirectories} "Mozilla\Firefox" "Mozilla\updates"
${CleanUpdateDirectories} "Waterfox\Waterfox" "Waterfox\updates"

${RemoveDeprecatedFiles}
${RemovePrecompleteEntries} "false"
Expand Down Expand Up @@ -370,33 +370,33 @@ Section "-Application" APP_IDX
StrCpy $AddDesktopSC "1"
${EndIf}

${CreateUpdateDir} "Mozilla"
${CreateUpdateDir} "Waterfox"
${If} ${Errors}
Pop $0
${LogMsg} "** ERROR Failed to create update directory: $0"
${EndIf}

${LogHeader} "Adding Registry Entries"
SetShellVarContext current ; Set SHCTX to HKCU
${RegCleanMain} "Software\Mozilla"
${RegCleanMain} "Software\Waterfox"
${RegCleanUninstall}
${UpdateProtocolHandlers}

ClearErrors
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
WriteRegStr HKLM "Software\Waterfox" "${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\Waterfox" "${BrandShortName}InstallerTest"
StrCpy $TmpVal "HKLM" ; used primarily for logging
${RegCleanMain} "Software\Mozilla"
${RegCleanMain} "Software\Waterfox"
${RegCleanUninstall}
${UpdateProtocolHandlers}

ReadRegStr $0 HKLM "Software\mozilla.org\Mozilla" "CurrentVersion"
ReadRegStr $0 HKLM "Software\waterfox.net\Waterfox" "CurrentVersion"
${If} "$0" != "${GREVersion}"
WriteRegStr HKLM "Software\mozilla.org\Mozilla" "CurrentVersion" "${GREVersion}"
WriteRegStr HKLM "Software\waterfox.net\Waterfox" "CurrentVersion" "${GREVersion}"
${EndIf}
${EndIf}

Expand Down Expand Up @@ -427,9 +427,9 @@ Section "-Application" APP_IDX

; In Win8, the delegate execute handler picks up the value in FirefoxURL and
; FirefoxHTML to launch the desktop browser when it needs to.
${AddDisabledDDEHandlerValues} "FirefoxHTML-$AppUserModelID" "$2" "$8,1" \
${AddDisabledDDEHandlerValues} "WaterfoxHTML-$AppUserModelID" "$2" "$8,1" \
"${AppRegName} Document" ""
${AddDisabledDDEHandlerValues} "FirefoxURL-$AppUserModelID" "$2" "$8,1" \
${AddDisabledDDEHandlerValues} "WaterfoxURL-$AppUserModelID" "$2" "$8,1" \
"${AppRegName} URL" "true"

; For pre win8, the following keys should only be set if we can write to HKLM.
Expand Down Expand Up @@ -712,7 +712,7 @@ Section "-InstallEndCleanup"
; If we have something other than empty string now, write the value.
${If} "$0" != ""
ClearErrors
WriteRegStr HKCU "Software\Mozilla\Firefox" "OldDefaultBrowserCommand" "$0"
WriteRegStr HKCU "Software\Waterfox\Waterfox" "OldDefaultBrowserCommand" "$0"
${EndIf}

${LogHeader} "Setting as the default browser"
Expand All @@ -729,7 +729,7 @@ Section "-InstallEndCleanup"
StrCpy $SetAsDefault false
${LogHeader} "Writing default-browser opt-out"
ClearErrors
WriteRegStr HKCU "Software\Mozilla\Firefox" "DefaultBrowserOptOut" "True"
WriteRegStr HKCU "Software\Waterfox\Waterfox" "DefaultBrowserOptOut" "True"
${If} ${Errors}
${LogMsg} "Error writing default-browser opt-out"
${EndIf}
Expand Down Expand Up @@ -1017,12 +1017,12 @@ Function SendPing
${EndIf}

ClearErrors
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
WriteRegStr HKLM "Software\Waterfox" "${BrandShortName}InstallerTest" \
"Write Test"
${If} ${Errors}
nsJSON::Set /tree ping "Data" "admin_user" /value false
${Else}
DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
DeleteRegValue HKLM "Software\Waterfox" "${BrandShortName}InstallerTest"
nsJSON::Set /tree ping "Data" "admin_user" /value true
${EndIf}

Expand All @@ -1047,7 +1047,7 @@ Function SendPing
${If} $1 == $INSTDIR
nsJSON::Set /tree ping "Data" "new_default" /value true
${Else}
StrCpy $0 "$0" "" -11 # 11 == length of "firefox.exe"
StrCpy $0 "$0" "" -11 # 11 == length of "waterfox.exe"
${If} "$0" == "${FileMainEXE}"
nsJSON::Set /tree ping "Data" "old_default" /value true
${EndIf}
Expand Down Expand Up @@ -1240,13 +1240,13 @@ Function preComponents

; Only show the maintenance service page if we have write access to HKLM
ClearErrors
WriteRegStr HKLM "Software\Mozilla" \
WriteRegStr HKLM "Software\Waterfox" \
"${BrandShortName}InstallerTest" "Write Test"
${If} ${Errors}
ClearErrors
Abort
${Else}
DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
DeleteRegValue HKLM "Software\Waterfox" "${BrandShortName}InstallerTest"
${EndIf}

StrCpy $PageName "Components"
Expand Down Expand Up @@ -1425,9 +1425,9 @@ Function preSummary

; Check if it is possible to write to HKLM
ClearErrors
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
WriteRegStr HKLM "Software\Waterfox" "${BrandShortName}InstallerTest" "Write Test"
${Unless} ${Errors}
DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
DeleteRegValue HKLM "Software\Waterfox" "${BrandShortName}InstallerTest"
; Check if Firefox is the http handler for this user.
SetShellVarContext current ; Set SHCTX to the current user
${IsHandlerForInstallDir} "http" $R9
Expand Down Expand Up @@ -1577,10 +1577,10 @@ Function .onInit
!endif

SetShellVarContext all
${GetFirstInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $0
${GetFirstInstallPath} "Software\Waterfox\${BrandFullNameInternal}" $0
${If} "$0" == "false"
SetShellVarContext current
${GetFirstInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $0
${GetFirstInstallPath} "Software\Waterfox\${BrandFullNameInternal}" $0
${If} "$0" == "false"
StrCpy $HadOldInstall false
${Else}
Expand Down
52 changes: 26 additions & 26 deletions browser/installer/windows/nsis/maintenanceservice_installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ Var BrandFullName
; And anyone that wants to run tests themselves should already have
; this installed.
!define FallbackKey \
"SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4"
"SOFTWARE\Waterfox\MaintenanceService\3932ecacee736d366d6436db0f55bce4"

!define CompanyName "Mozilla Corporation"
!define CompanyName "Waterfox Ltd"
!define BrandFullNameInternal ""

; The following includes are custom.
Expand All @@ -66,14 +66,14 @@ Name "${MaintFullName}"
OutFile "maintenanceservice_installer.exe"

; Get installation folder from registry if available
InstallDirRegKey HKLM "Software\Mozilla\MaintenanceService" ""
InstallDirRegKey HKLM "Software\Waterfox\MaintenanceService" ""

SetOverwrite on

; serviceinstall.cpp also uses this key, in case the path is changed, update
; there too.
!define MaintUninstallKey \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService"
"Software\Microsoft\Windows\CurrentVersion\Uninstall\WaterfoxMaintenanceService"

; Always install into the 32-bit location even if we have a 64-bit build.
; This is because we use only 1 service for all Firefox channels.
Expand Down Expand Up @@ -198,7 +198,7 @@ Section "MaintenanceService"
WriteRegStr HKLM "${MaintUninstallKey}" "DisplayIcon" \
"$INSTDIR\Uninstall.exe,0"
WriteRegStr HKLM "${MaintUninstallKey}" "DisplayVersion" "${AppVersion}"
WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Mozilla"
WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Waterfox"
WriteRegStr HKLM "${MaintUninstallKey}" "Comments" "${BrandFullName}"
WriteRegDWORD HKLM "${MaintUninstallKey}" "NoModify" 1
${GetSize} "$INSTDIR" "/S=0K" $R2 $R3 $R4
Expand All @@ -209,14 +209,14 @@ Section "MaintenanceService"
; want to install once on the first upgrade to maintenance service.
; Also write out that we are currently installed, preferences will check
; this value to determine if we should show the service update pref.
WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1
DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
WriteRegDWORD HKLM "Software\Waterfox\MaintenanceService" "Attempted" 1
WriteRegDWORD HKLM "Software\Waterfox\MaintenanceService" "Installed" 1
DeleteRegValue HKLM "Software\Waterfox\MaintenanceService" "FFPrefetchDisabled"

; Included here for debug purposes only.
; These keys are used to bypass the installation dir is a valid installation
; check from the service so that tests can be run.
; WriteRegStr HKLM "${FallbackKey}\0" "name" "Mozilla Corporation"
; WriteRegStr HKLM "${FallbackKey}\0" "name" "Waterfox Limited"
; WriteRegStr HKLM "${FallbackKey}\0" "issuer" "DigiCert SHA2 Assured ID Code Signing CA"
${If} ${RunningX64}
${OrIf} ${IsNativeARM64}
Expand Down Expand Up @@ -287,34 +287,34 @@ Section "Uninstall"
Push "$INSTDIR\logs\maintenanceservice-uninstall.log"
Call un.RenameDelete
SetShellVarContext all
Push "$APPDATA\Mozilla\logs\maintenanceservice.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-1.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-1.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-2.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-2.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-3.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-3.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-4.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-4.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-5.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-5.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-6.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-6.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-7.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-7.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-8.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-8.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-9.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-9.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-10.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-10.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-install.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-install.log"
Call un.RenameDelete
Push "$APPDATA\Mozilla\logs\maintenanceservice-uninstall.log"
Push "$APPDATA\Waterfox\logs\maintenanceservice-uninstall.log"
Call un.RenameDelete
RMDir /REBOOTOK "$APPDATA\Mozilla\logs"
RMDir /REBOOTOK "$APPDATA\Mozilla"
RMDir /REBOOTOK "$APPDATA\Waterfox\logs"
RMDir /REBOOTOK "$APPDATA\Waterfox"
RMDir /REBOOTOK "$INSTDIR\logs"
RMDir /REBOOTOK "$INSTDIR\update"
RMDir /REBOOTOK "$INSTDIR"
Expand All @@ -324,8 +324,8 @@ Section "Uninstall"
SetRegView 64
${EndIf}
DeleteRegKey HKLM "${MaintUninstallKey}"
DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "Installed"
DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
DeleteRegValue HKLM "Software\Waterfox\MaintenanceService" "Installed"
DeleteRegValue HKLM "Software\Waterfox\MaintenanceService" "FFPrefetchDisabled"
DeleteRegKey HKLM "${FallbackKey}\"
${If} ${RunningX64}
${OrIf} ${IsNativeARM64}
Expand Down
Loading

0 comments on commit bbe37ac

Please sign in to comment.