mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1366860 - Require a minimum amount of RAM to get a 64-bit build from the stub installer. r=rstrong
MozReview-Commit-ID: 4lR9pjafnTq --HG-- extra : rebase_source : 37dbab58bce96d2697ede973b44b81c00a6fef75
This commit is contained in:
parent
887b840043
commit
1750525a88
@ -181,6 +181,14 @@ Var PreviousInstallArch
|
||||
!define BlurbDisplayMS 19500
|
||||
!define BlurbBlankMS 500
|
||||
|
||||
; Amount of physical memory required for the 64-bit build to be selected.
|
||||
; Machines with less RAM than this get the 32-bit build, even with a 64-bit OS.
|
||||
; The value 1800 MB was chosen based on an initial requirement of 2 GB, reduced
|
||||
; to allow for hardware such as integrated graphics that reserves some of the
|
||||
; installed RAM for its own use.
|
||||
; 1800 MB * 1024 KB/MB * 1024 B/KB = 1887436800 bytes
|
||||
!define RAM_NEEDED_FOR_64BIT 1887436800
|
||||
|
||||
; Attempt to elevate Standard Users in addition to users that
|
||||
; are a member of the Administrators group.
|
||||
!define NONADMIN_ELEVATE
|
||||
@ -312,9 +320,18 @@ Function .onInit
|
||||
Quit
|
||||
${EndIf}
|
||||
|
||||
; Check if we meet the RAM requirement for the 64-bit build.
|
||||
System::Call "*(i 64, i, l 0, l, l, l, l, l, l)p.r0"
|
||||
System::Call "Kernel32::GlobalMemoryStatusEx(p r0)"
|
||||
System::Call "*$0(i, i, l.r1, l, l, l, l, l, l)"
|
||||
System::Free $0
|
||||
|
||||
${If} ${RunningX64}
|
||||
${AndIf} $1 L>= ${RAM_NEEDED_FOR_64BIT}
|
||||
StrCpy $DroplistArch "$(VERSION_64BIT)"
|
||||
StrCpy $INSTDIR "${DefaultInstDir64bit}"
|
||||
${Else}
|
||||
StrCpy $DroplistArch "$(VERSION_32BIT)"
|
||||
StrCpy $INSTDIR "${DefaultInstDir32bit}"
|
||||
${EndIf}
|
||||
|
||||
@ -423,11 +440,6 @@ Function .onInit
|
||||
!else
|
||||
StrCpy $CheckboxInstallMaintSvc "0"
|
||||
!endif
|
||||
${If} ${RunningX64}
|
||||
StrCpy $DroplistArch "$(VERSION_64BIT)"
|
||||
${Else}
|
||||
StrCpy $DroplistArch "$(VERSION_32BIT)"
|
||||
${EndIf}
|
||||
|
||||
StrCpy $0 ""
|
||||
!ifdef FONT_FILE1
|
||||
|
Loading…
Reference in New Issue
Block a user