Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add loading of spatialite on windows and remove remaining references to
pyspatialite (followup 39816cf)
  • Loading branch information
jef-n committed Oct 29, 2017
1 parent 39816cf commit e523780
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 45 deletions.
1 change: 0 additions & 1 deletion .ci/travis/macos/install.sh
Expand Up @@ -58,7 +58,6 @@ cmake \
-DENABLE_MODELTEST=ON \
-DENABLE_PGTEST=OFF \
-DWITH_QWTPOLAR=OFF \
-DWITH_PYSPATIALITE=ON \
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \
..

Expand Down
42 changes: 23 additions & 19 deletions INSTALL
@@ -1,10 +1,10 @@
QGIS
Building QGIS from source - step by step
Saturday September 23, 2017
Sunday October 29, 2017


Last Updated: Saturday September 23, 2017
Last Change : Saturday September 23, 2017
Last Updated: Sunday October 29, 2017
Last Change : Sunday October 29, 2017


1. Introduction
Expand Down Expand Up @@ -66,7 +66,7 @@ regularly updated to match the corresponding release. Instructions for the curre
master branch are available at
http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html.
If you wish to build another version of QGIS, ensure to checkout the appropriate
release branch.
release branch. The QGIS source code can be found in the repository (https://github.com/qgis/QGIS).

Please visit http://qgis.org for information on joining our mailing lists
and getting involved in the project further.
Expand Down Expand Up @@ -365,7 +365,7 @@ new subdirectory called `build` or `build-qt5` in it.
3.9.1. Install build dependencies
=================================

dnf install qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qttools-static qt5-qtscript-devel qca-qt5-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel qt5-qtxmlpatterns-devel spatialindex-devel expat-devel proj-devel qwt-qt5-devel gsl-devel postgresql-devel cmake python3-future gdal-python3 python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel sip-devel libzip-devel
dnf install qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qttools-static qt5-qtscript-devel qca-qt5-devel qca-qt5-ossl qt5-qt3d-devel python3-qt5-devel python3-qscintilla-qt5-devel qscintilla-qt5-devel python3-qscintilla-devel python3-qscintilla-qt5 clang flex bison geos-devel gdal-devel sqlite-devel libspatialite-devel qt5-qtsvg-devel qt5-qtxmlpatterns-devel spatialindex-devel expat-devel proj-devel qwt-qt5-devel gsl-devel postgresql-devel cmake python3-future gdal-python3 python3-psycopg2 python3-PyYAML python3-pygments python3-jinja2 python3-OWSLib qca-qt5-ossl qwt-qt5-devel qtkeychain-qt5-devel qwt-devel sip-devel libzip-devel

To build QGIS server additional dependencies are required:

Expand Down Expand Up @@ -469,6 +469,7 @@ and from OSGeo4W (select Advanced Installation):
- python3-future
- python3-pyyaml
- python3-mock
- python3-six
- qca-qt5-devel
- qca-qt5-libs
- qscintilla-qt5
Expand Down Expand Up @@ -669,23 +670,23 @@ it, just point the installer to c:\msys\mingw

When Qt installation is complete:

Edit C:\Qt\4.8.0\bin\qtvars.bat and add the following lines:
Edit C:\Qt\5.9.1\bin\qtvars.bat and add the following lines:

set PATH=%PATH%;C:\msys\local\bin;c:\msys\local\lib
set PATH=%PATH%;"C:\Program Files\Subversion\bin"

I suggest you also add C:\Qt\4.8.0\bin\ to your Environment Variables Path in
I suggest you also add C:\Qt\5.9.1\bin\ to your Environment Variables Path in
the windows system preferences.

If you plan to do some debugging, you'll need to compile debug version of Qt:
C:\Qt\4.8.0\bin\qtvars.bat compile_debug
C:\Qt\5.9.1\bin\qtvars.bat compile_debug

Note: there is a problem when compiling debug version of Qt 4.7, the script ends with
this message "mingw32-make: *** No rule to make target `debug'. Stop.". To
compile the debug version you have to go out of src directory and execute the
following command:

c:\Qt\4.8.0 make
c:\Qt\5.9.1 make


4.2.3. Flex and Bison
Expand All @@ -696,13 +697,16 @@ http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=16424
(the zip bin) and extract it into c:\msys\mingw\bin


4.2.4. Python stuff (optional)
==============================
4.2.4. Python
=============

Follow this section in case you would like to use Python bindings for QGIS. To
be able to compile bindings, you need to compile SIP and PyQt4 from sources as
be able to compile bindings, you need to compile SIP and PyQt5 from sources as
their installer doesn't include some development files which are necessary.

Note that even if you compile without the Python bindings, Python3 is still
a necessary dependency for building QGIS.


4.2.4.1. Download and install Python - use Windows installer
============================================================
Expand All @@ -712,7 +716,7 @@ their installer doesn't include some development files which are necessary.
http://python.org/download/


4.2.4.2. Download SIP and PyQt4 sources
4.2.4.2. Download SIP and PyQt5 sources
=======================================

http://www.riverbankcomputing.com/software/sip/download
Expand All @@ -725,7 +729,7 @@ to get versions that match your current Qt installed version.
4.2.4.3. Compile SIP
====================

c:\Qt\4.8.0\bin\qtvars.bat
c:\Qt\5.9.1\bin\qtvars.bat
python configure.py -p win32-g++
make
make install
Expand All @@ -734,7 +738,7 @@ to get versions that match your current Qt installed version.
4.2.4.4. Compile PyQt
=====================

c:\Qt\4.8.0\bin\qtvars.bat
c:\Qt\5.9.1\bin\qtvars.bat
python configure.py
make
make install
Expand All @@ -743,7 +747,7 @@ to get versions that match your current Qt installed version.
4.2.4.5. Final python notes
===========================

/!\ You can delete the directories with unpacked SIP and PyQt4 sources after a
/!\ You can delete the directories with unpacked SIP and PyQt5 sources after a
successful install, they're not needed anymore.


Expand All @@ -761,7 +765,7 @@ https://git-scm.com/download/win

CMake is build system used by QGIS. Download it from here:

http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe
https://cmake.org/files/v3.9/cmake-3.9.3-win64-x64.msi


4.2.7. QGIS
Expand All @@ -787,9 +791,9 @@ this document.
Start a cmd.exe window ( Start -> Run -> cmd.exe ) if you don't have one
already. Add paths to compiler and our MSYS environment:

c:\Qt\4.8.0\bin\qtvars.bat
c:\Qt\5.9.1\bin\qtvars.bat

For ease of use add c:\Qt\4.8.0\bin\ to your system path in system
For ease of use add c:\Qt\5.9.1\bin\ to your system path in system
properties so you can just type qtvars.bat when you open the cmd console.
Create build directory and set it as current directory:

Expand Down
11 changes: 6 additions & 5 deletions doc/INSTALL.html
Expand Up @@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>QGIS</TITLE>

<!-- Included doc/style.css -->
<!-- Included /home/fischer/src/qgis/doc/style.css -->
<STYLE TYPE="text/css">
body{ background: white;
color: black;
Expand Down Expand Up @@ -77,13 +77,13 @@
<DIV CLASS="header" ID="header">
<H1>QGIS</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Saturday October 14, 2017</H3>
<H3>Sunday October 29, 2017</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Saturday October 14, 2017
Last Change : Saturday October 14, 2017
Last Updated: Sunday October 29, 2017
Last Change : Sunday October 29, 2017
</P>
<DIV CLASS="toc">

Expand Down Expand Up @@ -214,6 +214,7 @@ <H1>2. Overview</H1>
<LI>QScintilla2
<LI>QCA
<LI>qtkeychain (&gt;= 0.5)
<LI>libzip
</UL>

<P>
Expand Down Expand Up @@ -3060,5 +3061,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -\-encoding=utf-8 -o doc/INSTALL.html -t html doc/INSTALL.t2t -->
<!-- cmdline: txt2tags -\-encoding=utf-8 -o/home/fischer/src/qgis/debian/build-master-qt5/doc/INSTALL.html -t html /home/fischer/src/qgis/doc/INSTALL.t2t -->
</BODY></HTML>
1 change: 1 addition & 0 deletions doc/overview.t2t
Expand Up @@ -27,6 +27,7 @@ Required build dependencies:
- QScintilla2
- QCA
- qtkeychain (>= 0.5)
- libzip
-

Optional dependencies:
Expand Down
18 changes: 0 additions & 18 deletions python/plugins/db_manager/README.md

This file was deleted.

2 changes: 2 additions & 0 deletions python/utils.py
Expand Up @@ -598,6 +598,8 @@ def spatialite_connect(*args, **kwargs):
libs = [
# SpatiaLite >= 4.2 and Sqlite >= 3.7.17, should work on all platforms
("mod_spatialite", "sqlite3_modspatialite_init"),
# SpatiaLite >= 4.2 (windows)
("spatialite4.dll", "sqlite3_modspatialite_init"),
# SpatiaLite >= 4.2 and Sqlite < 3.7.17 (Travis)
("mod_spatialite.so", "sqlite3_modspatialite_init"),
# SpatiaLite < 4.2 (linux)
Expand Down
2 changes: 1 addition & 1 deletion scripts/addcopyright.sh
Expand Up @@ -43,7 +43,7 @@ for i in $FILES; do
author=volayaf
;;

src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/gps/qextserialport/*|lib/astyle/*|python/pyspatialite/*)
src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/gps/qextserialport/*|lib/astyle/*)
# Skip third party files
echo $f skipped
continue
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-indent.sh
Expand Up @@ -57,7 +57,7 @@ ASTYLEDIFF=astyle.r$REV0-r$REV1.diff
# reformat
for f in $MODIFIED; do
case "$f" in
src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|external/astyle/*|python/pyspatialite/*)
src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|external/astyle/*)
echo $f skipped
continue
;;
Expand Down

0 comments on commit e523780

Please sign in to comment.