Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WIMPY's window installer files from 0.9.2 release branch
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8140 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Feb 12, 2008
1 parent 64f5bfe commit d59e00a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
31 changes: 25 additions & 6 deletions win_build/python.nsh
Expand Up @@ -11,20 +11,39 @@ 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"
MessageBox MB_OK "PyQt4 located.$\nNote: Overwriting with included copy."

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

!macroend

Expand Down
2 changes: 2 additions & 0 deletions win_build/qgis.nsi
Expand Up @@ -154,6 +154,8 @@ Section "Development headers" SEC02
SectionEnd

Section "Python Extension" SEC03
;this section is mandatory
SectionIn RO
!insertmacro CHECK_PYTHON
SetOutPath "$INSTDIR"
File /r "C:\Program Files\qgis${PRODUCT_VERSION_NUMBER}\python"
Expand Down

0 comments on commit d59e00a

Please sign in to comment.