Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom NSIS Script !include could not find nsh file #1239

Closed
FromStoneage opened this issue Feb 10, 2017 · 4 comments · May be fixed by qcif/data-curator#563
Closed

Custom NSIS Script !include could not find nsh file #1239

FromStoneage opened this issue Feb 10, 2017 · 4 comments · May be fixed by qcif/data-curator#563

Comments

@FromStoneage
Copy link

  • Version: 13.3.1
  • Target: Windows

I'm trying to include this EnvVarUpdate.nsh so I can update the PATH environment variable. According to the wiki page

build is added as addincludedir (i.e. you don't need to use BUILD_RESOURCES_DIR to include files).

so in my build/installer.nsh the first line I have !include "EnvVarUpdate.nsh"

but I keep getting the error below.

Error output:
!include: could not find: "EnvVarUpdate.nsh"
!include: error in script: "/home/jonathan/Documents/Git/sdt/build/installer.nsh" on line 1
Error in script "<stdin>" on line 5 -- aborting creation process

If I try to change to !include "${BUILD_RESOURCES_DIR}/EnvVarUpdate.nsh" it seems to load the file but got a different error while creating the installer.

Processed 1 file, 10 command line commands, writing output (x86-unicode):
warning: uninstall function "un.EnvVarUpdate" not referenced - zeroing code (179-377) out

Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x).

Error output:
Error: warning treated as error

Any ideas? Much appreciate!

@develar
Copy link
Member

develar commented Feb 10, 2017

Set https://github.com/electron-userland/electron-builder/wiki/Options#NsisOptions-warningsAsErrors

Or move include to macro.

@FromStoneage
Copy link
Author

@develar worked great! thanks! what about

build is added as addincludedir (i.e. you don't need to use BUILD_RESOURCES_DIR to include files).

it doesn't seem to do what it's advertising.

@jegj
Copy link

jegj commented Sep 13, 2017

@FromStoneage Do you have an example showing how to include the EnvVarUpdate function in your .nsh script

@hervehobbes
Copy link

Same problem for me but the suggested link does not exist anymore...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants