mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Make the Windows installer work with any version of Python
(fixes bug in 1.8.0 where it no longer reads/writes the correct registry key)
This commit is contained in:
parent
3f4195616a
commit
b2f912c468
@ -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
|
||||
|
||||
|
@ -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" '
|
||||
|
Loading…
x
Reference in New Issue
Block a user