Skip to content

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

@FromStoneage

Description

@FromStoneage
  • 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions