mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 08:57:34 +09:00
Make nsis match better
This commit is contained in:
parent
633ef1c426
commit
b43a601654
5 changed files with 42 additions and 100 deletions
|
|
@ -1073,51 +1073,22 @@ Function .onInit
|
|||
Quit
|
||||
${EndUnless}
|
||||
|
||||
SetRegView 64
|
||||
!else
|
||||
StrCpy $R8 "0"
|
||||
${If} ${AtMostWin2000}
|
||||
StrCpy $R8 "1"
|
||||
${EndIf}
|
||||
|
||||
${If} ${IsWinXP}
|
||||
${AndIf} ${AtMostServicePack} 1
|
||||
StrCpy $R8 "1"
|
||||
${EndIf}
|
||||
|
||||
${If} $R8 == "1"
|
||||
; XXX-rstrong - some systems failed the AtLeastWin2000 test that we
|
||||
; used to use for an unknown reason and likely fail the AtMostWin2000
|
||||
; and possibly the IsWinXP test as well. To work around this also
|
||||
; check if the Windows NT registry Key exists and if it does if the
|
||||
; first char in CurrentVersion is equal to 3 (Windows NT 3.5 and
|
||||
; 3.5.1), 4 (Windows NT 4), or 5 (Windows 2000 and Windows XP).
|
||||
StrCpy $R8 ""
|
||||
ClearErrors
|
||||
ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
|
||||
StrCpy $R8 "$R8" 1
|
||||
${If} ${Errors}
|
||||
${OrIf} "$R8" == "3"
|
||||
${OrIf} "$R8" == "4"
|
||||
${OrIf} "$R8" == "5"
|
||||
${If} "$R7" == "0"
|
||||
strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
|
||||
${Else}
|
||||
strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
|
||||
${EndIf}
|
||||
MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
|
||||
ExecShell "open" "${URLSystemRequirements}"
|
||||
Quit
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
!endif
|
||||
|
||||
; SSE2 support
|
||||
${If} "$R7" == "0"
|
||||
MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_CPU_MSG)" IDCANCEL +2
|
||||
ExecShell "open" "${URLSystemRequirements}"
|
||||
Quit
|
||||
${EndIf}
|
||||
|
||||
!ifdef HAVE_64BIT_BUILD
|
||||
${Unless} ${RunningX64}
|
||||
MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_OSVER_MSG)" IDCANCEL +2
|
||||
ExecShell "open" "${URLSystemRequirements}"
|
||||
Quit
|
||||
${EndUnless}
|
||||
SetRegView 64
|
||||
!endif
|
||||
|
||||
${InstallOnInitCommon} "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
|
||||
|
||||
; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be
|
||||
|
|
|
|||
|
|
@ -166,56 +166,6 @@ UninstPage custom un.preConfirm
|
|||
; Use the default dialog for IDD_VERIFY for a simple Banner
|
||||
ChangeUI IDD_VERIFY "${NSISDIR}\Contrib\UIs\default.exe"
|
||||
|
||||
################################################################################
|
||||
# Helper Functions
|
||||
|
||||
; This function is used to uninstall the maintenance service if the
|
||||
; application currently being uninstalled is the last application to use the
|
||||
; maintenance service.
|
||||
Function un.UninstallServiceIfNotUsed
|
||||
; $0 will store if a subkey exists
|
||||
; $1 will store the first subkey if it exists or an empty string if it doesn't
|
||||
; Backup the old values
|
||||
Push $0
|
||||
Push $1
|
||||
|
||||
; The maintenance service always uses the 64-bit registry on x64 systems
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
|
||||
; Figure out the number of subkeys
|
||||
StrCpy $0 0
|
||||
${Do}
|
||||
EnumRegKey $1 HKLM "Software\Mozilla\MaintenanceService" $0
|
||||
${If} "$1" == ""
|
||||
${ExitDo}
|
||||
${EndIf}
|
||||
IntOp $0 $0 + 1
|
||||
${Loop}
|
||||
|
||||
; Restore back the registry view
|
||||
${If} ${RunningX64}
|
||||
SetRegView lastUsed
|
||||
${EndIf}
|
||||
${If} $0 == 0
|
||||
; Get the path of the maintenance service uninstaller
|
||||
ReadRegStr $1 HKLM ${MaintUninstallKey} "UninstallString"
|
||||
|
||||
; If the uninstall string does not exist, skip executing it
|
||||
StrCmp $1 "" doneUninstall
|
||||
|
||||
; $1 is already a quoted string pointing to the install path
|
||||
; so we're already protected against paths with spaces
|
||||
nsExec::Exec "$1 /S"
|
||||
doneUninstall:
|
||||
${EndIf}
|
||||
|
||||
; Restore the old value of $1 and $0
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
################################################################################
|
||||
# Install Sections
|
||||
; Empty section required for the installer to compile as an uninstaller
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue