Permalink
Browse files

windows-nsi: install at appropreate program files

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
  • Loading branch information...
1 parent 749a449 commit d542e01a700b029b59d622f87ea08126febc22ba @alonbl alonbl committed May 8, 2012
Showing with 7 additions and 3 deletions.
  1. +1 −0 windows-nsis/build
  2. +6 −3 windows-nsis/openvpn.nsi
View
@@ -78,6 +78,7 @@ main() {
OUTPUT="${OUTPUT_DIR}/openvpn-install-${VERSION_STRING}-${ARCH}.exe"
"${MAKENSIS}" \
+ -DARCH="${ARCH}" \
-DPACKAGE_NAME="${OPENVPN_PACKAGE_NAME}" \
-DVERSION_STRING="${VERSION_STRING}" \
-DSPECIAL_BUILD="${SPECIAL_BUILD}" \
View
@@ -28,9 +28,6 @@ OutFile "${OUTPUT}"
ShowInstDetails show
ShowUninstDetails show
-;Folder selection page
-InstallDir "$PROGRAMFILES\${PACKAGE_NAME}"
-
;Remember install folder
InstallDirRegKey HKLM "SOFTWARE\${PACKAGE_NAME}" ""
@@ -152,6 +149,12 @@ Function .onInit
!insertmacro IsAdmin
+ ${If} "${ARCH}" == "x86_64"
+ StrCpy $INSTDIR "$PROGRAMFILES64\${PACKAGE_NAME}"
+ ${Else}
+ StrCpy $INSTDIR "$PROGRAMFILES\${PACKAGE_NAME}"
+ ${EndIf}
+
# Delete previous start menu
RMDir /r "$SMPROGRAMS\${PACKAGE_NAME}"
FunctionEnd

0 comments on commit d542e01

Please sign in to comment.