From 8e957c8a2e1aa4b6b12adc11939f66b8252eb2d1 Mon Sep 17 00:00:00 2001 From: develar Date: Mon, 12 Jun 2017 10:32:25 +0200 Subject: [PATCH] feat(nsis): add APP_EXECUTABLE_DIR Close #1612 --- packages/electron-builder/templates/nsis/portable.nsi | 1 + test/fixtures/test-app-one/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/electron-builder/templates/nsis/portable.nsi b/packages/electron-builder/templates/nsis/portable.nsi index f16b0b49bbc..bd90e6350ef 100644 --- a/packages/electron-builder/templates/nsis/portable.nsi +++ b/packages/electron-builder/templates/nsis/portable.nsi @@ -16,6 +16,7 @@ Section !insertmacro extractEmbeddedAppPackage + System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("PORTABLE_EXECUTABLE_DIR", "$EXEDIR").r0' ExecWait "$INSTDIR\${APP_EXECUTABLE_FILENAME}" SetOutPath $PLUGINSDIR diff --git a/test/fixtures/test-app-one/index.html b/test/fixtures/test-app-one/index.html index a50eff39f33..5143948678a 100644 --- a/test/fixtures/test-app-one/index.html +++ b/test/fixtures/test-app-one/index.html @@ -16,7 +16,7 @@

Hello World!

Chrome , and Electron . - and Electron . + Env: .