Skip to content

Commit

Permalink
Fix Installer for 64-bit fails with argument "/D"
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Oct 31, 2016
1 parent c58043e commit 80092ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions PowerEditor/installer/nppSetup.nsi
Expand Up @@ -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}"

This comment has been minimized.

Copy link
@SinghRajenM

SinghRajenM Nov 4, 2016

Contributor

Removing this causes regression #2526 . :(


; check if 32-bit version has been installed if yes, ask user to remove it
IfFileExists $PROGRAMFILES\${APPNAME}\notepad++.exe 0 noDelete32
Expand Down
6 changes: 6 additions & 0 deletions PowerEditor/installer/nsisInclude/gobalDef.nsh
Expand Up @@ -42,5 +42,11 @@

; Main Install settings
Name "${APPNAMEANDVERSION}"

!ifdef ARCH64
InstallDir "$PROGRAMFILES64\${APPNAME}"

This comment has been minimized.

Copy link
@SinghRajenM

SinghRajenM Nov 4, 2016

Contributor

This statement has no effect in x64 bit installer if N++ 32 is already installed.
This path is overridden by InstallDirRegKey. Refer API documentation at nsis doc. As per documentation, For more advanced install directory configuration, set $INSTDIR in .onInit. which was already there on v7.1.

Please refer the issue #2526 as well.

This comment has been minimized.

Copy link
@donho

donho Nov 13, 2016

Author Member

@SinghRajenM Any solution to fix this regression and make /D work?

This comment has been minimized.

Copy link
@SinghRajenM

SinghRajenM Nov 14, 2016

Contributor

@donho Sorry for the delay in response. I see, you have already fixed it and the solution looks fine to me.

!else
InstallDir "$PROGRAMFILES\${APPNAME}"
!endif

InstallDirRegKey HKLM "Software\${APPNAME}" ""
1 change: 0 additions & 1 deletion PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh
Expand Up @@ -29,7 +29,6 @@ Var UPDATE_PATH
Function setPathAndOptions
; Set Section properties
SetOverwrite on

StrCpy $UPDATE_PATH $INSTDIR

SetOutPath "$INSTDIR\"
Expand Down

0 comments on commit 80092ea

Please sign in to comment.