init
This commit is contained in:
91
mc_test/node_modules/app-builder-lib/templates/nsis/portable.nsi
generated
vendored
Executable file
91
mc_test/node_modules/app-builder-lib/templates/nsis/portable.nsi
generated
vendored
Executable file
@ -0,0 +1,91 @@
|
||||
!include "common.nsh"
|
||||
!include "extractAppPackage.nsh"
|
||||
|
||||
# https://github.com/electron-userland/electron-builder/issues/3972#issuecomment-505171582
|
||||
CRCCheck off
|
||||
WindowIcon Off
|
||||
AutoCloseWindow True
|
||||
RequestExecutionLevel ${REQUEST_EXECUTION_LEVEL}
|
||||
|
||||
Function .onInit
|
||||
!ifndef SPLASH_IMAGE
|
||||
SetSilent silent
|
||||
!endif
|
||||
|
||||
!insertmacro check64BitAndSetRegView
|
||||
FunctionEnd
|
||||
|
||||
Function .onGUIInit
|
||||
InitPluginsDir
|
||||
|
||||
!ifdef SPLASH_IMAGE
|
||||
File /oname=$PLUGINSDIR\splash.bmp "${SPLASH_IMAGE}"
|
||||
BgImage::SetBg $PLUGINSDIR\splash.bmp
|
||||
BgImage::Redraw
|
||||
!endif
|
||||
FunctionEnd
|
||||
|
||||
Section
|
||||
!ifdef SPLASH_IMAGE
|
||||
HideWindow
|
||||
!endif
|
||||
|
||||
StrCpy $INSTDIR "$PLUGINSDIR\app"
|
||||
!ifdef UNPACK_DIR_NAME
|
||||
StrCpy $INSTDIR "$TEMP\${UNPACK_DIR_NAME}"
|
||||
!endif
|
||||
|
||||
RMDir /r $INSTDIR
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
!ifdef APP_DIR_64
|
||||
!ifdef APP_DIR_ARM64
|
||||
!ifdef APP_DIR_32
|
||||
${if} ${IsNativeARM64}
|
||||
File /r "${APP_DIR_ARM64}\*.*"
|
||||
${elseif} ${RunningX64}
|
||||
File /r "${APP_DIR_64}\*.*"
|
||||
${else}
|
||||
File /r "${APP_DIR_32}\*.*"
|
||||
${endIf}
|
||||
!else
|
||||
${if} ${IsNativeARM64}
|
||||
File /r "${APP_DIR_ARM64}\*.*"
|
||||
${else}
|
||||
File /r "${APP_DIR_64}\*.*"
|
||||
{endIf}
|
||||
!endif
|
||||
!else
|
||||
!ifdef APP_DIR_32
|
||||
${if} ${RunningX64}
|
||||
File /r "${APP_DIR_64}\*.*"
|
||||
${else}
|
||||
File /r "${APP_DIR_32}\*.*"
|
||||
${endIf}
|
||||
!else
|
||||
File /r "${APP_DIR_64}\*.*"
|
||||
!endif
|
||||
!endif
|
||||
!else
|
||||
!ifdef APP_DIR_32
|
||||
File /r "${APP_DIR_32}\*.*"
|
||||
!else
|
||||
!insertmacro extractEmbeddedAppPackage
|
||||
!endif
|
||||
!endif
|
||||
|
||||
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("PORTABLE_EXECUTABLE_DIR", "$EXEDIR").r0'
|
||||
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("PORTABLE_EXECUTABLE_FILE", "$EXEPATH").r0'
|
||||
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("PORTABLE_EXECUTABLE_APP_FILENAME", "${APP_FILENAME}").r0'
|
||||
${StdUtils.GetAllParameters} $R0 0
|
||||
|
||||
!ifdef SPLASH_IMAGE
|
||||
BgImage::Destroy
|
||||
!endif
|
||||
|
||||
ExecWait "$INSTDIR\${APP_EXECUTABLE_FILENAME} $R0" $0
|
||||
SetErrorLevel $0
|
||||
|
||||
SetOutPath $EXEDIR
|
||||
RMDir /r $INSTDIR
|
||||
SectionEnd
|
||||
Reference in New Issue
Block a user