update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
62
electron/node_modules/app-builder-lib/templates/nsis/multiUser.nsh
generated
vendored
62
electron/node_modules/app-builder-lib/templates/nsis/multiUser.nsh
generated
vendored
|
|
@ -28,20 +28,27 @@ Var installMode
|
|||
StrCpy $INSTDIR $perUserInstallationFolder
|
||||
${else}
|
||||
StrCpy $0 "$LocalAppData\Programs"
|
||||
System::Store S
|
||||
# Win7 has a per-user programfiles known folder and this can be a non-default location
|
||||
|
||||
Push $1
|
||||
Push $2
|
||||
# UserProgramFiles is the per-user install root and can be a non-default location
|
||||
StrCpy $2 0
|
||||
System::Call 'SHELL32::SHGetKnownFolderPath(g "${FOLDERID_UserProgramFiles}", i ${KF_FLAG_CREATE}, p 0, *p .r2)i.r1'
|
||||
${If} $1 == 0
|
||||
System::Call '*$2(&w${NSIS_MAX_STRLEN} .s)'
|
||||
StrCpy $0 $1
|
||||
System::Call 'KERNEL32::lstrcpynW(w .r0, p r2, i ${NSIS_MAX_STRLEN})p'
|
||||
${endif}
|
||||
# SHGetKnownFolderPath may return allocated memory even on failure
|
||||
${If} $2 != 0
|
||||
System::Call 'OLE32::CoTaskMemFree(p r2)'
|
||||
${endif}
|
||||
System::Store L
|
||||
Pop $2
|
||||
Pop $1
|
||||
|
||||
StrCpy $INSTDIR "$0\${APP_FILENAME}"
|
||||
${endif}
|
||||
|
||||
# allow /D switch to override installation path https://github.com/electron-userland/electron-builder/issues/1551
|
||||
${StdUtils.GetParameter} $R0 "D" ""
|
||||
!insertmacro GetDParameter $R0
|
||||
${If} $R0 != ""
|
||||
StrCpy $INSTDIR $R0
|
||||
${endif}
|
||||
|
|
@ -84,10 +91,51 @@ Var installMode
|
|||
${endif}
|
||||
|
||||
# allow /D switch to override installation path https://github.com/electron-userland/electron-builder/issues/1551
|
||||
${StdUtils.GetParameter} $R0 "D" ""
|
||||
!insertmacro GetDParameter $R0
|
||||
${If} $R0 != ""
|
||||
StrCpy $INSTDIR $R0
|
||||
${endif}
|
||||
|
||||
!macroend
|
||||
!endif
|
||||
|
||||
# Custom function to handle /D parameter with spaces
|
||||
# The /D parameter is special in NSIS - it must be the last parameter and cannot have quotes
|
||||
# Use StdUtils.GetParameter to get the full command line, then parse /D= manually
|
||||
!macro GetDParameter outVar
|
||||
Push $R8
|
||||
Push $R9
|
||||
Push $R7
|
||||
Push $R6
|
||||
Push $R5
|
||||
|
||||
# Get the complete command line using StdUtils (including /D parameter)
|
||||
${StdUtils.GetAllParameters} $R8 "0"
|
||||
|
||||
# Initialize result
|
||||
StrCpy $R9 ""
|
||||
|
||||
# Search for /D= or /d= using a simple loop
|
||||
StrLen $R7 $R8
|
||||
IntOp $R7 $R7 - 2 # Don't check last 2 characters
|
||||
StrCpy $R6 0
|
||||
|
||||
${Do}
|
||||
StrCpy $R5 $R8 3 $R6 # Get 3 characters starting at position $R6
|
||||
${If} $R5 == "/D="
|
||||
${OrIf} $R5 == "/d="
|
||||
# Found /D= or /d=, extract everything after it
|
||||
IntOp $R6 $R6 + 3
|
||||
StrCpy $R9 $R8 "" $R6
|
||||
${Break}
|
||||
${EndIf}
|
||||
IntOp $R6 $R6 + 1
|
||||
${LoopUntil} $R6 > $R7
|
||||
|
||||
StrCpy ${outVar} $R9
|
||||
Pop $R5
|
||||
Pop $R6
|
||||
Pop $R7
|
||||
Pop $R9
|
||||
Pop $R8
|
||||
!macroend
|
||||
Loading…
Add table
Add a link
Reference in a new issue