Skip to content

Commit aaac097

Browse files
author
what_nick
committed
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
1 parent 4e0c022 commit aaac097

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

win_build/python.nsh

+26-7
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,40 @@ 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:
2641
MessageBox MB_OK "PyQt4 located.$\nNote: Overwriting with included copy."
27-
SetOutPath "$9\Lib\site-packages\"
28-
File /r "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\PyQt4"
42+
43+
installpyqt4:
44+
SetOutPath "$INSTDIR\python"
45+
File /r "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\pydep\PyQt4"
46+
pymacroend:
47+
2948
!macroend
3049

3150
!endif

0 commit comments

Comments
 (0)