Skip to contentSkip to conversation

Fix to Trac ticket #249 (openvpn-build subproject)

Openvpn-devel Samuli Seppänen 1 participant 1 message Jan 11, 2013

lore
Share & tools
lore
#0 lore raw

Hi all,

I took a stab at fixing Trac ticket #249:

<https://community.openvpn.net/openvpn/ticket/249>

The fix does not seem to cause any regressions if using the interactive installation method. Silent installation has not been tested yet. Links to new installers are here (build 002):

<https://community.openvpn.net/openvpn/ticket/249#comment:2>

Please test the installers and/or comment on the patch. It was aped from the suggestion given by the bug reporter which seemed to make sense.

Best regards,

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

From 209acaca040b14917b40ffd5314cde79efe8dd7c Mon Sep 17 00:00:00 2001
From: Samuli Seppänen <[email protected]...>
Date: Fri, 11 Jan 2013 15:00:24 +0200
Subject: [PATCH 2/3] Fix to Trac ticket #249

---
 windows-nsis/openvpn.nsi |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
windows-nsis/openvpn.nsi +9 -7
index afc382f..13543f6 100755
@@ -35,6 +35,9 @@ ShowUninstDetails show
 ;Remember install folder
 InstallDirRegKey HKLM "SOFTWARE\${PACKAGE_NAME}" ""
 
+; This is required for silent installations to work
+InstallDir "$PROGRAMFILES\${PACKAGE_NAME}"
+
 ;--------------------------------
 ;Modern UI Configuration
 
@@ -384,13 +387,12 @@ Function .onInit
 
 	!insertmacro MULTIUSER_INIT
 	SetShellVarContext all
-
-	${If} "${ARCH}" == "x86_64"
-		SetRegView 64
-		StrCpy $INSTDIR "$PROGRAMFILES64\${PACKAGE_NAME}"
-	${Else}
-		StrCpy $INSTDIR "$PROGRAMFILES\${PACKAGE_NAME}"
-	${EndIf}
+    
+    ${If} "${ARCH}" == "x86_64"
+        SetRegView 64
+        StrCmp $INSTDIR "$PROGRAMFILES\${PACKAGE_NAME}" 0 +2
+        StrCpy $INSTDIR "$PROGRAMFILES64\${PACKAGE_NAME}"
+    ${EndIf}
 
 	# Delete previous start menu
 	RMDir /r "$SMPROGRAMS\${PACKAGE_NAME}"
Signature · 1 line
1.7.9.5