From 80092ea90c2e8ac2ac699a6147a003206960ddb8 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Mon, 31 Oct 2016 02:22:08 +0100 Subject: [PATCH] Fix Installer for 64-bit fails with argument "/D" --- PowerEditor/installer/nppSetup.nsi | 2 -- PowerEditor/installer/nsisInclude/gobalDef.nsh | 6 ++++++ PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index 4bfd697ce..da17e5311 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -96,8 +96,6 @@ Function .onInit ${If} ${RunningX64} ; disable registry redirection (enable access to 64-bit portion of registry) SetRegView 64 - ; change install dir - StrCpy $INSTDIR "$PROGRAMFILES64\${APPNAME}" ; check if 32-bit version has been installed if yes, ask user to remove it IfFileExists $PROGRAMFILES\${APPNAME}\notepad++.exe 0 noDelete32 diff --git a/PowerEditor/installer/nsisInclude/gobalDef.nsh b/PowerEditor/installer/nsisInclude/gobalDef.nsh index c4749e118..93f987598 100644 --- a/PowerEditor/installer/nsisInclude/gobalDef.nsh +++ b/PowerEditor/installer/nsisInclude/gobalDef.nsh @@ -42,5 +42,11 @@ ; Main Install settings Name "${APPNAMEANDVERSION}" + +!ifdef ARCH64 +InstallDir "$PROGRAMFILES64\${APPNAME}" +!else InstallDir "$PROGRAMFILES\${APPNAME}" +!endif + InstallDirRegKey HKLM "Software\${APPNAME}" "" diff --git a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh index e17fc638f..3a21cf0e6 100644 --- a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh +++ b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh @@ -29,7 +29,6 @@ Var UPDATE_PATH Function setPathAndOptions ; Set Section properties SetOverwrite on - StrCpy $UPDATE_PATH $INSTDIR SetOutPath "$INSTDIR\"