зеркало из https://github.com/mozilla/pjs.git
Bug 392303 - Simplify installer changes - Part 1. r=sspitzer
This commit is contained in:
Родитель
9c74fc9883
Коммит
502ded9d59
|
@ -80,10 +80,7 @@ Var fhUninstallLog
|
|||
!insertmacro WordReplace
|
||||
!insertmacro GetSize
|
||||
!insertmacro GetParameters
|
||||
!insertmacro GetParent
|
||||
!insertmacro GetOptions
|
||||
!insertmacro GetRoot
|
||||
!insertmacro DriveSpace
|
||||
|
||||
; NSIS provided macros that we have overridden
|
||||
!include overrides.nsh
|
||||
|
@ -99,18 +96,18 @@ Var fhUninstallLog
|
|||
|
||||
VIAddVersionKey "FileDescription" "${BrandShortName} Installer"
|
||||
|
||||
!insertmacro GetLongPath
|
||||
!insertmacro RegCleanMain
|
||||
!insertmacro RegCleanUninstall
|
||||
!insertmacro CloseApp
|
||||
!insertmacro WriteRegStr2
|
||||
!insertmacro WriteRegDWORD2
|
||||
!insertmacro CreateRegKey
|
||||
!insertmacro AddHandlerValues
|
||||
!insertmacro CanWriteToInstallDir
|
||||
!insertmacro CheckDiskSpace
|
||||
!insertmacro CleanVirtualStore
|
||||
!insertmacro AddHandlerValues
|
||||
!insertmacro CloseApp
|
||||
!insertmacro CreateRegKey
|
||||
!insertmacro GetLongPath
|
||||
!insertmacro GetSingleInstallPath
|
||||
!insertmacro RegCleanMain
|
||||
!insertmacro RegCleanUninstall
|
||||
!insertmacro WriteRegStr2
|
||||
!insertmacro WriteRegDWORD2
|
||||
|
||||
!include shared.nsh
|
||||
|
||||
|
|
|
@ -62,13 +62,9 @@ Var TmpVal
|
|||
!include WordFunc.nsh
|
||||
!include MUI.nsh
|
||||
|
||||
!insertmacro FileJoin
|
||||
!insertmacro GetOptions
|
||||
!insertmacro GetParameters
|
||||
!insertmacro LineFind
|
||||
!insertmacro StrFilter
|
||||
!insertmacro TextCompare
|
||||
!insertmacro TrimNewLines
|
||||
!insertmacro WordFind
|
||||
!insertmacro WordReplace
|
||||
|
||||
|
|
|
@ -67,6 +67,12 @@ Exch 1 ; exchange the top of the stack with 2 below the top of the stack
|
|||
Exch $R9 ; exchange the new $R9 value with the top of the stack
|
||||
*/
|
||||
|
||||
!include TextFunc.nsh
|
||||
!include FileFunc.nsh
|
||||
|
||||
; NSIS provided macros that we have overridden.
|
||||
!include overrides.nsh
|
||||
|
||||
; Modified version of the following MUI macros to support Mozilla localization.
|
||||
; MUI_LANGUAGE
|
||||
; MUI_LANGUAGEFILE_BEGIN
|
||||
|
@ -645,6 +651,9 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
*/
|
||||
!macro CheckDiskSpace
|
||||
|
||||
!insertmacro ${_MOZFUNC_UN}GetRoot
|
||||
!insertmacro ${_MOZFUNC_UN}DriveSpace
|
||||
|
||||
!ifndef ${_MOZFUNC_UN}CheckDiskSpace
|
||||
!verbose push
|
||||
!verbose ${_MOZFUNC_VERBOSE}
|
||||
|
@ -674,8 +683,8 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
SectionGetSize 2 $R5
|
||||
IntOp $R8 $R8 + $R5
|
||||
|
||||
${GetRoot} "$INSTDIR" $R4
|
||||
${DriveSpace} "$R4" "/D=F /S=K" $R3
|
||||
${${_MOZFUNC_UN}GetRoot} "$INSTDIR" $R4
|
||||
${${_MOZFUNC_UN}DriveSpace} "$R4" "/D=F /S=K" $R3
|
||||
|
||||
System::Int64Op $R3 > $R8
|
||||
Pop $R2
|
||||
|
@ -723,6 +732,8 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
!undef _MOZFUNC_UN
|
||||
!define _MOZFUNC_UN "un."
|
||||
|
||||
!insertmacro GetRoot
|
||||
!insertmacro DriveSpace
|
||||
!insertmacro CheckDiskSpace
|
||||
|
||||
!undef _MOZFUNC_UN
|
||||
|
@ -756,6 +767,8 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
*/
|
||||
!macro RegCleanMain
|
||||
|
||||
!insertmacro ${_MOZFUNC_UN}GetLongPath
|
||||
|
||||
!ifndef ${_MOZFUNC_UN}RegCleanMain
|
||||
!verbose push
|
||||
!verbose ${_MOZFUNC_VERBOSE}
|
||||
|
@ -871,6 +884,7 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
!undef _MOZFUNC_UN
|
||||
!define _MOZFUNC_UN "un."
|
||||
|
||||
!insertmacro GetLongPath
|
||||
!insertmacro RegCleanMain
|
||||
|
||||
!undef _MOZFUNC_UN
|
||||
|
@ -892,6 +906,8 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
*/
|
||||
!macro RegCleanUninstall
|
||||
|
||||
!insertmacro ${_MOZFUNC_UN}GetLongPath
|
||||
|
||||
!ifndef ${_MOZFUNC_UN}RegCleanUninstall
|
||||
!verbose push
|
||||
!verbose ${_MOZFUNC_VERBOSE}
|
||||
|
@ -963,6 +979,7 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
!undef _MOZFUNC_UN
|
||||
!define _MOZFUNC_UN "un."
|
||||
|
||||
!insertmacro GetLongPath
|
||||
!insertmacro RegCleanUninstall
|
||||
|
||||
!undef _MOZFUNC_UN
|
||||
|
@ -1658,6 +1675,8 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
*/
|
||||
!macro GetSingleInstallPath
|
||||
|
||||
!insertmacro ${_MOZFUNC_UN}GetParent
|
||||
|
||||
!ifndef ${_MOZFUNC_UN}GetSingleInstallPath
|
||||
!verbose push
|
||||
!verbose ${_MOZFUNC_VERBOSE}
|
||||
|
@ -1737,6 +1756,7 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
!undef _MOZFUNC_UN
|
||||
!define _MOZFUNC_UN "un."
|
||||
|
||||
!insertmacro GetParent
|
||||
!insertmacro GetSingleInstallPath
|
||||
|
||||
!undef _MOZFUNC_UN
|
||||
|
@ -2100,14 +2120,17 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
/**
|
||||
* Updates the uninstall.log with new files added by software update.
|
||||
*
|
||||
* Requires FileJoin, LineFind, TextCompare, and TrimNewLines.
|
||||
*
|
||||
* IMPORTANT! The LineFind docs claim that it uses all registers except $R0-$R3.
|
||||
* Though it appears that this is not true all registers besides
|
||||
* $R0-$R3 may be overwritten so protect yourself!
|
||||
*/
|
||||
!macro UpdateUninstallLog
|
||||
|
||||
!insertmacro ${_MOZFUNC_UN}FileJoin
|
||||
!insertmacro ${_MOZFUNC_UN}LineFind
|
||||
!insertmacro ${_MOZFUNC_UN}TextCompareNoDetails
|
||||
!insertmacro ${_MOZFUNC_UN}TrimNewLines
|
||||
|
||||
!ifndef ${_MOZFUNC_UN}UpdateUninstallLog
|
||||
!verbose push
|
||||
!verbose ${_MOZFUNC_VERBOSE}
|
||||
|
@ -2129,7 +2152,7 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
|
||||
GetTempFileName $R2 "$R3"
|
||||
FileOpen $R1 $R2 w
|
||||
${${_MOZFUNC_UN}TextCompare} "$R3\uninstall.update" "$R3\uninstall.log" "SlowDiff" "${_MOZFUNC_UN}CreateUpdateDiff"
|
||||
${${_MOZFUNC_UN}TextCompareNoDetails} "$R3\uninstall.update" "$R3\uninstall.log" "SlowDiff" "${_MOZFUNC_UN}CreateUpdateDiff"
|
||||
FileClose $R1
|
||||
|
||||
IfErrors +2 0
|
||||
|
@ -2214,6 +2237,10 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
|
|||
!undef _MOZFUNC_UN
|
||||
!define _MOZFUNC_UN "un."
|
||||
|
||||
!insertmacro FileJoin
|
||||
!insertmacro LineFind
|
||||
!insertmacro TextCompareNoDetails
|
||||
!insertmacro TrimNewLines
|
||||
!insertmacro UpdateUninstallLog
|
||||
|
||||
!undef _MOZFUNC_UN
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
################################################################################
|
||||
# Modified versions of macros provided by NSIS
|
||||
|
||||
!ifndef OVERRIDES_INCLUDED
|
||||
!define OVERRIDES_INCLUDED
|
||||
|
||||
; Modified version of Locate from the NSIS File Functions Header v3.2
|
||||
; This version has the calls to SetDetailsPrint and DetailsPrint commented out.
|
||||
; See <NSIS App Dir>/include/FileFunc.nsh for more information
|
||||
|
@ -566,3 +569,5 @@
|
|||
!verbose pop
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче