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!
Set https://github.com/electron-userland/electron-builder/wiki/Options#NsisOptions-warningsAsErrors
Or move include to macro.
@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.
@FromStoneage Do you have an example showing how to include the EnvVarUpdate function in your .nsh script
Same problem for me but the suggested link does not exist anymore...
Most helpful comment
Same problem for me but the suggested link does not exist anymore...