]> git.sesse.net Git - vlc/commitdiff
win64: read/write x64 registry, not the x86 one
authorRafaël Carré <funman@videolan.org>
Wed, 16 Nov 2011 01:32:21 +0000 (20:32 -0500)
committerRafaël Carré <funman@videolan.org>
Wed, 16 Nov 2011 03:58:14 +0000 (22:58 -0500)
InstallDirRegKey is not affected so we have to emulate it

plugins are now registered correctly, and both 32-bits and 64-bits
versions can be installed side-by-side without the installers screaming
However there is an obvious conflict in the menu, desktop icon, and
file / actions / context menu associations.

In my testing the 32-bits version was selected as default, and it was
also the last one installed.

extras/package/win32/vlc.win32.nsi.in

index 5c549a65564494514588e4f0efd2d09217cc299e..7537a3f284b8e405ece25319d3f1626076dcc6f3 100644 (file)
@@ -30,7 +30,6 @@
 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
 OutFile ..\vlc-${VERSION}-win32.exe
 InstallDir "$@PROGRAMFILES@\VideoLAN\VLC"
-InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
 !ifdef NSIS_LZMA_COMPRESS_WHOLE
 SetCompressor lzma
 !else
@@ -771,6 +770,11 @@ SectionEnd
 ;;; Start function
 Function .onInit
 
+@HAVE_WIN64_TRUE@ SetRegView 64
+ReadRegStr $INSTDIR HKLM "${PRODUCT_DIR_REGKEY}" ""
+StrCmp $INSTDIR "" 0 +1
+StrCpy $INSTDIR "$@PROGRAMFILES@\VideoLAN\VLC"
+
 UAC_Elevate:
     UAC::RunElevated
     StrCmp 1223 $0 UAC_ElevationAborted