diff options
author | bas-vk <bas-vk@users.noreply.github.com> | 2016-12-11 07:01:57 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2016-12-11 07:01:57 +0800 |
commit | 4f9ccdd70f69dd0a879329d57ec21588f29f182c (patch) | |
tree | 485d305d44c364b93a4c6a06505803bb97ba70af /build/nsis.install.nsh | |
parent | 4e36b1e3dadda62a53e309a1b6cf7aed97ea7a3a (diff) | |
download | dexon-4f9ccdd70f69dd0a879329d57ec21588f29f182c.tar.gz dexon-4f9ccdd70f69dd0a879329d57ec21588f29f182c.tar.zst dexon-4f9ccdd70f69dd0a879329d57ec21588f29f182c.zip |
build: safe update of PATH on Windows (#3419)
NSIS has a default MAX_STR_LEN of 1024. If $ENV{PATH} is longer
the returned string is truncated to an empty string. Its then not
possible to distinguis between the variable not set or too long.
As a result the variable is set with the location where geth and/or
dev tools are installed. This may override any previous set values.
Diffstat (limited to 'build/nsis.install.nsh')
-rw-r--r-- | build/nsis.install.nsh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/nsis.install.nsh b/build/nsis.install.nsh index f9ad8e95e..57ef5a37c 100644 --- a/build/nsis.install.nsh +++ b/build/nsis.install.nsh @@ -37,8 +37,9 @@ Section "Geth" GETH_IDX ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc" ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\geth.ipc" - # Add geth to PATH - ${EnvVarUpdate} $0 "PATH" "A" "HKLM" $INSTDIR + # Add instdir to PATH + Push "$INSTDIR" + Call AddToPath SectionEnd # Install optional develop tools. |