From 438b7a0e08ae3d9ce1bac40d19dfcdd9522b2fc9 Mon Sep 17 00:00:00 2001 From: develar Date: Mon, 13 Feb 2017 07:38:42 +0100 Subject: [PATCH] fix(nsis): Custom NSIS Script !include could not find nsh file Close #1239 --- .idea/dictionaries/develar.xml | 1 + appveyor.yml | 2 +- packages/electron-builder/src/targets/nsis.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.idea/dictionaries/develar.xml b/.idea/dictionaries/develar.xml index 771434ce53d..bfaf269b66d 100644 --- a/.idea/dictionaries/develar.xml +++ b/.idea/dictionaries/develar.xml @@ -4,6 +4,7 @@ actperepo addincludedir addons + addplugindir adminrequired allusersnotpossible amazonaws diff --git a/appveyor.yml b/appveyor.yml index 2e2847189e5..50f8118823f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ platform: - x64 cache: - - node_modules + #- node_modules - '%USERPROFILE%\.electron' environment: diff --git a/packages/electron-builder/src/targets/nsis.ts b/packages/electron-builder/src/targets/nsis.ts index c3e321b3881..a6879f2333a 100644 --- a/packages/electron-builder/src/targets/nsis.ts +++ b/packages/electron-builder/src/targets/nsis.ts @@ -318,7 +318,7 @@ export default class NsisTarget extends Target { const packager = this.packager const customInclude = await packager.getResource(this.options.include, "installer.nsh") if (customInclude != null) { - script = `!include "${customInclude}"\n!addincludedir "${packager.buildResourcesDir}"\n${script}` + script = `!addincludedir "${packager.buildResourcesDir}"\n!addplugindir "${packager.buildResourcesDir}"\n\n!include "${customInclude}"\n\n${script}` } const fileAssociations = packager.fileAssociations