From 5126eda99666ade2f15b05d92ddd8778812f8496 Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 14 Apr 2021 17:07:20 -0400 Subject: [PATCH] Make sure that LogicLib.nsh is included in the nsis include so that the parent script doesn't necessarily need to include it. Quote some things so that they never break when expanded --- bin/i2p-zero.nsi | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/i2p-zero.nsi b/bin/i2p-zero.nsi index 890a36d..e6c22b8 100644 --- a/bin/i2p-zero.nsi +++ b/bin/i2p-zero.nsi @@ -2,7 +2,9 @@ !define ZERONAME "I2P-Zero" !define I2P64INSTDIR "$PROGRAMFILES64\I2P\" !define I2P32INSTDIR "$PROGRAMFILES32\I2P\" -!define ZEROINSTDIR "$PROGRAMFILES64\${APPNAME}\" +!define ZEROINSTDIR "$PROGRAMFILES64\${ZERONAME}\" +# Include the logic library for checking file exists. +!include LogicLib.nsh function buildZero !system "echo '#! /usr/bin/env sh' > build-docker.sh" @@ -24,15 +26,15 @@ function buildZero functionEnd function installZero - ${If} ${FileExists} `$I2P64INSTDIR\I2P.exe` - SetOutPath $ZEROINSTDIR - ${If} ${FileExists} `$I2P32INSTDIR\I2P.exe` - SetOutPath $ZEROINSTDIR + ${If} ${FileExists} "${I2P64INSTDIR}\I2P.exe" + SetOutPath "${ZEROINSTDIR}" + ${If} ${FileExists} "${I2P32INSTDIR}\I2P.exe" + SetOutPath "${ZEROINSTDIR}" ${Else} - SetOutPath $ZEROINSTDIR + SetOutPath "${ZEROINSTDIR}" File /a /r "./I2P-Zero/" - CreateShortcut "$SMPROGRAMS\Run I2P-Zero.lnk" "$ZEROINSTDIR\router\i2p-zero.exe" + CreateShortcut "$SMPROGRAMS\Run I2P-Zero.lnk" "${ZEROINSTDIR}\router\i2p-zero.exe" ${EndIf} functionEnd