Skip to content

Commit 26b9762

Browse files
author
what_nick
committed
Merged with extended Python install support from 0.9.0 release branch.
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0.9.2rc1@8103 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2cb4609 commit 26b9762

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

win_build/python.nsh

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,39 @@ ReadRegStr $9 HKEY_LOCAL_MACHINE "SOFTWARE\Python\PythonCore\2.5\InstallPath" ""
1111
IfFileExists $9\python.exe ok ng
1212

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

19-
IfFileExists $9\Lib\site-packages\PyQt4 pyqtok pyqtng
21+
testsip:
22+
IfFileExists $9\Lib\site-packages\sip.pyd sipok sipng
23+
sipok:
24+
goto testpyqt4
25+
26+
sipng:
27+
#copy over included sip
28+
SetOutPath "$INSTDIR\python"
29+
File "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\sipconfig.py"
30+
File "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\sip.pyd"
31+
goto pyqtng
32+
33+
testpyqt4:
34+
IfFileExists $9\Lib\site-packages\PyQt4 pyqtok pyqtng
2035

2136
pyqtng:
22-
MessageBox MB_OK "PyQt4 is not installed.$\nPlease install PyQt4 first."
37+
MessageBox MB_OK "PyQt4 is not installed.$\nInstalling Bundled PyQt4"
2338
#copy over bundled pyqt4 instead of skipping
24-
goto pythonskip
39+
goto installpyqt4
2540
pyqtok:
26-
MessageBox MB_OK "PyQt4 located"
41+
MessageBox MB_OK "PyQt4 located.$\nNote: Overwriting with included copy."
2742

43+
installpyqt4:
44+
SetOutPath "$INSTDIR\python"
45+
File /r "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\PyQt4"
46+
pymacroend:
2847

2948
!macroend
3049

0 commit comments

Comments
 (0)