зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1025640 - Enable building and installing the x64bit maintenance service on x64. r=rstrong
This commit is contained in:
Родитель
f6f4979801
Коммит
7ce0e02be8
|
@ -218,8 +218,10 @@ pref("app.update.incompatible.mode", 0);
|
|||
|
||||
// Whether or not to attempt using the service for updates.
|
||||
#ifdef MOZ_MAINTENANCE_SERVICE
|
||||
#ifndef HAVE_64BIT_OS
|
||||
pref("app.update.service.enabled", true);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Symmetric (can be overridden by individual extensions) update preferences.
|
||||
// e.g.
|
||||
|
|
|
@ -9,9 +9,9 @@ MOZ_UPDATER=1
|
|||
MOZ_PHOENIX=1
|
||||
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
MOZ_MAINTENANCE_SERVICE=1
|
||||
if ! test "$HAVE_64BIT_OS"; then
|
||||
MOZ_VERIFY_MAR_SIGNATURE=1
|
||||
MOZ_MAINTENANCE_SERVICE=1
|
||||
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
|
||||
"$MOZ_UPDATE_CHANNEL" = "aurora" -o \
|
||||
"$MOZ_UPDATE_CHANNEL" = "beta" -o \
|
||||
|
|
|
@ -75,14 +75,11 @@ SetOverwrite on
|
|||
!define MaintUninstallKey \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService"
|
||||
|
||||
; The HAVE_64BIT_OS define also means that we have an x64 build,
|
||||
; not just an x64 OS.
|
||||
!ifdef HAVE_64BIT_OS
|
||||
; See below, we actually abort the install for x64 builds currently.
|
||||
InstallDir "$PROGRAMFILES64\${MaintFullName}\"
|
||||
!else
|
||||
InstallDir "$PROGRAMFILES32\${MaintFullName}\"
|
||||
!endif
|
||||
; 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.
|
||||
; Allow either x86 and x64 builds to exist at this location, depending on
|
||||
; what is the latest build.
|
||||
InstallDir "$PROGRAMFILES32\${MaintFullName}\"
|
||||
ShowUnInstDetails nevershow
|
||||
|
||||
################################################################################
|
||||
|
@ -121,13 +118,6 @@ Function .onInit
|
|||
|
||||
SetSilent silent
|
||||
|
||||
!ifdef HAVE_64BIT_OS
|
||||
; We plan to eventually enable 64bit native builds to use the maintenance
|
||||
; service, but for the initial release, to reduce testing and development,
|
||||
; 64-bit builds will not install the maintenanceservice.
|
||||
Abort
|
||||
!endif
|
||||
|
||||
; On Windows 2000 we do not install the maintenance service.
|
||||
; We won't run this installer from the parent installer, but just in case
|
||||
; someone tries to execute it on Windows 2000...
|
||||
|
@ -205,8 +195,7 @@ Section "MaintenanceService"
|
|||
"$INSTDIR\Uninstall.exe,0"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "DisplayVersion" "${AppVersion}"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Mozilla"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "Comments" \
|
||||
"${BrandFullName} ${AppVersion} (${ARCH} ${AB_CD})"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "Comments" "${BrandFullName}"
|
||||
WriteRegDWORD HKLM "${MaintUninstallKey}" "NoModify" 1
|
||||
${GetSize} "$INSTDIR" "/S=0K" $R2 $R3 $R4
|
||||
WriteRegDWORD HKLM "${MaintUninstallKey}" "EstimatedSize" $R2
|
||||
|
|
|
@ -12,6 +12,15 @@ SetCompress off
|
|||
CRCCheck on
|
||||
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; The commands inside this ifdef require NSIS 3.0a2 or greater so the ifdef can
|
||||
; be removed after we require NSIS 3.0a2 or greater.
|
||||
!ifdef NSIS_PACKEDVERSION
|
||||
Unicode true
|
||||
ManifestSupportedOS all
|
||||
ManifestDPIAware true
|
||||
!endif
|
||||
|
||||
!addplugindir ./
|
||||
|
||||
; Variables
|
||||
|
@ -66,14 +75,11 @@ SetOverwrite on
|
|||
!define MaintUninstallKey \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService"
|
||||
|
||||
; The HAVE_64BIT_OS define also means that we have an x64 build,
|
||||
; not just an x64 OS.
|
||||
!ifdef HAVE_64BIT_OS
|
||||
; See below, we actually abort the install for x64 builds currently.
|
||||
InstallDir "$PROGRAMFILES64\${MaintFullName}\"
|
||||
!else
|
||||
InstallDir "$PROGRAMFILES32\${MaintFullName}\"
|
||||
!endif
|
||||
; 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.
|
||||
; Allow either x86 and x64 builds to exist at this location, depending on
|
||||
; what is the latest build.
|
||||
InstallDir "$PROGRAMFILES32\${MaintFullName}\"
|
||||
ShowUnInstDetails nevershow
|
||||
|
||||
################################################################################
|
||||
|
@ -106,14 +112,11 @@ ShowUnInstDetails nevershow
|
|||
BrandingText " "
|
||||
|
||||
Function .onInit
|
||||
SetSilent silent
|
||||
!ifdef HAVE_64BIT_OS
|
||||
; We plan to eventually enable 64bit native builds to use the maintenance
|
||||
; service, but for the initial release, to reduce testing and development,
|
||||
; 64-bit builds will not install the maintenanceservice.
|
||||
Abort
|
||||
!endif
|
||||
; Remove the current exe directory from the search order.
|
||||
; This only effects LoadLibrary calls and not implicitly loaded DLLs.
|
||||
System::Call 'kernel32::SetDllDirectoryW(w "")'
|
||||
|
||||
SetSilent silent
|
||||
; On Windows 2000 we do not install the maintenance service.
|
||||
; We won't run this installer from the parent installer, but just in case
|
||||
; someone tries to execute it on Windows 2000...
|
||||
|
@ -123,6 +126,18 @@ Function .onInit
|
|||
FunctionEnd
|
||||
|
||||
Function un.onInit
|
||||
; Remove the current exe directory from the search order.
|
||||
; This only effects LoadLibrary calls and not implicitly loaded DLLs.
|
||||
System::Call 'kernel32::SetDllDirectoryW(w "")'
|
||||
|
||||
; 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}
|
||||
!endif
|
||||
|
||||
StrCpy $BrandFullNameDA "${MaintFullName}"
|
||||
StrCpy $BrandFullName "${MaintFullName}"
|
||||
FunctionEnd
|
||||
|
@ -164,11 +179,11 @@ Section "MaintenanceService"
|
|||
;${GetParameters} $0
|
||||
;${GetOptions} "$0" "/Upgrade" $0
|
||||
;${If} ${Errors}
|
||||
nsExec::Exec '"$INSTDIR\$TempMaintServiceName" forceinstall'
|
||||
ExecWait '"$INSTDIR\$TempMaintServiceName" forceinstall'
|
||||
;${Else}
|
||||
; The upgrade cmdline is the same as install except
|
||||
; It will fail if the service isn't already installed.
|
||||
; nsExec::Exec '"$INSTDIR\$TempMaintServiceName" upgrade'
|
||||
; ExecWait '"$INSTDIR\$TempMaintServiceName" upgrade'
|
||||
;${EndIf}
|
||||
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
@ -179,8 +194,7 @@ Section "MaintenanceService"
|
|||
"$INSTDIR\Uninstall.exe,0"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "DisplayVersion" "${AppVersion}"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "Publisher" "Mozilla"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "Comments" \
|
||||
"${BrandFullName} ${AppVersion} (${ARCH} ${AB_CD})"
|
||||
WriteRegStr HKLM "${MaintUninstallKey}" "Comments" "${BrandFullName}"
|
||||
WriteRegDWORD HKLM "${MaintUninstallKey}" "NoModify" 1
|
||||
${GetSize} "$INSTDIR" "/S=0K" $R2 $R3 $R4
|
||||
WriteRegDWORD HKLM "${MaintUninstallKey}" "EstimatedSize" $R2
|
||||
|
@ -197,6 +211,7 @@ Section "MaintenanceService"
|
|||
${EndIf}
|
||||
WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
|
||||
WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Installed" 1
|
||||
DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
|
||||
|
||||
; Included here for debug purposes only.
|
||||
; These keys are used to bypass the installation dir is a valid installation
|
||||
|
@ -230,7 +245,7 @@ FunctionEnd
|
|||
|
||||
Section "Uninstall"
|
||||
; Delete the service so that no updates will be attempted
|
||||
nsExec::Exec '"$INSTDIR\maintenanceservice.exe" uninstall'
|
||||
ExecWait '"$INSTDIR\maintenanceservice.exe" uninstall'
|
||||
|
||||
Push "$INSTDIR\updater.ini"
|
||||
Call un.RenameDelete
|
||||
|
@ -242,14 +257,19 @@ Section "Uninstall"
|
|||
Call un.RenameDelete
|
||||
Push "$INSTDIR\Uninstall.exe"
|
||||
Call un.RenameDelete
|
||||
Push "$INSTDIR\update\updater.ini"
|
||||
Call un.RenameDelete
|
||||
Push "$INSTDIR\update\updater.exe"
|
||||
Call un.RenameDelete
|
||||
RMDir /REBOOTOK "$INSTDIR\update"
|
||||
RMDir /REBOOTOK "$INSTDIR"
|
||||
|
||||
DeleteRegKey HKLM "${MaintUninstallKey}"
|
||||
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "Installed"
|
||||
DeleteRegValue HKLM "Software\Mozilla\MaintenanceService" "FFPrefetchDisabled"
|
||||
DeleteRegKey HKLM "${FallbackKey}\"
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastused
|
||||
|
|
Загрузка…
Ссылка в новой задаче