Skip to content
Permalink
Browse files

Off global Python and PyQt4-Sip install if not already in the system.

git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_9_0@7278 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
what_nick
what_nick committed Oct 17, 2007
1 parent 4e0c022 commit aaac09734a2ce24992af74e8576d367440a27746
Showing with 26 additions and 7 deletions.
  1. +26 −7 win_build/python.nsh
@@ -11,21 +11,40 @@ ReadRegStr $9 HKEY_LOCAL_MACHINE "SOFTWARE\Python\PythonCore\2.5\InstallPath" ""
IfFileExists $9\python.exe ok ng

ng:
MessageBox MB_OK "Python is not installed on this system.$\nPlease install Python2.5 first."
goto pythonskip
MessageBox MB_OK "Python is not installed on this system.$\nUsing bundled python25.dll"
SetOutPath "$INSTDIR"
File "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\python25.dll"
goto sipng
ok:
MessageBox MB_OK "Python located $9"

IfFileExists $9\Lib\site-packages\PyQt4 pyqtok pyqtng
testsip:
IfFileExists $9\Lib\site-packages\sip.pyd sipok sipng
sipok:
goto testpyqt4

sipng:
#copy over included sip
SetOutPath "$INSTDIR\python"
File "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\sipconfig.py"
File "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\sip.pyd"
goto pyqtng

testpyqt4:
IfFileExists $9\Lib\site-packages\PyQt4 pyqtok pyqtng

pyqtng:
MessageBox MB_OK "PyQt4 is not installed.$\nPlease install PyQt4 first."
MessageBox MB_OK "PyQt4 is not installed.$\nInstalling Bundled PyQt4"
#copy over bundled pyqt4 instead of skipping
goto pythonskip
goto installpyqt4
pyqtok:
MessageBox MB_OK "PyQt4 located.$\nNote: Overwriting with included copy."
SetOutPath "$9\Lib\site-packages\"
File /r "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\PyQt4"

installpyqt4:
SetOutPath "$INSTDIR\python"
File /r "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\PyQt4"
pymacroend:

!macroend

!endif

0 comments on commit aaac097

Please sign in to comment.
You can’t perform that action at this time.