diff --git a/direct/src/directscripts/packpanda.nsi b/direct/src/directscripts/packpanda.nsi index c3f200dbe3..7a609258a6 100755 --- a/direct/src/directscripts/packpanda.nsi +++ b/direct/src/directscripts/packpanda.nsi @@ -18,6 +18,7 @@ ; UBITMAP - name of uninstaller bitmap (ie, "C:\Airblade\Airblade.bmp") ; ; PANDA - location of panda install tree. +; PYVER - version of Python that Panda was built with (ie, "2.7") ; PANDACONF - name of panda config directory - usually $PANDA\etc ; PSOURCE - location of the panda source-tree if available, OR location of panda install tree. ; PYEXTRAS - directory containing python extras, if any. @@ -251,7 +252,7 @@ Section -post Push "$INSTDIR\bin" Call AddToPath - ReadRegStr $0 HKLM "Software\Python\PythonCore\2.6\InstallPath" "" + ReadRegStr $0 HKLM "Software\Python\PythonCore\$PYVER\InstallPath" "" StrCmp $0 "$INSTDIR\python" RegPath 0 StrCmp $0 "" RegPath 0 @@ -261,9 +262,7 @@ Section -post RegPath: DetailPrint "Adding registry keys for python..." - WriteRegStr HKLM "Software\Python\PythonCore\2.6\InstallPath" "" "$INSTDIR\python" - WriteRegStr HKLM "Software\Python\PythonCore\2.6\Help" "" "" - WriteRegStr HKLM "Software\Python\PythonCore\2.6\Help\Main Python Documentation" "" "$INSTDIR\python\Doc\Python25.chm" + WriteRegStr HKLM "Software\Python\PythonCore\$PYVER\InstallPath" "" "$INSTDIR\python" SkipRegPath: !endif @@ -289,9 +288,9 @@ Section Uninstall Push "$INSTDIR\bin" Call un.RemoveFromPath - ReadRegStr $0 HKLM "Software\Python\PythonCore\2.6\InstallPath" "" + ReadRegStr $0 HKLM "Software\Python\PythonCore\$PYVER\InstallPath" "" StrCmp $0 "$INSTDIR\python" 0 SkipUnReg - DeleteRegKey HKLM "Software\Python\PythonCore\2.6" + DeleteRegKey HKLM "Software\Python\PythonCore\$PYVER" SkipUnReg: !endif diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 7a8a3fd1fc..94f652410e 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -5613,6 +5613,7 @@ def MakeInstallerNSIS(file, fullname, smdirectory, installdir): cmd=cmd+'/DIBITMAP="panda-install.bmp" ' cmd=cmd+'/DUBITMAP="panda-install.bmp" ' cmd=cmd+'/DPANDA="'+panda+'" ' + cmd=cmd+'/DPYVER="'+SDK["PYTHONVERSION"][6:9]+'" ' cmd=cmd+'/DPANDACONF="'+panda+'\\etc" ' cmd=cmd+'/DPSOURCE="'+psource+'" ' cmd=cmd+'/DPYEXTRAS="'+os.path.abspath(GetThirdpartyBase())+'\\win-extras" '