Skip to content

Commit d59e00a

Browse files
author
gsherman
committedFeb 12, 2008

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-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

‎win_build/qgis.nsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ Section "Development headers" SEC02
154154
SectionEnd
155155

156156
Section "Python Extension" SEC03
157+
;this section is mandatory
158+
SectionIn RO
157159
!insertmacro CHECK_PYTHON
158160
SetOutPath "$INSTDIR"
159161
File /r "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\python"

0 commit comments

Comments
 (0)
Please sign in to comment.