mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
Remove txt2tags dependency (use markdown instead)
This commit is contained in:
parent
2bcb63edc4
commit
dcd017a655
1554
INSTALL.md
Normal file
1554
INSTALL.md
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -60,9 +60,8 @@ modified.
|
||||
## Note
|
||||
|
||||
Please follow the installation instructions carefully.
|
||||
After extracting the distribution, you can find the HTML version of the
|
||||
installation document in `qgis/doc/index.html`. The installation document is
|
||||
also available as PDF in the same directory.
|
||||
After extracting the distribution, please check the
|
||||
[documentation](https://qgis.org/en/docs/index.html)
|
||||
|
||||
## Help us
|
||||
Please submit bug reports using the [QGIS bug tracker](https://github.com/qgis/QGIS/issues/).
|
||||
@ -93,4 +92,4 @@ If you are not a developer, there are many other possibilities which do not requ
|
||||
|
||||
### Building from source
|
||||
|
||||
The [building guide](http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html) can be used to get started with building QGIS from source.
|
||||
The [building guide](INSTALL.md) can be used to get started with building QGIS from source.
|
||||
|
@ -1,94 +0,0 @@
|
||||
# Macros for txt2tags
|
||||
# ~~~~~~~~~~~~~~~~~~~
|
||||
# Copyright (c) 2011, Juergen E. Fischer <jef at norbit dot de>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# use txt2tags for .t2t files
|
||||
|
||||
# search for bison
|
||||
MACRO(FIND_TXT2TAGS)
|
||||
IF(NOT TXT2TAGS_EXECUTABLE)
|
||||
IF (MSVC)
|
||||
FIND_PROGRAM(TXT2TAGS_EXECUTABLE PATHS
|
||||
NAMES txt2tags.exe
|
||||
PATHS $ENV{LIB_DIR}/bin $ENV{PROGRAMFILES}/GnuWin32/bin
|
||||
)
|
||||
ELSE (MSVC)
|
||||
FIND_PROGRAM(TXT2TAGS_EXECUTABLE txt2tags)
|
||||
ENDIF (MSVC)
|
||||
IF (NOT TXT2TAGS_EXECUTABLE)
|
||||
MESSAGE(STATUS "txt2tags not found - disabled")
|
||||
ENDIF (NOT TXT2TAGS_EXECUTABLE)
|
||||
ENDIF(NOT TXT2TAGS_EXECUTABLE)
|
||||
|
||||
IF (WITH_TXT2TAGS_PDF)
|
||||
IF (NOT PDFLATEX_EXECUTABLE)
|
||||
FIND_PROGRAM(PDFLATEX_EXECUTABLE pdflatex)
|
||||
ENDIF (NOT PDFLATEX_EXECUTABLE)
|
||||
IF (NOT PDFLATEX_EXECUTABLE)
|
||||
MESSAGE(ERROR "pdflatex not found - txt2tags documentation pdf cannot be generated")
|
||||
ENDIF(NOT PDFLATEX_EXECUTABLE)
|
||||
ENDIF(WITH_TXT2TAGS_PDF)
|
||||
ENDMACRO(FIND_TXT2TAGS)
|
||||
|
||||
MACRO(ADD_TXT2TAGS_FILES _sources)
|
||||
FOREACH (_current_FILE ${ARGN})
|
||||
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
|
||||
|
||||
STRING(TIMESTAMP NOW "%Y-%m-%d")
|
||||
FILE(TIMESTAMP ${_in} MODTIME "%Y-%m-%d")
|
||||
CONFIGURE_FILE(${_in} ${_in}.tmp @ONLY)
|
||||
|
||||
SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename})
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_out}
|
||||
COMMAND ${TXT2TAGS_EXECUTABLE}
|
||||
ARGS -o${_out} -t txt ${_in}.tmp
|
||||
DEPENDS ${_in}
|
||||
COMMENT "Building ${_out} from ${_in}"
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_out}.html
|
||||
COMMAND ${TXT2TAGS_EXECUTABLE}
|
||||
ARGS -o${_out}.html -t html ${_in}.tmp
|
||||
DEPENDS ${_in}
|
||||
COMMENT "Building ${_out}.html from ${_in}"
|
||||
)
|
||||
|
||||
SET(${_sources} ${${_sources}} ${_out} ${_out}.html)
|
||||
ENDFOREACH (_current_FILE)
|
||||
ENDMACRO(ADD_TXT2TAGS_FILES)
|
||||
|
||||
MACRO(ADD_TXT2TAGS_PDFS _sources)
|
||||
FOREACH (_current_FILE ${ARGN})
|
||||
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
|
||||
|
||||
STRING(TIMESTAMP NOW "%Y-%m-%d")
|
||||
FILE(TIMESTAMP ${_in} MODTIME "%Y-%m-%d")
|
||||
CONFIGURE_FILE(${_in} ${_in}.tmp @ONLY)
|
||||
|
||||
SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename})
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_out}.tex
|
||||
COMMAND ${TXT2TAGS_EXECUTABLE}
|
||||
ARGS -o${_out}.tex -t tex ${_in}.tmp
|
||||
DEPENDS ${_in}
|
||||
COMMENT "Building ${_out}.tex from ${_in}"
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_out}.pdf
|
||||
COMMAND TEXINPUTS=.:${CMAKE_CURRENT_SOURCE_DIR}: ${PDFLATEX_EXECUTABLE}
|
||||
ARGS -output-directory=${CMAKE_CURRENT_BINARY_DIR} ${_out}.tex
|
||||
DEPENDS ${_out}.tex
|
||||
COMMENT "Building ${_out}.pdf from ${_out}.tex"
|
||||
)
|
||||
SET(${_sources} ${${_sources}} ${_out}.pdf)
|
||||
ENDFOREACH (_current_FILE)
|
||||
ENDMACRO(ADD_TXT2TAGS_PDFS)
|
5
debian/qgis-common.install
vendored
5
debian/qgis-common.install
vendored
@ -1,15 +1,14 @@
|
||||
usr/share/qgis/doc/AUTHORS
|
||||
usr/share/qgis/doc/CONTRIBUTORS
|
||||
usr/share/qgis/doc/DONORS
|
||||
usr/share/qgis/doc/INSTALL
|
||||
usr/share/qgis/doc/INSTALL.html
|
||||
usr/share/qgis/doc/INSTALL.md
|
||||
usr/share/qgis/doc/SPONSORS
|
||||
usr/share/qgis/doc/TRANSLATORS
|
||||
usr/share/qgis/doc/developersmap.html
|
||||
usr/share/qgis/doc/favicon.ico
|
||||
usr/share/qgis/doc/images
|
||||
usr/share/qgis/doc/index.html
|
||||
usr/share/qgis/doc/NEWS
|
||||
usr/share/qgis/doc/NEWS.md
|
||||
usr/share/qgis/doc/NEWS.html
|
||||
usr/share/qgis/doc/nohelp.html
|
||||
usr/share/qgis/doc/style.css
|
||||
|
@ -1,33 +1,12 @@
|
||||
# include doxygen documentation
|
||||
SET (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built")
|
||||
|
||||
# include doxygen documentation
|
||||
SET (WITH_TXT2TAGS_PDF FALSE CACHE BOOL "Determines whether PDF should be generate for the txt2tags documentation")
|
||||
|
||||
# include Qt documentation
|
||||
SET (QT_DOC_URL "https://doc.qt.io/qt-5/" CACHE STRING "URL for Qt docs")
|
||||
|
||||
INCLUDE(Txt2Tags)
|
||||
FIND_TXT2TAGS()
|
||||
|
||||
IF(TXT2TAGS_EXECUTABLE)
|
||||
ADD_TXT2TAGS_FILES(QGIS_DOC_FILES INSTALL.t2t NEWS.t2t)
|
||||
IF(WITH_TXT2TAGS_PDF)
|
||||
ADD_TXT2TAGS_PDFS(QGIS_DOC_FILES INSTALL.t2t NEWS.t2t)
|
||||
ENDIF(WITH_TXT2TAGS_PDF)
|
||||
FILE(GLOB t2tfiles doc/*.t2t)
|
||||
ADD_CUSTOM_TARGET (t2tdoc ALL DEPENDS ${QGIS_DOC_FILES} ${t2tfiles})
|
||||
ELSE(TXT2TAGS_EXECUTABLE)
|
||||
SET(QGIS_DOC_FILES
|
||||
../INSTALL
|
||||
../NEWS
|
||||
INSTALL.html
|
||||
NEWS.html
|
||||
)
|
||||
ENDIF(TXT2TAGS_EXECUTABLE)
|
||||
|
||||
SET(QGIS_DOC_FILES
|
||||
${QGIS_DOC_FILES}
|
||||
../INSTALL
|
||||
../NEWS
|
||||
index.html
|
||||
developersmap.html
|
||||
nohelp.html
|
||||
|
2464
doc/INSTALL.html
2464
doc/INSTALL.html
File diff suppressed because it is too large
Load Diff
115
doc/INSTALL.t2t
115
doc/INSTALL.t2t
@ -1,115 +0,0 @@
|
||||
QGIS
|
||||
Building QGIS from source - step by step
|
||||
@NOW@
|
||||
|
||||
%! target : html
|
||||
%! style : style.css
|
||||
%! Options : --toc --toc-level 2 --enum-title
|
||||
%! preproc : TUT_URL https://qgis.org
|
||||
%! PostProc(html): '(?i)(<pre>)' '<div class="code">\1'
|
||||
%! PostProc(html): '(?i)(</pre>)' '\1</div>'
|
||||
%! PostProc(html): \(R\) ®
|
||||
% Next line will replace tabs with 2 spaces in txt generated outputs
|
||||
%! PostProc(txt): '(?i)(\t)' ' '
|
||||
%! encoding: utf-8
|
||||
%
|
||||
% Tex processing
|
||||
%
|
||||
% Make sure this is first
|
||||
%! PostProc(tex): '\\includegraphics' '\\includegraphics[width=100mm]'
|
||||
% scartcl is from the koma script document class (apt-get install texlive-latex-recommended ttf-komatuna)
|
||||
% setlength parindent suppresses first line of paragraph idents
|
||||
% parskip puts blank space between paragraphs
|
||||
% title pic stuff used to put a logo on the front page
|
||||
%! PostProc(tex): '\\documentclass{article}' '\\documentclass{scrartcl}\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{2ex}'
|
||||
% use the color table and table packages so we can pimp the tables a little
|
||||
%! PostProc(tex): '\\usepackage{style.css} % user defined' '\\usepackage{fancyvrb}\n\\usepackage{colortbl} \n\\usepackage [table]{xcolor}\n\\definecolor{tableShade}{HTML}{cecece}\n\\definecolor{qgis-green}{HTML}{0E7300}\n\\usepackage{wallpaper}\n\\LRCornerWallPaper{1}{WALLPAPER-IMAGE}\n\\usepackage{hyperref}\n\\hypersetup{linkcolor=qgis-green,urlcolor=qgis-green}\\renewcommand\\thesection{\\color{qgis-green}\\thechapter\\arabic{section}}'
|
||||
% Make the header row of tables have a dark background. light text
|
||||
%! PostProc(tex): '\\hline \\textbf' '\\hline \\rowcolor[rgb]{0,0,0} \\color{white} \\textbf'
|
||||
%! PostProc(tex): '& \\textbf' '& \\color{white} \\textbf'
|
||||
% Make verbatim text a little smaller and use fancyvrb package to draw it in a box
|
||||
% Note Verbatim with capital V for fancyvrb to work
|
||||
%! PostProc(tex): '\\begin{verbatim}' '{\\scriptsize\\begin{Verbatim}[frame=single,rulecolor=\\color{qgis-green}, framesep=4mm, label=\\fbox{\\small\\emph{Listing}}]'
|
||||
%! PostProc(tex): '\\end{verbatim}' '\\end{Verbatim}\n}'
|
||||
%! PostProc(tex): '\\section' '\\newpage\\section'
|
||||
%! PostProc(tex): 'section{' 'section{\\color{qgis-green}'
|
||||
%! PostProc(tex): NEWPAGE '\\newpage'
|
||||
% Give alternating table rows different colors and use a smaller font in tables (\tiny)
|
||||
%! PostProc(tex): '\\begin{tabular}' '\\rowcolors{2}{tableShade}{white} \n\\tiny\\begin{tabular}'
|
||||
%! encoding: utf-8
|
||||
|
||||
%! PostProc(tex): WALLPAPER-IMAGE 'qgis-footer.png'
|
||||
% These are comments and will not be generated in any output
|
||||
% -------------------
|
||||
|
||||
%This document is in txt2tags format. You can generate html, plain text and
|
||||
%moinmoin formatted documentation by running txt2tags on this document. See the
|
||||
%txt2tags home page for more details. Please insert manual line breaks in this
|
||||
%document as it makes diffing for changes much easier. To do this in vim
|
||||
%automatically, select a section then issue (gq) command. Please don't
|
||||
%apply vim formatting to the whole document as it screws up some formatting
|
||||
%rather apply it selectively to paragraphs where needed.
|
||||
|
||||
% To generate output files from this document:
|
||||
% cmake --build $YOURBUILDDIR --target t2tdoc
|
||||
|
||||
% End of comments
|
||||
% -------------------
|
||||
|
||||
Last Updated: @NOW@
|
||||
Last Change : @MODTIME@
|
||||
|
||||
%%toc
|
||||
|
||||
= Introduction =
|
||||
|
||||
This document is the original installation guide of the described software
|
||||
QGIS. The software and hardware descriptions named in this
|
||||
document are in most cases registered trademarks and are therefore subject
|
||||
to the legal requirements. QGIS is subject to the GNU General Public
|
||||
License. Find more information on the QGIS Homepage:
|
||||
http://qgis.org
|
||||
|
||||
The details, that are given in this document have been written and verified
|
||||
to the best of knowledge and responsibility of the editors. Nevertheless,
|
||||
mistakes concerning the content are possible. Therefore, all data are not
|
||||
liable to any duties or guarantees. The editors and publishers do not take
|
||||
any responsibility or liability for failures and their consequences. You are
|
||||
always welcome for indicating possible mistakes.
|
||||
|
||||
Because the code of QGIS evolves from release to release, These instructions are
|
||||
regularly updated to match the corresponding release. Instructions for the current
|
||||
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. 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.
|
||||
|
||||
/!\ **Note to document writers:** Please use this document as the central
|
||||
place for describing build procedures. Please do not remove this notice.
|
||||
|
||||
/!\ **Note to document writers:** This document is generated from
|
||||
doc/INSTALL.t2t - if you need to edit this document, be sure to edit that
|
||||
file rather than the generated INSTALL document found in the root of the
|
||||
source directory.
|
||||
|
||||
%!include: overview.t2t
|
||||
|
||||
%!include: linux.t2t
|
||||
|
||||
= Building on Windows =
|
||||
%!include: msvc.t2t
|
||||
%!include: msys.t2t
|
||||
%!include: mxe.t2t
|
||||
|
||||
%!include: osx.t2t
|
||||
|
||||
%!include: wcs-test-server.t2t
|
||||
|
||||
%!include: jenkins.t2t
|
||||
|
||||
%!include: debug-tests.t2t
|
||||
|
||||
%!include: iauthors.t2t
|
6869
doc/NEWS.html
6869
doc/NEWS.html
File diff suppressed because it is too large
Load Diff
@ -1,53 +0,0 @@
|
||||
|
||||
= Debug output and running tests =
|
||||
|
||||
If you are interested in seeing embedded debug output, change the following
|
||||
CMake option:
|
||||
|
||||
```
|
||||
-D CMAKE_BUILD_TYPE=DEBUG (or RELWITHDEBINFO)
|
||||
```
|
||||
|
||||
This will flood your terminal or system log with lots of useful output from
|
||||
QgsDebugMsg() calls in source code.
|
||||
|
||||
If you would like to run the test suite, you will need to do so from the build
|
||||
directory, as it will not work with the installed/bundled app. First set the
|
||||
CMake option to enable tests:
|
||||
|
||||
```
|
||||
-D ENABLE_TESTS=TRUE
|
||||
```
|
||||
|
||||
Then run all tests from build directory:
|
||||
|
||||
```
|
||||
cd build
|
||||
make test
|
||||
```
|
||||
|
||||
To run all tests and report to http://cdash.orfeo-toolbox.org/index.php?project=QGIS
|
||||
|
||||
```
|
||||
cd build
|
||||
make Experimental
|
||||
```
|
||||
|
||||
You can define the host name reported via 'make Experimental' by setting a CMake
|
||||
option:
|
||||
|
||||
```
|
||||
-D SITE="my.domain.org"
|
||||
```
|
||||
|
||||
To run specific test(s) (see 'man ctest'):
|
||||
|
||||
```
|
||||
cd build
|
||||
# show listing of tests, without running them
|
||||
ctest --show-only
|
||||
|
||||
# run specific C++ or Python test(s) matching a regular expression
|
||||
ctest --verbose --tests-regex SomeTestName
|
||||
```
|
||||
|
@ -1,41 +0,0 @@
|
||||
|
||||
= Authors and Acknowledgments =
|
||||
|
||||
The following people have contributed to this document:
|
||||
|
||||
- Windows MINGW Section
|
||||
- Tim Sutton, Godofredo Contreras 2006
|
||||
- CMake additions Magnus Homann 2007
|
||||
- Python additions Martin Dobias 2007
|
||||
- With thanks to Tisham Dhar for preparing the initial msys environment
|
||||
|
||||
- Windows MSVC Section (Detailed install)
|
||||
- David Willis 2007
|
||||
- MSVC install additions Tim Sutton 2007
|
||||
- PostgreSQL, Qt compile, SIP, Python, AutoExp additions Juergen Fischer 2007
|
||||
|
||||
- Windows MSVC Section (Simplified install)
|
||||
- Tim Sutton 2007
|
||||
- Juergen Fischer 2007
|
||||
- Florian Hillen 2010
|
||||
|
||||
- OSX Section
|
||||
- Tim Sutton 2007
|
||||
- With special thanks to Tom Elwertowski and William Kyngesburye
|
||||
- Larry Shaffer 2012
|
||||
|
||||
- GNU/Linux Section
|
||||
- Tim Sutton 2006
|
||||
- Debian package section: Juergen Fischer 2008
|
||||
|
||||
- WCS Test Server Section
|
||||
- Tim Sutton, Radim Blazek 2012
|
||||
|
||||
- Jenkins CI Configuration
|
||||
- Tim Sutton 2012
|
||||
|
||||
- Latex Generator
|
||||
- Tim Sutton 2011
|
||||
|
||||
- Debug Output/Tests Section
|
||||
- Larry Shaffer 2012, by way of 'Test Friday' Tim Sutton
|
@ -1,90 +0,0 @@
|
||||
|
||||
= Setting up a Jenkins Build Server =
|
||||
|
||||
**Assumption:** You know how to make a working build environment and want to
|
||||
deploy it under Jenkins for continuous integration testing now.
|
||||
|
||||
These notes are terse, I will expand on them later as the need arises. The
|
||||
procedure is:
|
||||
|
||||
- Install Jenkins and get it configured according to your own preferences
|
||||
- Make sure you have the git, github, junit etc plugins installed. A complete
|
||||
list of the plugins I have installed follows (note that you almost certainly
|
||||
don't need evey plugin listed here):
|
||||
- External Monitor Job Type Plugin
|
||||
- LDAP Plugin
|
||||
- pam-auth
|
||||
- javadoc
|
||||
- ant
|
||||
- Jenkins Subversion Plug-in
|
||||
- Git Plugin
|
||||
- Maven 2 Project Plugin
|
||||
- Jenkins SLOCCount Plug-in
|
||||
- Jenkins Sounds plugin
|
||||
- Jenkins Translation Assistance plugin
|
||||
- ruby-runtime
|
||||
- Jenkins CVS Plug-in
|
||||
- Coverage/Complexity Scatter Plot PlugIn
|
||||
- Status Monitor Plugin
|
||||
- Git Parameter Plug-In
|
||||
- github-api
|
||||
- GitHub plugin
|
||||
- Jenkins Violations plugin
|
||||
- git-notes Plugin
|
||||
- Twitter plugin
|
||||
- Jenkins Cobertura Plugin
|
||||
- Jenkins Gravatar plugin
|
||||
- Jenkins SSH Slaves plugin
|
||||
- Create a Job called 'QGIS'
|
||||
- Use the following options for your job:
|
||||
- Job Name: QGIS
|
||||
- Job Type: Build a free-style software project
|
||||
- Tick enable project based security (you need to elsewhere configure your
|
||||
Jenkins security to per project settings)
|
||||
- Allow Anonymous user Read and Discover access
|
||||
- Set the github project to https://github.com/qgis/QGIS/
|
||||
- Set source code management to Git
|
||||
- Set repository url to git://github.com/qgis/QGIS.git
|
||||
- In advanced repository url settings set refspec to :
|
||||
|
||||
```
|
||||
+refs/heads/master:refs/remotes/origin/master
|
||||
```
|
||||
|
||||
- Set branch to build to master
|
||||
- Repository Browser: Auto
|
||||
- Build triggers: set to Poll SCM and set schedule to ``* * * * *`` (polls every minute)
|
||||
- Build - Execute shell and set shell script to:
|
||||
|
||||
```
|
||||
cd build
|
||||
cmake ..
|
||||
xvfb-run --auto-servernum --server-num=1 \
|
||||
--server-args="-screen 0 1024x768x24" \
|
||||
make Experimental || true
|
||||
if [ -f Testing/TAG ] ; then
|
||||
xsltproc ../tests/ctest2junix.xsl \
|
||||
Testing/`head -n 1 < Testing/TAG`/Test.xml > \
|
||||
CTestResults.xml
|
||||
fi
|
||||
```
|
||||
|
||||
- Add Junit post build action and set 'Publish Junit test result report' to:
|
||||
``build/CTestResults.xml``
|
||||
- Email notification: Send separate e-mails to individuals who broke the build
|
||||
- Jenkins sounds - set up sounds for Failure, Success and Unstable.
|
||||
- Save
|
||||
-
|
||||
|
||||
Now open the Job dash board and push something to QGIS and wait a minute to
|
||||
validate automated builds work.
|
||||
|
||||
**Note:** You will need to log in to the Jenkins user account and go to
|
||||
/var/lib/jenkins/jobs/QGIS/workspace, then make a ``build`` directory and run
|
||||
the initial cmake setup and then do test build. This process is the same as
|
||||
described elsewhere in this doc.
|
||||
|
||||
I based some of the set up from this nice blog article here:
|
||||
|
||||
http://alexott.blogspot.com/2012/03/jenkins-cmakectest.html
|
||||
|
361
doc/linux.t2t
361
doc/linux.t2t
@ -1,361 +0,0 @@
|
||||
|
||||
= Building on GNU/Linux =
|
||||
|
||||
== Building QGIS with Qt 5.x ==
|
||||
|
||||
**Requires:** Ubuntu / Debian derived distro
|
||||
|
||||
/!\ **Note:** Refer to the section ''Building Debian packages'' for building
|
||||
debian packages. Unless you plan to develop on QGIS, that is probably the
|
||||
easiest option to compile and install QGIS.
|
||||
|
||||
These notes are for Ubuntu - other versions and Debian derived distros may
|
||||
require slight variations in package names.
|
||||
|
||||
These notes are for if you want to build QGIS from source. One of the major
|
||||
aims here is to show how this can be done using binary packages for ***all***
|
||||
dependencies - building only the core QGIS stuff from source. I prefer this
|
||||
approach because it means we can leave the business of managing system packages
|
||||
to apt and only concern ourselves with coding QGIS!
|
||||
|
||||
This document assumes you have made a fresh install and have a 'clean' system.
|
||||
These instructions should work fine if this is a system that has already been
|
||||
in use for a while, you may need to just skip those steps which are irrelevant
|
||||
to you.
|
||||
|
||||
== Prepare apt ==
|
||||
|
||||
The packages QGIS depends on to build are available in the "universe" component
|
||||
of Ubuntu. This is not activated by default, so you need to activate it:
|
||||
|
||||
+ Edit your /etc/apt/sources.list file.
|
||||
+ Uncomment all the lines starting with "deb"
|
||||
+
|
||||
|
||||
Also you will need a recent enough distribution in order for all dependencies
|
||||
to be met. The supported distributions are listed in the following section.
|
||||
|
||||
Now update your local sources database:
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
== Install build dependencies ==
|
||||
|
||||
|| Distribution | install command for packages |
|
||||
| buster | ``apt-get install bison ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dateutil python3-dev python3-future python3-gdal python3-httplib2 python3-jinja2 python3-lxml python3-markupsafe python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-requests python3-sip python3-sip-dev python3-six python3-termcolor python3-tz python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5-default qt5keychain-dev qtbase5-dev qtbase5-private-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools saga spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` |
|
||||
| bionic | ``apt-get install bison ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dateutil python3-dev python3-future python3-gdal python3-httplib2 python3-jinja2 python3-lxml python3-markupsafe python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-requests python3-sip python3-sip-dev python3-six python3-termcolor python3-tz python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5-default qt5keychain-dev qtbase5-dev qtbase5-private-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools saga spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` |
|
||||
| eoan | ``apt-get install bison ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dateutil python3-dev python3-future python3-gdal python3-httplib2 python3-jinja2 python3-lxml python3-markupsafe python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-requests python3-sip python3-sip-dev python3-six python3-termcolor python3-tz python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5-default qt5keychain-dev qtbase5-dev qtbase5-private-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools saga spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` |
|
||||
| focal | ``apt-get install bison ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dateutil python3-dev python3-future python3-gdal python3-httplib2 python3-jinja2 python3-lxml python3-markupsafe python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-requests python3-sip python3-sip-dev python3-six python3-termcolor python3-tz python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5-default qt5keychain-dev qtbase5-dev qtbase5-private-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools saga spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` |
|
||||
| sid | ``apt-get install bison ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dateutil python3-dev python3-future python3-gdal python3-httplib2 python3-jinja2 python3-lxml python3-markupsafe python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-requests python3-sip python3-sip-dev python3-six python3-termcolor python3-tz python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qt5-default qt5keychain-dev qtbase5-dev qtbase5-private-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools saga spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb`` |
|
||||
|
||||
(extracted from the control.in file in ``debian/``)
|
||||
|
||||
See http://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu for
|
||||
currently supported distributions (plain xenial's GDAL for instance is to old
|
||||
and we build with GDAL2 from ubuntugis).
|
||||
|
||||
|
||||
== Setup ccache (Optional, but recommended) ==
|
||||
|
||||
You should also setup ccache to speed up compile times:
|
||||
|
||||
```
|
||||
cd /usr/local/bin
|
||||
sudo ln -s /usr/bin/ccache gcc
|
||||
sudo ln -s /usr/bin/ccache g++
|
||||
```
|
||||
|
||||
or simply add ``/usr/lib/ccache`` to your ``PATH``.
|
||||
|
||||
== Prepare your development environment ==
|
||||
|
||||
As a convention I do all my development work in $HOME/dev/<language>, so in
|
||||
this case we will create a work environment for C++ development work like
|
||||
this:
|
||||
|
||||
```
|
||||
mkdir -p ${HOME}/dev/cpp
|
||||
cd ${HOME}/dev/cpp
|
||||
```
|
||||
|
||||
This directory path will be assumed for all instructions that follow.
|
||||
|
||||
|
||||
== Check out the QGIS Source Code ==
|
||||
|
||||
There are two ways the source can be checked out. Use the anonymous method
|
||||
if you do not have edit privileges for the QGIS source repository, or use
|
||||
the developer checkout if you have permissions to commit source code
|
||||
changes.
|
||||
|
||||
1. Anonymous Checkout
|
||||
|
||||
```
|
||||
cd ${HOME}/dev/cpp
|
||||
git clone git://github.com/qgis/QGIS.git
|
||||
```
|
||||
|
||||
2. Developer Checkout
|
||||
|
||||
```
|
||||
cd ${HOME}/dev/cpp
|
||||
git clone git@github.com:qgis/QGIS.git
|
||||
```
|
||||
|
||||
== Starting the compile ==
|
||||
|
||||
I compile my development version of QGIS into my ~/apps directory to avoid
|
||||
conflicts with Ubuntu packages that may be under /usr. This way for example
|
||||
you can use the binary packages of QGIS on your system along side with your
|
||||
development version. I suggest you do something similar:
|
||||
|
||||
```
|
||||
mkdir -p ${HOME}/apps
|
||||
```
|
||||
|
||||
Now we create a build directory and run ccmake:
|
||||
|
||||
```
|
||||
cd QGIS
|
||||
mkdir build-master
|
||||
cd build-master
|
||||
ccmake ..
|
||||
```
|
||||
|
||||
When you run ccmake (note the .. is required!), a menu will appear where
|
||||
you can configure various aspects of the build. If you want QGIS to have
|
||||
debugging capabilities then set CMAKE_BUILD_TYPE to Debug. If you do not have
|
||||
root access or do not want to overwrite existing QGIS installs (by your
|
||||
package manager for example), set the CMAKE_INSTALL_PREFIX to somewhere you
|
||||
have write access to (I usually use ${HOME}/apps). Now press
|
||||
'c' to configure, 'e' to dismiss any error messages that may appear.
|
||||
and 'g' to generate the make files. Note that sometimes 'c' needs to
|
||||
be pressed several times before the 'g' option becomes available.
|
||||
After the 'g' generation is complete, press 'q' to exit the ccmake
|
||||
interactive dialog.
|
||||
|
||||
/!\ **Warning:** Make sure that your build directory is completely empty when you
|
||||
enter the command. Do never try to "re-use" an existing **Qt5** build directory.
|
||||
If you want to use `ccmake` or other interactive tools, run the command in
|
||||
the empty build directory once before starting to use the interactive tools.
|
||||
|
||||
Now on with the build:
|
||||
|
||||
```
|
||||
make -jX
|
||||
```
|
||||
|
||||
where X is the number of available cores. Depending on your platform,
|
||||
this can speed up the build time considerably.
|
||||
|
||||
Then you can directly run from the build directory:
|
||||
|
||||
```
|
||||
./output/bin/qgis
|
||||
```
|
||||
|
||||
Another option is to install to your system:
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
After that you can try to run QGIS:
|
||||
|
||||
```
|
||||
$HOME/apps/bin/qgis
|
||||
```
|
||||
|
||||
If all has worked properly the QGIS application should start up and appear
|
||||
on your screen. If you get the error message "error while loading shared libraries",
|
||||
execute this command in your shell.
|
||||
|
||||
```
|
||||
sudo ldconfig
|
||||
```
|
||||
|
||||
If that doesn't help add the install path to LD_LIBRARY_PATH:
|
||||
|
||||
|
||||
```
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/apps/lib/
|
||||
```
|
||||
|
||||
Optionally, if you already know what aspects you want in your custom build
|
||||
then you can skip the interactive ccmake .. part by using the cmake -D
|
||||
option for each aspect, e.g.:
|
||||
|
||||
```
|
||||
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
|
||||
```
|
||||
|
||||
Also, if you want to speed your build times, you can easily do it with ninja,
|
||||
an alternative to make with similar build options.
|
||||
|
||||
For example, to configure your build you can do either one of:
|
||||
|
||||
```
|
||||
ccmake -G Ninja ..
|
||||
```
|
||||
|
||||
```
|
||||
cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
|
||||
```
|
||||
|
||||
Build and install with ninja:
|
||||
|
||||
```
|
||||
ninja (uses all cores by default; also supports the above described -jX option)
|
||||
ninja install
|
||||
```
|
||||
|
||||
To build even faster, you can build just the targets you need using, for example:
|
||||
```
|
||||
ninja qgis
|
||||
ninja pycore
|
||||
# if it's on desktop related code only:
|
||||
ninja qgis_desktop
|
||||
```
|
||||
|
||||
== Compiling with 3D ==
|
||||
|
||||
In the cmake, you need to enable:
|
||||
```
|
||||
WITH_3D=True
|
||||
```
|
||||
=== Compiling with 3D on Debian based distributions ===
|
||||
|
||||
QGIS 3D requires Qt53DExtras. These headers have been removed
|
||||
from Qt upstream on Debian based distributions. A copy has been made in the
|
||||
QGIS repository in ``external/qt3dextra-headers``.
|
||||
To compile with 3D enabled, you need to add some cmake options:
|
||||
```
|
||||
CMAKE_PREFIX_PATH={path to QGIS Git repo}/external/qt3dextra-headers/cmake
|
||||
QT5_3DEXTRA_INCLUDE_DIR={path to QGIS Git repo}/external/qt3dextra-headers
|
||||
QT5_3DEXTRA_LIBRARY=/usr/lib/x86_64-linux-gnu/libQt53DExtras.so
|
||||
```
|
||||
|
||||
== Building different branches ==
|
||||
|
||||
By using ``git worktree``, you can switch between different branches to use
|
||||
several sources in parallel, based on the same Git configuration.
|
||||
We recommand you to read the documentation about this Git command:
|
||||
```
|
||||
git commit
|
||||
git worktree add ../my_new_functionality
|
||||
cd ../my_new_functionality
|
||||
git fetch qgis/master
|
||||
git rebase -i qgis/master
|
||||
# only keep the commits to be pushed
|
||||
git push -u my_own_repo my_new_functionality
|
||||
```
|
||||
|
||||
== Building Debian packages ==
|
||||
|
||||
Instead of creating a personal installation as in the previous step you can
|
||||
also create debian package. This is done from the QGIS root directory, where
|
||||
you'll find a debian directory.
|
||||
|
||||
First you need to install the debian packaging tools once:
|
||||
|
||||
```
|
||||
apt-get install build-essential
|
||||
```
|
||||
|
||||
First you need to create an changelog entry for your distribution. For example
|
||||
for Ubuntu Precise:
|
||||
|
||||
```
|
||||
dch -l ~precise --force-distribution --distribution precise "precise build"
|
||||
```
|
||||
|
||||
The QGIS packages will be created with:
|
||||
|
||||
```
|
||||
dpkg-buildpackage -us -uc -b
|
||||
```
|
||||
|
||||
/!\ **Note:** Install ``devscripts`` to get ``dch``.
|
||||
|
||||
/!\ **Note:** If ``dpkg-buildpackage`` complains about unmet build dependencies
|
||||
you can install them using ``apt-get`` and re-run the command.
|
||||
|
||||
/!\ **Note:** If you have ``libqgis1-dev`` installed, you need to remove it first
|
||||
using ``dpkg -r libqgis1-dev``. Otherwise ``dpkg-buildpackage`` will complain about a
|
||||
build conflict.
|
||||
|
||||
/!\ **Note:** By default tests are run in the process of building and their
|
||||
results are uploaded to http://cdash.orfeo-toolbox.org/index.php?project=QGIS.
|
||||
You can turn the tests off using DEB_BUILD_OPTIONS=nocheck in front of the
|
||||
build command. The upload of results can be avoided with DEB_TEST_TARGET=test.
|
||||
|
||||
The packages are created in the parent directory (ie. one level up).
|
||||
Install them using dpkg. E.g.:
|
||||
|
||||
```
|
||||
sudo debi
|
||||
```
|
||||
|
||||
== On Fedora Linux ==
|
||||
|
||||
We assume that you have the source code of QGIS ready and created a
|
||||
new subdirectory called `build` or `build-qt5` in it.
|
||||
|
||||
=== Install build dependencies ===
|
||||
|
||||
```
|
||||
dnf install qt5-qtbase-private-devel qt5-qtwebkit-devel qt5-qtlocation-devel qt5-qttools-static 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 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 exiv2-devel
|
||||
```
|
||||
|
||||
To build QGIS server additional dependencies are required:
|
||||
|
||||
```
|
||||
dnf install fcgi-devel
|
||||
```
|
||||
|
||||
Make sure that your build directory is completely empty when you enter the
|
||||
following command. Do never try to "re-use" an existing Qt5 build directory.
|
||||
If you want to use `ccmake` or other interactive tools, run the following
|
||||
command in the empty build directory once before starting to use the interactive
|
||||
tools.
|
||||
|
||||
```
|
||||
cmake ..
|
||||
```
|
||||
|
||||
If everything went OK you can finally start to compile. (As usual append a -jX
|
||||
where X is the number of available cores option to make to speed up your build
|
||||
process)
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
Run from the build directory
|
||||
|
||||
```
|
||||
./output/bin/qgis
|
||||
```
|
||||
|
||||
Or install to your system
|
||||
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
=== Suggested system tweaks ===
|
||||
|
||||
By default Fedora disables debugging calls from Qt applications. This prevents
|
||||
the useful debug output which is normally printed when running the unit tests.
|
||||
|
||||
To enable debug prints for the current user, execute:
|
||||
|
||||
```
|
||||
cat > ~/.config/QtProject/qtlogging.ini << EOL
|
||||
[Rules]
|
||||
default.debug=true
|
||||
EOL
|
||||
```
|
224
doc/msvc.t2t
224
doc/msvc.t2t
@ -1,224 +0,0 @@
|
||||
|
||||
==Building with Microsoft Visual Studio==
|
||||
|
||||
This section describes how to build QGIS using Visual Studio (MSVC) 2015 on Windows.
|
||||
This is currently also how the binary QGIS packages are made (earlier versions used MinGW).
|
||||
|
||||
This section describes the setup required to allow Visual Studio to be used to
|
||||
build QGIS.
|
||||
|
||||
===Visual Studio 2015 Community Edition===
|
||||
|
||||
The free (as in free beer) Community installer is available under:
|
||||
|
||||
http://download.microsoft.com/download/D/2/3/D23F4D0F-BA2D-4600-8725-6CCECEA05196/vs_community_ENU.exe
|
||||
|
||||
Select "Custom" install and add the following packages:
|
||||
- "Common Tools for Visual C++ 2015" under "Visual C++"
|
||||
- "Tools (1.4.1) and Windows 10 SDK (10.0.14393)" under "Universal Windows App Development Tools".
|
||||
-
|
||||
|
||||
===Other tools and dependencies===
|
||||
|
||||
Download and install following packages:
|
||||
|
||||
|| Tool | Website |
|
||||
| CMake | https://cmake.org/files/v3.12/cmake-3.12.3-win64-x64.msi |
|
||||
| GNU flex, GNU bison and GIT | http://cygwin.com/setup-x86.exe (32bit) or http://cygwin.com/setup-x86_64.exe (64bit) |
|
||||
| OSGeo4W | http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86.exe (32bit) or http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe (64bit) |
|
||||
| ninja | https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip |
|
||||
|
||||
For the QGIS build you need to install following packages from cygwin:
|
||||
- bison
|
||||
- flex
|
||||
- git (even if you already have Git for Windows installed)
|
||||
-
|
||||
|
||||
and from OSGeo4W (select //Advanced Install//):
|
||||
|
||||
- qgis-dev-deps
|
||||
-
|
||||
|
||||
This will also select packages the above packages depend on.
|
||||
|
||||
If you install other packages, this might cause issues. Particularly, make sure
|
||||
**not** to install the msinttypes package. It installs a stdint.h file in
|
||||
OSGeo4W[64]\include, that conflicts with Visual Studio own stdint.h, which for
|
||||
example breaks the build of the virtual layer provider.
|
||||
|
||||
Earlier versions of this document also covered how to build all above
|
||||
dependencies. If you're interested in that, check the history of this page in the Wiki
|
||||
or the SVN repository.
|
||||
|
||||
ninja:
|
||||
copy ninja.exe to C:\OSGeo4W64\bin\
|
||||
|
||||
=== Clone the QGIS Source Code ===
|
||||
|
||||
Choose a directory to store the QGIS source code.
|
||||
For example, to put it in the OSGeo4W64 install, navigate there:
|
||||
|
||||
```
|
||||
cd C:\OSGeo4W64
|
||||
```
|
||||
|
||||
This directory will be assumed for all instructions
|
||||
that follow.
|
||||
|
||||
On the command prompt clone the QGIS source from
|
||||
git to the source directory ``QGIS``:
|
||||
|
||||
```
|
||||
git clone git://github.com/qgis/QGIS.git
|
||||
```
|
||||
|
||||
This requires Git. If you have Git for Windows on your PATH already,
|
||||
you can do this from a normal command prompt. If you do not, you can
|
||||
use the Git package that was installed as part of Cygwin by opening
|
||||
a Cygwin[64] Terminal
|
||||
|
||||
And, to avoid Git in Windows reporting changes to files not actually modified:
|
||||
|
||||
```
|
||||
cd QGIS
|
||||
git config core.filemode false
|
||||
```
|
||||
|
||||
=== Setting up the Visual Studio project with CMake ===
|
||||
|
||||
/!\ Consider this section as example. It tends to outdate, when OSGeo4W and
|
||||
SDKs move on. ``ms-windows/osgeo4w/package-nightly.cmd`` is used for the
|
||||
nightly builds and constantly updated and hence might contain necessary
|
||||
updates that are not yet reflected here.
|
||||
|
||||
To start a command prompt with an environment that both has the VC++ and the OSGeo4W
|
||||
variables create the following batch file (assuming the above packages were
|
||||
installed in the default locations):
|
||||
|
||||
```
|
||||
@echo off
|
||||
call C:\OSGeo4W64\QGIS\ms-windows\osgeo4w\msvc-env.bat x86_64
|
||||
@cmd
|
||||
```
|
||||
|
||||
Save the batch file as ``C:\OSGeo4W64\OSGeo4W-dev.bat`` and run it.
|
||||
|
||||
|
||||
Using configonly.bat to create the MSVC solution file:
|
||||
We will be using the file ``ms-windows/osgeo4w/configonly.bat`` to create an MSVC solution file.
|
||||
There are two supported CMake generators for creating a solution file: Ninja, and native MSVC.
|
||||
The advantage of using native MSVC solution is that you can find the root of build problems much more easily.
|
||||
configonly.bat is meant to create a configured build directory with a MSVC solution file:
|
||||
|
||||
```
|
||||
cd C:\OSGeo4W64\QGIS\ms-windows\osgeo4w
|
||||
configonly.bat
|
||||
```
|
||||
|
||||
Compiling QGIS with MSVC:
|
||||
We will need to run MSVC with all the environment variables set, thus we will run it as follows:
|
||||
Run the batch file OSGeo4W-dev.bat you created before.
|
||||
On the command prompt run ``call gdal-dev-env.bat`` to add the release gdal and proj libraries to your PATH.
|
||||
On the command prompt run ``devenv`` to open MSVC.
|
||||
From MSVC, open the solution file
|
||||
``C:\OSGeo4W64\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\qgis.sln``
|
||||
Try to build the solution (go grab a cup of tea, it may take a while).
|
||||
If it fails, run it again and again until there are (hopefully) no errors.
|
||||
|
||||
|
||||
Running QGIS from within MSVC:
|
||||
Edit the properties of the project ALL_BUILD:
|
||||
Debugging -> Command -> ``C:\OSGeo4W64\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\output\bin\RelWithDebInfo\qgis.exe``
|
||||
Run: Debug -> Start Debugging (F5) or Start Without Debugging (Ctrl+F5)
|
||||
Ignore the "These projects are out of date" message, it appears even if no files were changed.
|
||||
|
||||
|
||||
Old alternative method that might still work using cmake-gui:
|
||||
Create a 'build' directory somewhere. This will be where all the build output
|
||||
will be generated.
|
||||
|
||||
Now run ``cmake-gui`` (still from ``cmd``) and in the //Where is the source code://
|
||||
box, browse to the top level QGIS directory.
|
||||
|
||||
In the //Where to build the binaries:// box, browse to the 'build' directory you
|
||||
created.
|
||||
|
||||
If the path to bison and flex contains blanks, you need to use the short name
|
||||
for the directory (i.e. ``C:\Program Files`` should be rewritten to
|
||||
``C:\Progra~n``, where ``n`` is the number as shown in `dir /x C:\``).
|
||||
|
||||
Verify that the 'BINDINGS_GLOBAL_INSTALL' option is not checked, so that python
|
||||
bindings are placed into the output directory when you run the INSTALL target.
|
||||
|
||||
Hit ``Configure`` to start the configuration and select ``Visual Studio 9 2008``
|
||||
and keep ``native compilers`` and click ``Finish``.
|
||||
|
||||
The configuration should complete without any further questions and allow you to
|
||||
click ``Generate``.
|
||||
|
||||
Now close ``cmake-gui`` and continue on the command prompt by starting
|
||||
``vcexpress``. Use File / Open / Project/Solutions and open the
|
||||
qgis-x.y.z.sln File in your project directory.
|
||||
|
||||
Change ``Solution Configuration`` from ``Debug`` to ``RelWithDebInfo`` (Release
|
||||
with Debug Info) or ``Release`` before you build QGIS using the ALL_BUILD
|
||||
target (otherwise you need debug libraries that are not included).
|
||||
|
||||
After the build completed you should install QGIS using the INSTALL target.
|
||||
|
||||
Install QGIS by building the INSTALL project. By default this will install to
|
||||
c:\Program Files\qgis<version> (this can be changed by changing the
|
||||
CMAKE_INSTALL_PREFIX variable in cmake-gui).
|
||||
|
||||
You will also either need to add all the dependency DLLs to the QGIS install
|
||||
directory or add their respective directories to your PATH.
|
||||
|
||||
=== Packaging ===
|
||||
|
||||
To create a standalone installer there is a perl script named 'creatensis.pl'
|
||||
in 'qgis/ms-windows/osgeo4w'. It downloads all required packages from OSGeo4W
|
||||
and repackages them into an installer using NSIS.
|
||||
|
||||
|
||||
The script can be run on both Windows and Linux.
|
||||
|
||||
On Debian/Ubuntu you can just install the 'nsis' package.
|
||||
|
||||
NSIS for Windows can be downloaded at:
|
||||
|
||||
http://nsis.sourceforge.net
|
||||
|
||||
And Perl for Windows (including other requirements like 'wget', 'unzip', 'tar'
|
||||
and 'bzip2') is available at:
|
||||
|
||||
http://cygwin.com
|
||||
|
||||
=== Packaging your own build of QGIS ===
|
||||
|
||||
Assuming you have completed the above packaging step, if you want to include
|
||||
your own hand built QGIS executables, you need to copy them in from your
|
||||
windows installation into the ms-windows file tree created by the creatensis
|
||||
script.
|
||||
|
||||
```
|
||||
cd ms-windows/
|
||||
rm -rf osgeo4w/unpacked/apps/qgis/*
|
||||
cp -r /tmp/qgis1.7.0/* osgeo4w/unpacked/apps/qgis/
|
||||
```
|
||||
|
||||
Now create a package.
|
||||
|
||||
```
|
||||
./quickpackage.sh
|
||||
```
|
||||
|
||||
After this you should now have a nsis installer containing your own build
|
||||
of QGIS and all dependencies needed to run it on a windows machine.
|
||||
|
||||
|
||||
=== Osgeo4w packaging ===
|
||||
|
||||
The actual packaging process is currently not documented, for now please take a
|
||||
look at:
|
||||
|
||||
//ms-windows/osgeo4w/package.cmd//
|
386
doc/msys.t2t
386
doc/msys.t2t
@ -1,386 +0,0 @@
|
||||
|
||||
== Building using MinGW ==
|
||||
|
||||
**Note:** This section might be outdated as nowadays Visual C++ is use to build
|
||||
the "official" packages.
|
||||
|
||||
**Note:** For a detailed account of building all the dependencies yourself you
|
||||
can visit Marco Pasetti's website here:
|
||||
|
||||
http://www.webalice.it/marco.pasetti/qgis+grass/BuildFromSource.html
|
||||
|
||||
Read on to use the simplified approach with pre-built libraries...
|
||||
|
||||
=== MSYS ===
|
||||
|
||||
MSYS provides a unix style build environment under windows. We have created a
|
||||
zip archive that contains just about all dependencies.
|
||||
|
||||
Get this:
|
||||
|
||||
http://download.osgeo.org/qgis/win32/msys.zip
|
||||
|
||||
and unpack to c:\msys
|
||||
|
||||
|
||||
If you wish to prepare your msys environment yourself rather than using
|
||||
our pre-made one, detailed instructions are provided elsewhere in this
|
||||
document.
|
||||
|
||||
=== Qt ===
|
||||
|
||||
Download Qt opensource precompiled edition exe and install (including the
|
||||
download and install of mingw) from here:
|
||||
|
||||
http://qt.nokia.com/downloads/
|
||||
|
||||
When the installer will ask for MinGW, you don't need to download and install
|
||||
it, just point the installer to c:\msys\mingw
|
||||
|
||||
When Qt installation is complete:
|
||||
|
||||
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\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\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\5.9.1 make
|
||||
```
|
||||
|
||||
=== Flex and Bison ===
|
||||
|
||||
Get Flex
|
||||
http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=16424
|
||||
(the zip bin) and extract it into c:\msys\mingw\bin
|
||||
|
||||
=== 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 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.
|
||||
|
||||
==== Download and install Python - use Windows installer ====
|
||||
|
||||
(It doesn't matter to what folder you'll install it)
|
||||
|
||||
http://python.org/download/
|
||||
|
||||
==== Download SIP and PyQt5 sources ====
|
||||
|
||||
http://www.riverbankcomputing.com/software/sip/download
|
||||
http://www.riverbankcomputing.com/software/pyqt/download
|
||||
|
||||
Extract each of the above zip files in a temporary directory. Make sure
|
||||
to get versions that match your current Qt installed version.
|
||||
|
||||
==== Compile SIP ====
|
||||
|
||||
```
|
||||
c:\Qt\5.9.1\bin\qtvars.bat
|
||||
python configure.py -p win32-g++
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
==== Compile PyQt ====
|
||||
|
||||
```
|
||||
c:\Qt\5.9.1\bin\qtvars.bat
|
||||
python configure.py
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
==== Final python notes ====
|
||||
|
||||
/!\ You can delete the directories with unpacked SIP and PyQt5 sources after a
|
||||
successful install, they're not needed anymore.
|
||||
|
||||
=== git ===
|
||||
|
||||
In order to check out QGIS sources from the repository, you need a git client.
|
||||
This installer should work fine:
|
||||
|
||||
https://git-scm.com/download/win
|
||||
|
||||
=== CMake ===
|
||||
|
||||
CMake is build system used by QGIS. Download it from here:
|
||||
|
||||
https://cmake.org/files/v3.9/cmake-3.9.3-win64-x64.msi
|
||||
|
||||
=== QGIS ===
|
||||
|
||||
Start a cmd.exe window ( Start -> Run -> cmd.exe ) Create development
|
||||
directory and move into it
|
||||
|
||||
```
|
||||
md c:\dev\cpp
|
||||
cd c:\dev\cpp
|
||||
```
|
||||
|
||||
Check out sources from GIT:
|
||||
|
||||
```
|
||||
git clone git://github.com/qgis/QGIS.git
|
||||
```
|
||||
|
||||
=== Compiling ===
|
||||
|
||||
As a background read the generic building with CMake notes at the end of
|
||||
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\5.9.1\bin\qtvars.bat
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
|
||||
```
|
||||
cd c:\dev\cpp\qgis
|
||||
md build
|
||||
cd build
|
||||
```
|
||||
|
||||
=== Configuration ===
|
||||
|
||||
```
|
||||
cmakesetup ..
|
||||
```
|
||||
|
||||
**Note:** You must include the '..' above.
|
||||
|
||||
Click 'Configure' button. When asked, you should choose 'MinGW Makefiles' as
|
||||
generator.
|
||||
|
||||
There's a problem with MinGW Makefiles on Win2K. If you're compiling on this
|
||||
platform, use 'MSYS Makefiles' generator instead.
|
||||
|
||||
All dependencies should be picked up automatically, if you have set up the
|
||||
Paths correctly. The only thing you need to change is the installation
|
||||
destination (CMAKE_INSTALL_PREFIX) and/or set 'Debug'.
|
||||
|
||||
For compatibility with NSIS packaging scripts I recommend to leave the install
|
||||
prefix to its default c:\program files\
|
||||
|
||||
When configuration is done, click 'OK' to exit the setup utility.
|
||||
|
||||
=== Compilation and installation ===
|
||||
|
||||
```
|
||||
make make install
|
||||
```
|
||||
|
||||
=== Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX) ===
|
||||
|
||||
Make sure to copy all .dll:s needed to the same directory as the qgis.exe
|
||||
binary is installed to, if not already done so, otherwise QGIS will complain
|
||||
about missing libraries when started.
|
||||
|
||||
A possibility is to run qgis.exe when your path contains c:\msys\local\bin and
|
||||
c:\msys\local\lib directories, so the DLLs will be used from that place.
|
||||
|
||||
=== Create the installation package: (optional) ===
|
||||
|
||||
Download and install NSIS from (http://nsis.sourceforge.net/Main_Page)
|
||||
|
||||
Now using windows explorer, enter the win_build directory in your QGIS source
|
||||
tree. Read the READMEfile there and follow the instructions. Next right click
|
||||
on qgis.nsi and choose the option 'Compile NSIS Script'.
|
||||
|
||||
== Creation of MSYS environment for compilation of QGIS ==
|
||||
|
||||
=== Initial setup ===
|
||||
|
||||
==== MSYS ====
|
||||
|
||||
This is the environment that supplies many utilities from UNIX world in Windows and is needed
|
||||
by many dependencies to be able to compile.
|
||||
|
||||
Download from here:
|
||||
http://puzzle.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.11-2004.04.30-1.exe
|
||||
|
||||
Install to ``c:\msys``
|
||||
|
||||
All stuff we're going to compile is going to get to this directory (resp. its subdirs).
|
||||
|
||||
==== MinGW ====
|
||||
|
||||
Download from here:
|
||||
http://puzzle.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe
|
||||
|
||||
Install to ``c:\msys\mingw``
|
||||
|
||||
It suffices to download and install only ``g++`` and ``mingw-make`` components.
|
||||
|
||||
==== Flex and Bison ====
|
||||
|
||||
Flex and Bison are tools for generation of parsers, they're needed for GRASS and also QGIS compilation.
|
||||
|
||||
Download the following packages:
|
||||
http://gnuwin32.sourceforge.net/downlinks/flex-bin-zip.php
|
||||
|
||||
http://gnuwin32.sourceforge.net/downlinks/bison-bin-zip.php
|
||||
|
||||
http://gnuwin32.sourceforge.net/downlinks/bison-dep-zip.php
|
||||
|
||||
Unpack them all to ``c:\msys\local``
|
||||
|
||||
=== Installing dependencies ===
|
||||
|
||||
==== Getting ready ====
|
||||
|
||||
Paul Kelly did a great job and prepared a package of precompiled libraries for GRASS.
|
||||
The package currently includes:
|
||||
|
||||
- zlib-1.2.3
|
||||
- libpng-1.2.16-noconfig
|
||||
- xdr-4.0-mingw2
|
||||
- freetype-2.3.4
|
||||
- fftw-2.1.5
|
||||
- PDCurses-3.1
|
||||
- proj-4.5.0
|
||||
- gdal-1.4.1
|
||||
|
||||
|
||||
It's available for download here:
|
||||
http://www.stjohnspoint.co.uk/grass/wingrass-extralibs.tar.gz
|
||||
|
||||
Moreover he also left the notes how to compile it (for those interested):
|
||||
http://www.stjohnspoint.co.uk/grass/README.extralibs
|
||||
|
||||
Unpack the whole package to ``c:\msys\local``
|
||||
|
||||
|
||||
==== GRASS ====
|
||||
|
||||
Grab sources from CVS or use a weekly snapshot, see:
|
||||
http://grass.itc.it/devel/cvs.php
|
||||
|
||||
In MSYS console go to the directory where you've unpacked or checked out sources
|
||||
(e.g. ``c:\msys\local\src\grass-6.3.cvs``)
|
||||
|
||||
Run these commands:
|
||||
```
|
||||
export PATH="/usr/local/bin:/usr/local/lib:$PATH"
|
||||
./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg \
|
||||
--without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw \
|
||||
--with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes \
|
||||
--with-proj-share=/usr/local/share/proj
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
It should get installed to ``c:\msys\local\grass-6.3.cvs``
|
||||
|
||||
By the way, these pages might be useful:
|
||||
- http://grass.gdf-hannover.de/wiki/WinGRASS_Current_Status
|
||||
- http://geni.ath.cx/grass.html
|
||||
|
||||
|
||||
==== GEOS ====
|
||||
|
||||
Download the sources:
|
||||
http://geos.refractions.net/geos-2.2.3.tar.bz2
|
||||
|
||||
Unpack to e.g. ``c:\msys\local\src``
|
||||
|
||||
To compile, I had to patch the sources: in file ``source/headers/timeval.h`` line 13.
|
||||
Change it from:
|
||||
```
|
||||
#ifdef _WIN32
|
||||
```
|
||||
to:
|
||||
```
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
```
|
||||
|
||||
Now, in MSYS console, go to the source directory and run:
|
||||
|
||||
```
|
||||
./configure --prefix=/usr/local
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
|
||||
==== SQLITE ====
|
||||
|
||||
You can use precompiled DLL, no need to compile from source:
|
||||
|
||||
Download this archive:
|
||||
http://www.sqlite.org/sqlitedll-3_3_17.zip
|
||||
|
||||
and copy sqlite3.dll from it to ``c:\msys\local\lib``
|
||||
|
||||
Then download this archive:
|
||||
http://www.sqlite.org/sqlite-source-3_3_17.zip
|
||||
|
||||
and copy sqlite3.h to ``c:\msys\local\include``
|
||||
|
||||
|
||||
==== GSL ====
|
||||
|
||||
Download sources:
|
||||
ftp://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz
|
||||
|
||||
Unpack to ``c:\msys\local\src``
|
||||
|
||||
Run from MSYS console in the source directory:
|
||||
|
||||
```
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
==== EXPAT ====
|
||||
|
||||
Download sources:
|
||||
http://dfn.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz
|
||||
|
||||
Unpack to ``c:\msys\local\src``
|
||||
|
||||
Run from MSYS console in the source directory:
|
||||
|
||||
```
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
==== POSTGRES ====
|
||||
|
||||
We're going to use precompiled binaries. Use the link below for download:
|
||||
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fbinary%2Fv8.2.4%2Fwin32%2Fpostgresql-8.2.4-1-binaries-no-installer.zip
|
||||
|
||||
copy contents of pgsql directory from the archive to ``c:\msys\local``
|
||||
|
||||
=== Cleanup ===
|
||||
|
||||
We're done with preparation of MSYS environment. Now you can delete all stuff in ``c:\msys\local\src`` - it takes quite a lot
|
||||
of space and it's not necessary at all.
|
||||
|
40
doc/mxe.t2t
40
doc/mxe.t2t
@ -1,40 +0,0 @@
|
||||
|
||||
== Building on Linux with mxe ==
|
||||
|
||||
With this approach you can cross build a Windows binary on Linux using MXE (M cross environment).
|
||||
You can find the build script and a README.md file in the ms-windows/mxe directory.
|
||||
|
||||
For now, Python buildings cannot be built with mxe.
|
||||
|
||||
=== Building with Docker ===
|
||||
|
||||
This is the simplest way, but you need to have Docker installed
|
||||
on your system.
|
||||
|
||||
You can use a Docker image to cross build QGIS by calling
|
||||
the script ms-windows/mxe/build.sh from the root directory of QGIS repository.
|
||||
|
||||
=== Building without Docker ====
|
||||
|
||||
This requires to install mxe toolchain on your system and build
|
||||
all dependencies by yourself.
|
||||
|
||||
==== Initial setup ====
|
||||
|
||||
Please follow the instructions on mxe website to setup your building toolchain http://mxe.cc/,
|
||||
take note of the path where you have installed mxe.
|
||||
|
||||
==== Building the dependencies ====
|
||||
|
||||
Please see README.md under ms-windows/mxe for detailed instructions and for the
|
||||
list of dependencies that need to be built in mxe before attempting to build QGIS.
|
||||
|
||||
==== Cross-Building QGIS ====
|
||||
|
||||
Edit the build-mxe.sh script and optionally adjust the path where your mxe installation is located, you
|
||||
can also change the build and release directories.
|
||||
|
||||
=== Testing QGIS ===
|
||||
|
||||
Copy and unzip on the Windows machine package produced by the build and launch the qgis binary: no installation
|
||||
is required.
|
184
doc/osx.t2t
184
doc/osx.t2t
@ -1,184 +0,0 @@
|
||||
|
||||
|
||||
= Building on MacOS X =
|
||||
|
||||
If you want to test QGIS, easiest option is to download and install all-in-one self-containing bundle directly from
|
||||
|
||||
https://qgis.org/downloads/macos
|
||||
|
||||
On the other hand, if you want to build or develop QGIS on your own, you need a set of dependencies and tools.
|
||||
These instructions will use the same set of dependencies that are used for all-in-one QGIS bundle,
|
||||
but you can build QGIS with Homebrew, MacPorts or Conda dependencies too.
|
||||
|
||||
https://github.com/qgis/QGIS-Mac-Packager
|
||||
|
||||
Included are notes for building on latest Mac OS X with latest updates installed.
|
||||
The build uses clang compiler.
|
||||
|
||||
__Parallel Compilation:__ On multiprocessor/multicore Macs, it's possible to
|
||||
speed up compilation, but it's not automatic. Whenever you type "make" (but
|
||||
NOT "make install"), instead type:
|
||||
|
||||
```
|
||||
make -j [#cpus]
|
||||
```
|
||||
|
||||
Replace [#cpus] with the number of cores and/or processors your Mac has.
|
||||
To find out how many CPUs you have available, run the following in Terminal:
|
||||
|
||||
```
|
||||
/usr/sbin/sysctl -n hw.ncpu
|
||||
```
|
||||
|
||||
== Install Developer Tools ==
|
||||
|
||||
Developer tools are not a part of a standard OS X installation.
|
||||
As minimum you require command line tools
|
||||
|
||||
```
|
||||
sudo xcode-select --install
|
||||
```
|
||||
|
||||
but installation of Xcode from the App Store is recommended too.
|
||||
|
||||
== Install CMake and other build tools ==
|
||||
|
||||
For example install Homebrew
|
||||
|
||||
```
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
```
|
||||
|
||||
and these development/build tools
|
||||
|
||||
```
|
||||
brew install git
|
||||
brew install cmake
|
||||
brew install ninja
|
||||
brew install pkg-config
|
||||
brew install wget
|
||||
brew install bash-completion
|
||||
brew install curl
|
||||
brew install gnu-sed
|
||||
brew install coreutils
|
||||
brew install ccache
|
||||
brew install libtool
|
||||
brew install astyle
|
||||
brew install help2man
|
||||
brew install autoconf
|
||||
brew install automake
|
||||
brew install txt2tags
|
||||
```
|
||||
|
||||
if you have these tools installed from MacPorts or Conda, it is the same, but we will need to be able to
|
||||
run `cmake` and others from Terminal in the following steps
|
||||
|
||||
== Install Qt5 and QGIS-Deps ==
|
||||
|
||||
To build QGIS, we need Qt5 and FOSS dependencies on hand. The Qt5 version ideally should match the version that was
|
||||
used to build dependency package.
|
||||
|
||||
Download the latest QGIS-Deps install script, qt package and QGIS-Deps packages from
|
||||
|
||||
https://qgis.org/downloads/macos/deps
|
||||
|
||||
You should have one bash script and two tar archive in your download folder.
|
||||
Run the install script to install Qt and QGIS-Deps to `/opt/` area. You need
|
||||
root privileges or have write access to `/opt/Qt` and `/opt/QGIS`.
|
||||
|
||||
Alternatively you can download and install Qt Open Source for MacOS from the
|
||||
|
||||
https://www.qt.io/
|
||||
|
||||
in the same version as referenced in the install script. It must be installed in `/opt/Qt`
|
||||
|
||||
Note that the QGIS-Deps package is not yet signed, so you may need to add Terminal
|
||||
to System Preferences -> Security & Privacy -> Privacy -> Developer Tools or manually accept usage
|
||||
of the libraries when asked by system.
|
||||
|
||||
== QGIS source ==
|
||||
|
||||
Unzip the QGIS source to a working folder of your choice.
|
||||
If you are reading this from the source, you've already done this.
|
||||
|
||||
If you want to experiment with the latest development sources, go to the github
|
||||
QGIS project page:
|
||||
|
||||
http://github.com/qgis/QGIS
|
||||
|
||||
It should default to the master branch. Click the __Downloads__ button and
|
||||
select __Download .tar.gz__. Double-click the tarball to unzip it.
|
||||
|
||||
//Alternatively//, use git and clone the repository by
|
||||
|
||||
```
|
||||
git clone git://github.com/qgis/QGIS.git
|
||||
```
|
||||
|
||||
== Configure the build ==
|
||||
|
||||
CMake supports out of source build so we will create a 'build' dir for the
|
||||
build process. OS X uses ${HOME}/Applications as a standard user app folder (it
|
||||
gives it the system app folder icon). If you have the correct permissions you
|
||||
may want to build straight into your /Applications folder. The instructions
|
||||
below assume you are building into a ${HOME}/Applications directory.
|
||||
|
||||
In a Terminal cd to the qgis source folder previously downloaded, then:
|
||||
|
||||
```
|
||||
cd ..
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
QGIS_DEPS_VERSION=0.3.0;\
|
||||
QT_VERSION=5.14.1;\
|
||||
PATH=/opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION}/stage/bin:$PATH;\
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=~/Applications \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DQGIS_MAC_DEPS_DIR=/opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION}/stage \
|
||||
-DCMAKE_PREFIX_PATH=/opt/Qt/${QT_VERSION}/clang_64 \
|
||||
../QGIS
|
||||
```
|
||||
|
||||
__Note:__ Don't forget the `../QGIS` on the last line, which tells CMake to look for the source files.
|
||||
|
||||
__Note:__ Double check on the screen output that all libraries are picked from QGIS-Deps `/opt/QGIS`
|
||||
and not from system `/usr/lib` or Homebrew's `/usr/local/` or system Frameworks `/Library/Frameworks/`.
|
||||
Especially check Proj, GDAL, sqlite3 and Python paths.
|
||||
|
||||
After the initial Terminal configure, you can use ccmake to make further changes:
|
||||
|
||||
```
|
||||
cd build
|
||||
ccmake ..
|
||||
```
|
||||
|
||||
== Building ==
|
||||
|
||||
Now we can start the build process (remember the parallel compilation note at
|
||||
the beginning, this is a good place to use it, if you can):
|
||||
|
||||
```
|
||||
make -j [#cpus]
|
||||
```
|
||||
|
||||
Now you can run the QGIS from build directory by `./output/bin/QGIS.app/Contents/MacOS/QGIS`
|
||||
|
||||
If all built without errors you can then install it:
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
or, for an /Applications build:
|
||||
|
||||
```
|
||||
sudo make install
|
||||
```
|
||||
|
||||
For running the installed QGIS, you need to keep the dependencies in `/opt/` folder in place.
|
||||
If you want to create bundle that runs without these dependencies, please read the documentation in project
|
||||
|
||||
https://github.com/qgis/QGIS-Mac-Packager
|
||||
|
@ -1,53 +0,0 @@
|
||||
|
||||
= Overview =
|
||||
|
||||
QGIS, like a number of major projects (e.g., KDE 4.0), uses CMake
|
||||
(http://www.cmake.org) for building from source.
|
||||
|
||||
Following a summary of the required dependencies for building:
|
||||
|
||||
Required build tools:
|
||||
|
||||
- CMake >= 3.0.0
|
||||
- Flex >= 2.5.6
|
||||
- Bison >= 2.4
|
||||
- Python 3
|
||||
-
|
||||
|
||||
Required build dependencies:
|
||||
|
||||
- Qt >= 5.9.0
|
||||
- Proj >= 4.9.3
|
||||
- GEOS >= 3.4
|
||||
- Sqlite3 >= 3.0.0
|
||||
- SpatiaLite >= 4.2.0
|
||||
- libspatialindex
|
||||
- GDAL/OGR >= 2.1
|
||||
- Qwt >= 5.0 & (< 6.1 with internal QwtPolar)
|
||||
- expat >= 1.95
|
||||
- QScintilla2
|
||||
- QCA
|
||||
- qtkeychain (>= 0.5)
|
||||
- libzip
|
||||
-
|
||||
|
||||
Optional dependencies:
|
||||
|
||||
- for GRASS providers and plugin - GRASS >= 7.0.0.
|
||||
- for georeferencer - GSL >= 1.8
|
||||
- for PostGIS support - PostgreSQL >= 8.0.x
|
||||
- for gps plugin - gpsbabel
|
||||
- for mapserver export and PyQGIS - Python >= 3.3
|
||||
- for python support - SIP >= 4.12, PyQt >= 5.3 must match Qt version, Qscintilla2
|
||||
- for qgis mapserver - FastCGI
|
||||
- for oracle provider - Oracle OCI library
|
||||
-
|
||||
|
||||
Indirect dependencies:
|
||||
|
||||
Some proprietary formats (e.g., ECW and MrSid) supported by GDAL require
|
||||
proprietary third party libraries. QGIS doesn't need any of those itself to
|
||||
build, but will only support those formats if GDAL is built accordingly. Refer
|
||||
to http://gdal.org/formats_list.html ff. for instructions how to include
|
||||
those formats in GDAL.
|
||||
|
@ -1,114 +0,0 @@
|
||||
|
||||
|
||||
= Setting up the WCS test server on GNU/Linux =
|
||||
|
||||
**Requires:** Ubuntu / Debian derived distro
|
||||
|
||||
These notes are for Ubuntu - other versions and Debian derived distros may
|
||||
require slight variations in package names.
|
||||
|
||||
== Preparation ==
|
||||
|
||||
Note the git repo below will change to the default QGIS repo once this work
|
||||
is integrated into master.
|
||||
|
||||
git remote add blazek git://github.com/blazek/Quantum-GIS.git
|
||||
git fetch blazek
|
||||
git branch --track wcs2 blazek/wcs2
|
||||
git checkout wcs2
|
||||
cd /var/www/
|
||||
sudo mkdir wcs
|
||||
sudo chown timlinux wcs
|
||||
cd wcs/
|
||||
mkdir cgi-bin
|
||||
cd cgi-bin/
|
||||
|
||||
== Setup mapserver ==
|
||||
|
||||
```sudo apt-get install cgi-mapserver```
|
||||
|
||||
Set the contents of cgi-bin/wcstest-1.9.0 to:
|
||||
|
||||
```
|
||||
#! /bin/sh
|
||||
MS_MAPFILE=/var/www/wcs/testdata/qgis-1.9.0/raster/wcs.map
|
||||
export MS_MAPFILE
|
||||
/usr/lib/cgi-bin/mapserv
|
||||
```
|
||||
|
||||
Then do:
|
||||
|
||||
```
|
||||
chmod +x cgi-bin/wcstest-1.9.0
|
||||
mkdir -p /var/www/wcs/testdata/qgis-1.9.0/raster/
|
||||
cd /var/www/wcs/testdata/qgis-1.9.0/raster/
|
||||
cp -r /home/timlinux/QGIS/tests/testdata/raster/* .
|
||||
```
|
||||
|
||||
Edit wcs.map and set the shapepath to this:
|
||||
|
||||
```
|
||||
SHAPEPATH "/var/www/wcs/testdata/qgis-1.9.0/raster"
|
||||
```
|
||||
|
||||
Then create /var/www/wcs/7-wcs.qgis.org.conf setting the contents to this:
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName wcs.qgis.org
|
||||
ServerAdmin tim@linfiniti.com
|
||||
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\"" combined
|
||||
CustomLog /var/log/apache2/wcs_qgis.org/access.log combined
|
||||
ErrorLog /var/log/apache2/wcs_qgis.org/error.log
|
||||
|
||||
DocumentRoot /var/www/wcs/html
|
||||
|
||||
ScriptAlias /cgi-bin/ /var/www/wcs/cgi-bin/
|
||||
<Directory "/var/www/wcs/cgi-bin">
|
||||
AllowOverride None
|
||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
RewriteEngine on
|
||||
RewriteRule /1.9.0/wcs /cgi-bin/wcstest-1.9.0 [PT]
|
||||
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
== Create a home page ==
|
||||
|
||||
```
|
||||
mkdir html
|
||||
vim html/index.html
|
||||
```
|
||||
|
||||
Set the contents to:
|
||||
|
||||
```
|
||||
This is the test platform for QGIS' wcs client. You can use these services
|
||||
from QGIS directly (to try out WCS for example) by pointing your QGIS to:
|
||||
http://wcs.qgis.org/1.9.0/wcs
|
||||
```
|
||||
|
||||
|
||||
== Now deploy it ==
|
||||
|
||||
```
|
||||
sudo mkdir /var/log/apache2/wcs_qgis.org
|
||||
sudo chown www-data /var/log/apache2/wcs_qgis.org
|
||||
cd /etc/apache2/sites-available/
|
||||
sudo ln -s /var/www/wcs/7-wcs.qgis.org.conf .
|
||||
cd /var/www/wcs/
|
||||
sudo a2ensite 7-wcs.qgis.org.conf
|
||||
sudo /etc/init.d/apache2 reload
|
||||
```
|
||||
|
||||
== Debugging ==
|
||||
|
||||
```
|
||||
sudo tail -f /var/log/apache2/wcs_qgis.org/error.log
|
||||
```
|
@ -183,9 +183,6 @@ run( "cp debian/changelog /tmp", "backup changelog failed" );
|
||||
unless( defined $dopoint ) {
|
||||
run( "perl -i -pe 's/qgis-dev-deps/qgis-ltr-deps/;' doc/msvc.t2t", "could not update osgeo4w deps package" ) if $doltr;
|
||||
run( "perl -i -pe 's/qgis-dev-deps/qgis-rel-deps/;' doc/msvc.t2t", "could not update osgeo4w deps package" ) unless $doltr;
|
||||
run( "txt2tags -odoc/INSTALL.html -t html doc/INSTALL.t2t", "could not update INSTALL.html" );
|
||||
run( "txt2tags -oINSTALL -t txt doc/INSTALL.t2t", "could not update INSTALL" );
|
||||
|
||||
run( "cp -v images/splash/splash-$newmajor.$newminor.png images/splash/splash.png", "splash png switch failed" );
|
||||
run( "convert -resize 164x314 ms-windows/Installer-Files/WelcomeFinishPage-$newmajor.$newminor.png BMP3:ms-windows/Installer-Files/WelcomeFinishPage.bmp", "installer bitmap switch failed" );
|
||||
run( "git commit -n -a -m 'Release of $release ($newreleasename)'", "release commit failed" );
|
||||
|
@ -33,14 +33,15 @@ close I;
|
||||
|
||||
die "no dists" unless @dists;
|
||||
|
||||
open I, "doc/linux.t2t";
|
||||
open O, ">doc/linux.t2t.new";
|
||||
open I, "doc/INSTALL.md";
|
||||
open O, ">doc/INSTALL.md.new";
|
||||
while(<I>) {
|
||||
last if /^\|\| Distribution \| install command for packages \|\n$/;
|
||||
last if /^\|Distribution\|Install command for packages\|\n$/;
|
||||
print O;
|
||||
}
|
||||
|
||||
print O "|| Distribution | install command for packages |\n";
|
||||
print O "|Distribution|Install command for packages|\n";
|
||||
print O "|------------|----------------------------|\n";
|
||||
|
||||
for my $dist (@dists) {
|
||||
system("git checkout debian/control" )==0 or die "git checkout failed: $!";
|
||||
@ -127,7 +128,5 @@ while(<I>) {
|
||||
close O;
|
||||
close I;
|
||||
|
||||
rename "doc/linux.t2t", "doc/linux.t2t.orig";
|
||||
rename "doc/linux.t2t.new", "doc/linux.t2t";
|
||||
my $time = time;
|
||||
utime $time, $time, "doc/INSTALL.t2t";
|
||||
rename "doc/INSTALL.md", "doc/INSTALL.md.orig";
|
||||
rename "doc/INSTALL.md.new", "doc/INSTALL.md";
|
||||
|
@ -22,16 +22,16 @@ my ($version,$releasename) = @ARGV;
|
||||
|
||||
my ($news,$tempfile) = tempfile();
|
||||
|
||||
open my $in, "doc/NEWS.t2t";
|
||||
open my $in, "NEWS.md";
|
||||
while(<$in>) {
|
||||
print $news $_;
|
||||
last if /^Last Change/;
|
||||
last if /^Change history for the QGIS Project/;
|
||||
}
|
||||
|
||||
my $content = `curl -A Mozilla -s https://changelog.qgis.org/en/qgis/version/$version/gnu/`;
|
||||
die "Couldn't get it!" unless defined $content;
|
||||
|
||||
print $news "\n= What's new in Version $version '$releasename'? =\n\n";
|
||||
print $news "\n# What's new in Version $version '$releasename'?\n\n";
|
||||
print $news "This release has following new features:\n\n";
|
||||
|
||||
die "Invalid changelog" unless $content =~ /^Changelog for QGIS/;
|
||||
@ -59,10 +59,9 @@ while(<$in>) {
|
||||
close $news;
|
||||
close $in;
|
||||
|
||||
copy($tempfile, "doc/NEWS.t2t");
|
||||
copy($tempfile, "doc/NEWS.md");
|
||||
|
||||
system "txt2tags -odoc/NEWS.html -t html doc/NEWS.t2t";
|
||||
system "txt2tags -oNEWS -t txt doc/NEWS.t2t";
|
||||
system "pandoc --table-of-contents --toc-depth=1 -s -o doc/NEWS.html NEWS.md --metadata title=\"QGIS News\"";
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user