Compare commits

...

No commits in common. "master" and "final-0_1" have entirely different histories.

33788 changed files with 82596 additions and 12888950 deletions

View File

@ -1,55 +0,0 @@
SET (CTEST_SOURCE_DIRECTORY $ENV{CTEST_SOURCE_DIR})
SET (CTEST_BINARY_DIRECTORY $ENV{CTEST_BUILD_DIR})
#SET (CTEST_SOURCE_DIRECTORY /usr/src/QGIS)
#SET (CTEST_BINARY_DIRECTORY /usr/src/qgis-build)
SET (CTEST_CMAKE_COMMAND "cmake")
SET (CTEST_BUILD_COMMAND $ENV{CTEST_BUILD_COMMAND})
SET (CTEST_SITE "github.com")
SET (CTEST_BUILD_NAME "$ENV{CTEST_BUILD_NAME}")
SET (CTEST_BUILD_CONFIGURATION "Release")
SET (CTEST_TEST_TIMEOUT 90) # 90 seconds
IF(DEFINED ENV{CTEST_PARALLEL_LEVEL})
SET(PARALLEL_LEVEL $ENV{CTEST_PARALLEL_LEVEL})
ELSE(DEFINED ENV{CTEST_PARALLEL_LEVEL})
SET(PARALLEL_LEVEL 2)
ENDIF(DEFINED ENV{CTEST_PARALLEL_LEVEL})
SET (INITIAL_CACHE "
BUILDNAME:STRING=${CTEST_BUILD_NAME}
SITE:STRING=${CTEST_SITE}
CTEST_USE_LAUNCHERS:BOOL=ON
")
SET (CTEST_NOTES_FILES
${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}
${CTEST_BINARY_DIRECTORY}/CMakeCache.txt
)
IF(NOT WIN32)
STRING(ASCII 27 Esc)
SET(ColorReset "${Esc}[m")
SET(ColorBold "${Esc}[1m")
SET(Red "${Esc}[31m")
SET(Green "${Esc}[32m")
SET(Yellow "${Esc}[33m")
SET(Blue "${Esc}[34m")
SET(Magenta "${Esc}[35m")
SET(Cyan "${Esc}[36m")
SET(White "${Esc}[37m")
SET(BoldRed "${Esc}[1;31m")
SET(BoldGreen "${Esc}[1;32m")
SET(BoldYellow "${Esc}[1;33m")
SET(BoldBlue "${Esc}[1;34m")
SET(BoldMagenta "${Esc}[1;35m")
SET(BoldCyan "${Esc}[1;36m")
SET(BoldWhite "${Esc}[1;37m")
ENDIF(NOT WIN32)
# Create link to test results
# CDash on OTB requires the date to be set for the search to work (used to be UTC-6, seems to be UTC now)
SET(ENV{TZ} "UTC")
EXECUTE_PROCESS(COMMAND date +%Y-%m-%d OUTPUT_VARIABLE CDASH_DATE)
SET(RESULT_LINK "http://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{CTEST_BUILD_NAME}&date=${CDASH_DATE}")
EXECUTE_PROCESS(COMMAND curl --data-urlencode "url=${RESULT_LINK}" -s http://tinyurl.com/api-create.php
OUTPUT_VARIABLE SHORTURL)

View File

@ -1,27 +0,0 @@
include(${CMAKE_CURRENT_LIST_DIR}/config.ctest)
# Requires a track on the CDash server
ctest_start(Experimental)
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES NUMBER_WARNINGS NUMWARN NUMBER_ERRORS NUMERR)
SET(IGNORE_BUILD_FAILURES $ENV{IGNORE_BUILD_FAILURES})
IF(NOT IGNORE_BUILD_FAILURES)
IF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}")
MESSAGE("")
MESSAGE( FATAL_ERROR " ${Red}Build failed. Not running tests.${ColorReset}" )
MESSAGE("")
ENDIF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ENDIF(NOT IGNORE_BUILD_FAILURES)
IF(${BUILDRES} EQUAL 0 OR ${NUMERR} EQUAL 0)
MESSAGE("")
MESSAGE(" ${BoldGreen}Success${ColorReset}")
MESSAGE(" ${Green}Build passed successfully.${ColorReset}")
MESSAGE("")
MESSAGE("")
ENDIF(${BUILDRES} EQUAL 0 OR ${NUMERR} EQUAL 0)

View File

@ -1,26 +0,0 @@
include(${CMAKE_CURRENT_LIST_DIR}/config.ctest)
# Requires a track on the CDash server
ctest_start(Experimental)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL ${PARALLEL_LEVEL} RETURN_VALUE TESTRES)
IF(NOT ${TESTRES} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}" )
MESSAGE("")
SET(LEVEL "")
IF(NOT ${TESTRES} EQUAL 0)
SET(TESTRES_MESSAGE " Tests failed.")
SET(LEVEL FATAL_ERROR)
ENDIF(NOT ${TESTRES} EQUAL 0)
MESSAGE( ${LEVEL} " ${Red}${TESTRES_MESSAGE} ${ColorReset}" )
ENDIF(NOT ${TESTRES} EQUAL 0)
IF(NOT ${TESTRES} EQUAL 0)
MESSAGE("")
MESSAGE(" ${BoldGreen}Success${ColorReset}")
MESSAGE(" ${Green}All tests passed successfully.${ColorReset}")
MESSAGE("")
MESSAGE("")
ENDIF(NOT ${TESTRES} EQUAL 0)

View File

@ -1,139 +0,0 @@
#!/usr/bin/env python3
"""
***************************************************************************
ctest2ci.py
---------------------
Date : March 2017
Copyright : (C) 2017 by Matthias Kuhn
Email : matthias@opengis.ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = "Matthias Kuhn"
__date__ = "March 2017"
__copyright__ = "(C) 2017, Matthias Kuhn"
# This script parses output from ctest and injects
#
# - Colors for failing unit tests and test cases
# - Group control sequences to hide uninteresting output by default
import re
import string
import subprocess
import sys
from termcolor import colored
fold_stack = list()
printable = set(string.printable)
def start_fold(tag):
sys.stdout.write(f"::group::{tag}\n")
fold_stack.append(tag)
def end_fold():
try:
tag = fold_stack.pop()
sys.stdout.write("::endgroup::\n")
except IndexError:
updated_line = colored("======================", "magenta")
updated_line += colored(
"ctest2ci error when processing the following line:", "magenta"
)
updated_line += colored("----------------------", "magenta")
updated_line += colored(updated_line, "magenta")
updated_line += colored("----------------------", "magenta")
updated_line += colored(
"Tried to end fold, but fold was never started.", "magenta"
)
updated_line += colored("======================", "magenta")
test_count = 0
def start_test_fold():
global test_count
sys.stdout.write("Running tests\n")
start_fold(f"test.{test_count}")
test_count += 1
in_failing_test = False
in_failure = False
p = subprocess.Popen(sys.argv[1:], stdout=subprocess.PIPE)
for line in p.stdout:
updated_line = line.decode("utf-8")
# remove non printable characters https://stackoverflow.com/a/8689826/1548052
filter(lambda x: x in printable, updated_line)
if re.match("Run dashboard with model Experimental", updated_line):
start_fold("Run tests")
updated_line = "{title}\n{line}".format(
title=colored("Running tests...", "yellow", attrs=["bold"]),
line=updated_line,
)
elif re.match("Test project /home/runner/QGIS/QGIS/build", updated_line):
end_fold() # tag=Run tests
start_test_fold()
if re.search(r"\*\*\*Failed", updated_line) or re.search(
r"\*\*\*Timeout", updated_line
):
end_fold()
updated_line = colored(updated_line, "red")
in_failing_test = True
if in_failing_test:
if re.match(" Start", updated_line):
start_test_fold()
in_failing_test = False
elif in_failure:
if re.match("PASS", updated_line) or re.match("Ran", updated_line):
in_failure = False
else:
updated_line = colored(updated_line, "yellow")
elif re.search(r"\*\*\* Segmentation fault", updated_line):
start_fold("segfault")
updated_line = colored(updated_line, "magenta")
elif re.match(" Test failed: Segmentation fault", updated_line):
end_fold()
else:
if re.match(r"(FAIL|ERROR)[:\!].*", updated_line):
updated_line = colored(updated_line, "yellow")
in_failure = True
if not in_failing_test and re.search(
"[0-9]+% tests passed, [0-9]+ tests failed out of", updated_line
):
tests_failing = re.match(r".* ([0-9]+) tests failed", updated_line).group(1)
# updated_line += '\n::set-output name=TESTS_FAILING::{}'.format(tests_failing)
end_fold()
if re.search("100% tests passed", updated_line):
updated_line = colored(updated_line, "green")
if re.match("Submit files", updated_line):
start_fold("submit")
elif re.search("Test results submitted to", updated_line):
cdash_url = re.match(r".*(http.*)$", updated_line).group(1)
# updated_line += '\n::set-output name=CDASH_URL::{}'.format(cdash_url)
end_fold()
sys.stdout.write(updated_line)
exit(p.wait())

View File

@ -1,47 +0,0 @@
FROM ubuntu:latest
RUN export DEBIAN_FRONTEND=noninteractive
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
ccache \
cmake \
ninja-build \
clang \
flex \
bison \
libgeos-dev \
libgdal-dev \
libzip-dev \
libprotobuf-dev \
qtbase5-dev \
libdraco-dev \
libqt5svg5-dev \
libqt5serialport5-dev \
qttools5-dev \
protobuf-compiler \
qt5-qmake \
qtbase5-dev-tools \
qtchooser \
qtpositioning5-dev \
libqt5webkit5-dev \
libqca-qt5-2-dev \
libgsl-dev \
libspatialindex-dev \
qt5keychain-dev \
libexiv2-dev \
libfcgi-dev \
libqt5scintilla2-dev \
libqwt-qt5-dev \
pyqt5-dev \
python3-pyqt5 \
python3-pyqt5.qsci \
python3-all-dev \
python3-dev \
python3-sip-dev \
pyqt5-dev-tools \
spawn-fcgi
ADD qgis_mapserv.sh /root/qgis_mapserv.sh
CMD ["sh", "/root/qgis_mapserv.sh"]

View File

@ -1,53 +0,0 @@
#!/bin/bash
set -e
mkdir -p /usr/src/qgis/build
cd /usr/src/qgis/build || exit 1
export CCACHE_TEMPDIR=/tmp
# Github workflow cache max size is 2.0, but ccache data get compressed (roughly 1/5?)
ccache -M 2.0G
# Temporarily uncomment to debug ccache issues
# export CCACHE_LOGFILE=/tmp/cache.debug
ccache -z
# To make ccache work properly with precompiled headers
ccache --set-config sloppiness=pch_defines,time_macros,include_file_mtime,include_file_ctime
cmake -GNinja \
-DUSE_CCACHE=ON \
-DWITH_QUICK=OFF \
-DWITH_3D=OFF \
-DWITH_STAGED_PLUGINS=OFF \
-DWITH_GRASS=OFF \
-DENABLE_MODELTEST=OFF \
-DENABLE_PGTEST=OFF \
-DENABLE_MSSQLTEST=OFF \
-DENABLE_TESTS=OFF \
-DWITH_QSPATIALITE=OFF \
-DWITH_QWTPOLAR=OFF \
-DWITH_APIDOC=OFF \
-DWITH_ASTYLE=OFF \
-DWITH_ANALYSIS=ON \
-DWITH_GSL=OFF \
-DWITH_DESKTOP=OFF \
-DWITH_GUI=OFF \
-DWITH_BINDINGS=ON \
-DWITH_SERVER=ON \
-DWITH_SERVER_PLUGINS=ON \
-DWITH_ORACLE=OFF \
-DWITH_PDAL=OFF \
-DWITH_QTPRINTER=OFF \
-DDISABLE_DEPRECATED=ON \
-DCXX_EXTRA_FLAGS="${CLANG_WARNINGS}" \
-DCMAKE_C_COMPILER=/bin/clang \
-DCMAKE_CXX_COMPILER=/bin/clang++ \
-DADD_CLAZY_CHECKS=OFF \
..
ninja
echo "ccache statistics"
ccache -s

View File

@ -1,29 +0,0 @@
version: '3'
services:
nginx:
image: nginx:1.13
container_name: qgis_server_nginx
ports:
- 8089:80
networks:
- qgis
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./../../data/metadata:/var/www/html/wms13/metadata
depends_on:
- qgis-server
qgis-server:
image: ${DOCKER_IMAGE}
container_name: qgis_server_deps
volumes:
- ./../../:/usr/src/qgis/
- ./../../data:/data
networks:
- qgis
privileged: true
networks:
qgis:
driver: bridge

View File

@ -1,49 +0,0 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location /qgisserver_wms130 {
fastcgi_pass qgis-server:5555;
add_header Access-Control-Allow-Origin *;
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,X-Requested-With';
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param SERVER_PORT 80;
fastcgi_param SERVER_NAME $server_addr;
fastcgi_param QGIS_PROJECT_FILE /data/teamengine_wms_130.qgs;
}
location /qgisserver_ogcapif {
fastcgi_pass qgis-server:5555;
add_header Access-Control-Allow-Origin *;
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,X-Requested-With';
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param SERVER_PORT 80;
fastcgi_param SERVER_NAME $server_addr;
fastcgi_param QGIS_PROJECT_FILE /data/QGIS-Training-Data/exercise_data/qgis-server-tutorial-data/world.qgs;
}
}

View File

@ -1,7 +0,0 @@
#!/bin/bash
export QGIS_SERVER_LOG_STDERR=true
export QGIS_SERVER_LOG_LEVEL=0
export QGIS_PREFIX_PATH=/usr/src/qgis/build/output
exec /usr/bin/spawn-fcgi -n -p 5555 /usr/src/qgis/build/output/bin/qgis_mapserv.fcgi

View File

@ -1,40 +0,0 @@
#!/usr/bin/env python3
import argparse
import json
import sys
from urllib.error import URLError
from urllib.request import ( # using urllib since it is a standard module (vs. requests)
urlopen,
)
parser = argparse.ArgumentParser(
description="Determines if a pull request has a defined label"
)
parser.add_argument("pull_request", type=str, help="pull request id")
parser.add_argument("label", type=int, help="label ID")
args = parser.parse_args()
if args.pull_request == "false":
print("false")
sys.exit(1)
url = f"https://api.github.com/repos/qgis/QGIS/pulls/{args.pull_request}"
try:
data = urlopen(url).read().decode("utf-8")
except URLError as err:
print(f"URLError: {err.reason}")
sys.exit(1)
obj = json.loads(data)
for label in obj["labels"]:
if label["id"] == args.label:
print("true")
sys.exit(0)
print("label not found")
sys.exit(1)

View File

@ -1,152 +0,0 @@
#!/bin/sh
set -e
DOCKER=$(command -v podman docker | head -1)
# check for docker availability
test -n "${DOCKER}" || {
echo "Please install podman or docker" >&2
exit 1
}
DOCKER_COMPOSE=$(command -v podman-compose docker-compose | head -1)
test -n "${DOCKER_COMPOSE}" || {
DOCKER_COMPOSE="${DOCKER} compose"
# check if supported
${DOCKER_COMPOSE} > /dev/null || {
echo "Cannot find podman-compose or docker-compose, and '${DOCKER_COMPOSE}' fails" >&2
echo "HINT: try installing podman-compose" >&2
exit 1
}
}
IMAGE_BUILD_DEPS=docker.io/qgis/qgis3-build-deps:latest
UPDATE_IMAGES=yes
INTERACTIVE=no
FORCE_REBUILD=no
export QT_VERSION=5 # TODO: ask user for this one
export DISTRO_VERSION=21.10 # TODO: ask user for this one
# can be: ALL, ALL_BUT_PROVIDERS, POSTGRES, HANA, ORACLE, SQLSERVER
TESTS_TO_RUN=ALL_BUT_PROVIDERS # TODO: ask user for this one
usage() {
echo "Usage: $(basename $0) [--skip-update-images] [--force-rebuild] [--interactive]"
}
while test -n "$1"; do
if test "$1" = '--help' || test "$1" = '-h'; then
usage
exit 0
elif test "$1" = '--skip-update-images'; then
UPDATE_IMAGES=no
shift
elif test "$1" = '--force-rebuild'; then
FORCE_REBUILD=yes
shift
elif test "$1" = '--interactive'; then
INTERACTIVE=yes
shift
else
echo "Unrecognized option $1" >&2
usage >&2
exit 1
fi
done
cd $(dirname $0)/.. || exit 1
#echo "--=[ PWD is $PWD"
export QGIS_BUILDDIR=build-ci
QGIS_WORKSPACE="$(pwd -P)"
export QGIS_WORKSPACE
echo "--=[ QGIS_WORKSPACE is $QGIS_WORKSPACE"
QGIS_WORKSPACE_MOUNTPOINT=${QGIS_WORKSPACE} # was /root/QGIS
export QGIS_WORKSPACE_MOUNTPOINT
echo "--=[ QGIS_WORKSPACE_MOUNTPOINT is $QGIS_WORKSPACE_MOUNTPOINT"
QGIS_GIT_DIR="$(git rev-parse --git-dir)"
if test -f ${QGIS_GIT_DIR}/commondir; then
QGIS_COMMON_GIT_DIR="$(cat ${QGIS_GIT_DIR}/commondir)"
else
QGIS_COMMON_GIT_DIR=${QGIS_WORKSPACE}
fi
QGIS_COMMON_GIT_DIR="$(cd ${QGIS_COMMON_GIT_DIR} && pwd -P)"
export QGIS_COMMON_GIT_DIR
echo "--=[ QGIS_COMMON_GIT_DIR is $QGIS_COMMON_GIT_DIR"
#
# Make qgis3-build-deps-binary-image available, building it if needed
#
if test "$(${DOCKER} images -q ${IMAGE_BUILD_DEPS})" = ""; then
echo "--=[ Fetching qgis build dependencies image"
${DOCKER} pull ${IMAGE_BUILD_DEPS}
elif test "${UPDATE_IMAGES}" = "yes"; then
echo "--=[ Updating qgis build dependencies image"
${DOCKER} pull ${IMAGE_BUILD_DEPS}
fi
if test -d ${QGIS_BUILDDIR} -a "${FORCE_REBUILD}" = "no"; then
echo "--=[ Testing against pre-existing build directory ${QGIS_BUILDDIR}. To rebuild use --force-rebuild or move it away"
else
echo "--=[ Building qgis inside the dependencies container"
VOLUMES="-v ${QGIS_WORKSPACE}:${QGIS_WORKSPACE}:z"
if test "${QGIS_WORKSPACE}" != "${QGIS_COMMON_GIT_DIR}"; then
VOLUMES="${VOLUMES} -v ${QGIS_COMMON_GIT_DIR}:${QGIS_COMMON_GIT_DIR}:z"
fi
${DOCKER} run -t --name qgis_container \
--rm \
${VOLUMES} \
--env-file .docker/docker-variables.env \
--env PUSH_TO_CDASH=false \
--env WITH_QT5=true \
--env BUILD_WITH_QT6=false \
--env WITH_QUICK=false \
--env WITH_3D=false \
--env PATCH_QT_3D=false \
--env CTEST_SOURCE_DIR=${QGIS_WORKSPACE} \
--env CTEST_BUILD_DIR=${QGIS_WORKSPACE}/${QGIS_BUILDDIR} \
${IMAGE_BUILD_DEPS} \
${QGIS_WORKSPACE_MOUNTPOINT}/.docker/docker-qgis-build.sh ||
exit 1
test -d ${QGIS_BUILDDIR} || {
echo "Building failed" >&2
exit 1
}
fi
if test "$(${DOCKER} images -q qgis3-build-deps-binary-image)" = ""; then
echo "--=[ Tagging qgis build dependencies image as required by .docker/docker-compose-testing.yml"
${DOCKER} tag ${IMAGE_BUILD_DEPS} qgis3-build-deps-binary-image
fi
if test "${INTERACTIVE}" = "no"; then
echo "--=[ Running tests via docker compose"
COMMAND=${QGIS_WORKSPACE_MOUNTPOINT}/.docker/docker-qgis-test.sh
COMMAND_ARGS="${TESTS_TO_RUN}"
else
echo "--=[ Starting interactive shell into test environment"
COMMAND=bash
fi
# Create an empty minio folder with appropriate permissions so www user can write inside it
mkdir -p /tmp/minio_tests/test-bucket && chmod -R 777 /tmp/minio_tests
# Create an empty webdav folder with appropriate permissions so www user can write inside it
mkdir -p /tmp/webdav_tests && chmod 777 /tmp/webdav_tests
${DOCKER_COMPOSE} \
-f .docker/docker-compose-testing.yml \
run \
-w "${QGIS_WORKSPACE_MOUNTPOINT}" \
-e PUSH_TO_CDASH=false \
-e CTEST_SOURCE_DIR="${QGIS_WORKSPACE}" \
-e CTEST_BUILD_DIR="${QGIS_WORKSPACE}/${QGIS_BUILDDIR}" \
qgis-deps \
${COMMAND} ${COMMAND_ARGS}

View File

@ -1,19 +0,0 @@
# block list
test_gui_queryresultwidget
# code layout tests are run on separate build
qgis_spelling
qgis_sipify
qgis_sip_include
qgis_sip_uptodate
# Need a local postgres installation
PyQgsAuthManagerOgrPostgresTest
PyQgsDbManagerPostgis
# Needs an OpenCL device, the library is not enough
test_core_openclutils
# Relies on a broken/unreliable 3rd party service
test_core_layerdefinition

View File

@ -1,43 +0,0 @@
# Qt6 blocklist
test_core_compositionconverter
test_core_labelingengine
test_core_layoutpicture
test_core_vectortilelayer
test_gui_processinggui
test_app_advanceddigitizing
test_app_vertextool
# Crashes -- also disabled on qt5 builds!
test_gui_queryresultwidget
# code layout tests are run on separate build
qgis_spelling
qgis_sipify
qgis_sip_include
qgis_sip_uptodate
# Need a local postgres installation
PyQgsAuthManagerOgrPostgresTest
PyQgsDbManagerPostgis
# Needs an OpenCL device, the library is not enough
test_core_openclutils
# Relies on a broken/unreliable 3rd party service
test_core_layerdefinition
# MSSQL requires the MSSQL docker
PyQgsProviderConnectionMssql
PyQgsStyleStorageMssql
# To be fixed
PyQgsAnnotation
PyQgsAuthenticationSystem
PyQgsEditWidgets
PyQgsElevationProfileCanvas
PyQgsLayoutHtml
PyQgsPalLabelingPlacement
PyQgsRasterLayerRenderer
PyQgsSettings
PyQgsSettingsEntry
ProcessingQgisAlgorithmsTestPt4

View File

@ -1,6 +0,0 @@
# flaky
test_gui_filedownloader
test_provider_wcsprovider
PyQgsWFSProviderGUI
# See https://github.com/qgis/QGIS/issues/48927
test_core_tiledownloadmanager

View File

@ -1,219 +0,0 @@
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: No
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Never
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: All
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IncludeCategories:
- Regex: "^<Q.*"
Priority: 300
- Regex: "^<qgs.*"
Priority: 200
- Regex: "<.*"
Priority: 400
- Regex: '^".*'
Priority: 100
- Regex: ".*"
Priority: 1
IncludeIsMainRegex: false
#IncludeBlocks: Regroup
IncludeIsMainSourceRegex: ""
IndentAccessModifiers: true
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: true
# should be:
# InsertBraces: true
# InsertNewlineAtEOF: true
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
# Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between.
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 150
PenaltyBreakBeforeFirstCallParameter: 5000
PenaltyBreakComment: 500
PenaltyBreakFirstLessLess: 400
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 600
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 10
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 5000
PointerAlignment: Right
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
# should be:
# ReflowComments: true
ReflowComments: false
RemoveBracesLLVM: false
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: false
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Leave
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: true
SpacesInLineCommentPrefix:
# should be:
# Minimum: 1
Minimum: 0
Maximum: -1
SpacesInParentheses: true
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
Macros:
- SIP_ENUM_BASETYPE(x)=x
- SIP_MONKEYPATCH_SCOPEENUM_UNNEST(x,y)=x
AttributeMacros:
- SIP_SKIP
---
Language: ObjC
ObjCBlockIndentWidth: 4

View File

@ -1,2 +0,0 @@
Checks: 'bugprone-*,-bugprone-easily-swappable-parameters,-bugprone-virtual-near-miss,-bugprone-suspicious-include'
HeaderFilterRegex: ''

View File

@ -1,258 +0,0 @@
QGIS Docker images
==================
The QGIS project provides a few official docker images that can be
used for testing purposes.
These dockers are currently used to run continuous integration
tests for the QGIS project itself and to run continuous integration
tests for several third party Python plugins.
The images are automatically built every day and pushed on docker hub
to the QGIS account: https://hub.docker.com/r/qgis/
# Available images
## Dependencies image
`qgis/qgis3-build-deps`
This is a simple base image that contains all the dependencies required to build
QGIS, it is used by the other images.
Multiple versions of this image may be available: the suffix in the image name indicates the Ubuntu version they are based on.
## Main QGIS image
`qgis/qgis`
This is the main image containing a build of QGIS.
The docker tags for this image are assigned for each point release (prefixed with `final-`), for the active development branches (prefixed with `release-`) while the `latest` tag refers to a build of the current master branch.
### Features
The docker file builds QGIS from the current directory and
sets up a testing environment suitable for running tests
inside QGIS.
You can use this docker image to test QGIS and/or to run unit tests inside
QGIS, `xvfb` (A fake X server) is available and running as a service inside
the container to allow for fully automated headless testing in CI pipelines
such as Travis or Circle-CI.
### Building
You can build the image from the main directory of the QGIS source tree with:
```
$ docker build -t qgis/qgis:latest \
--build-arg DOCKER_TAG=latest \
-f .docker/qgis.dockerfile \
.
```
The `DOCKER_TAG` argument, can be used to specify the tag of the dependencies image.
### Running QGIS
You can also use this image to run QGIS on your desktop.
To run a QGIS container, assuming that you want to use your current
display to use QGIS and the image is tagged `qgis/qgis:latest` you can use a script like the one here below:
```bash
# Allow connections from any host
$ xhost +
$ docker run --rm -it --name qgis \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
qgis/qgis:latest qgis
```
This code snippet will launch QGIS inside a container and display the
application on your screen.
### Running unit tests inside QGIS
Suppose that you have local directory containing the tests you want to execute into QGIS:
```
/my_tests/travis_tests/
├── __init__.py
└── test_TravisTest.py
```
To run the tests inside the container, you must mount the directory that
contains the tests (e.g. your local directory `/my_tests`) into a volume
that is accessible by the container, see `-v /my_tests/:/tests_directory`
in the example below:
```bash
$ docker run -d --name qgis -v /tmp/.X11-unix:/tmp/.X11-unix \
-v /my_tests/:/tests_directory \
-e DISPLAY=:99 \
qgis/qgis:latest
```
Here is an extract of `test_TravisTest.py`:
```python
# -*- coding: utf-8 -*-
import sys
from qgis.testing import unittest
class TestTest(unittest.TestCase):
def test_passes(self):
self.assertTrue(True)
def run_all():
"""Default function that is called by the runner if nothing else is specified"""
suite = unittest.TestSuite()
suite.addTests(unittest.makeSuite(TestTest, 'test'))
unittest.TextTestRunner(verbosity=3, stream=sys.stdout).run(suite)
```
When done, you can invoke the test runnner by specifying the test
that you want to run, for instance:
```
$ docker exec -it qgis sh -c "cd /tests_directory && qgis_testrunner.sh travis_tests.test_TravisTest.run_fail"
```
The test can be specified by using a dotted notation, similar to Python
import notation, by default the function named `run_all` will be executed
but you can pass another function name as the last item in the dotted syntax:
```bash
# Call the default function "run_all" inside test_TravisTest module
qgis_testrunner.sh travis_tests.test_TravisTest
# Call the function "run_fail" inside test_TravisTest module
qgis_testrunner.sh travis_tests.test_TravisTest.run_fail
```
Please note that in order to make the test script accessible to Python
the calling command must ensure that the tests are in Python path.
Common patterns are:
- change directory to the one containing the tests (like in the examples above)
- add to `PYTHONPATH` the directory containing the tests
#### Running tests for a Python plugin
All the above considerations applies to this case too, however in order
to simulate the installation of the plugin inside QGIS, you'll need to
make an additional step: call `qgis_setup.sh <YourPluginName>` in the
docker container before actually running the tests (see the paragraph
about Running on Travis for a complete example).
The `qgis_setup.sh` script prepares QGIS to run in headless mode and
simulate the plugin installation process:
- creates the QGIS profile folders
- "installs" the plugin by making a symbolic link from the profiles folder to the plugin folder
- installs `startup.py` monkey patches to prevent blocking dialogs
- enables the plugin
Please note that depending on your plugin repository internal directory structure
you may need to adjust (remove and create) the symbolic link created by `qgis_setup.sh`,
this is required in particular if the real plugin code in your repository is contained
in the main directory and not in a subdirectory with the same name of the plugin
internal name (the name in `metadata.txt`).
#### Options for the test runner
The env var `QGIS_EXTRA_OPTIONS` defaults to an empty string and can
contains extra parameters that are passed to QGIS by the test runner.
#### Running on Travis
Here is a simple example for running unit tests of a small QGIS plugin (named *QuickWKT*), assuming that the tests are in `tests/test_Plugin.py` under
the main directory of the QuickWKT plugin:
```yml
services:
- docker
install:
- docker run -d --name qgis-testing-environment -v ${TRAVIS_BUILD_DIR}:/tests_directory -e DISPLAY=:99 qgis/qgis:latest
- sleep 10 # This is required to allow xvfb to start
# Setup qgis and enables the plugin
- docker exec -it qgis-testing-environment sh -c "qgis_setup.sh QuickWKT"
# Additional steps (for example make or paver setup) here
# Fix the symlink created by qgis_setup.sh
- docker exec -it qgis-testing-environment sh -c "rm -f /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT"
- docker exec -it qgis-testing-environment sh -c "ln -s /tests_directory/ /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT"
script:
- docker exec -it qgis-testing-environment sh -c "cd /tests_directory && qgis_testrunner.sh tests.test_Plugin"
```
Please note that `cd /tests_directory && ` before the call to `qgis_testrunner.sh` could be avoided here, because QGIS automatically
adds the plugin main directory to Python path.
#### Running on Circle-CI
Here is an example for running unit tests of a small QGIS plugin (named *QuickWKT*), assuming
that the tests are in `tests/test_Plugin.py` under the main directory of the QuickWKT plugin:
```yml
version: 2
jobs:
build:
docker:
- image: qgis/qgis:latest
environment:
DISPLAY: ":99"
working_directory: /tests_directory
steps:
- checkout
- run:
name: Setup plugin
command: |
qgis_setup.sh QuickWKT
- run:
name: Fix installation path created by qgis_setup.s
command: |
rm -f /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT
ln -s /tests_directory/ /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgisce
- run:
name: run tests
command: |
sh -c "/usr/bin/Xvfb :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset -nolisten tcp &"
qgis_testrunner.sh tests.test_Plugin
```
#### Implementation notes
The main goal of the test runner in this image is to execute unit tests
inside a real instance of QGIS (not a mocked one).
The QGIS tests should be runnable from a Travis/Circle-CI CI job.
The implementation is:
- run the docker, mounting as volumes the unit tests folder in `/tests_directory`
(or the QGIS plugin folder if the unit tests belong to a plugin and the
plugin is needed to run the tests)
- execute `qgis_setup.sh MyPluginName` script in docker that sets up QGIS to
avoid blocking modal dialogs and installs the plugin into QGIS if needed
- create config and python plugin folders for QGIS
- enable the plugin in the QGIS configuration file
- install the `startup.py` script to disable python exception modal dialogs
- execute the tests by running `qgis_testrunner.sh MyPluginName.tests.tests_MyTestModule.run_my_tests_function`
- the output of the tests is captured by the `test_runner.sh` script and
searched for `FAILED` (that is in the standard unit tests output) and other
string that indicate a failure or success condition, if a failure condition
is identified, the script exits with `1` otherwise it exits with `0`.
`qgis_testrunner.sh` accepts a dotted notation path to the test module that
can end with the function that has to be called inside the module to run the
tests. The last part (`.run_my_tests_function`) can be omitted and defaults to
`run_all`.

View File

@ -1,25 +0,0 @@
version: '3'
services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: QGIStestSQLServer1234
ports:
- 1433:1433
qgis-deps:
tty: true
image: qgis3-build-deps-binary-image
volumes:
- ${QGIS_WORKSPACE}:/root/QGIS
links:
- mssql
env_file:
- docker-variables.env
environment:
- LANG=C.UTF-8
- LC_ALL=en_US.UTF-8
cap_add:
- NET_ADMIN

View File

@ -1,24 +0,0 @@
services:
oracle:
image: oslandia/oracle-slim-for-qgis:18.4.0-xe
environment:
- ORACLE_SID=XE
- ORACLE_PWD=adminpass
- ORACLE_PDB=ORCLPDBTEST
- ORACLE_CHARACTERSET=AL32UTF8
ports:
- 1521:1521
qgis-deps:
tty: true
image: qgis3-build-deps-binary-image
volumes:
- ${QGIS_WORKSPACE}:/root/QGIS
links:
- oracle
env_file:
- docker-variables.env
environment:
- LANG=C.UTF-8
- LC_ALL=en_US.UTF-8

View File

@ -1,27 +0,0 @@
version: '3'
services:
postgres:
build:
dockerfile: Dockerfile-postgis
context: ../tests/testdata
environment:
- ALLOW_IP_RANGE="172.18.0.0/16"
# The following files are added in Dockerfile-postgis
- SSL_CERT_FILE=/etc/ssl/certs/postgres.crt
- SSL_KEY_FILE=/etc/ssl/private/postgres.key
- SSL_CA_FILE=/etc/ssl/certs/qgis_ca.crt
qgis-deps:
tty: true
image: qgis3-build-deps-binary-image
volumes:
- ${QGIS_WORKSPACE}:/root/QGIS
links:
- postgres
env_file:
- docker-variables.env
environment:
- LANG=C.UTF-8
- LC_ALL=en_US.UTF-8
cap_add:
- NET_ADMIN

View File

@ -1,39 +0,0 @@
version: '3'
services:
httpbin:
image: kennethreitz/httpbin:latest
webdav:
image: nginx
volumes:
- ${QGIS_WORKSPACE}/.docker/webdav/nginx.conf:/etc/nginx/conf.d/default.conf
- ${QGIS_WORKSPACE}/.docker/webdav/passwords.list:/etc/nginx/.passwords.list
- /tmp/webdav_tests:/tmp/webdav_tests_root/webdav_tests
minio:
image: minio/minio
volumes:
- /tmp/minio_tests:/data
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=adminio€
command: server /data
qgis-deps:
tty: true
image: qgis3-build-deps-binary-image
volumes:
- ${QGIS_WORKSPACE}:/root/QGIS
- ${QGIS_COMMON_GIT_DIR}:${QGIS_COMMON_GIT_DIR}
links:
- webdav
- minio
- httpbin
env_file:
- docker-variables.env
environment:
- LANG=C.UTF-8
- LC_ALL=en_US.UTF-8
- QGIS_HTTPBIN_HOST=httpbin
- QGIS_TEST_ACCEPT_GITSTATUS_CHECK_FAILURE=1

View File

@ -1,149 +0,0 @@
#!/usr/bin/env bash
set -e
CTEST_SOURCE_DIR=${CTEST_SOURCE_DIR-/root/QGIS}
CTEST_BUILD_DIR=${CTEST_BUILD_DIR-/root/QGIS/build}
export LANG="C.UTF-8"
##############
# Setup ccache
##############
export CCACHE_TEMPDIR=/tmp
# Github workflow cache max size is 2.0, but ccache data get compressed (roughly 1/5?)
ccache -M 2.0G
# Temporarily uncomment to debug ccache issues
# export CCACHE_LOGFILE=/tmp/cache.debug
ccache -z
# To make ccache work properly with precompiled headers
ccache --set-config sloppiness=pch_defines,time_macros,include_file_mtime,include_file_ctime
##############################
# Variables for output styling
##############################
bold=$(tput bold)
endbold=$(tput sgr0)
###########
# Configure
###########
pushd ${CTEST_SOURCE_DIR} > /dev/null
mkdir -p ${CTEST_BUILD_DIR}
pushd ${CTEST_BUILD_DIR} > /dev/null
echo "${bold}Running cmake...${endbold}"
echo "::group::cmake"
BUILD_TYPE=Release
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
if [[ "${WITH_CLAZY}" = "ON" ]]; then
# In release mode, all variables in QgsDebugMsg would be considered unused
BUILD_TYPE=Debug
export CXX=clazy
# ignore sip and external libraries
export CLAZY_IGNORE_DIRS="(.*/external/.*)|(.*sip_.*part.*)"
fi
if [[ ${BUILD_WITH_QT6} = "ON" ]]; then
CLANG_WARNINGS="-Wrange-loop-construct"
fi
CMAKE_EXTRA_ARGS=()
if [[ "${WITH_COMPILE_COMMANDS}" == "ON" ]]; then
CMAKE_EXTRA_ARGS+=(
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
)
fi
if [[ ${WITH_GRASS7} == "ON" || ${WITH_GRASS8} == "ON" ]]; then
CMAKE_EXTRA_ARGS+=(
"-DGRASS_PREFIX$( grass --config version | cut -b 1 )=$( grass --config path )"
)
fi
if [[ ${BUILD_WITH_QT6} = "ON" ]]; then
CMAKE_EXTRA_ARGS+=(
"-DUSE_ALTERNATE_LINKER=mold"
)
fi
cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DUSE_CCACHE=ON \
-DBUILD_WITH_QT6=${BUILD_WITH_QT6} \
-DWITH_DESKTOP=ON \
-DWITH_ANALYSIS=ON \
-DWITH_GUI=ON \
-DWITH_QUICK=${WITH_QUICK} \
-DWITH_3D=${WITH_3D} \
-DWITH_STAGED_PLUGINS=ON \
-DWITH_GRASS7=${WITH_GRASS7} \
-DWITH_GRASS8=${WITH_GRASS8} \
-DWITH_GRASS_PLUGIN=${WITH_GRASS8} \
-DENABLE_TESTS=ON \
-DENABLE_MODELTEST=${WITH_QT5} \
-DENABLE_PGTEST=${WITH_QT5} \
-DENABLE_MSSQLTEST=${WITH_QT5} \
-DENABLE_MSSQLTEST_CPP=${WITH_QT5} \
-DENABLE_HANATEST=${WITH_QT5} \
-DENABLE_ORACLETEST=${WITH_QT5} \
-DENABLE_UNITY_BUILDS=${ENABLE_UNITY_BUILDS} \
-DPUSH_TO_CDASH=${PUSH_TO_CDASH} \
-DWITH_HANA=ON \
-DWITH_QGIS_PROCESS=ON \
-DWITH_QSPATIALITE=${WITH_QT5} \
-DWITH_QWTPOLAR=OFF \
-DWITH_APIDOC=OFF \
-DWITH_ASTYLE=OFF \
-DWITH_BINDINGS=ON \
-DWITH_SERVER=ON \
-DWITH_SERVER_LANDINGPAGE_WEBAPP=${WITH_QT5} \
-DWITH_ORACLE=ON \
-DWITH_PDAL=ON \
-DWITH_QTSERIALPORT=ON \
-DWITH_QTWEBKIT=${WITH_QT5} \
-DWITH_QTWEBENGINE=${WITH_QTWEBENGINE} \
-DWITH_PDF4QT=${WITH_PDF4QT} \
-DORACLE_INCLUDEDIR=/instantclient_21_16/sdk/include/ \
-DORACLE_LIBDIR=/instantclient_21_16/ \
-DDISABLE_DEPRECATED=ON \
-DPYTHON_TEST_WRAPPER="timeout -sSIGSEGV 55s" \
-DCXX_EXTRA_FLAGS="${CLANG_WARNINGS}" \
-DWERROR=TRUE \
-DAGGRESSIVE_SAFE_MODE=ON \
-DWITH_CLAZY=${WITH_CLAZY} \
"${CMAKE_EXTRA_ARGS[@]}" ..
echo "::endgroup::"
# Workaround https://github.com/actions/checkout/issues/760
git config --global --add safe.directory ${CTEST_SOURCE_DIR}
git config --global --add safe.directory ${CTEST_BUILD_DIR}
#######
# Build
#######
echo "${bold}Building QGIS...${endbold}"
echo "::group::build"
ctest -VV -S ${CTEST_SOURCE_DIR}/.ci/config_build.ctest
echo "::endgroup::"
########################
# Show ccache statistics
########################
echo "ccache statistics"
ccache -s
popd > /dev/null # ${CTEST_BUILD_DIR}
popd > /dev/null # ${CTEST_SOURCE_DIR}
[ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log || true

View File

@ -1,50 +0,0 @@
#!/usr/bin/env bash
###########################################################################
# docker-qgis-clangtidy.sh
# ---------------------
# Date : September 2022
# Copyright : (C) 2022 by Julien Cabieces
# Email : julien dot cabieces at oslandia dot com
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################
set -e
SRCDIR=${CTEST_SOURCE_DIR-/root/QGIS}
cd ${SRCDIR}
# This is needed for `git status` to work, see
# https://github.com/qgis/QGIS/runs/6733585841?check_suite_focus=true#step:13:89
git config --global --add safe.directory ${SRCDIR}
# The clang-tidy version installed needs to match the one used to compile QGIS.
# Otherwise, it will not be able to inspect the modified files.
echo "::group::Install clang tidy"
apt install -y \
clang-tidy-15
echo "::endgroup::"
cd ${SRCDIR}
echo "${bold}Disable unity build...${endbold}"
cmake . -B build -DENABLE_UNITY_BUILDS=OFF
echo "${bold}Run clang-tidy on modifications...${endbold}"
# We need to add build/src/test dir as extra include directories because when clang-tidy tries to process qgstest.h
# it has no compile_commands.json instructions to know what are include directories
# It manages to figure out for other headers though, I don't get how...
git diff -U0 HEAD^ | python3 /usr/bin/clang-tidy-diff-15.py -p1 -path=${CTEST_BUILD_DIR} -use-color -extra-arg=-I${CTEST_BUILD_DIR}/src/test/ -clang-tidy-binary /usr/bin/clang-tidy-15 | tee clang-tidy.log
echo -e "\e[1;34mTo reproduce locally:"
echo -e "\e[1;34m - launch cmake with option -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
echo -e "\e[1;34m - update build by calling Ninja"
echo -e "\e[1;34m - launch command ./scripts/clang-tidy.sh -p <your_build_dir> <source_file>"
exit $(grep -c "warning:" clang-tidy.log)

View File

@ -1,292 +0,0 @@
#!/usr/bin/env bash
set -e
SRCDIR=${CTEST_SOURCE_DIR-/root/QGIS}
cd ${SRCDIR}
# This is needed for `git status` to work, see
# https://github.com/qgis/QGIS/runs/6733585841?check_suite_focus=true#step:13:89
git config --global --add safe.directory ${SRCDIR}
usage() {
echo "Usage; $(basename $0) [<TEST_BATCHNAME>]"
echo "TEST_BATCHNAME can be any of:"
echo " HANA Test the HANA provider"
echo " POSTGRES Test the PostgreSQL provider"
echo " ORACLE Test the Oracle provider"
echo " SQLSERVER Test the SQL Server provider"
echo " ALL_BUT_PROVIDERS Skip all providers tests"
echo " ALL (default) Run all tests"
}
if [ $# -eq 1 ] && [ $1 = "HANA" ]; then
LABELS_TO_RUN="HANA"
RUN_HANA=YES
elif [ $# -eq 1 ] && [ $1 = "POSTGRES" ]; then
LABELS_TO_RUN="POSTGRES"
RUN_POSTGRES=YES
elif [ $# -eq 1 ] && [ $1 = "ORACLE" ]; then
LABELS_TO_RUN="ORACLE"
RUN_ORACLE=YES
elif [ $# -eq 1 ] && [ $1 = "SQLSERVER" ]; then
LABELS_TO_RUN="SQLSERVER"
RUN_SQLSERVER=YES
elif [ $# -eq 1 ] && [ $1 = "ALL_BUT_PROVIDERS" ]; then
LABELS_TO_EXCLUDE="HANA|POSTGRES|ORACLE|SQLSERVER"
elif [ $# -gt 0 ] && [ $1 != "ALL" ]; then
echo "Invalid argument"
usage >&2
exit 1
else
RUN_HANA=YES
RUN_POSTGRES=YES
RUN_ORACLE=YES
RUN_SQLSERVER=YES
fi
# Debug env
echo "::group::Print env"
env
echo "::endgroup::"
# Temporarily uncomment to debug ccache issues
# cat /tmp/cache.debug
if [ -n "$LABELS_TO_RUN" ]; then
echo "Only following test labels will be run: $LABELS_TO_RUN"
CTEST_OPTIONS="-L $LABELS_TO_RUN"
fi
if [ -n "$LABELS_TO_EXCLUDE" ]; then
echo "Following test labels will be excluded: $LABELS_TO_EXCLUDE"
CTEST_OPTIONS="$CTEST_OPTIONS -LE $LABELS_TO_EXCLUDE"
fi
if [ ${RUN_HANA:-"NO"} == "YES" ]; then
##################################
# Prepare HANA database connection
##################################
echo "::group::hana"
echo "${bold}Load HANA database...${endbold}"
export HANA_HOST=917df316-4e01-4a10-be54-eac1b6ab15fb.hana.prod-us10.hanacloud.ondemand.com
export HANA_PORT=443
export HANA_USER=QGISCI
export HANA_PASSWORD="tQ&7W3Klr9!p"
export QGIS_HANA_TEST_DB='driver='/usr/sap/hdbclient/libodbcHDB.so' host='${HANA_HOST}' port='${HANA_PORT}' user='${HANA_USER}' password='${HANA_PASSWORD}' sslEnabled=true sslValidateCertificate=False'
# wait for the DB to be available
echo "Wait a moment while trying to connect to a HANA database."
while ! echo exit | hdbsql -n '${HANA_HOST}:${HANA_PORT}' -u '${HANA_USER}' -p '${HANA_PASSWORD}' &> /dev/null
do
printf "⚘"
sleep 1
done
echo "🌊 done"
echo "::endgroup::"
fi
if [ ${RUN_POSTGRES:-"NO"} == "YES" ]; then
echo "::group::Setup PostgreSQL"
############################
# Restore postgres test data
############################
echo "${bold}Load Postgres database...🐘${endbold}"
printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=qgis_test\nuser=docker\npassword=docker" > ~/.pg_service.conf
export PGUSER=docker
export PGHOST=postgres
export PGPASSWORD=docker
export PGDATABASE=qgis_test
# wait for the DB to be available
echo "Wait a moment while loading PostGreSQL database."
while ! PGPASSWORD='docker' psql -h postgres -U docker -p 5432 -l &> /dev/null
do
printf "🐘"
sleep 1
done
echo " done 🥩"
pushd ${SRCDIR} > /dev/null
echo "Restoring postgres test data ..."
${SRCDIR}/tests/testdata/provider/testdata_pg.sh
echo "Postgres test data restored ..."
popd > /dev/null # /root/QGIS
echo "::endgroup::"
fi
if [ ${RUN_ORACLE:-"NO"} == "YES" ]; then
echo "::group::Setup Oracle"
##############################
# Restore Oracle test data
##############################
echo "${bold}Load Oracle database...🙏${endbold}"
export ORACLE_HOST="oracle"
export ORACLE_PDB="XEPDB1"
export QGIS_ORACLETEST_DBNAME="${ORACLE_HOST}/${ORACLE_PDB}"
export QGIS_ORACLETEST_DB="host=${ORACLE_HOST} dbname=${ORACLE_PDB} port=1521 user='QGIS' password='qgis'"
echo "Wait a moment while loading Oracle database."
COUNT=0
while ! echo exit | sqlplus -L SYSTEM/adminpass@$QGIS_ORACLETEST_DBNAME &> /dev/null
do
printf "🙏"
sleep 5
if [[ $(( COUNT++ )) -eq 40 ]]; then
break
fi
done
if [[ ${COUNT} -eq 41 ]]; then
echo "timeout, no oracle, no 🙏"
else
echo " done 👀"
pushd ${SRCDIR} > /dev/null
${SRCDIR}/tests/testdata/provider/testdata_oracle.sh $ORACLE_HOST
popd > /dev/null # /root/QGIS
fi
echo "::endgroup::"
fi
if [ ${RUN_SQLSERVER:-"NO"} == "YES" ]; then
echo "::group::Setup SQL Server"
##############################
# Restore SQL Server test data
##############################
echo "Wait a moment before loading SQL Server database."
sleep 15
echo "Importing SQL Server test data..."
export SQLUSER=sa
export SQLHOST=mssql
export SQLPORT=1433
export SQLPASSWORD=QGIStestSQLServer1234
export SQLDATABASE=qgis_test
export PATH=$PATH:/opt/mssql-tools/bin
pushd ${SRCDIR} > /dev/null
${SRCDIR}/tests/testdata/provider/testdata_mssql.sh
popd > /dev/null # ${SRCDIR}
echo "Setting up DSN for test SQL Server"
cat <<EOT > /etc/odbc.ini
[ODBC Data Sources]
testsqlserver = ODBC Driver 18 for SQL Server
[testsqlserver]
Driver = ODBC Driver 18 for SQL Server
Description = Test SQL Server
Server = mssql
Encrypt = no
AllowSelfSignedServerCert=1
EOT
echo "::endgroup::"
fi
#######################################
# Wait for Minio container to be ready
#######################################
if [ $# -eq 0 ] || [ $1 = "ALL_BUT_PROVIDERS" ] || [ $1 = "ALL" ] ; then
echo "::group::Setup Minio"
echo "Wait for minio to be ready..."
COUNT=0
while ! curl http://$QGIS_MINIO_HOST:$QGIS_MINIO_PORT &> /dev/null;
do
printf "."
sleep 5
if [[ $(( COUNT++ )) -eq 40 ]]; then
break
fi
done
if [[ ${COUNT} -eq 41 ]]; then
echo "Error: Minio docker timeout!!!"
else
echo "done"
fi
echo "::endgroup::"
fi
#######################################
# Wait for WebDAV container to be ready
#######################################
if [ $# -eq 0 ] || [ $1 = "ALL_BUT_PROVIDERS" ] || [ $1 = "ALL" ] ; then
echo "::group::Setup WebDAV"
echo "Wait for webdav to be ready..."
COUNT=0
while ! curl -f -X GET -u qgis:myPasswd! http://$QGIS_WEBDAV_HOST:$QGIS_WEBDAV_PORT/webdav_tests/ &> /dev/null;
do
printf "."
sleep 5
if [[ $(( COUNT++ )) -eq 40 ]]; then
break
fi
done
if [[ ${COUNT} -eq 41 ]]; then
echo "Error: WebDAV docker timeout!!!"
else
echo "done"
fi
echo "::endgroup::"
fi
###########
# Run tests
###########
EXCLUDE_TESTS="^$(cat ${SRCDIR}/.ci/test_blocklist_qt${QT_VERSION}.txt | sed -r '/^(#.*?)?$/d' | paste -sd '~' | sed -r 's/~/\$|^/g' -)\$"
if ! [[ ${RUN_FLAKY_TESTS} == true ]]; then
echo "Flaky tests are skipped!"
EXCLUDE_TESTS=${EXCLUDE_TESTS}"|^"$(cat ${SRCDIR}/.ci/test_flaky.txt | sed -r '/^(#.*?)?$/d' | paste -sd '~' | sed -r 's/~/\$|^/g' -)"$"
else
echo "Flaky tests are run!"
fi
echo "List of skipped tests: $EXCLUDE_TESTS"
echo "::group::Print disk space before running tests"
df -h
echo "::endgroup::"
export QTWEBENGINE_DISABLE_SANDBOX=1
python3 ${SRCDIR}/.ci/ctest2ci.py xvfb-run ctest -V $CTEST_OPTIONS -E "${EXCLUDE_TESTS}" -S ${SRCDIR}/.ci/config_test.ctest --output-on-failure
echo "::group::Print disk space after running tests"
df -h
echo "::endgroup::"

View File

@ -1,28 +0,0 @@
# CTEST
SEGFAULT_SIGNALS="abrt segv"
CTEST_BUILD_COMMAND=/usr/bin/ninja
CTEST_PARALLEL_LEVEL=1
CTEST_SOURCE_DIR=/root/QGIS
CTEST_BUILD_DIR=/root/QGIS/build
# CTEST vars defined in workflow
CTEST_BUILD_NAME
RUN_FLAKY_TESTS
QT_VERSION
# Other vars
QGIS_NO_OVERRIDE_IMPORT=1
# This is used in some tests to be skipped
QGIS_CONTINUOUS_INTEGRATION_RUN=true
PUSH_TO_CDASH=false
XDG_RUNTIME_DIR=/tmp
QGIS_MINIO_HOST=minio
QGIS_MINIO_PORT=9000
QGIS_WEBDAV_HOST=webdav
QGIS_WEBDAV_PORT=80

View File

@ -1,79 +0,0 @@
# see https://docs.docker.com/docker-cloud/builds/advanced/
# using ARG in FROM requires min v17.05.0-ce
ARG DOCKER_DEPS_TAG=latest
FROM qgis/qgis3-build-deps:${DOCKER_DEPS_TAG} AS BUILDER
MAINTAINER Denis Rouzaud <denis@opengis.ch>
LABEL Description="Docker container with QGIS" Vendor="QGIS.org" Version="1.1"
# build timeout in seconds, so no timeout by default
ARG BUILD_TIMEOUT=360000
ARG CC=/usr/lib/ccache/gcc
ARG CXX=/usr/lib/ccache/g++
ENV LANG=C.UTF-8
COPY . /QGIS
# If this directory is changed, also adapt script.sh which copies the directory
# if ccache directory is not provided with the source
RUN mkdir -p /QGIS/.ccache_image_build
ENV CCACHE_DIR=/QGIS/.ccache_image_build
RUN ccache -M 1G
RUN ccache -s
RUN echo "ccache_dir: "$(du -h --max-depth=0 ${CCACHE_DIR})
WORKDIR /QGIS/build
RUN SUCCESS=OK \
&& cmake \
-GNinja \
-DUSE_CCACHE=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_DESKTOP=ON \
-DWITH_SERVER=ON \
-DWITH_3D=ON \
-DWITH_BINDINGS=ON \
-DWITH_CUSTOM_WIDGETS=ON \
-DBINDINGS_GLOBAL_INSTALL=ON \
-DWITH_STAGED_PLUGINS=ON \
-DWITH_GRASS=ON \
-DDISABLE_DEPRECATED=ON \
-DENABLE_TESTS=OFF \
-DWITH_QSPATIALITE=ON \
-DWITH_APIDOC=OFF \
-DWITH_ASTYLE=OFF \
.. \
&& ninja install || SUCCESS=FAILED \
&& echo "$SUCCESS" > /QGIS/build_exit_value
# Additional run-time dependencies
RUN pip3 install jinja2 pygments pexpect && apt install -y expect
################################################################################
# Python testing environment setup
# Add QGIS test runner
COPY .docker/qgis_resources/test_runner/qgis_* /usr/bin/
# Make all scripts executable
RUN chmod +x /usr/bin/qgis_*
# Add supervisor service configuration script
COPY .docker/qgis_resources/supervisor/ /etc/supervisor
# Python paths are for
# - kartoza images (compiled)
# - deb installed
# - built from git
# needed to find PyQt wrapper provided by QGIS
ENV PYTHONPATH=/usr/share/qgis/python/:/usr/share/qgis/python/plugins:/usr/lib/python3/dist-packages/qgis:/usr/share/qgis/python/qgis
WORKDIR /
# Run supervisor
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

View File

@ -1,249 +0,0 @@
ARG DISTRO_VERSION=24.04
ARG PDAL_VERSION=2.8.4
# Oracle Docker image is too large, so we add as less dependencies as possible
# so there is enough space on GitHub runner
FROM ubuntu:${DISTRO_VERSION} AS binary-for-oracle
LABEL org.opencontainers.image.authors="Denis Rouzaud <denis@opengis.ch>"
LABEL Description="Docker container with QGIS dependencies" Vendor="QGIS.org" Version="1.0"
ARG PDAL_VERSION
# && echo "deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main" >> /etc/apt/sources.list \
# && echo "deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main" >> /etc/apt/sources.list \
# && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160 \
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-transport-https \
ca-certificates \
clazy \
cmake \
curl \
dh-python \
git \
gdal-bin \
gnupg \
gpsbabel \
graphviz \
'libaio1|libaio1t64' \
'libdraco4|libdraco8' \
libexiv2-27 \
'libfcgi0ldbl|libfcgi0t64' \
libgsl27 \
'libprotobuf-lite17|libprotobuf-lite23|libprotobuf-lite32t64' \
libqca-qt5-2-plugins \
libqt53dextras5 \
libqt53drender5 \
'libqt5concurrent5|libqt5concurrent5t64' \
libqt5keychain1 \
libqt5positioning5 \
libqt5multimedia5 \
libqt5multimediawidgets5 \
libqt5qml5 \
libqt5quick5 \
libqt5quickcontrols2-5 \
libqt5quickwidgets5 \
libqt5serialport5 \
libqt5sql5-odbc \
libqt5sql5-sqlite \
'libqt5xml5|libqt5xml5t64' \
libqt5webkit5 \
libqwt-qt5-6 \
libspatialindex6 \
libsqlite3-mod-spatialite \
'libzip4|libzip5|libzip4t64' \
lighttpd \
locales \
poppler-utils \
python3-future \
python3-gdal \
python3-mock \
python3-nose2 \
python3-numpy \
python3-owslib \
python3-pip \
python3-psycopg2 \
python3-pyproj \
python3-pyqt5 \
python3-pyqt5.qsci \
python3-pyqt5.qtsql \
python3-pyqt5.qtsvg \
python3-pyqt5.qtwebkit \
python3-pyqt5.qtpositioning \
python3-pyqt5.qtmultimedia \
python3-pyqt5.qtserialport \
python3-sip \
python3-termcolor \
python3-yaml \
qpdf \
qt3d-assimpsceneimport-plugin \
qt3d-defaultgeometryloader-plugin \
qt3d-gltfsceneio-plugin \
qt3d-scene2d-plugin \
qt5-image-formats-plugins \
saga \
supervisor \
unzip \
xauth \
xfonts-100dpi \
xfonts-75dpi \
xfonts-base \
xfonts-scalable \
xvfb \
ocl-icd-libopencl1 \
&& pip3 install --break-system-packages \
numpy \
nose2 \
pyyaml \
mock \
future \
termcolor \
oauthlib \
pyopenssl \
pep8 \
pexpect \
capturer \
sphinx \
requests \
six \
hdbcli \
shapely \
&& apt-get clean
# Node.js and Yarn for server landingpage webapp
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update
RUN apt-get install -y nodejs
RUN corepack enable
# Oracle : client side
RUN curl https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-basic-linux.x64-21.16.0.0.0dbru.zip > instantclient-basic-linux.x64-21.16.0.0.0dbru.zip
RUN curl https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip > instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip
RUN curl https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip > instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip
RUN unzip -n instantclient-basic-linux.x64-21.16.0.0.0dbru.zip
RUN unzip -n instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip
RUN unzip -n instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip
ENV PATH="/instantclient_21_16:${PATH}"
ENV LD_LIBRARY_PATH="/instantclient_21_16"
# workaround noble libaio SONAME issue -- see https://bugs.launchpad.net/ubuntu/+source/libaio/+bug/2067501
RUN if [ -e /usr/lib/x86_64-linux-gnu/libaio.so.1t64 ] ; then ln -sf /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1 ; fi
# Avoid sqlcmd termination due to locale -- see https://github.com/Microsoft/mssql-docker/issues/163
RUN echo "nb_NO.UTF-8 UTF-8" > /etc/locale.gen
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN locale-gen
RUN echo "alias python=python3" >> ~/.bash_aliases
# PDAL is not available in ubuntu 24.04
# Install it from source
# PDAL dependencies
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
ninja-build \
libgdal-dev \
libproj-dev
# download PDAL and compile it
RUN curl -L https://github.com/PDAL/PDAL/releases/download/${PDAL_VERSION}/PDAL-${PDAL_VERSION}-src.tar.gz --output PDAL-${PDAL_VERSION}-src.tar.gz \
&& mkdir pdal \
&& tar zxf PDAL-${PDAL_VERSION}-src.tar.gz -C pdal --strip-components=1 \
&& rm -f PDAL-${PDAL_VERSION}-src.tar.gz \
&& mkdir -p pdal/build \
&& cd pdal/build \
&& cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_TESTS=OFF .. \
&& ninja \
&& ninja install
FROM binary-for-oracle AS binary-only
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
grass \
iproute2 \
postgresql-client \
spawn-fcgi \
&& pip3 install --break-system-packages \
psycopg2 \
&& apt-get clean
# HANA: client side
# Install hdbsql tool
RUN curl -j -k -L -H "Cookie: eula_3_2_agreed=tools.hana.ondemand.com/developer-license-3_2.txt" https://tools.hana.ondemand.com/additional/hanaclient-latest-linux-x64.tar.gz --output hanaclient-latest-linux-x64.tar.gz \
&& tar -xvf hanaclient-latest-linux-x64.tar.gz \
&& mkdir /usr/sap \
&& ./client/hdbinst -a client --sapmnt=/usr/sap \
&& rm -rf client \
&& rm hanaclient*
ENV PATH="/usr/sap/hdbclient:${PATH}"
# MSSQL: client side
RUN curl -sSL -O https://packages.microsoft.com/config/ubuntu/$(grep VERSION_ID /etc/os-release | cut -d '"' -f 2)/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y --allow-unauthenticated msodbcsql18 mssql-tools18
ENV PATH="/opt/mssql-tools18/bin:${PATH}"
FROM binary-only
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
bison \
ccache \
clang \
cmake \
flex \
grass-dev \
libdraco-dev \
libexiv2-dev \
libexpat1-dev \
libfcgi-dev \
libgeos-dev \
libgsl-dev \
libpq-dev \
libprotobuf-dev \
libqca-qt5-2-dev \
libqt5opengl5-dev \
libqt5scintilla2-dev \
libqt5svg5-dev \
libqt5webkit5-dev \
libqt5serialport5-dev \
libqwt-qt5-dev \
libspatialindex-dev \
libspatialite-dev \
libsqlite3-dev \
libsqlite3-mod-spatialite \
libzip-dev \
libzstd-dev \
protobuf-compiler \
pyqt5-dev \
pyqt5-dev-tools \
pyqt5.qsci-dev \
python3-all-dev \
python3-dev \
python3-sip-dev \
qt3d5-dev \
qt5keychain-dev \
qtbase5-dev \
qtdeclarative5-dev-tools \
qtpositioning5-dev \
qtmultimedia5-dev \
qttools5-dev \
qttools5-dev-tools \
qtbase5-private-dev \
opencl-headers \
ocl-icd-opencl-dev \
&& apt-get clean
ENV PATH="/usr/local/bin:${PATH}"
# environment variables shall be located in .docker/docker-variables.env

View File

@ -1,119 +0,0 @@
ARG DISTRO_VERSION=39
FROM fedora:${DISTRO_VERSION} AS binary-for-oracle
LABEL org.opencontainers.image.authors="Matthias Kuhn <matthias@opengis.ch>"
RUN dnf -y --refresh install \
bison \
ccache \
clang \
clazy \
curl \
draco-devel \
exiv2-devel \
expat-devel \
fcgi-devel \
flex \
fontconfig-devel \
freetype-devel \
git \
gdal \
gdal-devel \
gdal-python-tools \
geos-devel \
gpsbabel \
grass \
grass-devel \
gsl-devel \
lcms2-devel \
libjpeg-turbo-devel \
libpq-devel \
libspatialite-devel \
libxml2-devel \
libzip-devel \
libzstd-devel \
libaio \
mold \
netcdf-devel \
ninja-build \
ocl-icd-devel \
openjpeg2-devel \
PDAL \
PDAL-libs \
PDAL-devel \
perl-YAML-Tiny \
poppler-utils \
proj-devel \
protobuf-devel \
protobuf-lite-devel \
python3-devel \
python3-mock \
python3-oauthlib \
python3-OWSLib \
python3-pyqt6 \
python3-pyqt6-devel \
python3-qscintilla-qt6 \
python3-qscintilla-qt6-devel \
python3-termcolor \
PyQt-builder \
qca-qt6-devel \
qpdf \
qt6-qt3d-devel \
qt6-qtbase-devel \
qt6-qtbase-private-devel \
qt6-qtdeclarative-devel \
qt6-qttools-static \
qt6-qtserialport-devel \
qt6-qtsvg-devel \
qt6-qtpositioning-devel \
qt6-qtdeclarative-devel \
qt6-qt5compat-devel \
qt6-qtmultimedia-devel \
qt6-qtwebengine-devel \
qtkeychain-qt6-devel \
qwt-qt6-devel \
qscintilla-qt6-devel \
sip6 \
spatialindex-devel \
sqlite-devel \
unzip \
unixODBC-devel \
xorg-x11-server-Xvfb \
util-linux \
wget \
openssl-devel \
libsecret-devel \
make \
automake \
gcc \
gcc-c++ \
kernel-devel \
ninja-build \
patch \
dos2unix
# Oracle : client side
RUN curl https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-basic-linux.x64-21.16.0.0.0dbru.zip > instantclient-basic-linux.x64-21.16.0.0.0dbru.zip
RUN curl https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip > instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip
RUN curl https://download.oracle.com/otn_software/linux/instantclient/2116000/instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip > instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip
RUN unzip -n instantclient-basic-linux.x64-21.16.0.0.0dbru.zip
RUN unzip -n instantclient-sdk-linux.x64-21.16.0.0.0dbru.zip
RUN unzip -n instantclient-sqlplus-linux.x64-21.16.0.0.0dbru.zip
ENV PATH="/instantclient_21_16:${PATH}"
ENV LD_LIBRARY_PATH="/instantclient_21_16"
ENV LANG=C.UTF-8
FROM binary-for-oracle AS binary-only
RUN dnf -y install \
python3-gdal \
python3-nose2 \
python3-psycopg2 \
python3-pyyaml \
python3-shapely
FROM binary-only

View File

@ -1,7 +0,0 @@
pep8
pexpect
capturer
sphinx
requests
future
six

View File

@ -1,4 +0,0 @@
; Supervisor config file for Xvfb
[program:Xvfb]
command=/usr/bin/Xvfb :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset -nolisten tcp

View File

@ -1,13 +0,0 @@
; Supervisor config file.
[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=info
pidfile=/var/run/supervisord.pid
childlogdir=/var/log
[include]
files = /etc/supervisor/supervisor.d/*.conf

View File

@ -1,63 +0,0 @@
#!/bin/bash
# Setup QGIS for the automated tests
# This is normally called from Travis or rundockertests.sh
# before running the tests for a particular plugin
#
# Note: on QGIS3 assumes the default profile for root user
#
# - create the folders
# - install startup.py monkey patches
# - disable tips
# - enable the plugin (optionally)
PLUGIN_NAME=$1
CONF_MASTER_FOLDER="/root/.local/share/QGIS/QGIS3/profiles/default/QGIS/"
CONF_MASTER_FILE="${CONF_MASTER_FOLDER}/QGIS3.ini"
QGIS_MASTER_FOLDER="/root/.local/share/QGIS/QGIS3/profiles/default"
PLUGIN_MASTER_FOLDER="${QGIS_MASTER_FOLDER}/python/plugins"
STARTUP_MASTER_FOLDER="/root/.local/share/QGIS/QGIS3/"
# Creates the config file
mkdir -p $CONF_MASTER_FOLDER
if [ -e "$CONF_MASTER_FILE" ]; then
rm -f $CONF_MASTER_FILE
fi
touch $CONF_MASTER_FILE
# Creates plugin folder
mkdir -p $PLUGIN_MASTER_FOLDER
mkdir -p $STARTUP_MASTER_FOLDER
# Install the monkey patches to prevent modal stacktrace on python errors
cp /usr/bin/qgis_startup.py ${STARTUP_MASTER_FOLDER}/startup.py
# Disable tips
printf "[qgis]\n" >> $CONF_MASTER_FILE
SHOW_TIPS=$(qgis --help 2>&1 | head -2 | grep 'QGIS - ' | perl -npe 'chomp; s/QGIS - (\d+)\.(\d+).*/showTips\1\2=false/')
printf "%s\n\n" "$SHOW_TIPS" >> $CONF_MASTER_FILE
if [[ -n "$PLUGIN_NAME" ]]; then
# Enable plugin
printf '[PythonPlugins]\n' >> $CONF_MASTER_FILE
printf "%s=true\n\n" "$PLUGIN_NAME" >> $CONF_MASTER_FILE
# Install the plugin
if [ ! -d "${PLUGIN_MASTER_FOLDER}/${PLUGIN_NAME}" ]; then
plugin_dir="/tests_directory/${PLUGIN_NAME}"
if [ ! -d "${plugin_dir}" ]; then
echo "ERROR: ${plugin_dir} does not exist" >&2
exit 1
fi
ln -s "${plugin_dir}" "${PLUGIN_MASTER_FOLDER}"
echo "Plugin master folder linked in ${PLUGIN_MASTER_FOLDER}/${PLUGIN_NAME}"
fi
fi
# Disable firstRunVersionFlag for master
echo "
[migration]
fileVersion=2
firstRunVersionFlag=30500
settings=true
" >> $CONF_MASTER_FILE

View File

@ -1,29 +0,0 @@
"""
Disable QGIS modal error dialog.
This script is meant to be run automatically when QGIS starts.
Is should be renamed to `startup.py` and placed into
~/.qgis3/python/startup.py
"""
import traceback
from qgis import utils
from qgis.core import Qgis
def _showException(type, value, tb, msg, messagebar=False, level=Qgis.Warning):
print(msg)
logmessage = ""
for s in traceback.format_exception(type, value, tb):
logmessage += s.decode("utf-8", "replace") if hasattr(s, "decode") else s
print(logmessage)
def _open_stack_dialog(type, value, tb, msg, pop_error=True):
print(msg)
utils.showException = _showException
utils.open_stack_dialog = _open_stack_dialog

View File

@ -1,185 +0,0 @@
#!/usr/bin/env python
"""
***************************************************************************
Launches a unit test inside QGIS and exit the application.
Arguments:
accepts a single argument with the package name in python dotted notation,
the program tries first to load the module and launch the `run_all`
function of the module, if that fails it considers the last part of
the dotted path to be the function name and the previous part to be the
module.
Extra options for QGIS command line can be passed in the env var
QGIS_EXTRA_OPTIONS
Example run:
# Will load geoserverexplorer.test.catalogtests and run `run_all`
QGIS_EXTRA_OPTIONS='--optionspath .' \
GSHOSTNAME=localhost \
python qgis_testrunner.py geoserverexplorer.test.catalogtests
GSHOSTNAME=localhost \
python qgis_testrunner.py geoserverexplorer.test.catalogtests.run_my
---------------------
Date : May 2016
Copyright : (C) 2016 by Alessandro Pasotti
Email : apasotti at boundlessgeo dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = "Alessandro Pasotti"
__date__ = "May 2016"
import importlib
import os
import re
import signal
import sys
import traceback
from shlex import quote
from pexpect import run
from qgis.utils import iface
def eprint(text):
sys.__stderr__.write(text + "\n")
def __get_test_function(test_module_name):
"""
Load the test module and return the test function
"""
print("QGIS Test Runner - Trying to import %s" % test_module_name)
try:
test_module = importlib.import_module(test_module_name)
function_name = "run_all"
except ImportError as e:
# traceback.print_exc(file=sys.stdout)
# Strip latest name
pos = test_module_name.rfind(".")
if pos <= 0:
raise e
test_module_name, function_name = (
test_module_name[:pos],
test_module_name[pos + 1 :],
)
print("QGIS Test Runner - Trying to import %s" % test_module_name)
sys.stdout.flush()
try:
test_module = importlib.import_module(test_module_name)
except ImportError as e:
# traceback.print_exc(file=sys.stdout)
raise e
return getattr(test_module, function_name, None)
if iface is None:
"""
Launch QGIS and passes itself as an init script
"""
sys.path.append(os.getcwd())
test_module_name = sys.argv[-1]
if __get_test_function(test_module_name) is None:
print(
"QGIS Test Runner - [ERROR] cannot load test function from %s"
% test_module_name
)
sys.exit(1)
try:
me = __file__
except NameError:
me = sys.argv[0]
os.environ["QGIS_DEBUG"] = "1"
args = [
"qgis",
os.environ.get("QGIS_EXTRA_OPTIONS", ""),
"--nologo",
"--noversioncheck",
"--code",
me,
test_module_name, # Must be the last one!
]
command_line = " ".join(args)
print("QGIS Test Runner - launching QGIS as %s ..." % command_line)
out, returncode = run("sh -c " + quote(command_line), withexitstatus=1)
if isinstance(out, bytes):
out = out.decode("utf-8")
assert returncode is not None
print("QGIS Test Runner - QGIS exited.")
ok = (
out.find("(failures=") < 0
and len(re.findall(r"Ran \d+ tests in\s", out, re.MULTILINE)) > 0
)
print("=" * 60)
if not ok:
print(out)
else:
eprint(out)
if len(out) == 0:
print("QGIS Test Runner - [WARNING] subprocess returned no output")
print("=" * 60)
print(
"QGIS Test Runner - {} bytes returned and finished with exit code: {}".format(
len(out), 0 if ok else 1
)
)
sys.exit(0 if ok else 1)
else: # We are inside QGIS!
# Start as soon as the initializationCompleted signal is fired
from qgis.core import QgsApplication, QgsProject, QgsProjectBadLayerHandler
from qgis.PyQt.QtCore import QDir
from qgis.utils import iface
class QgsProjectBadLayerDefaultHandler(QgsProjectBadLayerHandler):
def handleBadLayers(self, layers, dom):
pass
# Monkey patch QGIS Python console
from console.console_output import writeOut
def _write(self, m):
sys.__stdout__.write(m)
writeOut.write = _write
# Add current working dir to the python path
sys.path.append(QDir.current().path())
def __run_test():
"""
Run the test specified as last argument in the command line.
"""
# Disable modal handler for bad layers
QgsProject.instance().setBadLayerHandler(QgsProjectBadLayerDefaultHandler())
eprint("QGIS Test Runner Inside - starting the tests ...")
try:
test_module_name = QgsApplication.instance().arguments()[-1]
function_name = __get_test_function(test_module_name)
eprint("QGIS Test Runner Inside - executing function %s" % function_name)
function_name()
except Exception as e:
eprint("QGIS Test Runner Inside - [FAILED] Exception: %s" % e)
# Print tb
traceback.print_exc(file=sys.stdout)
app = QgsApplication.instance()
os.kill(app.applicationPid(), signal.SIGTERM)
iface.initializationCompleted.connect(__run_test)

View File

@ -1,43 +0,0 @@
#!/bin/bash
# Run a python test inside QGIS
# Note: the test module and function are specified in dotted notation
# for example, to run the test function run_all (which is the default anyway)
# $ qgis_testrunner.sh tests_folder.test_module.run_all
# tests_folder must be in PYTHONPATH (plugins main folders are automatically added to path)
### Turn on debug mode ###
#set -x
TEST_NAME=$1
TEST_RUNNER_PATH=${TEST_RUNNER_PATH:-/usr/bin/qgis_testrunner.py}
QGIS_BUILD_PATH=${QGIS_BUILD_PATH:-qgis}
LOGFILE=/tmp/qgis_testrunner_$$
echo "Running test $1 ..."
QGIS_TEST_MODULE=${TEST_NAME} unbuffer ${QGIS_BUILD_PATH} \
--version-migration --nologo --code \
${TEST_RUNNER_PATH} "$TEST_NAME" \
2>/dev/null | \
tee ${LOGFILE}
# NOTE: EXIT_CODE will always be 0 if "tee" works,
# we could `set -o pipefail` to change this
EXIT_CODE="$?"
OUTPUT=$(cat $LOGFILE) # quick hack to avoid changing too many lines
if [ -z "$OUTPUT" ]; then
echo "ERROR: no output from the test runner! (exit code: ${EXIT_CODE})"
exit 1
fi
echo "$OUTPUT" | grep -q 'FAILED'
IS_FAILED="$?"
echo "$OUTPUT" | grep -q 'OK' && echo "$OUTPUT" | grep -q 'Ran'
IS_PASSED="$?"
echo "$OUTPUT" | grep "QGIS died on signal"
IS_DEAD="$?"
echo "Finished running test $1 (codes: IS_DEAD=$IS_DEAD IS_FAILED=$IS_FAILED IS_PASSED=$IS_PASSED)."
if [ "$IS_PASSED" -eq "0" ] && [ "$IS_FAILED" -eq "1" ] && [ "$IS_DEAD" -eq "1" ]; then
exit 0;
fi
exit 1

View File

@ -1,21 +0,0 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
location /webdav_tests {
auth_basic realm_name;
auth_basic_user_file /etc/nginx/.passwords.list;
dav_methods PUT DELETE MKCOL COPY MOVE;
#dav_ext_methods PROPFIND OPTIONS;
dav_access user:rw group:rw all:r;
autoindex on;
client_max_body_size 0;
create_full_put_path on;
root /tmp/webdav_tests_root;
}
}

View File

@ -1 +0,0 @@
qgis:$apr1$cxID/nB1$3tG4J0FkYvEHyWAB.yqjo.

View File

@ -1,4 +0,0 @@
/.ci
/.git
/.github
build*

View File

@ -1,17 +0,0 @@
# See http://editorconfig.org
# top-most EditorConfig file
root = true
# every file needs these
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
# python scripts have 4 spaces indent
[*.py]
indent_size = 4

View File

@ -1,4 +0,0 @@
0f032e5f2d78d0d0ba2edb4a20c4853e77ec0fc4 # python formatting after pre-commit introduction
33ea41a100e8eea891c1d9d95fe34e346c3e71d1 # clang-format on non sipified files
00fecc29bbe2e295d75c2dad4b9090f7afba739a # clang-format src/analysis
3a4f8bcdad4f843d7217116ac1cb94b6b6c3fb8b # clang-format src/3d + server

3
.gitattributes vendored
View File

@ -1,3 +0,0 @@
*.sip export-subst
*.py export-subst
tests/testdata/auth_system/certs_keys/donald_key_DSA_crlf.pem text eol=crlf

View File

@ -1,72 +0,0 @@
name: Bug/Crash report but not related to a third party plugin, read below for plugins
description: Create a bug report to help us improve QGIS.
labels:
- 'Bug'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report correctly.
Please report only issues related to the QGIS application.
If the issue is related to a plugin, you should file the issue in the plugin code repository.
You can find the URL in the QGIS Plugin Manager.
- type: textarea
id: what
attributes:
label: What is the bug or the crash?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce the issue
description: |
Steps, sample datasets and qgis project file to reproduce the behavior. Screencasts or screenshots are more than welcome, you can drag&drop them in the text box.
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
id: about-info
attributes:
label: Versions
description: |
In the QGIS Help menu -> About, click on the "Copy to Clipboard" button, then paste here.
validations:
required: true
- type: checkboxes
id: qgis-version
attributes:
label: Supported QGIS version
description: |
Each month, there is a new release of QGIS. According to the release schedule, you should at least be running a supported QGIS version.
You can check the release schedule https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule
options:
- label: I'm running a supported QGIS version according to [the roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule).
- type: checkboxes
id: new-profile
attributes:
label: New profile
description: |
Did you try with a new QGIS profile? Some issues or crashes might be related to plugins or user configuration.
You must try with a new profile to check if the issue remains.
Read this link how to create a new profile
https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles
options:
- label: I tried with a new [QGIS profile](https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles)
- type: textarea
id: additional-context
attributes:
label: Additional context
description: |
Add any other context about the problem here.

View File

@ -1,25 +0,0 @@
name: Feature request
description: Suggest a feature idea for QGIS.
labels:
- 'Feature Request'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request correctly.
- type: textarea
id: what
attributes:
label: Feature description
description: A clear and concise description of what you want to happen. Ex. QGIS would rock even more if [...]
validations:
required: true
- type: textarea
id: Additional
attributes:
label: Additional context
description: |
Add any other context or screenshots about the feature request here. Open source is community driven, please consider a way to support this work either by hiring developers, supporting the QGIS project, find someone to submit a pull request.
If the change required is important, you should consider writing a [QGIS Enhancement Proposal](https://github.com/qgis/QGIS-Enhancement-Proposals/issues) (QEP) or hiring someone to, and announce your work on the lists.

View File

@ -1,19 +0,0 @@
name: API documentation (C++ or PyQGIS)
description: An issue about the C++ or PyQGIS documentation
labels:
- 'Documentation'
- 'API'
- 'PyQGIS'
body:
- type: markdown
attributes:
value: |
Report only an issue related to the C++ or PyQGIS documentation
- type: textarea
id: what
attributes:
label: What is the issue about the documentation?
validations:
required: true

View File

@ -1,21 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Documentation (desktop and server)
url: https://github.com/qgis/QGIS-Documentation/issues
about: Suggest improvements or report errors regarding https://docs.qgis.org
- name: Question
url: https://gis.stackexchange.com/
about: >
Questions should go to the qgis-user mailing list at https://lists.osgeo.org/mailman/listinfo/qgis-user
or other support forums such as https://gis.stackexchange.com/.
GitHub issues are for bug reports and suggestions for new features.
- name: QGIS plugin issue
# There must be a link to make this option valid for GitHub
url: https://plugins.qgis.org
about: >
If the issue concerns a third party plugin (downloaded with the plugin manager) then it can't be fixed
by the QGIS core team. Please raise your issue in the dedicated bug tracker for that specific plugin
(as listed in the plugin's description)

View File

@ -1,33 +0,0 @@
## Description
[Replace this with some text explaining the rationale and details about this pull request]
<!--
BEFORE HITTING SUBMIT -- Please BUILD AND TEST your changes thoroughly. This is YOUR responsibility! Do NOT rely on the QGIS code maintainers to do this for you!!
IMPORTANT NOTES FOR FIRST TIME CONTRIBUTORS
===========================================
Congratulations, you are about to make a pull request to QGIS! To make this as easy and pleasurable for everyone, please take the time to read these lines before opening the pull request.
Include a few sentences describing the overall goals for this pull request (PR). If applicable also add screenshots or - even better - screencasts.
Include both: *what* you changed and *why* you changed it.
If this is a pull request that adds new functionality which needs documentation, give an especially detailed explanation.
In this case, start with a short abstract and then write some text that can be copied 1:1 to the documentation in the best case.
Also mention if you think this PR needs to be backported. And list relevant or fixed issues.
------------------------
Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by checking the following list.
Feel free to ask in a comment if you have troubles with any of them.
- Commit messages are descriptive and explain the rationale for changes.
- Commits which fix bugs include `Fixes #11111` at the bottom of the commit message. If this is your first pull request and you forgot to do this, write the same statement into this text field with the pull request description.
- New unit tests have been added for relevant changes
- you have read the QGIS Developer Guide (https://docs.qgis.org/testing/en/docs/developers_guide/index.html) and your PR complies with its QGIS Coding Standards
-->

View File

@ -1,34 +0,0 @@
name: 'Get Workflow Artifact IDs'
description: 'Generates consistent artifact IDs and names based on workflow trigger'
outputs:
filename:
description: 'Filename to use for artifacts (e.g. pr123)'
value: ${{ steps.generate-ids.outputs.filename }}
display-name:
description: 'Human readable name (e.g. PR123)'
value: ${{ steps.generate-ids.outputs.display_name }}
runs:
using: "composite"
steps:
- id: generate-ids
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
ID="pr${{ github.event.pull_request.number }}"
DISPLAY_ID="PR${{ github.event.pull_request.number }}"
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG=${GITHUB_REF#refs/tags/}
ID="$TAG"
DISPLAY_ID="$TAG"
else
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
BRANCH_NAME=${GITHUB_REF#refs/heads/}
ID="$BRANCH_NAME-$SHORT_SHA"
DISPLAY_ID="$BRANCH_NAME-$SHORT_SHA"
fi
# Set outputs
echo "filename=$ID" >> $GITHUB_OUTPUT
echo "display_name=$DISPLAY_ID" >> $GITHUB_OUTPUT

View File

@ -1,54 +0,0 @@
name: Post Sticky Comment
description: Post a sticky comment
inputs:
marker:
description: Unique marker
required: true
type: string
body:
description: Body
required: true
type: string
pr:
description: Pull Request Number
required: true
type: string
runs:
using: composite
steps:
- name: Create metadata
uses: actions/github-script@v7
env:
BODY: ${{ inputs.body }}
with:
script: |
const fs = require('fs');
try {
// Get inputs from the GitHub Action
const marker = "${{ inputs.marker }}";
const body = process.env.BODY; // Transfer input via env variable as it's not possible to access it directly https://github.com/actions/github-script/issues/56#issuecomment-642188313
const pr = ${{ inputs.pr }};
// Create the content of the JSON file
const content = JSON.stringify({
marker: marker,
body: body,
pr_number: pr
}, null, 2);
console.debug(content)
fs.writeFileSync('comment-${{ github.job }}.json', content);
console.log('comment.json file has been written successfully.');
} catch (error) {
core.setFailed(`Action failed with error: ${error}`);
}
- name: 📤 Upload data
uses: actions/upload-artifact@v4
with:
name: comment_artifacts-${{ github.job }}
path: |
comment-${{ github.job }}.json

View File

@ -1,31 +0,0 @@
name: Setup Vcpkg
description: Initialize vcpkg tool, does not checkout the registry
# TODO, set VCPKG_BASE_VERSION based on this
# inputs:
# vcpkg-version:
# description: Enter vcpkg version tag or stable or latest
# required: false
# default: latest
# type: string
runs:
using: composite
steps:
- name: Setup vcpkg
if: runner.os != 'Windows'
shell: bash
run: |
export VCPKG_ROOT=$HOME/.vcpkg
wget https://aka.ms/vcpkg-init.sh -O /tmp/vcpkg-init.sh
. /tmp/vcpkg-init.sh
echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV
echo "$VCPKG_ROOT" >> $GITHUB_PATH
- name: Setup vcpkg
if: runner.os == 'Windows'
shell: powershell
run: |
$env:VCPKG_ROOT = "C:/.vcpkg"
iex (iwr -useb https://aka.ms/vcpkg-init.ps1)
echo "VCPKG_ROOT=$env:VCPKG_ROOT" >> $env:GITHUB_ENV
echo "$env:VCPKG_ROOT" >> $env:GITHUB_PATH

View File

@ -1,54 +0,0 @@
name: Compare vcpkg install changes
description: Compares vcpkg install outputs between the base and head refs on pull requests and generates a report.
inputs:
vcpkg-manifest-dir:
description: 'Directory containing the vcpkg.json manifest'
required: true
default: '.'
type: string
triplet:
description: 'Triplet to use for vcpkg installation'
required: true
default: 'x64-linux'
type: string
features:
description: 'Comma separated list of features'
required: false
default: ''
type: string
outputs:
report:
description: 'The report of added and removed packages after vcpkg installation comparison'
value: ${{ steps.compare.outputs.report }}
runs:
using: "composite"
steps:
# Run vcpkg install --dry-run on the head ref
- name: Run vcpkg install (HEAD)
shell: bash
run: |
vcpkg install --dry-run --triplet ${{ inputs.triplet }} --x-manifest-root=${{ inputs.vcpkg-manifest-dir }} $(awk -v FS=',' '{for(i=1; i<=NF; i++) printf "--x-feature=%s ", $i}' <<< "${{ inputs.features }}") --allow-unsupported > /tmp/vcpkg-head-output.txt
# Run vcpkg install --dry-run on the base ref
- name: Run vcpkg install (BASE)
shell: bash
run: |
git worktree add .base-ref ${{ github.event.pull_request.base.sha }}
vcpkg install --dry-run --triplet ${{ inputs.triplet }} --x-manifest-root=.base-ref/${{ inputs.vcpkg-manifest-dir }} $(awk -v FS=',' '{for(i=1; i<=NF; i++) printf "--x-feature=%s ", $i}' <<< "${{ inputs.features }}") --allow-unsupported > /tmp/vcpkg-base-output.txt
# Compare the outputs and generate a report
- name: Compare vcpkg outputs
shell: bash
id: compare
run: |
python3 ${GITHUB_ACTION_PATH}/vcpkg-diff.py > /tmp/vcpkg-report.txt
cat /tmp/vcpkg-report.txt
{
echo 'report<<EOF'
cat /tmp/vcpkg-report.txt
echo EOF
} >> "$GITHUB_OUTPUT"

View File

@ -1,101 +0,0 @@
import re
def extract_packages(data):
"""
Extract package name, triplet, version, and features information from the file content.
"""
packages = {}
lines = data.strip().split("\n")
for line in lines:
# Regex to match the package format and capture features inside brackets
match = re.match(
r"\s*\*?\s+([^\[\]:]+)(?:\[(.*?)\])?:([^\[\]@]+)@([^\s]+)\s+--", line
)
if match:
package_name = match.group(1)
features = match.group(2) if match.group(2) else ""
triplet = match.group(3)
version = match.group(4)
features_list = (
[feature.strip() for feature in features.split(",")] if features else []
)
packages[package_name] = (triplet, version, features_list)
return packages
def compare_features(features1, features2):
"""
Compare two feature lists and return the differences.
"""
added_features = set(features2) - set(features1)
removed_features = set(features1) - set(features2)
return added_features, removed_features
def generate_report(file1_content, file2_content):
# Extract package information from both files
file1_packages = extract_packages(file1_content)
file2_packages = extract_packages(file2_content)
added = []
removed = []
updated = []
# Identify removed and updated packages
for pkg in file1_packages:
if pkg not in file2_packages:
removed.append(pkg)
else:
# Compare version and features
triplet1, version1, features1 = file1_packages[pkg]
triplet2, version2, features2 = file2_packages[pkg]
updated_parts = []
if version1 != version2 or triplet1 != triplet2:
updated_parts.append(f"{version1} -> {version2}")
added_features, removed_features = compare_features(features1, features2)
if added_features:
updated_parts.append("+" + ", ".join(added_features))
if removed_features:
updated_parts.append("-" + ", ".join(removed_features))
if updated_parts:
updated.append(f"{pkg}: " + " ".join(updated_parts))
# Identify added packages
for pkg in file2_packages:
if pkg not in file1_packages:
added.append(pkg)
# Print the report
if added:
print("**Added packages:**")
for pkg in added:
triplet, version, features = file2_packages[pkg]
print(f" 🍓 {pkg}: {version} (Features: {', '.join(features)})")
if removed:
print("\n**Removed packages:**")
for pkg in removed:
triplet, version, features = file1_packages[pkg]
print(f" 🍄 {pkg}: {version} (Features: {', '.join(features)})")
if updated:
print("\n**Updated packages:**")
for pkg in updated:
print(f" 🍇 {pkg}")
def read_file(file_path):
"""
Read the content of a file.
"""
with open(file_path) as file:
return file.read()
# Read files
file1_content = read_file("/tmp/vcpkg-base-output.txt")
file2_content = read_file("/tmp/vcpkg-head-output.txt")
# Generate the report
generate_report(file1_content, file2_content)

View File

@ -1,6 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

112
.github/labeler.yml vendored
View File

@ -1,112 +0,0 @@
"3D":
- any: [
'resources/3d/**/*',
'src/3d/**/*',
'src/app/3d/**/*',
]
"Annotations":
- any: [
'src/core/annotations/**/*',
'src/gui/annotations/**/*',
]
"Chore":
- any: [
'.ci/**/*',
'.docker/**/*',
'.github/**/*',
]
"DB Manager":
- any: ['python/plugins/db_manager/**/*']
"Expressions":
- any: [
'src/core/expression/**/*',
'resources/function_help/**/*',
]
"Form":
- any: [
'src/core/editform/**/*',
'src/gui/attributeformconfig/**/*',
]
"GRASS":
- any: ['python/plugins/grassprovider/**/*']
"GUI/UX":
- any: [
'images/**/*',
'resources/themes/**/*',
# 'src/gui/**/*', too broad
]
"HANA data provider":
- any: [
'src/providers/hana/**/*',
]
"Labeling":
- any: [
'src/app/labeling/**/*',
'src/core/labeling/**/*',
]
"Locator":
- any: [
'src/core/locator/**/*',
'src/gui/locator/**/*',
]
"Mesh":
- any: [
'external/mdal/**/*',
'src/analysis/mesh/**/*',
'src/core/mesh/**/*',
'src/gui/mesh/**/*',
]
"Metasearch":
- any: ['python/plugins/MetaSearch/**/*']
"Point Clouds":
- any: [
'src/app/pointcloud/**/*',
'src/core/pointcloud/**/*',
'src/gui/pointcloud/**/*',
]
"PostGIS data provider":
- any: ['src/providers/postgres/**/*']
"Processing":
- any: [
'python/plugins/processing/**/*',
'src/analysis/**/*',
'src/core/processing/**/*',
'src/process/**/*'
]
"Python Console":
- any: [
'python/console/**/*',
]
"Quick":
- any: [
'src/quickgui/**/*',
]
"Server":
- any: [
'src/server/**/*',
'resources/server/**/*'
]
"Vector tiles":
- any: [
'src/core/vectortile/**/*',
'src/gui/vectortile/**/*',
]

View File

@ -1,25 +0,0 @@
name: ♻ Backport
on:
pull_request_target:
types:
- closed
- labeled
permissions:
contents: read
jobs:
backport:
runs-on: ubuntu-22.04
name: Backport
permissions:
pull-requests: write
steps:
- name: Backport Bot
id: backport
if: github.event.pull_request.merged && ( ( github.event.action == 'closed' && contains( join( github.event.pull_request.labels.*.name ), 'backport') ) || contains( github.event.label.name, 'backport' ) )
uses: m-kuhn/backport@7f3cab83e4b3b26aefcffda21851c3dc3d389f45 #v1.2.7
with:
github_token: ${{ secrets.GH_TOKEN_BOT }}

View File

@ -1,222 +0,0 @@
---
name: 🍎 Build - MacOS Qt6
on:
push:
branches:
- master
- release-*
pull_request:
release:
types: ['published']
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
include:
- os: macos-13
triplet: x64-osx-dynamic-release
deployment-target: "10.15"
- os: macos-14
triplet: arm64-osx-dynamic-release
deployment-target: "11.0"
name: build (macos)
runs-on: ${{ matrix.os }}
steps:
- name: 🐣 Checkout
uses: actions/checkout@v4
- name: 🐩 Install CMake and Ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # latest
with:
# Pin to specific version to avoid rebuilding too often
# Also helps to avoid spurious build failures like https://github.com/qgis/QGIS/pull/47098
cmakeVersion: 3.30.4
- name: 🎡 Setup vcpkg
id: setup-vcpkg
uses: ./.github/actions/setup-vcpkg
- name: 🎲 Get artifact ids
id: workflow-artifact-ids
uses: ./.github/actions/get-workflow-artifact-ids
- name: 🔨 Prepare build env
run: |
brew install automake bison flex gnu-sed autoconf-archive nasm libtool fdupes
echo $(brew --prefix bison)/bin >> $GITHUB_PATH
echo $(brew --prefix flex)/bin >> $GITHUB_PATH
echo $(brew --prefix libtool)/bin >> $GITHUB_PATH
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 🍭 Setup XCode
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: latest-stable
- name: 🛍️ Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 500M
key: build-ccache-${{ matrix.triplet }}-qt6-${{ github.event.pull_request.base.ref || github.ref_name }}
save: ${{ github.event_name == 'push' }}
- name: 🛍️ Tune ccache configuration
shell: bash
run: |
# To make ccache work properly with precompiled headers
ccache --set-config sloppiness=pch_defines,time_macros,include_file_mtime,include_file_ctime
- name: 🌱 Install dependencies and generate project files
env:
X_VCPKG_ASSET_SOURCES: x-azurl,https://assetcache.open-vcpkg.org/assetcache,,read
run: |
echo "VCPKG_ROOT: ${VCPKG_ROOT}"
# Install first only with binarycaching, then deduplicate binaries and replace copies with symlinks.
# Nuget doesn't understand the symlink concept
cmake -S . \
-G Ninja \
-B build \
-D QGIS_APP_NAME="QGIS-${{steps.workflow-artifact-ids.outputs.display-name}}" \
-D WITH_VCPKG=ON \
-D BUILD_WITH_QT6=ON \
-D WITH_QTWEBKIT=OFF \
-D WITH_BINDINGS=ON \
-D WITH_ORACLE=ON \
-D VCPKG_TARGET_TRIPLET="${{ matrix.triplet }}" \
-D VCPKG_HOST_TRIPLET="${{ matrix.triplet }}" \
-D VCPKG_INSTALL_OPTIONS="--only-binarycaching" \
-D CMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.deployment-target }} \
-D ENABLE_UNITY_BUILDS=ON \
-D NUGET_USERNAME=${{ github.actor }} \
-D NUGET_SOURCE="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-D NUGET_TOKEN=${{ secrets.GITHUB_TOKEN }} || true
fdupes -q -r -1 build/vcpkg_installed/${{ matrix.triplet }}/lib | grep libQt | while read line; do master=""; for file in ${line[*]}; do if [[ "x${master}" == "x" ]]; then master=$file; else rm "${file}"; ln -s $(basename "${master}") "${file}"; fi; done; done
cmake -D VCPKG_INSTALL_OPTIONS="" build
- name: 📑 Upload vcpkg build logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-logs-${{ matrix.triplet }}
path: |
${{ env.VCPKG_ROOT }}/buildtrees/**/*.log
- name: 📦 Create SDK
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
run: |
./build/_deps/vcpkg-src/vcpkg export --zip --output-dir=./sdk --x-install-root=./build/vcpkg_installed --x-manifest-root=vcpkg
- name: 📤 Upload sdk
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: qgis-sdk-${{ matrix.triplet }}
path: |
sdk/vcpkg-export-*.zip
- name: 🌋 Build
run: |
# We make sure the target "all" is built before bundling
# Ideally, we would specify each target that is required to be installed, but this workaround is sufficient for now
cmake --build build
cmake --build build --target bundle
- name: Archive app
run: |
gtar -cpvzf qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-${{ matrix.triplet }}.tar.gz ./build/_CPack_Packages/Darwin/External/*/*.app
- name: 📤 Upload app
uses: actions/upload-artifact@v4
with:
name: qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-${{ matrix.triplet }}
path: |
qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-${{ matrix.triplet }}.tar.gz
schedule_download_comment:
name: Create dmg
runs-on: macos-latest
needs: build
steps:
- name: 🐣 Checkout
uses: actions/checkout@v4
- name: 🔨 Prepare build env
run: |
brew install create-dmg
- name: 🎲 Get artifact ids
id: workflow-artifact-ids
uses: ./.github/actions/get-workflow-artifact-ids
- name: 📤 Download app
uses: actions/download-artifact@v4
with:
pattern: qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-*
path: |
artifacts
- name: Create universal app
run: |
mkdir -p x64
gtar --strip-components=5 -zxf ./artifacts/qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-x64-osx-dynamic-release/qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-x64-osx-dynamic-release.tar.gz -C x64
mkdir -p arm64
gtar --strip-components=5 -zxf ./artifacts/qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-arm64-osx-dynamic-release/qgis-app-${{steps.workflow-artifact-ids.outputs.filename}}-arm64-osx-dynamic-release.tar.gz -C arm64
pip install lipomerge
lipomerge ./x64 ./arm64 universal
- name: Create dmg
run: |
QGIS_APP_NAME=QGIS-"${{steps.workflow-artifact-ids.outputs.display-name}}"
create-dmg --volname "${QGIS_APP_NAME} Installer" \
--hide-extension ${QGIS_APP_NAME}.app \
--volicon "$(pwd)/images/icons/mac/qgis.icns" \
--background "$(pwd)/platform/macos/installer_background.png" \
--window-pos 200 120 \
--window-size 512 320 \
--icon-size 100 \
--icon "${QGIS_APP_NAME}.app" 130 160 \
--app-drop-link 400 155 \
${QGIS_APP_NAME}-Installer.dmg \
universal/*/*.app
- name: 📤 Upload app
uses: actions/upload-artifact@v4
id: artifact-mac-qt6
with:
name: qgis-${{steps.workflow-artifact-ids.outputs.filename}}-dmg
path: |
*.dmg
- name: Upload release assets
uses: AButler/upload-release-assets@v3.0
if: ${{ github.event_name == 'release' }}
with:
files: '*.dmg'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Schedule download comment
uses: ./.github/actions/post_sticky_comment
if: github.event_name == 'pull_request'
with:
marker: macos-qt6
body: |
### 🍎 MacOS Qt6 builds
Download [MacOS Qt6 builds of this PR for testing](${{ steps.artifact-mac-qt6.outputs.artifact-url }}).
_This installer is not signed, `control`+click > `open` the app to avoid the warning_
*(Built from commit ${{ github.event.pull_request.head.sha }})*
pr: ${{ github.event.number }}

View File

@ -1,157 +0,0 @@
name: Write build artifact comments
on:
workflow_run:
workflows:
- 🪟 MingW64 Windows 64bit Build
- 🪟 Windows Qt6
- 🧮 Vcpkg report
- 🍎 Build - MacOS Qt6
types:
- completed
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
on-success:
if: github.event.workflow_run.event == 'pull_request'
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: 'Download artifact'
id: download_artifact
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name.startsWith('comment_artifacts-');
});
if (matchArtifacts.length > 0)
{
for (const artifact of matchArtifacts) {
const suffix = artifact.name.split('comment_artifacts-')[1]; // Extract the suffix from the artifact name
// Download each matching artifact
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: 'zip',
});
// Write each artifact to a zip file named after its suffix
const zipFilePath = `${process.env.GITHUB_WORKSPACE}/data-${suffix}.zip`;
fs.writeFileSync(zipFilePath, Buffer.from(download.data));
console.log(`Downloaded and saved artifact: ${artifact.name} to ${zipFilePath}`);
}
}
else
{
core.setOutput('artifact_id', 0);
}
- name: 'Unzip artifact'
run: |
unzip data-*.zip
- name: 'Post artifact download link as comment on PR'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
function updateCommentSection(prComment, marker, body) {
// Create a regular expression to match the section between start and end markers
const sectionRegex = new RegExp(`(<!-- ====startsection ${marker}-->\\n)([\\s\\S]*?)(<!-- ====endsection ${marker}-->)`, 'm');
// Check if the section with the marker exists
if (sectionRegex.test(prComment)) {
// Replace the existing body text between the markers
return prComment.replace(sectionRegex, `$1${body}\n$3`);
} else {
// If the section doesn't exist, append the new section to the end
return prComment.trim() + `\n\n<!-- ====startsection ${marker}-->\n${body}\n<!-- ====endsection ${marker}-->\n`;
}
}
const fs = require('fs');
const path = require('path');
// Read all files matching the pattern 'comment*.json'
const files = fs.readdirSync('.').filter(file => file.startsWith('comment') && file.endsWith('.json'));
if (files.length === 0) {
console.log('No comment*.json files found');
return;
}
// Take the PR number from the first file
const dataSample = JSON.parse(fs.readFileSync(files[0], 'utf8'));
const prNumber = dataSample.pr_number;
const prComments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
const PREFIX = "<!-- !!## stickymarker ##!! -->";
// Find the comment that starts with the specified PREFIX
const comment = prComments.data?.find(c => c.body.startsWith(PREFIX));
let newPrComment;
if (!!comment) {
newPrComment = comment.body;
} else {
newPrComment = PREFIX + "\n";
}
// Loop through all the comment*.json files
for (const file of files) {
try {
const data = JSON.parse(fs.readFileSync(file, 'utf8'));
const marker = data.marker;
const body = data.body;
console.debug(data);
newPrComment = updateCommentSection(newPrComment, marker, body);
} catch (error) {
console.error(`Failed to process file ${file}: ${error.message}`);
}
}
// Update or create the PR comment after processing all the files
if (!!comment) {
// Update the existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id,
body: newPrComment
});
} else {
// Create a new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: newPrComment
});
}

View File

@ -1,106 +0,0 @@
name: Check if user is running the latest version of QGIS
on:
issues:
types: [opened]
env:
# Extract issue body
ISSUE_BODY: ${{ github.event.issue.body }}
jobs:
check_version_reported:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version details
run: |
python ./scripts/get_latest_qgis_versions.py --release="stable" --github_token=${{ secrets.GITHUB_TOKEN }} >> $GITHUB_ENV
- name: Write comment
uses: actions/github-script@v7
with:
script: |
const {ISSUE_BODY, QGIS_VERSION_LTR_PATCH, QGIS_VERSION_STABLE_PATCH} = process.env // Latest released version identified using get_latest_qgis_versions
compareSemanticVersions = (version1, version2) => {
// Returns -1 if version1 < version2
// Returns 1 if version1 > version2
// Returns 0 if version1 = version2
// Assume parameters are string and follow the semantic version : major.minor.patch
var version1 = version1.split(".").map(x => parseInt(x))
var version2 = version2.split(".").map(x => parseInt(x))
//Major version
if ( version1[0] < version2[0] ){
return -1
}
else if ( version1[0] > version2[0] ) {
return 1
}
//Minor version2
if ( version1[1] < version2[1] ){
return -1
}
else if ( version1[1] > version2[1] ) {
return 1
}
//Patch version
if ( version1[2] < version2[2] ){
return -1
}
else if ( version1[2] > version2[2] ) {
return 1
}
return 0
}
// Match qgis version reported e.g : "3.40.0-Bratislava"
// More example here : https://regex101.com/r/jvHJAf/2
var regex = /QGIS [Vv]ersion(?:: | \| )(\d)\.(\d{2})\.(\d*)-[A-Z][a-z]+/
var m = ISSUE_BODY.match(regex)
if ( !m ){
console.log("Debug: No version identified in the body")
return
}
major_version = m[1]
minor_version = m[2]
patch_version = m[3]
user_version = `${major_version}.${minor_version}.${patch_version}`
if ( compareSemanticVersions(user_version, QGIS_VERSION_LTR_PATCH) === -1 ) {
console.log("Debug: Suggest user to try latest LTR release")
let comment = `Thanks for reporting, however it looks like you are using an older version of QGIS (version ${user_version}) instead of latest (Version ${QGIS_VERSION_LTR_PATCH}). Your bug could already be resolved in the latest version. \nIt takes a lot of human effort to triage all the bugs in a project like QGIS, could you please retry with the latest version first?`
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
})
}
else if ( compareSemanticVersions(user_version, QGIS_VERSION_LTR_PATCH) === 0 ) {
console.log("Debug: user is already running latest LTR version")
}
else if ( compareSemanticVersions(user_version, QGIS_VERSION_STABLE_PATCH) === -1 ) {
console.log("Debug: Suggest user to try latest release")
let comment = `Thanks for reporting, however it looks like you are using an older version of QGIS (version ${user_version}) instead of latest (Version ${QGIS_VERSION_STABLE_PATCH}). Your bug could already be resolved in the latest version. \nIt takes a lot of human effort to triage all the bugs in a project like QGIS, could you please retry with the latest version first?`
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
})
}
else {
console.log("Debug: pass, the user is running a supported version so do nothing")
}

View File

@ -1,219 +0,0 @@
name: 🧹 Code Layout
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
- release-**
- queued_ltr_backports
pull_request:
permissions:
contents: read
env:
DOXYGEN_VERSION: 1.9.8
jobs:
documentation_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install requirements
run: |
wget https://www.doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
tar -xzf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
python -m pip install --upgrade pip
pip install autopep8 nose2 mock termcolor
- name: Make
run: |
mkdir build
cd build
cmake -DUSE_CCACHE=OFF -DWITH_CORE=OFF -DWITH_APIDOC=ON -DWITH_ASTYLE=ON -DENABLE_TESTS=ON \
-DWITH_DOT=NO -DWERROR=ON -DDOXYGEN_EXECUTABLE=../doxygen-${DOXYGEN_VERSION}/bin/doxygen ..
make -j3 apidoc
- name: Run Tests
run: cd build && ctest -V -R PyQgsDocCoverage
license_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Requirements
run: |
sudo apt install -y \
cpanminus
cpanm --notest App::Licensecheck
- name: Run License Check
run: ./tests/code_layout/test_licenses.sh
shell_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Requirements
run: |
sudo apt install -y \
shellcheck
- name: Run Shellcheck
run: ./tests/code_layout/test_shellcheck.sh
banned_keywords_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Banned Keywords Test
run: ./tests/code_layout/test_banned_keywords.sh
class_name_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run class naming conventions check
run: ./tests/code_layout/test_class_names.sh
def_window_title_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Def Window Title Test
run: ./tests/code_layout/test_defwindowtitle.sh
qgsscrollarea_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run QgsScrollArea check
run: ./tests/code_layout/test_qgsscrollarea.sh
qvariant_no_brace_init:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: No brace initialization of QVariant variables
run: ./tests/code_layout/test_qvariant_no_brace_init.sh
qt_module_wide_imports:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: No module-wide imports of Qt modules
run: ./tests/code_layout/test_qt_imports.sh
doxygen_layout_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Requirements
run: |
sudo apt install -y \
expect \
silversearcher-ag
- name: Doxygen Layout Test
run: ./tests/code_layout/test_doxygen_layout.sh
indentation_check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Install Requirements
run: |
sudo apt install -y \
astyle \
python3-autopep8 \
flip
- name: Indentation Test
run: ./scripts/verify_indentation.sh HEAD~1
spell_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Requirements
run: |
sudo apt install -y \
expect \
silversearcher-ag
- name: Retrieve changed files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c #v46
id: changed_files
with:
separator: " "
- name: Spell Test
if: steps.changed_files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed_files.outputs.changed_files }}
run: ./scripts/spell_check/check_spelling.sh
sip_check:
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install autopep8 nose2 mock termcolor pyyaml
- name: Checkout
uses: actions/checkout@v4
- name: Sip Checks
run: ./tests/code_layout/sipify/test_sipify.sh
- name: Sip Include Test
run: ./tests/code_layout/sipify/test_sip_include.sh
- name: Sip Files Up To Date
run: ./tests/code_layout/sipify/test_sipfiles.sh
cppcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Requirements
run: |
sudo apt install -y cppcheck
- name: Run cppcheck test
run: ./scripts/cppcheck.sh
moc_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run Check
run: python3 scripts/includemocs.py src --dry-run

View File

@ -1,130 +0,0 @@
name: 🪟 MingW64 Windows 64bit Build
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
- release-**
- queued_ltr_backports
paths:
- 'src/**'
- 'external/**'
- 'python/**'
- 'tests/**'
- 'ms-windows/**'
- 'CMakeLists.txt'
- '.github/workflows/mingw64.yml'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
mingw64-build:
name: MinGW64 Windows Build
runs-on: ubuntu-latest
container:
image: fedora:40
options: --security-opt seccomp=unconfined
volumes:
- ${{ github.workspace }}:/w
steps:
- uses: actions/checkout@v4
# To be removed
# Workaround a bug where the initial /etc/dnf/dnf.conf file contains
# just the "tsflags=nodocs" line
- name: Replace broken dnf.conf
run: printf '[main]\ngpgcheck=True\ninstallonly_limit=3\nclean_requirements_on_remove=True\nbest=False\nskip_if_unavailable=True\ntsflags=nodocs' > /etc/dnf/dnf.conf
- name: Update system
run: dnf -y update
- name: Install core dependencies
run: dnf -y install zip
- name: Install build dependencies
run: ./ms-windows/mingw/mingwdeps.sh
# Node.js and Yarn for server landingpage webapp
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Make yarn available
run: corepack enable
- name: Create ccache dir
run: mkdir -p /w/.ccache/QGIS
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: /w/.ccache/QGIS
key: build-ccache-mingw64-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-mingw64-master
- name: Build QGIS Application
run: CCACHE_DIR=/w/.ccache/QGIS ./ms-windows/mingw/build.sh x86_64 nodebug 4
- name: Save build cache for push only
uses: actions/cache/save@v4
if: ${{ github.event_name == 'push' }}
with:
path: /w/.ccache/QGIS
key: build-ccache-mingw64-${{ github.ref_name }}-${{ github.run_id }}
- name: Create Portable zip
run: |
DISTROOT=build_mingw64/dist/usr/x86_64-w64-mingw32/sys-root/mingw
DEBUGROOT=dist_debug
for file in $(find $DISTROOT -name '*.debug' \( -type l -or -type f \)); do
DEST=${file/$DISTROOT/$DEBUGROOT}
mkdir -p "$(dirname $DEST)"
sudo mv "$file" "$DEST"
done
sudo mv $DISTROOT QGIS-Portable
zip -r qgis-portable-win64.zip QGIS-Portable
(cd $DEBUGROOT && zip -r - *) > qgis-portable-win64-debugsym.zip
- name: Save PR number to zips
run: |
echo ${{ github.event.number }} | tee pr_number
zip -u qgis-portable-win64.zip pr_number
zip -u qgis-portable-win64-debugsym.zip pr_number
echo ${{ github.event.pull_request.head.sha }} | tee git_commit
zip -u qgis-portable-win64.zip git_commit
zip -u qgis-portable-win64-debugsym.zip git_commit
- name: Upload QGIS for Windows 64bit
uses: actions/upload-artifact@v4
id: artifact-win64
with:
name: QGIS for Windows 64bit
path: qgis-portable-win64.zip
- name: Upload QGIS for Windows 64bit Debug Symbols
uses: actions/upload-artifact@v4
id: artifact-win64-debug
with:
name: QGIS for Windows 64bit Debug Symbols
path: qgis-portable-win64-debugsym.zip
- name: Schedule download comment
uses: ./.github/actions/post_sticky_comment
if: github.event_name == 'pull_request'
with:
marker: mingw64
body: |
### 🪟 Windows builds
Download [Windows builds of this PR for testing](${{ steps.artifact-win64.outputs.artifact-url }}).
Debug symbols for this build are available [here](${{ steps.artifact-win64-debug.outputs.artifact-url }}).
*(Built from commit ${{ github.event.pull_request.head.sha }})*
pr: ${{ github.event.number }}

View File

@ -1,100 +0,0 @@
name: 🗺 OGC tests for QGIS Server
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
- release-**
- queued_ltr_backports
paths:
- 'src/core/**'
- 'src/auth/**'
- 'src/providers/**'
- 'src/server/**'
- 'src/CMakeLists.txt'
- 'external/**'
- 'CMakeLists.txt'
- '.github/workflows/ogc.yml'
pull_request:
branches:
- master
- release-**
paths:
- 'src/core/**'
- 'src/auth/**'
- 'src/providers/**'
- 'src/server/**'
- 'src/CMakeLists.txt'
- 'external/**'
- 'CMakeLists.txt'
- '.github/workflows/ogc.yml'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-ogc-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-ogc-master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker Container
id: docker-build
uses: docker/build-push-action@v6
with:
tags: qgis/qgis-deps-ogc:${{ github.event.pull_request.base.ref || github.ref_name }}
context: .ci/ogc
file: .ci/ogc/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
- name: Run build
run: |
docker run -v $(pwd):/usr/src/qgis -v /home/runner/QGIS/.ccache:/root/.ccache ${DOCKER_IMAGE} /usr/src/qgis/.ci/ogc/build.sh
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
- name: Save build cache for push only
uses: actions/cache/save@v4
if: ${{ github.event_name == 'push' }}
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-ogc-${{ github.ref_name }}-${{ github.run_id }}
- name: Install pyogctest
run: |
sudo apt-get update && sudo apt-get install python3-virtualenv virtualenv
virtualenv -p /usr/bin/python3 venv && source venv/bin/activate && pip install pyogctest
- name: Run WMS 1.3.0 OGC tests
run: |
source venv/bin/activate && pyogctest -s wms130 -e
docker compose -f .ci/ogc/docker-compose.yml up -d
source venv/bin/activate && pyogctest -n ogc_qgis -s wms130 -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_wms130
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}
- name: Run OGC API Features 1.0 tests
run: |
cd data && git clone https://github.com/qgis/QGIS-Training-Data && cd -
docker compose -f .ci/ogc/docker-compose.yml up -d
source venv/bin/activate && pyogctest -n ogc_qgis -s ogcapif -v -u http://$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qgis_server_nginx)/qgisserver_ogcapif
env:
DOCKER_IMAGE: ${{ steps.docker-build.outputs.imageid }}

View File

@ -1,20 +0,0 @@
name: "🌈 Triage"
on:
pull_request_target:
types: [ opened, synchronize, reopened ]
permissions:
contents: read
jobs:
triage:
name: "Set on PR"
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@ -1,148 +0,0 @@
name: 📅 Auto set milestone on PR
on:
workflow_call:
pull_request_target:
types:
- opened
permissions:
contents: read
env:
QGIS_MAJOR_VERSION: 3
jobs:
pr-without-milestones:
runs-on: ubuntu-latest
if: github.repository == 'qgis/QGIS'
permissions:
issues: write
pull-requests: write
steps:
# list the tags and milestones
- uses: octokit/graphql-action@v2.x
id: graphql_request
with:
query: |
query {
repository(owner: "qgis", name: "QGIS") {
pullRequests(states: OPEN, last: 100) {
edges {
node {
number
title
milestone {
number
}
baseRef {
name
}
}
}
}
milestones(orderBy: {field: CREATED_AT, direction: DESC}, first: 50) {
edges {
node {
title
number
}
}
}
refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 30) {
edges {
node {
name
}
}
}
}
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# take the first unprocessed PR and determine if some remain
- name: Filter PR to check
id: extract_data
env:
JSON_DATA: ${{ steps.graphql_request.outputs.data }}
run: |
# get PRs without milestones
PRS_TO_PROCESS=$(echo "${JSON_DATA}" | jq '.repository.pullRequests.edges[] | select( .node.milestone.number | not ) | .node.number')
NUMBER_OF_PRS=$(echo "${PRS_TO_PROCESS}" | jq -s '. | length')
echo "NUMBER_OF_PRS: ${NUMBER_OF_PRS}"
# early exit
[[ ${NUMBER_OF_PRS} == 0 ]] && echo "has_milestone_to_set=0" >> $GITHUB_OUTPUT && exit 0
# Take the first
PR_NUMBER=$(echo "${PRS_TO_PROCESS}" | jq -s '. | first')
echo "PR_NUMBER: ${PR_NUMBER}"
# Not used for now
RE_RUN_JOB=$(echo "${JSON_DATA}" | jq -s '. | length > 1')
echo "RE_RUN_JOB: ${RE_RUN_JOB}"
# Get the base branch
BASE_BRANCH=$(echo "${JSON_DATA}" | jq -r ".repository.pullRequests.edges[] | select( .node.number == ${PR_NUMBER} ) | .node.baseRef.name")
echo "BASE_BRANCH: ${BASE_BRANCH}"
# master => NOTHING, release_3-10 => _10
MINOR_VERSION=$(echo ${BASE_BRANCH} | sed -r -e 's/^release-[0-9]_([0-9]+)/_\1/;t;d')
echo "MINOR_VERSION: ${MINOR_VERSION}"
# get the max release from the tags
MAX_RELEASE=$(echo "${JSON_DATA}" | jq ".repository.refs.edges[].node.name | select( . | test(\"^final-${QGIS_MAJOR_VERSION}${MINOR_VERSION}\") ) | sub(\"^final-${QGIS_MAJOR_VERSION}_(?<m>[0-9]+)_(?<p>.)\"; .m+\".\"+.p) | tonumber" | jq -s '. | max')
echo "MAX_RELEASE: ${MAX_RELEASE}"
# increase the number to get milestone: round+2 for master, +0.1 for release_xxx branches
INCREASE_OPERATION=$([[ -z ${MINOR_VERSION} ]] && echo "${MAX_RELEASE%.*} + 2.0" || echo "${MAX_RELEASE} + 0.1" )
echo "INCREASE_OPERATION: ${INCREASE_OPERATION}"
MILESTONE_TITLE="${QGIS_MAJOR_VERSION}."$(echo "${INCREASE_OPERATION}" | bc)
echo "MILESTONE_TITLE: ${MILESTONE_TITLE}"
MILESTONE_NUMBER=$(echo "${JSON_DATA}" | jq ".repository.milestones.edges[] | select( .node.title == \"${MILESTONE_TITLE}\" ) | .node.number")
echo "MILESTONE_NUMBER: ${MILESTONE_NUMBER}"
HAS_MILESTONE_TO_CREATE=$([[ -z ${MILESTONE_NUMBER} ]] && echo "1" || echo "0" )
echo "HAS_MILESTONE_TO_CREATE: ${HAS_MILESTONE_TO_CREATE}"
echo "has_milestone_to_set=1" >> $GITHUB_OUTPUT
echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "milestone_title=${MILESTONE_TITLE}" >> $GITHUB_OUTPUT
echo "milestone_number=${MILESTONE_NUMBER}" >> $GITHUB_OUTPUT
echo "has_milestone_to_create=${HAS_MILESTONE_TO_CREATE}" >> $GITHUB_OUTPUT
# create the milestone if needed
- name: Create milestone if needed
id: create_milestone
if: steps.extract_data.outputs.has_milestone_to_set == 1 && steps.extract_data.outputs.has_milestone_to_create == 1
uses: octokit/request-action@v2.x
with:
route: POST /repos/qgis/QGIS/milestones
title: ${{ steps.extract_data.outputs.milestone_title }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Compute the milestone number
- name: Compute milestone number from existing or created
id: compute_milestone
if: always() && steps.extract_data.outputs.has_milestone_to_set == 1
env:
MILESTONE_NUMBER_EXISTING: ${{ steps.extract_data.outputs.milestone_number }}
MILESTONE_NUMBER_CREATED_JSON: ${{ steps.create_milestone.outputs.data }}
run: |
FINAL_MILESTONE_NUMBER=$([[ -n ${MILESTONE_NUMBER_EXISTING} ]] && echo "${MILESTONE_NUMBER_EXISTING}" || echo $(echo "${MILESTONE_NUMBER_CREATED_JSON}" | jq .number ))
echo "FINAL_MILESTONE_NUMBER: ${FINAL_MILESTONE_NUMBER}"
echo "milestone_number=${FINAL_MILESTONE_NUMBER}" >> $GITHUB_OUTPUT
# update PR with milestone
- name: update PR milestone
if: steps.extract_data.outputs.has_milestone_to_set == 1
uses: octokit/request-action@v2.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: PATCH /repos/qgis/QGIS/issues/:pull_number
pull_number: ${{ steps.extract_data.outputs.pr_number }}
milestone: ${{ steps.compute_milestone.outputs.milestone_number }}

View File

@ -1,172 +0,0 @@
name: 📖 PR needs documentation
# a message will be added to the PR to ping the author about her/his responsibility to handle the documentation issue
# an issue is automatically created in the QGIS-Documentation repository when the PR gets merged
on:
pull_request_target:
types:
- opened
- closed
- labeled
permissions:
contents: read
jobs:
ping-author-message:
permissions:
issues: write # for peter-evans/create-or-update-comment to create or update comment
pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
if: github.event.action != 'closed'
runs-on: ubuntu-latest
name: Write comment to ping author about the pull request description
steps:
- name: Create comment about documentation
if: github.event.label.name == 'Needs Documentation'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
token: ${{ secrets.GH_TOKEN_BOT }}
issue-number: ${{ github.event.pull_request.number }}
body: |
@${{ github.event.pull_request.user.login }}
This pull request has been tagged as **requiring documentation**.
A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation **when this PR is merged**.
**Please update the description** (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.
Thank you!
reactions: 'rocket'
- name: Create comment about changelog
if: github.event.label.name == 'Changelog'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
token: ${{ secrets.GH_TOKEN_BOT }}
issue-number: ${{ github.event.pull_request.number }}
body: |
@${{ github.event.pull_request.user.login }}
This pull request has been tagged for the [changelog](https://www.qgis.org/en/site/forusers/visualchangelogs.html).
* The description will be harvested so please provide a "nearly-ready" text for the final changelog
* If possible, add a nice illustration of the feature. Only the **first** one in the description will be harvested (GIF accepted as well)
* If you can, it's better to give credits to your sponsor, see below for different formats.
You can edit the description.
<details>
<summary>Format available for credits</summary>
<br />
- `Funded by NAME`
- `Funded by URL`
- `Funded by NAME URL`
- `Sponsored by NAME`
- `Sponsored by URL`
- `Sponsored by NAME URL`
</details>
Thank you!
reactions: '+1'
update-milestone:
if: github.event.pull_request.merged && ( ( github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'Needs Documentation') ) || github.event.label.name == 'Needs Documentation' )
# Update the milestone (if necessary)
name: Update final milestone
permissions:
issues: write
pull-requests: write
contents: read
uses: ./.github/workflows/pr-auto-milestone.yml
create-doc-issue:
if: github.event.pull_request.merged && ( ( github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'Needs Documentation') ) || github.event.label.name == 'Needs Documentation' )
runs-on: ubuntu-latest
name: Create issue on doc repo for labeled issue
steps:
# transform the milestone (e.g. 3.10.4) to a doc label (3.10)
- name: QGIS milestone to Doc label
id: milestone2label
env:
MILESTONE: ${{ github.event.pull_request.milestone.title }}
run: |
LABEL=$(sed -r 's/^([[:digit:]]\.[[:digit:]]+)(\.[[:digit:]]+)?$/\1/' <<< ${MILESTONE})
echo ${LABEL}
echo "label=${LABEL}" >> $GITHUB_OUTPUT
# get the PR body
- name: Get PR body as text
id: get_pr_body
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_BODY: "${{ github.event.pull_request.body }}"
run: |
echo 'body<<EOF' >> $GITHUB_OUTPUT
echo "$PR_BODY" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
# get commits from the PR
- name: Get PR commits
uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d # v2.4.0
id: get_pr_commits
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: GET /repos/qgis/QGIS/pulls/{pull_number}/commits
pull_number: ${{ github.event.pull_request.number }}
# extracts the matching commits
- name: Filter commits with \[needs?.doc(umentation)?s?\]
id: filtered_commits
env:
JSON_DATA: ${{ steps.get_pr_commits.outputs.data }}
run: |
COMMITS_MESSAGES=$(echo ${JSON_DATA} | jq '.[].commit.message | select( . |test("\\[(feature|needs?.doc(umentation)?s?)\\]"; "i")) | sub("\\[needs?.doc(umentation)?s?\\]"; "\n\n\n\n"; "i")')
echo "commits=$(echo ${COMMITS_MESSAGES} | tr -d '\n' )" >> $GITHUB_OUTPUT
# create the documentation issue
- name: Create Documentation issue
id: doc_issue
uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
with:
token: ${{ secrets.GH_TOKEN_BOT }}
owner: qgis
repo: QGIS-Documentation
title: ${{ format('{0} (Request in QGIS)', github.event.pull_request.title) }}
# do not modify the QGIS version, an action automatically creates a label in the doc repo
# this is not possible to set labels directly due to security reasons
# the token is in clear, so no rights are given to qgis-bot
body: |
### Request for documentation
From pull request qgis/QGIS#${{ github.event.pull_request.number }}
Author: @${{ github.event.pull_request.user.login }}
QGIS version: ${{ steps.milestone2label.outputs.label }}
**${{ github.event.pull_request.title }}**
### PR Description:
${{ steps.get_pr_body.outputs.body }}
### Commits tagged with [need-docs] or [FEATURE]
${{ steps.filtered_commits.outputs.commits }}
# write comment to ping the PR author
- name: Create comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
token: ${{ secrets.GH_TOKEN_BOT }}
issue-number: ${{ github.event.pull_request.number }}
body: |
@${{ github.event.pull_request.user.login }}
A documentation ticket has been opened at https://github.com/qgis/QGIS-Documentation/issues/${{ steps.doc_issue.outputs.number }}
It is **your** responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!
reactions: 'rocket'

View File

@ -1,20 +0,0 @@
name: Remove Labels PR Commit
on: pull_request_target
permissions:
contents: read
jobs:
remove_labels:
permissions:
pull-requests: write # for actions-ecosystem/action-remove-labels to remove PR labels
if: contains(github.event.pull_request.labels.*.name, 'stale')
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 #v1.0
if: ${{ github.event.comment.user.url != 'https://github.com/apps/github-actions' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
stale

View File

@ -1,106 +0,0 @@
name: Pre-commit checks
on:
pull_request_target:
push:
issue_comment:
types: [created]
jobs:
pre-commit:
if: github.event_name != 'issue_comment' || github.event.comment.body == '/fix-precommit'
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
issues: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 200
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: |
if [ "${{ github.event_name }}" == "pull_request_target" ]; then
git fetch origin ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/${{ github.event.pull_request.base.ref }}
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-head
MODIFIED_FILES=($(git diff --name-only origin/${{ github.event.pull_request.base.ref }} pr-head))
elif [ "${{ github.event_name }}" == "push" ]; then
MODIFIED_FILES=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }}))
else
echo "Unsupported event: ${{ github.event_name }}"
exit 1
fi
echo "Modified files: ${MODIFIED_FILES[@]}"
pre-commit run --files ${MODIFIED_FILES[@]} || (echo "pre-commit failed. Attempting to auto-fix..." && exit 1)
- name: Commit fixes
if: failure()
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "auto-fix pre-commit issues" || echo "No changes to commit"
- name: Auto-commit fixes
if: failure() && github.event_name == 'push'
run: git push || echo "Failed to push changes. Please check permissions or conflicts."
- name: Push fixes to new branch
if: failure() && github.event_name == 'issue_comment' && github.event.comment.body == '/fix-precommit' && github.event.issue.pull_request
run: |
git checkout -b fix/pre-commit-${{ github.event.pull_request.head.sha }}
git push origin fix/pre-commit-${{ github.event.pull_request.head.sha }}
- name: Listen for `/fix-precommit` comment
if: failure() && github.event_name == 'issue_comment' && github.event.comment.body == '/fix-precommit' && github.event.issue.pull_request
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const forkOwner = context.payload.pull_request.head.repo.owner.login;
const forkRepo = context.payload.pull_request.head.repo.name;
const forkBranch = context.payload.pull_request.head.ref;
const baseRepoOwner = context.repo.owner;
const baseRepoName = context.repo.repo;
const headBranch = `fix/pre-commit-${context.payload.pull_request.head.sha}`;
await github.rest.pulls.create({
owner: forkOwner,
repo: forkRepo,
title: "Auto-fix: Pre-commit issues",
head: `${baseRepoOwner}:${headBranch}`,
base: forkBranch,
body: "This PR attempts to fix pre-commit issues automatically.",
});
- name: Comment on PR if pre-commit failed
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const existingComment = comments.find(comment => comment.body.includes("⚠️ Pre-commit checks failed."));
if (!existingComment) {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "⚠️ Pre-commit checks failed. You can fix issues locally by running `pre-commit run --all-files`. Alternatively, comment `/fix-precommit` on this pull request, and I will attempt to auto-fix and open a new pull request for you."
});
}

View File

@ -1,50 +0,0 @@
name: 🚀 Release
on:
push:
tags:
- 'final-*_*_*'
permissions:
contents: read
jobs:
build:
permissions:
contents: none
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Version URL
run: |
VERSION=$(echo ${RELEASE_VERSION} | cut -d '-' -f 2 )
if [ ${VERSION: -1} = "0" ]
then
VERSION=$(echo ${VERSION} | cut -d '_' -f1,2 | sed 's/_/\./g')
echo "version_url=https://changelog.qgis.org/en/qgis/version/${VERSION}" >> $GITHUB_ENV
else
PREVIOUS=$(echo ${VERSION} | sed 's/_/\./g' | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF-1)%(10^length($NF))); print}' | sed 's/\./_/g')
echo "version_url=https://github.com/qgis/QGIS/compare/final-${PREVIOUS}%5E...final-${VERSION}" >> $GITHUB_ENV
fi
- name: Version name
run: |
VERSION_NAME=$(echo ${{ env.RELEASE_VERSION }} | cut -d '-' -f 2 | sed 's/_/\./g')
echo "version_name=${VERSION_NAME}" >> $GITHUB_ENV
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_BOT }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.version_name }}
body: ${{ env.version_url }}
draft: false
prerelease: false

View File

@ -1,455 +0,0 @@
name: 🧪 QGIS tests
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
- release-**
- queued_ltr_backports
paths:
- 'src/**'
- 'external/**'
- 'python/**'
- 'tests/**'
- 'CMakeLists.txt'
- '.github/workflows/run-tests.yml'
- '.docker/**'
- '.ci/**'
pull_request:
branches:
- master
- release-**
- queued_ltr_backports
# paths cannot be filtered on this workflow on pull request as it is a required one in the branch protection
# feature request and hacks: https://github.community/t/feature-request-conditional-required-checks/16761
permissions:
contents: read
jobs:
build:
env:
QGIS_WORKSPACE: ${{ github.workspace }} # used in docker compose
RUN_FLAKY_TESTS: ${{ contains( github.event.pull_request.labels.*.name, 'run flaky tests') }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
include:
- distro-version: '24.04'
qt-version: 5
run-tests: true
with-qt6: OFF
with-qt5: ON
with-3d: ON
with-quick: ON
with-clazy: ON
with-grass7: OFF
with-grass8: OFF
with-webengine: OFF
with-pdf4qt: OFF
with-compile-commands: ON
# LD_PRELOAD: /lib/x86_64-linux-gnu/libSegFault.so
experimental: false
unity-builds: ON
- distro-version: '39'
qt-version: 6
run-tests: true
with-qt6: ON
with-qt5: OFF
with-3d: ON
with-quick: ON
with-clazy: OFF
with-grass7: OFF
with-grass8: ON
with-webengine: ON
with-pdf4qt: ON
with-compile-commands: OFF
LD_PRELOAD: ''
experimental: false
unity-builds: ON
fail-fast: false
outputs:
compile_outcome: ${{ steps.compile.outcome }}
tests_failing: ${{ steps.tests.outputs.TESTS_FAILING }}
cdash_url: ${{ steps.tests.outputs.CDASH_URL }}
runners_outcome: ${{ steps.runners.outcome }}
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # main
with:
tool-cache: true
large-packages: false
docker-images: false
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
- name: Set vars
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
GITHUB_PR_NUMBER: ${{github.event.number}}
run: |
# Be aware that these instructions are duplicated in run-tests job
DOCKER_TAG=$(echo $( [[ ${GITHUB_EVENT_NAME} == pull_request ]] && echo ${GITHUB_BASE_REF} || echo ${GITHUB_REF##*/} ) | sed 's/^master$/latest/')
CTEST_BUILD_NAME=$( [[ ${GITHUB_EVENT_NAME} == pull_request ]] && echo "PR${GITHUB_PR_NUMBER}" || echo ${GITHUB_REF##*/} )"_${GITHUB_SHA}"
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
echo "CTEST_BUILD_NAME=${CTEST_BUILD_NAME}" >> $GITHUB_ENV
echo "QT_VERSION=${{ matrix.qt-version }}" >> $GITHUB_ENV
- name: Print vars
run: |
echo DOCKER_TAG: ${DOCKER_TAG}
echo CTEST_BUILD_NAME: ${CTEST_BUILD_NAME}
echo QT_VERSION: ${QT_VERSION}
- name: Login to Docker Hub
if: ${{ github.event_name == 'push' && github.repository == 'qgis/QGIS' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Container with Build Environment
id: docker-build
uses: docker/build-push-action@v6
with:
context: .
file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile
tags: qgis/qgis3-build-deps-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}:${{ github.event.pull_request.base.ref || github.ref_name }}
push: ${{ github.event_name == 'push' && github.repository == 'qgis/QGIS' }}
pull: true
build-args:
DISTRO_VERSION=${{ matrix.distro-version }}
- name: Tag image
run: docker tag ${{ steps.docker-build.outputs.imageid }} qgis3-build-deps
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}-${{ github.event.pull_request.base.ref || github.ref_name }}
restore-keys: |
build-ccache-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}-master
- name: Compile QGIS
id: compile
run: |
docker run -t --name qgis_container \
-v $(pwd):/root/QGIS \
-v /home/runner/QGIS/.ccache:/root/.ccache \
--env-file .docker/docker-variables.env \
--env CCACHE_DIR=/root/.ccache \
--env PUSH_TO_CDASH=true \
--env WITH_QT5=${{ matrix.with-qt5 }} \
--env BUILD_WITH_QT6=${{ matrix.with-qt6 }} \
--env WITH_QUICK=${{ matrix.with-quick }} \
--env WITH_3D=${{ matrix.with-3d }} \
--env WITH_GRASS7=${{ matrix.with-grass7 }} \
--env WITH_GRASS8=${{ matrix.with-grass8 }} \
--env WITH_QTWEBENGINE=${{ matrix.with-webengine }} \
--env WITH_PDF4QT=${{ matrix.with-pdf4qt }} \
--env LD_PRELOAD=${{ matrix.LD_PRELOAD }} \
--env WITH_CLAZY=${{ matrix.with-clazy }} \
--env WITH_COMPILE_COMMANDS=${{ matrix.with-compile-commands }} \
--env ENABLE_UNITY_BUILDS=${{ matrix.unity-builds }} \
qgis3-build-deps \
/root/QGIS/.docker/docker-qgis-build.sh
- name: Save build cache for push only
uses: actions/cache/save@v4
if: ${{ github.event_name == 'push' }}
with:
path: /home/runner/QGIS/.ccache
key: build-ccache-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}-${{ github.ref_name }}-${{ github.run_id }}
- name: Push artifact
id: push_artifact
if: ${{ matrix.run-tests }}
run: tar --exclude='*.o' -cvzf build.tgz build
- uses: actions/upload-artifact@v4
if: ${{ matrix.run-tests }}
with:
name: build-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}.tgz
path: ./build.tgz
retention-days: 1
# - name: Test QGIS runners
# id: runners
# if: ${{ matrix.distro-version == env.DEFAULT_DISTRO_VERSION }}
# run: |
# docker run -d --name qgis-testing-environment \
# -v $(pwd):/root/QGIS \
# -v $(pwd)/tests/src/python:/tests_directory \
# -v $(pwd)/.docker/qgis_resources/test_runner:/usr/bin/test_runner \
# -v $(pwd)/.docker/qgis_resources/supervisor:/etc/supervisor \
# -e QGIS_BUILD_PATH=/root/QGIS/build/output/bin/qgis \
# -e TEST_RUNNER_PATH=/usr/bin/test_runner/qgis_testrunner.py \
# -e DISPLAY=:99 \
# qgis_image \
# /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
# # Wait for xvfb to finish starting
# printf "Waiting for the docker...🐳..."
# sleep 10
# echo " done 🥩"
#
# declare -A testrunners
# # Passing cases:
# testrunners["test_testrunner.run_passing"]=0
# testrunners["test_testrunner.run_skipped_and_passing"]=0
# # Failing cases:
# testrunners["test_testrunner"]=1
# testrunners["test_testrunner.run_all"]=1
# testrunners["test_testrunner.run_failing"]=1
# set +e # do not exit on error
# # Run tests in the docker
# for i in "${!testrunners[@]}"
# do
# echo "::group::docker_test_runner_${i}"
# echo "test ${i}..."
# docker exec -i qgis-testing-environment sh -c "cd /tests_directory && /usr/bin/test_runner/qgis_testrunner.sh ${i}"
# [[ $? -eq "${testrunners[$i]}" ]] && echo "success" || exit 1
# echo "::endgroup::"
# done
# set -e # switch back
# docker stop qgis-testing-environment
run-tests:
name: Run tests
env:
QGIS_WORKSPACE: ${{ github.workspace }} # used in docker compose
runs-on: ubuntu-latest
needs: build
if: always()
strategy:
matrix:
qt-version: [5, 6]
test-batch: [ALL_BUT_PROVIDERS, POSTGRES, HANA, SQLSERVER]
include:
- qt-version: 5
distro-version: 24.04
docker-target: binary-only
- qt-version: 6
distro-version: 39
docker-target: binary-only
- qt-version: 5
distro-version: 24.04
test-batch: ORACLE
docker-target: binary-for-oracle
exclude:
- qt-version: 6
test-batch: HANA
- qt-version: 6
test-batch: POSTGRES
- qt-version: 6
test-batch: SQLSERVER
fail-fast: false
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # main
with:
tool-cache: true
large-packages: false
docker-images: false
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
- name: Set vars
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
GITHUB_PR_NUMBER: ${{github.event.number}}
run: |
# Be aware that these instructions are duplicated in build job
CTEST_BUILD_NAME=$( [[ ${GITHUB_EVENT_NAME} == pull_request ]] && echo "PR${GITHUB_PR_NUMBER}" || echo ${GITHUB_REF##*/} )"_${GITHUB_SHA}_${{ matrix.test-batch }}"
echo "CTEST_BUILD_NAME=${CTEST_BUILD_NAME}" >> $GITHUB_ENV
echo "QT_VERSION=${{ matrix.qt-version }}" >> $GITHUB_ENV
- name: Print vars
run: |
echo CTEST_BUILD_NAME: ${CTEST_BUILD_NAME}
- name: Login to Docker Hub
if: ${{ github.event_name == 'push' && github.repository == 'qgis/QGIS' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Container with Testing Environment
id: docker-build
uses: docker/build-push-action@v6
with:
context: .
file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile
tags: qgis/qgis3-qt${{ matrix.qt-version }}-build-deps-bin-only:${{ github.event.pull_request.base.ref || github.ref_name }}
push: ${{ github.event_name == 'push' && github.repository == 'qgis/QGIS' }}
pull: true
target: ${{ matrix.docker-target }}
build-args:
DISTRO_VERSION=${{ matrix.distro-version }}
- name: Tag image
run: docker tag ${{ steps.docker-build.outputs.imageid }} qgis3-build-deps-binary-image
- name: Print disk space
run: |
echo "DOCKER IMAGES"
docker images
echo "DF -H"
sudo df -h
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}.tgz
path: .
- name: Extract build artifact
run: |
tar xvzf build.tgz
rm -Rf build.tgz
- name: Print disk space
run: |
echo "DF -H"
sudo df -h
- name: Run tests
id: tests
env:
TEST_BATCH: ${{matrix.test-batch}}
QGIS_COMMON_GIT_DIR: ${{ github.workspace }}
GITHUB_SHA: ${{ github.sha }}
run: |
DOCKERFILE=$( ( [[ ${{ matrix.test-batch }} == "ORACLE" ]] && echo "docker-compose-testing-oracle.yml" ) \
|| ( [[ ${{ matrix.test-batch }} == "POSTGRES" ]] && echo "docker-compose-testing-postgres.yml" ) \
|| ( [[ ${{ matrix.test-batch }} == "SQLSERVER" ]] && echo "docker-compose-testing-mssql.yml" ) \
|| echo "docker-compose-testing.yml" )
[[ ${{ matrix.test-batch }} == "ORACLE" ]] && sudo rm -rf /usr/share/dotnet/sdk
echo "TEST_BATCH=$TEST_BATCH"
echo "DOCKERFILE=$DOCKERFILE"
mkdir -p /tmp/webdav_tests && chmod 777 /tmp/webdav_tests
mkdir -p /tmp/minio_tests/test-bucket && chmod -R 777 /tmp/minio_tests
docker compose -f .docker/$DOCKERFILE run -e GITHUB_SHA=$GITHUB_SHA qgis-deps /root/QGIS/.docker/docker-qgis-test.sh $TEST_BATCH
- name: Fix permissions on test report
if: ${{ failure() }}
run: |
sudo chmod -R 777 qgis_test_report
- name: Dump report contents
if: ${{ failure() }}
run: |
MD_REPORT_FILE="qgis_test_report/summary.md"; [ -f "$MD_REPORT_FILE" ] && cat "$MD_REPORT_FILE" || true
- name: Save PR number to test report
if: ${{ failure() }}
run: |
echo ${{ github.event.number }} | tee qgis_test_report/pr_number
echo ${{ github.event.pull_request.head.sha }} | tee qgis_test_report/git_commit
- name: Archive test results report
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results-qt${{ matrix.qt-version }}
path: qgis_test_report
clang-tidy:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
include:
- distro-version: '24.04'
qt-version: 5
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # main
with:
tool-cache: true
large-packages: false
docker-images: false
swap-storage: true
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Login to Docker Hub
if: ${{ github.event_name == 'push' && github.repository == 'qgis/QGIS' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Container with Testing Environment
id: docker-build
uses: docker/build-push-action@v6
with:
context: .
file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile
tags: qgis/qgis3-qt${{ matrix.qt-version }}-build-deps-bin-only:${{ github.event.pull_request.base.ref || github.ref_name }}
push: ${{ github.event_name == 'push' && github.repository == 'qgis/QGIS' }}
pull: true
target: ${{ matrix.docker-target }}
build-args:
DISTRO_VERSION=${{ matrix.distro-version }}
- name: Tag image
run: docker tag ${{ steps.docker-build.outputs.imageid }} qgis3-build-deps-binary-image
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}.tgz
path: .
- name: Extract build artifact
run: |
tar xvzf build.tgz
rm -Rf build.tgz
- name: Run Clang-Tidy
run: |
docker run -t --name qgis_container \
-v $(pwd):/root/QGIS \
-v /home/runner/QGIS/.ccache:/root/.ccache \
--env-file .docker/docker-variables.env \
qgis3-build-deps-binary-image \
/root/QGIS/.docker/docker-qgis-clangtidy.sh

View File

@ -1,38 +0,0 @@
name: Run sipify
on:
workflow_dispatch:
push:
branches:
- master
- release-*
jobs:
sipify:
runs-on: [ubuntu-latest]
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Requirements
run: pip install nose2 mock termcolor pyyaml
- name: Get PR branch
uses: alessbell/pull-request-comment-branch@ef3408c9757d05f89cb525036383033a313758a0 # v2.1.0
if: ${{ github.event_name == 'issue_comment' }}
id: comment-branch
- uses: actions/checkout@v4
- name: run sipify
run: ./scripts/sipify_all.sh -m
- name: commit
run: |
git config user.name qgis-bot
git config user.email bot@qgis.org
git add .
git commit -m "auto sipify 🍺" || echo "nothing to commit"
git push

View File

@ -1,93 +0,0 @@
name: 👓 Handle stale issues
on:
schedule:
- cron: "30 2 * * *"
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
if: github.repository_owner == 'qgis'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: >
The QGIS project highly values your contribution and would love to see
this work merged!
Unfortunately this PR has not had any activity in the last 14 days and
is being automatically marked as "stale".
If you think this pull request should be merged, please check
- that all unit tests are passing
- that all comments by reviewers have been addressed
- that there is enough information for reviewers, in particular
- link to any issues which this pull request fixes
- add a description of workflows which this pull request fixes
- add screenshots if applicable
- that you have written unit tests where possible
In case you should have any uncertainty, please leave a comment and we will
be happy to help you proceed with this pull request.
If there is no further activity on this pull request, it will be closed in a
week.
close-pr-message: >
While we hate to see this happen, this PR has been automatically closed because
it has not had any activity in the last 21 days. If this pull request should be
reconsidered, please follow the guidelines in the previous comment and reopen
this pull request. Or, if you have any further questions, just ask! We love to
help, and if there's anything the QGIS project can do to help push this PR forward
please let us know how we can assist.
stale-pr-label: 'stale'
exempt-pr-labels: 'Merge After Thaw,Frozen'
days-before-pr-stale: 14
days-before-pr-close: 7
stale-issue-message: >
The QGIS project highly values your report and would love to see it addressed.
However, this issue has been left in feedback mode for the last 14 days and is
being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information
or answer any open questions. If you could resolve the issue yourself meanwhile,
please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be
happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.
close-issue-message: >
While we hate to see this happen, this issue has been automatically closed because
it has not had any activity in the last 42 days despite being marked as feedback.
If this issue should be reconsidered, please follow the guidelines in the previous
comment and reopen this issue.
Or, if you have any further questions, there are also
[further support channels](https://www.qgis.org/en/site/forusers/support.html)
that can help you.
stale-issue-label: 'stale'
only-issue-labels: 'feedback'
days-before-issue-stale: 14
days-before-issue-close: 28
operations-per-run: 1000

View File

@ -1,21 +0,0 @@
name: Remove Labels
on: [issue_comment, pull_request]
permissions:
contents: read
jobs:
remove_labels:
permissions:
issues: write # for actions-ecosystem/action-remove-labels to remove issue labels
pull-requests: write # for actions-ecosystem/action-remove-labels to remove PR labels
if: contains(github.event.issue.labels.*.name, 'stale')
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-remove-labels@v1
if: ${{ github.event.comment.user.url != 'https://github.com/apps/github-actions' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
stale

View File

@ -1,36 +0,0 @@
---
name: 🧮 Vcpkg report
on:
pull_request:
paths:
- 'vcpkg/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
vcpkg-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 30
- name: Generate diff report
id: vcpkg_diff
uses: ./.github/actions/vcpkg_update_report
with:
vcpkg-manifest-dir: vcpkg
triplet: x64-linux
features: 3d,bindings,gui,opencl,quick,server
- name: Schedule report comment
uses: ./.github/actions/post_sticky_comment
if: github.event_name == 'pull_request'
with:
marker: vcpkg-report
body: |
### 🧮 Vcpkg update report
${{ steps.vcpkg_diff.outputs.report }}
pr: ${{ github.event.number }}

View File

@ -1,152 +0,0 @@
---
name: 🪟 Windows Qt6
on:
push:
branches:
- master
- release-**
pull_request:
release:
types: ['published']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
packages: write
jobs:
build:
name: build (windows)
runs-on: windows-2022
steps:
- name: 🐣 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: 🔨 Uninstall system cmake
shell: bash
run: |
choco uninstall cmake.install
- name: 🐩 Install CMake and Ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5
with:
cmakeVersion: 3.31.6
- name: 🧽 Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 #v1
- name: 🎡 Setup vcpkg
uses: ./.github/actions/setup-vcpkg
- name: 🦬 Setup flex/bison
uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 #v1.12
with:
repository: 'lexxmark/winflexbison'
fileName: '*.zip'
tag: 'v2.5.24'
extract: true
- name: 🛍️ Setup ccache
uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 #v1.2
with:
max-size: 1G
key: build-ccache-win64-qt6-${{ github.event.pull_request.base.ref || github.ref_name }}
save: ${{ github.event_name == 'push' }}
- name: 🛍️ Tune ccache configuration
shell: bash
run: |
# To make ccache work properly with precompiled headers
ccache --set-config sloppiness=pch_defines,time_macros,include_file_mtime,include_file_ctime
- name: 🌱 Install dependencies and generate project files
shell: bash
env:
X_VCPKG_ASSET_SOURCES: x-azurl,https://assetcache.open-vcpkg.org/assetcache,,read
run: |
BUILD_DIR=$( cygpath "${{ github.workspace }}/build" )
SOURCE_DIR=$( cygpath "${{ github.workspace }}" )
cmake -S "${SOURCE_DIR}" \
-B "${BUILD_DIR}" \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D WITH_VCPKG=ON \
-D CREATE_ZIP=ON \
-D VCPKG_TARGET_TRIPLET=x64-windows-release \
-D VCPKG_HOST_TRIPLET=x64-windows-release \
-D WITH_DESKTOP=ON \
-D WITH_3D=ON \
-D WITH_BINDINGS=ON \
-D ENABLE_TESTS=OFF \
-D BUILD_WITH_QT6=ON \
-D USE_CCACHE=ON \
-D ENABLE_UNITY_BUILDS=ON \
-D FLEX_EXECUTABLE="${SOURCE_DIR}/win_flex.exe" \
-D BISON_EXECUTABLE="${SOURCE_DIR}/win_bison.exe" \
-D SIP_BUILD_EXECUTABLE="${BUILD_DIR}\vcpkg_installed\x64-windows-release\tools\python3\Scripts\sip-build.exe" \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D WITH_QTWEBKIT=OFF \
-D VCPKG_INSTALL_OPTIONS="--x-buildtrees-root=C:/src" \
-D NUGET_USERNAME=${{ github.actor }} \
-D NUGET_TOKEN=${{ secrets.GITHUB_TOKEN }}
- name: 🌋 Build
shell: bash
run: |
cmake --build "${{ github.workspace }}/build" --config Release
# - uses: m-kuhn/action-tmate@patch-1
# if: failure()
- name: 📦 Package
shell: bash
run: |
cmake --build "${{ github.workspace }}/build" --target bundle --config Release
- name: 📦 Create SDK
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
run: |
vcpkg.exe export --zip --output-dir=./sdk --x-install-root=./build/vcpkg_installed --x-manifest-root=vcpkg
- name: 📤 Upload sdk
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
uses: actions/upload-artifact@v4
with:
name: qgis-sdk-x64-windows
path: |
sdk/vcpkg-export-*.zip
- name: 📑 Upload dep build logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-logs-x64-windows
path: |
C:/src/**/*.log
- name: 📤 Upload bundle
uses: actions/upload-artifact@v4
id: artifact-win64-qt6
with:
name: qgis-windows-qt6
path: |
build/*-win64.zip
- name: Schedule download comment
uses: ./.github/actions/post_sticky_comment
if: github.event_name == 'pull_request'
with:
marker: mingw64-qt6
body: |
### 🪟 Windows Qt6 builds
Download [Windows Qt6 builds of this PR for testing](${{ steps.artifact-win64-qt6.outputs.artifact-url }}).
*(Built from commit ${{ github.event.pull_request.head.sha }})*
pr: ${{ github.event.number }}

View File

@ -1,101 +0,0 @@
name: Write test failure comment
on:
workflow_run:
workflows: [🧪 QGIS tests]
types:
- completed
permissions:
contents: read
jobs:
on-failure:
strategy:
matrix:
qt-version: [ 5, 6 ]
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: 'Download artifact'
id: download_artifact
uses: actions/github-script@v7
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "test-results-qt${{ matrix.qt-version }}"
});
if (matchArtifacts.length>0)
{
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifacts[0].id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/test-results-qt${{ matrix.qt-version }}.zip`, Buffer.from(download.data));
core.setOutput('artifact_id', matchArtifacts[0].id);
}
else
{
core.setOutput('artifact_id', 0);
}
- name: 'Unzip artifact'
if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0
run: unzip -j test-results-qt${{ matrix.qt-version }}.zip *.md pr_number git_commit || ( e=$? && if [ $e -ne 11 ]; then exit $e; fi )
- name: 'Post test report markdown summary as comment on PR'
if: fromJSON(steps.download_artifact.outputs.artifact_id) > 0
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let fs = require('fs');
if (fs.existsSync('./summary.md'))
{
const issue_number = Number(fs.readFileSync('./pr_number'));
const git_sha = String(fs.readFileSync('./git_commit')).trim();
const prComments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
});
const PREFIX = "# Tests failed for Qt ${{ matrix.qt-version }}";
let body = PREFIX + "\n\n";
body += "*One or more tests failed using the build from commit " + git_sha + "*\n\n";
body += String(fs.readFileSync('./summary.md')) +
"\n\n**The full test report (included comparison of rendered vs expected images) can be found [here](https://github.com/qgis/QGIS/suites/" + context.payload.workflow_run.check_suite_id + "/artifacts/${{steps.download_artifact.outputs.artifact_id}}).**\n\n" +
"Further documentation on the QGIS test infrastructure can be found in the [Developer's Guide](https://docs.qgis.org/latest/en/docs/developers_guide/unittesting.html).";
const failureComment = prComments.data?.find(c => c.body.startsWith(PREFIX));
if (!!failureComment) {
// update the existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: failureComment.id,
body: body
});
} else {
// submit a new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: body
});
}
}

115
.gitignore vendored
View File

@ -1,115 +0,0 @@
*-stamp
*.*~
*.autosave
*.aux
*.bak
*.diff
*.gpkg-shm
*.gpkg-wal
*.log*
*.orig
*.out
*.prepare
*.pro.user
*.py.temp
*.pyc
*.sortinc
*.stash
*.tex
*.tmp
*.toc
*~
.*.swp
.DS_Store
.cache/
.gdb_history
.idea
.kdev4/
.project
.pydevproject
.venv
.vscode
.vs
.devcontainer
.worktrees
CMakePresets.json
/CMakeLists.txt.user
/CMakeLists.txt.user.*
/build*
Makefile
Testing/*
Thumb.db
api_doc
compile_commands.json
debian/*.debhelper
debian/*.substvars
debian/qgis.sh
desktop.ini
doc/INSTALL.tex
i18n/*.qm
ms-windows/*.exe*
ms-windows/Installer-Files/postinstall.bat
ms-windows/Installer-Files/preremove.bat
ms-windows/nsis/
ms-windows/osgeo4w/addons/
ms-windows/osgeo4w/binary-*
ms-windows/osgeo4w/build-*
ms-windows/osgeo4w/nsis/
ms-windows/osgeo4w/packages-x86/
ms-windows/osgeo4w/packages-x86_64/
ms-windows/osgeo4w/unpacked/
ms-windows/osgeo4w/untgz/
ms-windows/packages/
ms-windows/progs/
ms-windows/untgz/
python/expressions/
python/plugins/grassprovider/description/algorithms.json
python/plugins/grassprovider/tests/testdata/directions.tif.aux.xml
python/plugins/processing/tests/testdata/*.aux.xml
python/plugins/processing/tests/testdata/custom/*.aux.xml
python/plugins/processing/tests/testdata/custom/grass7/*.aux.xml
python/plugins/processing/tests/testdata/dem.prj
python/plugins/processing/tests/testdata/dem.tfw
python/plugins/processing/tests/testdata/dem.wld
qgis-test.ctest
qgis.kdev4
qgis.supp
qtcreator-build/
resources/themes/*/style.qss.auto
resources/server/src/landingpage/node_modules/
scripts/Debug
scripts/RelWithDebInfo
scripts/astyle.exe
scripts/qgisstyle*
src/core/qgsexpression_texts.cpp
tags
tests/testdata/*.aux.xml
tests/testdata/cache/
tests/testdata/checker360by180.asc.aux.xml
tests/testdata/control_images/*/*.aux.xml
tests/testdata/dPAOWM_styles.db
tests/testdata/grass/wgs84/test/.gislock
tests/testdata/grass/wgs84/test6/.gislock
tests/testdata/grass/wgs84/test7/.gislock
tests/testdata/landsat-int16-b1.tif.aux.xml
tests/testdata/mGuhmd_styles.db
tests/testdata/mesh/trap_steady_05_3D.nc.aux.xml
tests/testdata/oOQkbL_styles.db
tests/testdata/point_clouds/las/cloud.copc.laz
tests/testdata/project_translation/points_translation_de_attachments.zip
tests/testdata/qgstestproject_relative_path_test.qgs
tests/testdata/qgstestproject_relative_path_test_attachments.zip
tests/testdata/rKinSs_styles.db
tests/testdata/raster/*.aux.xml
tests/testdata/raster/band1_byte_noct_epsg4326.tif.aux.xml
tests/testdata/raster/band1_float32_noct_epsg4326.tif.aux.xml
tests/testdata/raster/band1_int16_noct_epsg4326.tif.aux.xml
tests/testdata/raster/band3_float32_noct_epsg4326.tif.aux.xml
tests/testdata/raster/band3_int16_noct_epsg4326.tif.aux.xml
tests/testdata/tenbytenraster.asc.aux.xml
tests/testdata/test_plugin_path/plugin_started.txt
tests/testdata/test_qgis_config_path/profiles/default/*
!tests/testdata/test_qgis_config_path/profiles/default/python
tests/testdata/widget_config.qlr
tests/testdata/zip/testtar.tgz.properties
venv

223
.mailmap
View File

@ -1,223 +0,0 @@
Alessandro Pasotti <elpaso@itopen.it> <apasotti@boundlessgeo.com>
Alessandro Pasotti <elpaso@itopen.it> <apasotti@gmail.com>
Alessandro Pasotti <elpaso@itopen.it> <apasottis@boundlessgeo.com>
Alessandro Pasotti <elpaso@itopen.it> elpaso <elpaso@itopen.it>
Alexander Bruy <alexander.bruy@gmail.com>
Alexander Bruy <alexander.bruy@gmail.com> <alexbruy@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Alexander Bruy <alexander.bruy@gmail.com> <alexander.bruy@gmail.com@881b9c09-3ef8-f3c2-ec3d-21d735c97f4d>
Alexandre Neto <senhor.neto@gmail.com> Alexandre <senhor.neto@gmail.com>
Alexandre Neto <senhor.neto@gmail.com> SrNetoChan <senhor.neto@gmail.com>
Alex <roya0045@users.noreply.github.com> roya0045 <roya0045@users.noreply.github.com>
Alister Hood <alister.hood@gmail.com> Alister <alister.hood@gmail.com>
Alister Hood <alister.hood@gmail.com> Alister <alister.hood@synergine.com>
Alister Hood <alister.hood@gmail.com> AlisterH <alister.hood@gmail.com>
Andreas Neumann <a.neumann@carto.net> andreasneumann <a.neumann@carto.net>
Anita Graser <anitagraser@gmx.at> anitagraser <anitagraser@gmx.at>
Arnaud Morvan <arnaud.morvan@camptocamp.com> arnaud.morvan@camptocamp.com <arnaud.morvan@camptocamp.com>
Asger Skovbo Petersen <asgerpetersen@gmail.com> AsgerPetersen <asgerpetersen@gmail.com>
Borys Jurgiel <info@borysjurgiel.pl> borys <info@borysjurgiel.pl>
Borys Jurgiel <info@borysjurgiel.pl> <info at borysjurgiel dot pl>
Borys Jurgiel <info@borysjurgiel.pl> borysiasty <borysiasty@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Clemens Raffler <clemens.raffler@gmail.com> <root676@users.noreply.github.com>
Clemens Raffler <clemens.raffler@gmail.com> root676 <clemens.raffler@gmail.com>
Clemens Raffler <clemens.raffler@gmail.com> root676 <clemens.raffler@gmx.at>
D'Hont René-Luc <rldhont@gmail.com>
Damiano Lombardi <damiano@opengis.ch> Damiano <damiano@opengis.ch>
Damiano Lombardi <damiano@opengis.ch> Damiano <lombardi.damiano@gmail.com>
Damiano Lombardi <damiano@opengis.ch> <lombardi@customcut.ch>
Damiano Lombardi <damiano@opengis.ch> <lombardi.damiano@gmail.com>
Damiano Lombardi <damiano@opengis.ch> domi <lombardi@customcut.ch>
David Marteau <dmarteau@3liz.com> <david@innophi.com>
David Marteau <dmarteau@3liz.com> <dhmarteau@gmail.com>
David Signer <david@opengis.ch> David <david@opengis.ch>
David Signer <david@opengis.ch> signedav <david@opengis.ch>
Etienne Trimaille <etienne.trimaille@gmail.com> <etienne@Etiennes-MacBook-Pro.local>
Etienne Trimaille <etienne.trimaille@gmail.com> <gustrimaille@yahoo.fr>
Etienne Trimaille <etienne.trimaille@gmail.com> Étienne Trimaille <gustrimaille@yahoo.fr>
Even Rouault <even.rouault@spatialys.com> <even.rouault@mines-paris.org>
Francisco Raga <All4Gis@users.noreply.github.com> Fran Raga <All4Gis@users.noreply.github.com>
Gary Sherman <gsherman@geoapt.com> <gsherman@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Germán Carrillo <gcarrillo@linuxmail.org> gacarrillor <gcarrillo@linuxmail.org>
Germán Carrillo <gcarrillo@linuxmail.org> gacarrillor <geotux_tuxman@linuxmail.org>
Germán Carrillo <gcarrillo@linuxmail.org> <geotux_tuxman@linuxmail.org>
Germán Carrillo <gcarrillo@linuxmail.org> Germán <geotux_tuxman@linuxmail.org>
Germán Carrillo <gcarrillo@linuxmail.org> Germap <gcarrillo@linuxmail.org>
Giovanni Allegri <giovanni.allegri@gmail.com> giohappy <giohappy@gmail.com>
Giovanni Manghi <giovanni.manghi@naturalgis.pt> gioman <giovanni.manghi@faunalia.pt>
Giovanni Manghi <giovanni.manghi@naturalgis.pt> <gio@sibirica.(none)>
Giovanni Manghi <giovanni.manghi@naturalgis.pt> <giovanni.manghi@faunalia.pt>
Giovanni Manghi <giovanni.manghi@naturalgis.pt> Giovanni Manghi <giovanni@sibirica.(none)>
Giuseppe Sucameli <brush.tyler@gmail.com> <brushtyler@881b9c09-3ef8-f3c2-ec3d-21d735c97f4d>
Giuseppe Sucameli <brush.tyler@gmail.com> <brushtyler@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Harrissou Sant-anna <delazj@gmail.com> DelazJ <delazj@gmail.com>
Ivan Ivanov <ivan.ivanov@suricactus.com> <suricactus@users.noreply.github.com>
Jacky Volpes <jacky.volpes@oslandia.com> <34267385+Djedouas@users.noreply.github.com>
Jean-Roc Morreale <jr.morreale@enoreth.net> Jean Roc <jr.morreale@enoreth.net>
Jean-Roc Morreale <jr.morreale@enoreth.net> MORREALE Jean-Roc <jr.morreale@enoreth.net>
Jorge Gustavo Rocha <jgr@geomaster.pt> <jgr@di.uminho.pt>
Julien Cabieces <julien.cabieces@oslandia.com> <julien@julien-laptop.home>
Jürgen E. Fischer <jef@norbit.de>
Jürgen E. Fischer <jef@norbit.de> <fischer@linux-buechse.de>
Jürgen E. Fischer <jef@norbit.de> <jef@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Jürgen E. Fischer <jef@norbit.de> <jef@FARAMIR>
Jürgen E. Fischer <jef@norbit.de> Juergen E. Fischer <jef@norbit.de>
Jürgen E. Fischer <jef@norbit.de> Juergen Fischer <jef@norbit.de>
Jürgen E. Fischer <jef@norbit.de> Jürgen Fischer <jef@norbit.de>
Larry Shaffer <lshaffer@federal.planet.com> <lshaffer@boundlessgeo.com>
Larry Shaffer <lshaffer@federal.planet.com> <dakcarto@users.noreply.github.com>
Larry Shaffer <lshaffer@federal.planet.com> <larrys@dakotacarto.com>
Loïc Bartoletti <loic.bartoletti@oslandia.com>
Loïc Bartoletti <loic.bartoletti@oslandia.com> <l.bartoletti@free.fr>
Loïc Bartoletti <loic.bartoletti@oslandia.com> <coder@tuxfamily.org>
Loïc Bartoletti <loic.bartoletti@oslandia.com> <lbartoletti@tuxfamily.org>
Loïc Bartoletti <loic.bartoletti@oslandia.com> <lbartoletti@users.noreply.github.com>
Luigi Pirelli <luipir@gmail.com> luipir <luipir@gmail.com>
Marco Bernasocchi <marco@opengis.ch> <marco@bernawebdesign.ch>
Marco Bernasocchi <marco@opengis.ch> <marco@muse.(none)>
Marco Bernasocchi <marco@opengis.ch> <marco@placebo.(none)>
Marco Hugentobler <marco.hugentobler@sourcepole.ch> <marco@hugis1.(none)>
Marco Hugentobler <marco.hugentobler@sourcepole.ch> <marco@marco-laptop.(none)>
Marco Hugentobler <marco.hugentobler@sourcepole.ch> <marco@sourcepole.ch>
Marco Hugentobler <marco.hugentobler@sourcepole.ch> mhugent <marco.hugentobler@sourcepole.ch>
Marco Hugentobler <marco.hugentobler@sourcepole.ch> mhugent <mhugent@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Mario Baranzini <mario.baranzini@gmail.com> <mario@opengis.ch>
Mario Baranzini <mario.baranzini@gmail.com> <marioba@users.noreply.github.com>
Markus Neteler <neteler@gmail.com> <neteler@osgeo.org>
Markus Neteler <neteler@gmail.com> <neteler@oboe.localdomain>
Martin Dobias <wonder.sk@gmail.com> <wonder@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Mathieu Pellerin <nirvn.asia@gmail.com>
Matteo Ghetta <matteo.ghetta@gmail.com> ghtmtt <matteo.ghetta@gmail.com>
Matteo Ghetta <matteo.ghetta@gmail.com> matteo <matteo.ghetta@gmail.com>
Matteo Ghetta <matteo.ghetta@gmail.com> Matteo <matteo.ghetta@gmail.com>
Matthias Kuhn <matthias@opengis.ch> <matthias.kuhn@gmx.ch>
Matthias Kuhn <matthias@opengis.ch> <kk@kk-office.gslwd>
Matthias Kuhn <matthias@opengis.ch> matthias-kuhn <matthias.kuhn@gmx.ch>
Nathan Woodrow <madmanwoo@gmail.com> Nathan <nathan_woodrow@technologyonecorp.com>
Nathan Woodrow <madmanwoo@gmail.com> <nathan.woodrow@mapsolutions.com.au>
Nathan Woodrow <madmanwoo@gmail.com> <nathan_woodrow@technologyonecorp.com>
Nathan Woodrow <madmanwoo@gmail.com> <woodrow.nathan@gmail.com>
Nathan Woodrow <madmanwoo@gmail.com> <woo@woo-mint.(none)>
Nedjima Belgacem <gb_nedjima@esi.dz> NEDJIMAbelgacem <gb_nedjima@esi.dz>
Nedjima Belgacem <gb_nedjima@esi.dz> nedjima <gb_nedjima@esi.dz>
Nedjima Belgacem <gb_nedjima@esi.dz> Belgacem <gb_nedjima@esi.dz>
Nicolas Godet <nicolas.godet@outlook.fr> nicogodet <39594821+nicogodet@users.noreply.github.com>
Nicolas Godet <nicolas.godet@outlook.fr> nicogodet <nicolas.godet@outlook.fr>
Nicolas Godet <nicolas.godet@outlook.fr> <39594821+nicogodet@users.noreply.github.com>
Nyall Dawson <nyall.dawson@gmail.com> nyalldawson <nyall.dawson@gmail.com>
Nyall Dawson <nyall.dawson@gmail.com> <nyall@localhost.localdomain>
Nyall Dawson <nyall.dawson@gmail.com> Nyall <nyall.dawson@gmail.com>
Olivier Dalang <olivier.dalang@gmail.com> olivierdalang <olivier.dalang@epfl.ch>
Olivier Dalang <olivier.dalang@gmail.com> olivierdalang <olivier.dalang@gmail.com>
Olivier Dalang <olivier.dalang@gmail.com> olivier <olivier.dalang@gmail.com>
Otto Dassau <dassau@gbd-consult.de> dassau <dassau@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Otto Dassau <dassau@gbd-consult.de> dassau <dassau@gbd-consult.de>
Paolo Cavallini <cavallini@faunalia.it>
Paolo Cavallini <cavallini@faunalia.it> <pcav@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Paul Blottiere <blottiere.paul@gmail.com> Blottiere Paul <blottiere.paul@gmail.com>
Peter Petrik <zilolv@gmail.com> PeterPetrik <zilolv@gmail.com>
Radim Blazek <radim.blazek@gmail.com> <rblazek@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Raymond Nijssen <r.nijssen@terglobo.nl> raymondnijssen <r.nijssen@terglobo.nl>
Régis Haubourg <regis@qgis.org> <regis.haubourg@eau-adour-garonne.fr>
Régis Haubourg <regis@qgis.org> <regis.haubourg@oslandia.com>
Richard Duivenvoorde <richard@duif.net> rduivenvoorde <rduivenvoorde@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Richard Duivenvoorde <richard@duif.net> <rdmailings@duif.net>
Saber <saber.razmjooei@lutraconsulting.co.uk> Lutra <saber.razmjooei@lutraconsulting.co.uk>
Saber <saber.razmjooei@lutraconsulting.co.uk> saber <saber.razmjooei@lutraconsulting.co.uk>
Saber <saber.razmjooei@lutraconsulting.co.uk> Sab <saber.razmjooei@lutraconsulting.co.uk>
Salvatore Fiandaca <pigrecoinfinito@gmail.com> Salvatore <pigrecoinfinito@gmail.com>
Salvatore Larosa <lrssvtml@gmail.com>
Samweli Mwakisambwe <samweli@kartoza.com> <smwltwesa6@gmail.com>
Samweli Mwakisambwe <samweli@kartoza.com> Samweli <samweli@kartoza.com>
Samweli Mwakisambwe <samweli@kartoza.com> Samweli <smwltwesa6@gmail.com>
Sandro Santilli <strk@kbt.io> <strk@keybit.net>
Stefanos Natsis <uclaros@gmail.com> <uclaros@debian-BULLSEYE-live-builder-AMD64>
Stefanos Natsis <uclaros@gmail.com> uclaros <Ucla ros 1>
Stefanos Natsis <uclaros@gmail.com> uclaros <uclaros@gmail.com>
Thomas Gratier <thomas_gratier@yahoo.fr> ThomasG77 <thomas_gratier@yahoo.fr>
Tim Sutton <tim@linfiniti.com> <tim@kartoza.com>
Tim Sutton <tim@linfiniti.com> <timlinux@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Tom Chadwin <tomchadwin@astuntechnology.com> <tom.chadwin@nnpa.org.uk>
Tom Chadwin <tomchadwin@astuntechnology.com> <tomchadwin@users.noreply.github.com>
Tomas Mizera <tomas.mizera@lutraconsulting.co.uk> tomasMizera <tomas.mizera2@gmail.com>
Tomas Mizera <tomas.mizera@lutraconsulting.co.uk> <tomas.mizera2@gmail.com>
Tomas Mizera <tomas.mizera@lutraconsulting.co.uk> tomasMizera <tomas.mizera@lutraconsulting.co.uk>
Tudor Bărăscu <tudor.barascu@qtibia.ro> Tudor Barascu <tudor.barascu@qtibia.ro>
Víctor Olaya <volayaf@gmail.com>
Víctor Olaya <volayaf@gmail.com> <volayaf@881b9c09-3ef8-f3c2-ec3d-21d735c97f4d>
Víctor Olaya <volayaf@gmail.com> <volayaf@gmail.com@881b9c09-3ef8-f3c2-ec3d-21d735c97f4d>
Vincent Cloarec <vcloarec@gmail.com> vcloarec <vcloarec@gmail.com>
Werner Macho <werner.macho@gmail.com> macho <macho@c8812cc2-4d05-0410-92ff-de0c093fc19c>
Werner Macho <werner.macho@gmail.com> <macho@void.(none)>
William Kyngesburye <kyngchaos@kyngchaos.com> kyngchaos <kyngchaos@c8812cc2-4d05-0410-92ff-de0c093fc19c>
William Kyngesburye <kyngchaos@kyngchaos.com> <kyngchaos@sumomo.attlocal.net>
William Kyngesburye <kyngchaos@kyngchaos.com> <kyngchaos@Sumomo.attlocal.net>
Yves Jacolin <yves.jacolin@camptocamp.com> Jacolin <yves.jacolin@camptocamp.com>

View File

@ -1,48 +0,0 @@
exclude: |
(?x)^(
python/.*/auto_\w+/.*.py|
external/.*|
tests/testdata/script_with_error.py
)$
fail_fast: false
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.6
# if adding directory handled by clang-format
# you need to adapt prepare_commit and verify_indentation scripts accordingly
hooks:
- id: clang-format
types_or: [c++, c, c#]
exclude: |
(?x)^(
src/core/.*|
tests/code_layout/sipify/sipifyheader.h
)$
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: local
hooks:
- id: prepare_commit
name: prepare_commit
entry: ./scripts/prepare_commit.sh
language: system
always_run: true
pass_filenames: false

View File

@ -1,52 +0,0 @@
[main]
host = https://www.transifex.com
[o:qgis:p:QGIS:r:qgis-application]
file_filter = i18n/qgis_<lang>.ts
source_file = i18n/qgis_en.ts
source_lang = en
type = QT
minimum_perc = 35
trans.cs = i18n/qgis_cs.ts
trans.de = i18n/qgis_de.ts
trans.es = i18n/qgis_es.ts
trans.fi = i18n/qgis_fi.ts
trans.it = i18n/qgis_it.ts
trans.ru = i18n/qgis_ru.ts
trans.sk = i18n/qgis_sk.ts
trans.ar = i18n/qgis_ar.ts
trans.hu = i18n/qgis_hu.ts
trans.lv = i18n/qgis_lv.ts
trans.ca = i18n/qgis_ca.ts
trans.ja = i18n/qgis_ja.ts
trans.nb = i18n/qgis_nb.ts
trans.pl = i18n/qgis_pl.ts
trans.pt_PT = i18n/qgis_pt_PT.ts
trans.tr = i18n/qgis_tr.ts
trans.uk = i18n/qgis_uk.ts
trans.hr = i18n/qgis_hr.ts
trans.en_US = i18n/qgis_en_US.ts
trans.fr = i18n/qgis_fr.ts
trans.ko = i18n/qgis_ko.ts
trans.lt = i18n/qgis_lt.ts
trans.pt_BR = i18n/qgis_pt_BR.ts
trans.sr@latin = i18n/qgis_sr@latin.ts
trans.vi = i18n/qgis_vi.ts
trans.el = i18n/qgis_el.ts
trans.eo = i18n/qgis_eo.ts
trans.hi = i18n/qgis_hi.ts
trans.nl = i18n/qgis_nl.ts
trans.ro = i18n/qgis_ro.ts
trans.bs = i18n/qgis_bs.ts
trans.et = i18n/qgis_et.ts
trans.km = i18n/qgis_km.ts
trans.sl = i18n/qgis_sl.ts
trans.sr = i18n/qgis_sr.ts
trans.zh-Hant = i18n/qgis_zh-Hant.ts
trans.eu = i18n/qgis_eu.ts
trans.gl = i18n/qgis_gl.ts
trans.id = i18n/qgis_id.ts
trans.sv = i18n/qgis_sv.ts
trans.zh-Hans = i18n/qgis_zh-Hans.ts
trans.da = i18n/qgis_da.ts

26
BUGS
View File

@ -1,26 +0,0 @@
Help I think I found a bug!
---------------------------
If you find a bug in QGIS, first check if it has already been reported:
https://github.com/qgis/QGIS/issues
If you can't find an existing ticket, report a new one, using the bug report template provided.
Some hints about when you should file a bug:
- Just because a bug is filed doesn't always mean we can or will fix it.
Sometimes people ask for things that will require many man hours to do and
offer little reward to work ratio benefit when compared to the other issues
in the queue. Also some things are simply not fixable due to whatever
technical reason.
- Sometimes we don't fix a bug because the user's vision of how QGIS should
behave doesn't match ours. Hey we are all humans it can happen...
- Always check that your bug has not already been filed by someone else since
dealing with duplicate tickets causes a lot of time wasting.
- Be prepared to provided further feedback after the initial triage.
- Don't be offended if we don't see tickets as having the same priority as you
do. While we appreciate it's inconvenient if some issue prevents you doing
your work, we need to take the big picture view of things and focus on
things that affect the largest proportion of our user base.

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
# Contributing
## Developer guide
A [complete developer guide](https://docs.qgis.org/latest/en/docs/developers_guide/index.html) is also available to explain the development process, the unit testing system and more!
You may also want to consult the build process for QGIS which is fully detailed in the [install guide](INSTALL.md).
## Bug reporting and bug fixing
You can help us **by submitting bug reports or fixing bugs** in the [QGIS bug tracker](https://github.com/qgis/QGIS/issues/).
## New features and enhancements
If you wish to contribute patches you can:
1. [Fork the project](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
2. Install the [pre-commit](https://pre-commit.com/) hook: `pre-commit install --install-hooks` (version 4.1+ required)
3. Make your changes
4. Commit to your repository
5. [Create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
The development team can then review your contribution and commit it upstream as appropriate.
If you commit a new feature, add `[FEATURE]` to your commit message AND give a clear description of the new feature. The label `Needs documentation` will be added by maintainers and will automatically create an issue on the QGIS-Documentation repo, where you or others should write documentation about it.
For large-scale changes, you can open a [QEP (QGIS Enhancement Proposal)](https://github.com/qgis/QGIS-Enhancement-Proposals). QEPs are used in the process of creating and discussing new enhancements or policy for QGIS.
## Translations
Please help translate QGIS to your language. At this moment about forty languages are already available in the Desktop user interface and about eighty languages are available in transifex ready to be translated.
The [translation](https://docs.qgis.org/latest/en/docs/documentation_guidelines/do_translations.html) process is managed by the [Translation Team](https://qgis.org/community/organisation/#translation) and all the activities are done under the [Transifex](https://www.transifex.com/qgis/) platform.
## Other ways to contribute
If you are not a developer, there are many other possibilities that do not require programming skills to help QGIS to evolve. Check our [project homepage for more information](https://qgis.org/community/involve/).

352
COPYING
View File

@ -1,352 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
In addition, as a special exception, the QGIS Development Team gives
permission to link the code of this program with the Qt library,
including but not limited to the following versions (both free and
commercial): Qt/Non-commercial Windows, Qt/Windows, Qt/X11, Qt/Mac, and
Qt/Embedded (or with modified versions of Qt that use the same license
as Qt), and distribute linked combinations including the two. You must
obey the GNU General Public License in all respects for all of the code
used other than Qt. If you modify this file, you may extend this
exception to your version of the file, but you are not obligated to do
so. If you do not wish to do so, delete this exception statement from
your version.
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

498807
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@ -1,680 +0,0 @@
From mcoletti at lychnobite.org Wed Jun 16 12:49:18 2004
Return-Path: <mcoletti at lychnobite.org>
X-Original-To: gsherman at mrcc.com
Delivered-To: gsherman at mrcc.com
Received: from lakermmtao11.cox.net (lakermmtao11.cox.net [68.230.240.28])
by mrcc.com (Postfix) with ESMTP
id E72DE1ED31; Wed, 16 Jun 2004 12:49:36 -0800 (AKDT)
Received: from xanadu.lychnobite.org ([68.101.37.27])
by lakermmtao11.cox.net
(InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP
id <20040616204920.GTEM25349.lakermmtao11.cox.net at xanadu.lychnobite.org>;
Wed, 16 Jun 2004 16:49:20 -0400
Received: from xanadu.lychnobite.org (localhost.localdomain [127.0.0.1])
by xanadu.lychnobite.org (8.12.8/8.12.8) with ESMTP id i5GKnJFl020545;
Wed, 16 Jun 2004 16:49:19 -0400
Received: from xanadu.lychnobite.org (mcoletti at localhost)
by xanadu.lychnobite.org (8.12.8/8.12.8/Submit) with ESMTP id i5GKnIrt020541;
Wed, 16 Jun 2004 16:49:19 -0400
Message-Id: <200406162049.i5GKnIrt020541 at xanadu.lychnobite.org>
To: sherman at mrcc.com
Cc: gsherman at mrcc.com
Subject: Re: Exception to GPL for Windows
In-Reply-To: Message from sherman at mrcc.com
of "Wed, 16 Jun 2004 11:44:06 -0800." <20040616194406.GA3630 at mrcc.com>
Date: Wed, 16 Jun 2004 16:49:18 -0400
From: Mark Coletti <mcoletti at lychnobite.org>
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on tank
X-Spam-Level:
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=ham version=2.63
X-UIDL: )OL!!25(#!c^a"!IMQ"!
Status: RO
X-Status: R
X-KMail-EncryptionState: N
X-KMail-SignatureState: N
X-KMail-MDN-Sent:
On Wed, 16 Jun 2004 11:44:06 -0800, sherman at mrcc.com wrote:
> Greetings,
>
> Below is an addition to the QGIS license that will allow linking with any
> version of the Qt library. This change is needed to give us the
> flexibility to compile native versions on Windows, Mac, and embedded
> platforms.
>
> By receiving this email you have been identified as a contributor to the
> QGIS code base and therefore a member of the "QGIS Development Team" as
> referenced in the license change below. Your concurrence is required to
> make this change to the license. Please review the statement below and
> reply to this message indicating you agree with the change. Please
> include the text of this message in your reply.
>
> I would like to have this change implemented prior to the 0.4 release so
> your prompt reply is appreciated.
>
> This change follows guidance found in the GPL FAQ.
>
> Thanks,
> -gary
>
> ---- Addendum to QGIS License ----
> In addition, as a special exception, the QGIS Development Team gives
> permission to link the code of this program with the Qt library,
> including but not limited to the following versions (both free and
> commercial): Qt/Non-commerical Windows, Qt/Windows, Qt/X11, Qt/Mac, and
> Qt/Embedded (or with modified versions of Qt that use the same license
> as Qt), and distribute linked combinations including the two. You must
> obey the GNU General Public License in all respects for all of the code
> used other than Qt. If you modify this file, you may extend this
> exception to your version of the file, but you are not obligated to do
> so. If you do not wish to do so, delete this exception statement from
> your version.
I agree with the change.
--
Mark Coletti | mailto:mcoletti at lychnobite.org | http://www.lychnobite.org/
Tell Zeno I'm willing to meet him halfway.
From j.obi at troja.net Wed Jun 16 12:14:58 2004
Return-Path: <j.obi at troja.net>
X-Original-To: sherman at mrcc.com
Delivered-To: sherman at mrcc.com
Received: from mail-out03.broadnet-mediascape.de (mail-out03.broadnet-mediascape.de [62.206.1.20])
by mrcc.com (Postfix) with SMTP id 5A3B42CB0
for <sherman at mrcc.com>; Wed, 16 Jun 2004 12:13:50 -0800 (AKDT)
Received: (qmail 6668 invoked by uid 113); 16 Jun 2004 20:13:04 -0000
Received: from j.obi at troja.net by mail-out03 by uid 106 with qmail-scanner-1.20rc3
(trophie: 6.810-1005/905/65140. Clear:RC:1:.
Processed in 0.561462 secs); 16 Jun 2004 20:13:04 -0000
X-Qmail-Scanner-Mail-From: j.obi at troja.net via mail-out03
X-Qmail-Scanner: 1.20rc3 (Clear:RC:1:. Processed in 0.561462 secs)
Received: from d463c54f.datahighways.de (HELO didge.troja.net) (212.99.197.79)
by mail-out03.broadnet-mediascape.de with SMTP; 16 Jun 2004 20:13:03 -0000
Date: Wed, 16 Jun 2004 22:14:58 +0200
From: Jens Oberender <j.obi at troja.net>
To: sherman at mrcc.com
Subject: Re: Exception to GPL for Windows
Message-Id: <20040616221458.010e5378 at didge.troja.net>
In-Reply-To: <20040616194406.GA3630 at mrcc.com>
References: <20040616194406.GA3630 at mrcc.com>
Organization: troja.net
X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux)
Mime-Version: 1.0
Content-Type: text/plain;
charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on tank
X-Spam-Level:
X-Spam-Status: No, hits=-4.9 required=4.0 tests=BAYES_00 autolearn=ham
version=2.63
X-UIDL: P#?"!35)!!Y~h!!`Mh"!
Status: RO
Lines: 41
X-Status: R
X-KMail-EncryptionState: N
X-KMail-SignatureState: N
X-KMail-MDN-Sent:
Hi Gary
I agree!
Ciao,
Jens
> Below is an addition to the QGIS license that will allow linking with
> any version of the Qt library. This change is needed to give us the
> flexibility to compile native versions on Windows, Mac, and embedded
> platforms.
>
> By receiving this email you have been identified as a contributor to the
> QGIS code base and therefore a member of the "QGIS Development Team" as
> referenced in the license change below. Your concurrence is required to
> make this change to the license. Please review the statement below and
> reply to this message indicating you agree with the change. Please
> include the text of this message in your reply.
>
> I would like to have this change implemented prior to the 0.4 release so
> your prompt reply is appreciated.
>
> This change follows guidance found in the GPL FAQ.
>
> Thanks,
> -gary
>
> ---- Addendum to QGIS License ----
> In addition, as a special exception, the QGIS Development Team gives
> permission to link the code of this program with the Qt library,
> including but not limited to the following versions (both free and
> commercial): Qt/Non-commerical Windows, Qt/Windows, Qt/X11, Qt/Mac, and
> Qt/Embedded (or with modified versions of Qt that use the same license
> as Qt), and distribute linked combinations including the two. You must
> obey the GNU General Public License in all respects for all of the code
> used other than Qt. If you modify this file, you may extend this
> exception to your version of the file, but you are not obligated to do
> so. If you do not wish to do so, delete this exception statement from
> your version.
>
From tim at linfiniti.com Wed Jun 16 12:30:12 2004
Return-Path: <tim at linfiniti.com>
X-Original-To: sherman at mrcc.com
Delivered-To: sherman at mrcc.com
Received: from mta09-svc.ntlworld.com (mta09-svc.ntlworld.com [62.253.162.49])
by mrcc.com (Postfix) with ESMTP id 1FD261ED31
for <sherman at mrcc.com>; Wed, 16 Jun 2004 12:39:01 -0800 (AKDT)
Received: from [192.168.1.101] ([80.6.202.23]) by mta09-svc.ntlworld.com
(InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP
id <20040616203130.UXAS20971.mta09-svc.ntlworld.com at [192.168.1.101]>
for <sherman at mrcc.com>; Wed, 16 Jun 2004 21:31:30 +0100
From: Tim Sutton <tim at linfiniti.com>
Reply-To: tim at linfiniti.com
To: sherman at mrcc.com
Subject: Re: Exception to GPL for Windows
Date: Wed, 16 Jun 2004 21:30:12 +0100
User-Agent: KMail/1.6.2
References: <20040616194406.GA3630 at mrcc.com>
In-Reply-To: <20040616194406.GA3630 at mrcc.com>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: Text/Plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <200406162130.21139.tim at linfiniti.com>
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on tank
X-Spam-Level:
X-Spam-Status: No, hits=-4.9 required=4.0 tests=BAYES_00 autolearn=ham
version=2.63
X-UIDL: NL'#!OR^"!~bb"!1; at "!
Status: RO
Lines: 62
X-Status: R
X-KMail-EncryptionState: N
X-KMail-SignatureState: F
X-KMail-MDN-Sent:
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
Yes thats fine by me.
Regards
Tim Sutton
On Wednesday 16 June 2004 20:44, you wrote:
> Greetings,
>
> Below is an addition to the QGIS license that will allow linking with any
> version of the Qt library. This change is needed to give us the
> flexibility to compile native versions on Windows, Mac, and embedded
> platforms.
>
> By receiving this email you have been identified as a contributor to the
> QGIS code base and therefore a member of the "QGIS Development Team" as
> referenced in the license change below. Your concurrence is required to
> make this change to the license. Please review the statement below and
> reply to this message indicating you agree with the change. Please
> include the text of this message in your reply.
>
> I would like to have this change implemented prior to the 0.4 release so
> your prompt reply is appreciated.
>
> This change follows guidance found in the GPL FAQ.
>
> Thanks,
> -gary
>
> ---- Addendum to QGIS License ----
> In addition, as a special exception, the QGIS Development Team gives
> permission to link the code of this program with the Qt library,
> including but not limited to the following versions (both free and
> commercial): Qt/Non-commerical Windows, Qt/Windows, Qt/X11, Qt/Mac, and
> Qt/Embedded (or with modified versions of Qt that use the same license
> as Qt), and distribute linked combinations including the two. You must
> obey the GNU General Public License in all respects for all of the code
> used other than Qt. If you modify this file, you may extend this
> exception to your version of the file, but you are not obligated to do
> so. If you do not wish to do so, delete this exception statement from
> your version.
=2D --=20
The only reason for time is so that everything doesn't happen at once=20
--Albert Einstein=20
Get my public keys from:
http://tim.suttonfamily.co.uk/modules.php?name=3DContent&pa=3Dshowpage&pid=
=3D2
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA0K3cWvXTJUo0BDoRAs3HAJ9QUcpErktV+nxs9EL1ULKmrelFQQCgrxBW
TP/O/ichXAhfI7U43t5wz0I=3D
=3DzYl2
=2D----END PGP SIGNATURE-----
From mcoletti at lychnobite.org Wed Jun 16 12:49:18 2004
Return-Path: <mcoletti at lychnobite.org>
X-Original-To: sherman at mrcc.com
Delivered-To: sherman at mrcc.com
Received: from lakermmtao11.cox.net (lakermmtao11.cox.net [68.230.240.28])
by mrcc.com (Postfix) with ESMTP
id E72DE1ED31; Wed, 16 Jun 2004 12:49:36 -0800 (AKDT)
Received: from xanadu.lychnobite.org ([68.101.37.27])
by lakermmtao11.cox.net
(InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP
id <20040616204920.GTEM25349.lakermmtao11.cox.net at xanadu.lychnobite.org>;
Wed, 16 Jun 2004 16:49:20 -0400
Received: from xanadu.lychnobite.org (localhost.localdomain [127.0.0.1])
by xanadu.lychnobite.org (8.12.8/8.12.8) with ESMTP id i5GKnJFl020545;
Wed, 16 Jun 2004 16:49:19 -0400
Received: from xanadu.lychnobite.org (mcoletti at localhost)
by xanadu.lychnobite.org (8.12.8/8.12.8/Submit) with ESMTP id i5GKnIrt020541;
Wed, 16 Jun 2004 16:49:19 -0400
Message-Id: <200406162049.i5GKnIrt020541 at xanadu.lychnobite.org>
To: sherman at mrcc.com
Cc: gsherman at mrcc.com
Subject: Re: Exception to GPL for Windows
In-Reply-To: Message from sherman at mrcc.com
of "Wed, 16 Jun 2004 11:44:06 -0800." <20040616194406.GA3630 at mrcc.com>
Date: Wed, 16 Jun 2004 16:49:18 -0400
From: Mark Coletti <mcoletti at lychnobite.org>
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on tank
X-Spam-Level:
X-Spam-Status: No, hits=-4.9 required=4.0 tests=BAYES_00 autolearn=ham
version=2.63
X-UIDL: :ja!!"e-"!cAL"!6Xj"!
Status: RO
Lines: 44
X-Status: R
X-KMail-EncryptionState: N
X-KMail-SignatureState: N
X-KMail-MDN-Sent:
On Wed, 16 Jun 2004 11:44:06 -0800, sherman at mrcc.com wrote:
> Greetings,
>
> Below is an addition to the QGIS license that will allow linking with any
> version of the Qt library. This change is needed to give us the
> flexibility to compile native versions on Windows, Mac, and embedded
> platforms.
>
> By receiving this email you have been identified as a contributor to the
> QGIS code base and therefore a member of the "QGIS Development Team" as
> referenced in the license change below. Your concurrence is required to
> make this change to the license. Please review the statement below and
> reply to this message indicating you agree with the change. Please
> include the text of this message in your reply.
>
> I would like to have this change implemented prior to the 0.4 release so
> your prompt reply is appreciated.
>
> This change follows guidance found in the GPL FAQ.
>
> Thanks,
> -gary
>
> ---- Addendum to QGIS License ----
> In addition, as a special exception, the QGIS Development Team gives
> permission to link the code of this program with the Qt library,
> including but not limited to the following versions (both free and
> commercial): Qt/Non-commerical Windows, Qt/Windows, Qt/X11, Qt/Mac, and
> Qt/Embedded (or with modified versions of Qt that use the same license
> as Qt), and distribute linked combinations including the two. You must
> obey the GNU General Public License in all respects for all of the code
> used other than Qt. If you modify this file, you may extend this
> exception to your version of the file, but you are not obligated to do
> so. If you do not wish to do so, delete this exception statement from
> your version.
I agree with the change.
--
Mark Coletti | mailto:mcoletti at lychnobite.org | http://www.lychnobite.org/
Tell Zeno I'm willing to meet him halfway.
From blazek at itc.it Thu Jun 17 00:33:15 2004
Return-Path: <blazek at itc.it>
X-Original-To: sherman at mrcc.com
Delivered-To: sherman at mrcc.com
Received: from mail.itc.it (unknown [217.77.80.3])
by mrcc.com (Postfix) with ESMTP id E2E201EE46
for <sherman at mrcc.com>; Thu, 17 Jun 2004 00:33:35 -0800 (AKDT)
Received: from ntvir.itc.it ([10.0.20.5])
by mail.itc.it (8.11.6/8.11.6) with SMTP id i5H8XGB06990
for <sherman at mrcc.com>; Thu, 17 Jun 2004 10:33:16 +0200
Received: from orchestra.itc.it ([10.0.10.11])
by ntvir.itc.it (SAVSMTP 3.1.6.45) with SMTP id M2004061710331632569
for <sherman at mrcc.com>; Thu, 17 Jun 2004 10:33:16 +0200
Received: from janacek.itc.it. (janacek [10.40.0.140])
by orchestra.itc.it (8.11.6/8.11.6) with ESMTP id i5H8XF013962
for <sherman at mrcc.com>; Thu, 17 Jun 2004 10:33:16 +0200
Received: from localhost (localhost [[UNIX: localhost]])
by janacek.itc.it. (8.11.6/8.11.2) id i5H8XF223747
for sherman at mrcc.com; Thu, 17 Jun 2004 10:33:15 +0200
Message-Id: <200406170833.i5H8XF223747 at janacek.itc.it.>
Content-Type: text/plain;
charset="iso-8859-1"
From: Radim Blazek <blazek at itc.it>
To: sherman at mrcc.com
Subject: Re: Exception to GPL for Windows
Date: Thu, 17 Jun 2004 10:33:15 +0200
X-Mailer: KMail [version 1.3.2]
References: <20040616194406.GA3630 at mrcc.com>
In-Reply-To: <20040616194406.GA3630 at mrcc.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on tank
X-Spam-Level:
X-Spam-Status: No, hits=-4.9 required=4.0 tests=BAYES_00 autolearn=ham
version=2.63
X-UIDL: 6n="!_NX!!K<+"!9B*!!
Status: RO
Lines: 41
X-Status: U
X-KMail-EncryptionState:
X-KMail-SignatureState:
X-KMail-MDN-Sent:
I fully agree with the change of QGIS license as it is specified below.
I give you permission to apply this change to all my contributions
to QGIS project, I have done so far.
Radim
On Wednesday 16 June 2004 21:44, you wrote:
> Greetings,
>
> Below is an addition to the QGIS license that will allow linking with any
> version of the Qt library. This change is needed to give us the
> flexibility to compile native versions on Windows, Mac, and embedded
> platforms.
>
> By receiving this email you have been identified as a contributor to the
> QGIS code base and therefore a member of the "QGIS Development Team" as
> referenced in the license change below. Your concurrence is required to
> make this change to the license. Please review the statement below and
> reply to this message indicating you agree with the change. Please
> include the text of this message in your reply.
>
> I would like to have this change implemented prior to the 0.4 release so
> your prompt reply is appreciated.
>
> This change follows guidance found in the GPL FAQ.
>
> Thanks,
> -gary
>
> ---- Addendum to QGIS License ----
> In addition, as a special exception, the QGIS Development Team gives
> permission to link the code of this program with the Qt library,
> including but not limited to the following versions (both free and
> commercial): Qt/Non-commerical Windows, Qt/Windows, Qt/X11, Qt/Mac, and
> Qt/Embedded (or with modified versions of Qt that use the same license
> as Qt), and distribute linked combinations including the two. You must
> obey the GNU General Public License in all respects for all of the code
> used other than Qt. If you modify this file, you may extend this
> exception to your version of the file, but you are not obligated to do
> so. If you do not wish to do so, delete this exception statement from
> your version.
From larsl at users.sourceforge.net Fri Jun 18 04:08:22 2004
Return-Path: <larsl at users.sourceforge.net>
X-Original-To: sherman at mrcc.com
Delivered-To: sherman at mrcc.com
Received: from mailfe03.swip.net (mailfe03.swip.net [212.247.154.65])
by mrcc.com (Postfix) with ESMTP id A1F061ECF5
for <sherman at mrcc.com>; Fri, 18 Jun 2004 04:10:46 -0800 (AKDT)
X-T2-Posting-ID: uSiNlGVPT75WaBL3fNIbuw==
Received: from c213-100-50-52.swipnet.se ([213.100.50.52] verified)
by mailfe03.swip.net (CommuniGate Pro SMTP 4.2b5)
with ESMTP id 70251642 for sherman at mrcc.com; Fri, 18 Jun 2004 14:10:26 +0200
Subject: Re: Exception to GPL for Windows
From: Lars Luthman <larsl at users.sourceforge.net>
To: sherman at mrcc.com
In-Reply-To: <20040616194406.GA3630 at mrcc.com>
References: <20040616194406.GA3630 at mrcc.com>
Content-Type: multipart/signed;
micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-vCdaKdKc0XHLvdsO36MG"
Message-Id: <1087560502.2726.0.camel at gnorf.lars>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.4-8mdk
Date: Fri, 18 Jun 2004 14:08:22 +0200
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on tank
X-Spam-Level:
X-Spam-Status: No, hits=-4.9 required=4.0 tests=BAYES_00 autolearn=ham
version=2.63
X-UIDL: V7;"!R$M"!15 at !!:IW"!
Status: RO
Lines: 60
X-Status: U
X-KMail-EncryptionState:
X-KMail-SignatureState:
X-KMail-MDN-Sent:
--=-vCdaKdKc0XHLvdsO36MG
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Wed, 2004-06-16 at 21:44, sherman at mrcc.com wrote:
> Greetings,
>=20
> Below is an addition to the QGIS license that will allow linking with any
> version of the Qt library. This change is needed to give us the
> flexibility to compile native versions on Windows, Mac, and embedded
> platforms.
>=20
> By receiving this email you have been identified as a contributor to the
> QGIS code base and therefore a member of the "QGIS Development Team" as
> referenced in the license change below. Your concurrence is required to
> make this change to the license. Please review the statement below and
> reply to this message indicating you agree with the change. Please
> include the text of this message in your reply.
>=20
> I would like to have this change implemented prior to the 0.4 release so
> your prompt reply is appreciated.
>=20
> This change follows guidance found in the GPL FAQ.
>=20
> Thanks,
> -gary
>=20
> ---- Addendum to QGIS License ----
> In addition, as a special exception, the QGIS Development Team gives
> permission to link the code of this program with the Qt library,
> including but not limited to the following versions (both free and
> commercial): Qt/Non-commerical Windows, Qt/Windows, Qt/X11, Qt/Mac, and
> Qt/Embedded (or with modified versions of Qt that use the same license
> as Qt), and distribute linked combinations including the two. You must
> obey the GNU General Public License in all respects for all of the code
> used other than Qt. If you modify this file, you may extend this
> exception to your version of the file, but you are not obligated to do
> so. If you do not wish to do so, delete this exception statement from
> your version.
Yes, that's OK with me.
-- Lars Luthman
--=-vCdaKdKc0XHLvdsO36MG
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQBA0ts2Q3FGUATHfi4RAu4+AJ44eYQhpfXaUuA14PNi9F9m0Q2MqgCdHFg3
6jxbPbCJKG5FEYIqGEARk10=
=HEzb
-----END PGP SIGNATURE-----
--=-vCdaKdKc0XHLvdsO36MG--
From stevehalasz at yahoo.com Fri Jun 18 06:06:45 2004
Return-Path: <stevehalasz at yahoo.com>
X-Original-To: sherman at mrcc.com
Delivered-To: sherman at mrcc.com
Received: from web41713.mail.yahoo.com (web41713.mail.yahoo.com [66.218.93.130])
by mrcc.com (Postfix) with SMTP id 2FFE01ECF5
for <sherman at mrcc.com>; Fri, 18 Jun 2004 06:07:04 -0800 (AKDT)
Message-ID: <20040618140645.24110.qmail at web41713.mail.yahoo.com>
Received: from [69.165.92.12] by web41713.mail.yahoo.com via HTTP; Fri, 18 Jun 2004 07:06:45 PDT
Date: Fri, 18 Jun 2004 07:06:45 -0700 (PDT)
From: Steve Halasz <stevehalasz at yahoo.com>
Subject: Re: Exception to GPL for Windows
To: sherman at mrcc.com
In-Reply-To: <20040616194406.GA3630 at mrcc.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset=us-ascii
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on tank
X-Spam-Level:
X-Spam-Status: No, hits=-4.9 required=4.0 tests=BAYES_00 autolearn=ham
version=2.63
X-UIDL: db'"!M[,"!T6D"!5MT"!
Status: RO
Lines: 74
X-Status: U
X-KMail-EncryptionState:
X-KMail-SignatureState:
X-KMail-MDN-Sent:
Gary,
I agree with this change.
I added a bit of code for autoscrolling the legend
during layer drags that I nicked from another gpl
project. I have asked for their ok for this change,
but have not heard back yet.
Steve Halasz
--- sherman at mrcc.com wrote:
> Greetings,
>
> Below is an addition to the QGIS license that will
> allow linking with any
> version of the Qt library. This change is needed to
> give us the
> flexibility to compile native versions on Windows,
> Mac, and embedded
> platforms.
>
> By receiving this email you have been identified as
> a contributor to the
> QGIS code base and therefore a member of the "QGIS
> Development Team" as
> referenced in the license change below. Your
> concurrence is required to
> make this change to the license. Please review the
> statement below and
> reply to this message indicating you agree with the
> change. Please
> include the text of this message in your reply.
>
> I would like to have this change implemented prior
> to the 0.4 release so
> your prompt reply is appreciated.
>
> This change follows guidance found in the GPL FAQ.
>
> Thanks,
> -gary
>
> ---- Addendum to QGIS License ----
> In addition, as a special exception, the QGIS
> Development Team gives
> permission to link the code of this program with the
> Qt library,
> including but not limited to the following versions
> (both free and
> commercial): Qt/Non-commerical Windows, Qt/Windows,
> Qt/X11, Qt/Mac, and
> Qt/Embedded (or with modified versions of Qt that
> use the same license
> as Qt), and distribute linked combinations including
> the two. You must
> obey the GNU General Public License in all respects
> for all of the code
> used other than Qt. If you modify this file, you may
> extend this
> exception to your version of the file, but you are
> not obligated to do
> so. If you do not wish to do so, delete this
> exception statement from
> your version.
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
////////////////////////////////////////////////////////////////
From: morb@ozemail.com.au
Subject: Re: QGIS Exception to the GPL
Date: May 12, 2005 9:47:41 PM AKDT
To: sherman@mrcc.com
Dear Gary,
I, Brendan Morley, agree with this exception.
Thanks,
Brendan
On Thu, 12 May 2005 21:45:33 -0800, Gary Sherman wrote:
You have been identified as a member of the QGIS Development team.
Please reply to this message indicating that you are in agreement
with the exception to the GPL as stated below. Include the full text
of this message in your reply.
"In addition, as a special exception, the QGIS Development Team gives
permission to link the code of this program with the Qt library,
including but not limited to the following versions (both free and
commercial): Qt/Non-commerical Windows, Qt/Windows, Qt/X11, Qt/Mac,
and Qt/Embedded (or with modified versions of Qt that use the same
license as Qt), and distribute linked combinations including the
two.
You must obey the GNU General Public License in all respects for all
of the code used other than Qt. If you modify this file, you may
extend this exception to your version of the file, but you are not
obligated to do so. If you do not wish to do so, delete this
exception
statement from your version."

1394
INSTALL.md

File diff suppressed because it is too large Load Diff

4270
NEWS.md

File diff suppressed because it is too large Load Diff

View File

@ -1,71 +0,0 @@
<!--
This file documents the code provenance review for QGIS as part of the
OSGEO incubation process and should remain in the QGIS source tree. It
should not be included in release packages.
This file is in MediaWiki format for inclusion on the OSGEO wiki.
-->
Note the authoritative copy of this document is stored in the QGIS repository.
= Committers Past and Present =
dassau - Otto Dassau
ersts - Peter Ersts
g_j_m - Gavin Macaulay
godofredo - Godofredo Contreras
gsherman - Gary Sherman
homann - Magnus Homann
hoshi - Masaru Hoshi
jef - Jürgen Fischer
jobi - Jens Oberender
larsl - Lars Luthman
leo.lami - Leonardo Lami
mcoletti - Mark Coletti
mhugent - Marco Hugentobler
morb_au - Brendan Morley
perrygeo - Matthew Perry
rabla/rblazek - Radim Blazek
rawbytes - Denis Antipov
sbr00pwb - Peter Brewer
shalasz/stevehalasz - Steve Halasz
spoerri - Christoph Spoerri
StevenB - Steven Bell
telwertowski - Tom Elwertowski
timlinux - Tim Sutton
warmerdam - Frank Warmerdam
what_nick - Tisham Dhar
wonder - Martin Dobias
= Outstanding Issues =
No issues were discovered in the code review. All external code was
examined to make sure there were no license problems (see below).
= Included Libraries =
The following libraries are used in QGIS:
* GDAL/OGR
* GSL (optional)
* Qt
* PostgreSQL (optional)
* Python (optional)
* GRASS (optional)
* PyQt (optional)
* Sip (optional)
* Sqlite3
= Source Code Review =
All non-generated source files were manually reviewed for copyright and
license statements, as well as potential issues. This constituted a
review of 364 implementation files (.cpp and .cc), 378 header files
(.h), and 21 Python scripts in the src directory and its subdirectories:
app
designer
core
gui
helpviewer
mac
plugins
providers
ui
Where copyright and/or GPL license statement were missing, it was added
after ensuring it was appropriate. All code within the project is
licensed under the GPL or LGPL, version 2.
== External Source Files ==
The following files are included in the QGIS source tree from external
sources. The source, license, and copyright are noted for each.

190
README.md
View File

@ -1,190 +0,0 @@
<img src="images/README-md/main_logo.png" width="300">
[![🧪 QGIS tests](https://github.com/qgis/QGIS/actions/workflows/run-tests.yml/badge.svg)](https://github.com/qgis/QGIS/actions/workflows/run-tests.yml?query=branch%3Amaster+event%3Apush)
[![Docker Status](https://img.shields.io/docker/automated/qgis/qgis.svg)](https://hub.docker.com/r/qgis/qgis/tags)
[![Build Status](https://dev.azure.com/qgis/QGIS/_apis/build/status/qgis.QGIS?branchName=master)](https://dev.azure.com/qgis/QGIS/_build/latest?definitionId=1&branchName=master)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/qgis/QGIS/badge)](https://securityscorecards.dev/viewer/?uri=github.com/qgis/QGIS)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/1581/badge)](https://www.bestpractices.dev/projects/1581)
[![🪟 MingW64 Windows 64bit Build](https://github.com/qgis/QGIS/actions/workflows/mingw64.yml/badge.svg)](https://github.com/qgis/QGIS/actions/workflows/mingw64.yml?query=branch%3Amaster+event%3Apush)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5869837.svg)](https://doi.org/10.5281/zenodo.5869837)
QGIS is a full-featured, user-friendly, free-and-open-source (FOSS) geographical information system (GIS) that runs on Unix platforms, Windows, and MacOS.
<!-- TOC generated with https://freelance-tech-writer.github.io/table-of-contents-generator/index.html -->
- [Features](#features)
- [1. Flexible and powerful spatial data management](#1-flexible-and-powerful-spatial-data-management)
- [2. Beautiful cartography](#2-beautiful-cartography)
- [3. Advanced and robust geospatial analysis](#3-advanced-and-robust-geospatial-analysis)
- [4. Powerful customization and extensibility](#4-powerful-customization-and-extensibility)
- [5. QGIS Server](#5-qgis-server)
- [Under the hood](#under-the-hood)
- [Versions and release cycle](#versions-and-release-cycle)
- [Free and Open Source](#free-and-open-source)
- [Installing and using QGIS](#installing-and-using-qgis)
- [Documentation](#documentation)
- [Help and support channels](#help-and-support-channels)
- [Get involved with the community](#get-involved-with-the-community)
## Features
### 1. Flexible and powerful spatial data management
- Support for raster, vector, mesh, and point cloud data in a range of industry-standard formats
- *Raster formats include*: GeoPackage, GeoTIFF, GRASS, ArcInfo binary and ASCII grids, ERDAS Imagine SDTS, WMS, WCS, PostgreSQL/PostGIS, and [other GDAL supported formats](https://gdal.org/drivers/raster/index.html).
- *Vector formats include*: GeoPackage, ESRI shapefiles, GRASS, SpatiaLite, PostgreSQL/PostGIS, MSSQL, Oracle, WFS, Vector Tiles and [other OGR supported formats](https://www.gdal.org/ogr_formats.html).
- *Mesh formats include*: NetCDF, GRIB, 2DM, and [other MDAL supported formats](https://github.com/lutraconsulting/MDAL#supported-formats).
- *Point-cloud format*: LAS/LAZ and EPT datasets.
- Data abstraction framework, with local files, spatial databases (PostGIS, SpatiaLite, SQL Server, Oracle, SAP HANA), and web services (WMS, WCS, WFS, ArcGIS REST) all accessed through a unified data model and browser interface, and as flexible layers in user-created projects
- Spatial data creation via visual and numerical digitizing and editing, as well as georeferencing of raster and vector data
- On-the-fly reprojection between coordinate reference systems (CRS)
- Nominatim (OpenStreetMap) geocoder access
- Temporal support
*Example: Temporal animation*
![Example: Temporal animation](images/README-md/icebergs.gif "Temporal animation")
*Example: 3D map view*
![Example: 3D map view](https://docs.qgis.org/latest/en/_images/3dmapview.png "3D map view")
### 2. Beautiful cartography
- Large variety of rendering options in 2D and 3D
- Fine control over symbology, labeling, legends and additional graphical elements for beautifully rendered maps
- Respect for embedded styling in many spatial data sources (e.g. KML and TAB files, Mapbox-GL styled vector tiles)
- In particular, near-complete replication (and significant extension) of symbology options that are available in proprietary software by ESRI
- Advanced styling using data-defined overrides, blending modes, and draw effects
- 500+ built-in color ramps (cpt-city, ColorBrewer, etc.)
- Create and update maps with specified scale, extent, style, and decorations via saved layouts
- Generate multiple maps (and reports) automatically using QGIS Atlas and QGIS Reports
- Display and export elevation profile plots with flexible symbology
- Flexible output direct to printer, or as image (raster), PDF, or SVG for further customization
- On-the-fly rendering enhancements using geometry generators (e.g. create and style new geometries from existing features)
- Preview modes for inclusive map making (e.g. monochrome, color blindness)
*[Example: Map of Bogota, Colombia in the style of Starry Starry Night, by Andrés Felipe Lancheros Sánchez](https://flic.kr/p/2jFfGJP)*
![Map of Bogota, Colombia in the style of Starry Starry Night](https://live.staticflickr.com/65535/50327326323_3da28f0d86_b.jpg "Map of Bogota, Colombia in the style of Starry Starry Night")
For more maps created with QGIS, visit the [QGIS Map Showcase Flickr Group](https://www.flickr.com/groups/2244553@N22/pool/with/50355460063/).
![QGIS Map Showcase](images/README-md/qgis_map_showcase.png "QGIS Map Showcase")
### 3. Advanced and robust geospatial analysis
- Powerful processing framework with 200+ native processing algorithms
- Access to 1000+ processing algorithms via providers such as GDAL, SAGA, GRASS, OrfeoToolbox, as well as custom models and processing scripts
- Geospatial database engine (filters, joins, relations, forms, etc.), as close to datasource- and format-independent as possible
- Immediate visualization of geospatial query and geoprocessing results
- Model designer and batch processing
*Example: Travel isochrones*
![Example: Travel isochrones](images/README-md/network_analysis_2.png "Travel isochrones")
*Example: Model designer*
![Example: model designer](https://docs.qgis.org/latest/en/_images/models_model.png "Model designer")
### 4. Powerful customization and extensibility
- Fully customizable user experience, including user interface and application settings that cater to power-users and beginners alike
- Rich [expression engine](https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/expression.html) for maximum flexibility in visualization and processing
- Broad and varied [plugin ecosystem](https://plugins.qgis.org/) that includes data connectors, digitizing aids, advanced analysis and charting tools,
in-the-field data capture, conversion of ESRI style files, etc.
- Style manager for creating, storing, and managing styles
- [QGIS style hub](https://plugins.qgis.org/styles/) for easy sharing of styles
- Python and C++ API for standalone (headless) applications as well as in-application comprehensive scripting (PyQGIS)
*Example: Style manager*
![Example: Style manager](https://docs.qgis.org/latest/en/_images/stylemanager.png "Style Manager")
*Example: Plugins*
![Example: Plugins](images/README-md/plugins_1.png "Plugins")
<!-- Kill this one for now, since the example provided is Python2 not 3
Example: Python console
![Example: Python console](https://docs.qgis.org/latest/en/_images/python_console_editor.png "Python console")
-->
### 5. QGIS Server
Headless map server -- running on Linux, macOS, Windows, or in a docker container -- that shares the same code base as QGIS.
- Industry-standard protocols (WMS, WFS, WFS3/OGC API for Features and WCS) allow plug-n-play with any software stack
- Works with any web server (Apache, nginx, etc) or standalone
- All beautiful QGIS cartography is supported with best-in-class support for printing
- Fully customizable with Python scripting support
*Example: QGIS server WMS response*
![Example: QGIS Server response to a WMS request](https://docs.qgis.org/latest/en/_images/server_selection_parameter.png "QGIS Server response to a WMS request")
*Example: QGIS server WFS response*
![Example: QGIS Server response to a WFS Feature request](https://docs.qgis.org/latest/en/_images/server_wfs3_feature.png "QGIS Server response to a WFS Feature request")
## Under the hood
QGIS is developed using the [Qt toolkit](https://qt.io) and C++, since 2002, and has a pleasing, easy to use graphical
user interface with multilingual support. It is maintained by an active developer team and supported by vibrant
community of GIS professionals and enthusiasts as well as geospatial data publishers and end-users.
### Versions and release cycle
QGIS development and releases follow a [time based schedule/roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html). There are three main branches of QGIS that users can install. These are the **Long Term Release (LTR)** branch, the **Latest Release (LR)** branch, and the **Development (Nightly)** branch.
Every month, there is a **Point Release** that provides bug-fixes to the LTR and LR.
### Free and Open Source
QGIS is released under the GNU Public License (GPL) Version 2 or any later version.
Developing QGIS under this license means that you can (if you want to) inspect
and modify the source code and guarantees that you, our happy user will always
have access to a GIS program that is free of cost and can be freely
modified.
QGIS is part of the Open-Source Geospatial Foundation ([OSGeo](https://www.osgeo.org/)), offering a range of complementary open-source GIS software projects.
## Installing and using QGIS
Precompiled binaries for QGIS are available at [the QGIS.org download page](https://www.qgis.org/en/site/forusers/download.html).
Please follow the installation instructions carefully.
The [building guide](INSTALL.md) can be used to get started with building QGIS from source.
For installation of QGIS Server, see its [getting started documentation](https://docs.qgis.org/testing/en/docs/server_manual/getting_started.html).
### Documentation
A range of [documentation](https://qgis.org/resources/hub/#documentation) is available. This includes:
- [Training Manual](https://docs.qgis.org/latest/en/docs/training_manual/index.html)
- [QGIS User Guide](https://docs.qgis.org/latest/en/docs/user_manual/index.html)
- [QGIS Server Guide](https://docs.qgis.org/latest/en/docs/server_manual/index.html)
- [Visual Changelog](https://qgis.org/project/visual-changelogs/)
- [Documentation Guidelines](https://docs.qgis.org/latest/en/docs/documentation_guidelines/index.html)
- [QGIS Python (PyQGIS) Cookbook](https://docs.qgis.org/latest/en/docs/pyqgis_developer_cookbook/index.html)
- [QGIS Python (PyQGIS) API](https://qgis.org/pyqgis/)
- [QGIS C++ API](https://qgis.org/api/)
- [Developers Guide](https://docs.qgis.org/latest/en/docs/developers_guide/index.html)
### Help and support channels
There are several channels where you can find help and support for QGIS:
- Using the [QGIS community site](https://qgis.org)
- Joining the [qgis-users mailing list](https://lists.osgeo.org/mailman/listinfo/qgis-user)
- Chatting with other users real-time. *Please wait around for a response to your question as many folks on the channel are doing other things and it may take a while for them to notice your question. The following paths all take you to the same chat room:*
- Using an IRC client and joining the
[#qgis](https://web.libera.chat/?channels=#qgis) channel on irc.libera.chat.
- Using a Matrix client and joining the [#qgis:osgeo.org](https://matrix.to/#/#qgis:osgeo.org) room.
- At the [GIS stackexchange](https://gis.stackexchange.com/) or [r/QGIS reddit](https://www.reddit.com/r/QGIS/), which are not maintained by the QGIS team, but where the QGIS and broader GIS community provides lots of advice
- [Other support channels](https://qgis.org/resources/support/)
## Get involved with the community
[Contribution guidelines for this project](CONTRIBUTING.md)

View File

@ -1,64 +0,0 @@
set(CPACK_GENERATOR)
set(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/BundleConfig.cmake")
add_custom_target(bundle
COMMAND ${CMAKE_CPACK_COMMAND} "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake" "--verbose"
COMMENT "Running CPACK. Please wait..."
DEPENDS qgis)
if(WIN32 AND NOT UNIX)
set (CREATE_NSIS FALSE CACHE BOOL "Create an installer using NSIS")
endif()
set (CREATE_ZIP FALSE CACHE BOOL "Create a ZIP package")
# Do not warn about runtime libs when building using VS Express
if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
endif()
if(QGIS_INSTALL_SYS_LIBS)
include(InstallRequiredSystemLibraries)
endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "QGIS")
set(CPACK_PACKAGE_VENDOR "Open Source Geospatial Foundation")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "QGIS ${COMPLETE_VERSION}")
set(CPACK_PACKAGE_EXECUTABLES "qgis" "QGIS")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
if(CREATE_NSIS)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backslashes.
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/win_build\\\\sidebar.bmp")
set(CPACK_NSIS_INSTALLED_ICON_NAME "\\\\qgis.exe")
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} QGIS")
set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\qgis.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\qgis.org")
set(CPACK_NSIS_CONTACT "info@qgis.org")
set(CPACK_NSIS_MODIFY_PATH ON)
endif()
if(CREATE_ZIP)
list(APPEND CPACK_GENERATOR "ZIP")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND QGIS_MAC_BUNDLE)
set(CREATE_DMG FALSE CACHE BOOL "Create a dmg bundle")
set(PYMACDEPLOYQT_EXECUTABLE "${CMAKE_SOURCE_DIR}/platform/macos/pymacdeployqt.py")
configure_file("${CMAKE_SOURCE_DIR}/platform/macos/Info.plist.in" "${CMAKE_BINARY_DIR}/platform//macos/Info.plist" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/platform/macos/Info.plist" DESTINATION "${APP_CONTENTS_DIR}")
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
set(CPACK_DMG_FORMAT "UDBZ")
list(APPEND CPACK_GENERATOR "External")
message(STATUS " + macdeployqt/DMG YES ")
configure_file(${CMAKE_SOURCE_DIR}/platform/macos/CPackMacDeployQt.cmake.in "${CMAKE_BINARY_DIR}/CPackExternal.cmake" @ONLY)
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_BINARY_DIR}/CPackExternal.cmake")
set(CPACK_EXTERNAL_ENABLE_STAGING ON)
set(CPACK_PACKAGING_INSTALL_PREFIX "/${QGIS_APP_NAME}.app")
endif()
include(CPack)

View File

@ -1,42 +0,0 @@
# Macros/functions for debugging CMake
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016, Larry Shaffer, <lshaffer (at) boundlessgeo (dot) com>>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Dump current CMake variables to file
#
# Usage:
# INCLUDE(CMakeDebugMacros)
# DUMP_CMAKE_VARS() or DUMP_CMAKE_VARS("regex")
#
# regex: optional ARGV0 regular expression for filtering output variable names
#
# Outputs the result relative to the current CMake file being processed and
# writes to a file with name "<file-basename>_cmake-vars.txt" to the current
# build (binary) directory
#
function(DUMP_CMAKE_VARS)
get_filename_component(_basename ${CMAKE_CURRENT_LIST_FILE} NAME_WE)
set(_out "${CMAKE_CURRENT_BINARY_DIR}/${_basename}_cmake-vars.txt")
set(_cmake_vars "")
get_cmake_property(_varNames VARIABLES)
foreach(_varName ${_varNames})
if(ARGV0)
string(REGEX MATCH "${ARGV0}" _match "${_varName}")
if(_match)
set(_cmake_vars "${_cmake_vars}\n\n${_varName}=${${_varName}}")
endif()
else()
set(_cmake_vars "${_cmake_vars}\n\n${_varName}=${${_varName}}")
endif()
endforeach()
message(STATUS "Dumping current CMake variables to ...\n ${_out}")
file(WRITE "${_out}" "${_cmake_vars}")
endfunction(DUMP_CMAKE_VARS)

View File

@ -1,22 +0,0 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,4 +0,0 @@
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E compare_files ${SRC} ${DST} RESULT_VARIABLE result)
IF(result)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${SRC} ${DST})
ENDIF(result)

View File

@ -1,42 +0,0 @@
##
# The ADD_QGIS_RESOURCES macro handles resource file installation
#
# - at build time it copies files to buildPath/output/data
# - at install time it installs the files into the qgis data folder (typically INSTALL_PREFIX/share/qgis)
#
# The SOURCE_PREFIX is the base path of all the files in the source folder (typically ${CMAKE_CURRENT_SOURCE_DIR})
# The TARGET_PREFIX is the subdirectory inside the data folder where files should be placed
# DEST_FILES is an output variable where a list of all generated files in the build folder is written to. This can be used to define a custom target
# The SOURCE_FILE_PATHS takes a list of files relative to SOURCE_PREFIX
##
MACRO(ADD_QGIS_RESOURCES SOURCE_PREFIX TARGET_PREFIX DEST_FILES SOURCE_FILE_PATHS)
# Create a list of all copy commands, source paths and destination paths
SET(ALL_COPY_COMMANDS "")
SET(ALL_SOURCE_FILES "")
FOREACH(RESOURCE_FILE ${SOURCE_FILE_PATHS})
LIST(APPEND ALL_COPY_COMMANDS
COMMAND ${CMAKE_COMMAND} -E copy
"${SOURCE_PREFIX}/${RESOURCE_FILE}"
"${CMAKE_BINARY_DIR}/output/data/${TARGET_PREFIX}/${RESOURCE_FILE}"
)
LIST(APPEND ALL_SOURCE_FILES "${SOURCE_PREFIX}/${RESOURCE_FILE}")
LIST(APPEND ${DEST_FILES}
"${CMAKE_BINARY_DIR}/output/data/${TARGET_PREFIX}/${RESOURCE_FILE}")
ENDFOREACH(RESOURCE_FILE)
# Add a single custom command to install all resources to system resource folder
ADD_CUSTOM_COMMAND(
OUTPUT ${${DEST_FILES}}
${ALL_COPY_COMMANDS}
COMMENT "Copying '${TARGET_PREFIX}' resources"
DEPENDS ${ALL_SOURCE_FILES}
)
# Install resources to system resource folder
FOREACH(RESOURCE_FILE ${SOURCE_FILE_PATHS})
GET_FILENAME_COMPONENT(PATH_NAME "${TARGET_PREFIX}/${RESOURCE_FILE}" PATH)
INSTALL(FILES "${SOURCE_PREFIX}/${RESOURCE_FILE}" DESTINATION "${QGIS_DATA_DIR}/${PATH_NAME}")
ENDFOREACH()
ENDMACRO()

View File

@ -1,60 +0,0 @@
# Creates version files
# qgsversion.h that defines QGSVERSION
# qgsversion.inc for doxygen
MACRO(CREATE_QGSVERSION)
IF (${ENABLE_LOCAL_BUILD_SHORTCUTS})
FILE(WRITE ${CMAKE_BINARY_DIR}/qgsversion.h.out "#define QGSVERSION \"dev\"\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/qgsversion.inc "PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} (dev)\"\n")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/qgsversion.h.out ${CMAKE_BINARY_DIR}/qgsversion.h)
ELSE (${ENABLE_LOCAL_BUILD_SHORTCUTS})
IF (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
FIND_PROGRAM(GITCOMMAND git PATHS c:/cygwin/bin)
IF(GITCOMMAND)
IF(WIN32 AND NOT CMAKE_CROSS_COMPILING)
IF(USING_NINJA)
SET(ARG %a)
ELSE(USING_NINJA)
SET(ARG %%a)
ENDIF(USING_NINJA)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/qgsversion.h ${CMAKE_BINARY_DIR}/qgsversion.inc
COMMAND for /f \"usebackq tokens=1\" ${ARG} in "(`\"${GITCOMMAND}\" log -n1 --oneline`)" do echo \#define QGSVERSION \"${ARG}\" >${CMAKE_BINARY_DIR}/qgsversion.h.temp
COMMAND for /f \"usebackq tokens=1\" ${ARG} in "(`\"${GITCOMMAND}\" log -n1 --oneline`)" do echo PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} \(${ARG}\)\" >${CMAKE_BINARY_DIR}/qgsversion.inc
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_BINARY_DIR}/qgsversion.h.temp -DDST=${CMAKE_BINARY_DIR}/qgsversion.h -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/.git/index
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ELSE(WIN32 AND NOT CMAKE_CROSS_COMPILING)
STRING(REPLACE "'" "%x27" _rn ${RELEASE_NAME})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/qgsversion.h ${CMAKE_BINARY_DIR}/qgsversion.inc
COMMAND ${GITCOMMAND} log -n1 --pretty=\#define\\ QGSVERSION\\ \\"%h\\" >${CMAKE_BINARY_DIR}/qgsversion.h.temp
COMMAND ${GITCOMMAND} log -n1 --pretty='PROJECT_NUMBER = \"${COMPLETE_VERSION}-${_rn} \(%h\)\"' >${CMAKE_BINARY_DIR}/qgsversion.inc
COMMAND ${GITCOMMAND} config remote.$$\(${GITCOMMAND} config branch.$$\(${GITCOMMAND} name-rev --name-only HEAD\).remote\).url | sed -e 's/^/\#define QGS_GIT_REMOTE_URL \"/' -e 's/$$/\"/' >>${CMAKE_BINARY_DIR}/qgsversion.h.temp
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_BINARY_DIR}/qgsversion.h.temp -DDST=${CMAKE_BINARY_DIR}/qgsversion.h -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/.git/index
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ENDIF(WIN32 AND NOT CMAKE_CROSS_COMPILING)
ELSE(GITCOMMAND)
MESSAGE(STATUS "git marker, but no git found - version will be unknown")
IF(NOT SHA)
SET(SHA "unknown")
ENDIF(NOT SHA)
FILE(WRITE ${CMAKE_BINARY_DIR}/qgsversion.h.out "#define QGSVERSION \"${SHA}\"\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/qgsversion.inc "PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} (${SHA})\"\n")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/qgsversion.h.out ${CMAKE_BINARY_DIR}/qgsversion.h)
ENDIF(GITCOMMAND)
ELSE (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
IF(NOT SHA)
SET(SHA "exported")
ENDIF(NOT SHA)
FILE(WRITE ${CMAKE_BINARY_DIR}/qgsversion.h.out "#define QGSVERSION \"${SHA}\"\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/qgsversion.inc "PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} (${SHA})\"\n")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/qgsversion.h.out ${CMAKE_BINARY_DIR}/qgsversion.h)
ENDIF (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
ENDIF (${ENABLE_LOCAL_BUILD_SHORTCUTS})
ADD_CUSTOM_TARGET(version ALL DEPENDS ${CMAKE_BINARY_DIR}/qgsversion.h)
ENDMACRO(CREATE_QGSVERSION)

View File

@ -1,66 +0,0 @@
# Download Module for o2 Library Source
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright (c) March 2017, Boundless Spatial
# Author: Larry Shaffer <lshaffer (at) boundlessgeo (dot) com>
#
# Official o2 project source code repository: https://github.com/pipacs/o2
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# NOTE: These is a temporary source code commit checkout, until a release with
# recent commits is available via common platform packaging
set(_o2_commit 31ceafb3f0c3b605110ddd20aeebd3288504ee1f)
set(_o2_url "https://github.com/pipacs/o2/archive/${_o2_commit}.tar.gz")
set(_o2_dl_file "${CMAKE_BINARY_DIR}/o2-${_o2_commit}.tar.gz")
set(_o2_dl_sha1 94236af3c373927d778349cdbe89ff6112343cc9)
set(_o2_dl_timeout 45)
set(_o2_dl_inactive_timeout 30)
set(_o2_prefix "${CMAKE_BINARY_DIR}/o2-${_o2_commit}")
message(STATUS "Downloading or verifying o2 library source archive...")
file(DOWNLOAD ${_o2_url} ${_o2_dl_file}
INACTIVITY_TIMEOUT ${_o2_dl_inactive_timeout}
TIMEOUT ${_o2_dl_timeout}
STATUS _o2_dl_status
LOG _o2_dl_log
#SHOW_PROGRESS
EXPECTED_HASH SHA1=${_o2_dl_sha1}
TLS_VERIFY on
#TLS_CAINFO file
)
list(GET _o2_dl_status 0 _o2_dl_status_code)
list(GET _o2_dl_status 1 _o2_dl_status_string)
if(NOT "${_o2_dl_status_code}" STREQUAL "0")
set(_o2_dl_log_file ${CMAKE_BINARY_DIR}/o2-download.log)
set(_o2_dl_log_title "Error downloading or verifying o2 library source archive")
set(_o2_dl_log_msg "${_o2_dl_log_title}
from url=${_o2_url}
to file =${_o2_dl_file}
timeout =${_o2_dl_timeout} seconds
status code: ${_o2_dl_status_code}
status string: ${_o2_dl_status_string}
connection log:
${_o2_dl_log}
")
file(WRITE ${_o2_dl_file} "${_o2_dl_log_msg}")
message(FATAL_ERROR "${_o2_dl_log_title}
See log: ${_o2_dl_log_file}
")
endif()
if(NOT EXISTS ${_o2_dl_file})
message(FATAL_ERROR "Download file does not exist")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xfz ${_o2_dl_file})
# These match variables set by FindO2.cmake
set(O2_INCLUDE_DIR "${_o2_prefix}/src" CACHE INTERNAL "Path to o2 library headers" FORCE)
set(O2_LIBRARY "" CACHE INTERNAL "Path to o2 built shared library" FORCE)
set(O2_LIBRARY_STATIC "" CACHE INTERNAL "Path to o2 built static library" FORCE)
set(O2_FOUND TRUE CACHE INTERNAL "Whether O2 has been found" FORCE)

View File

@ -1,70 +0,0 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# based on https://github.com/hlrs-vis/covise/blob/b909e6fad418e23e48726ab44de1bb36e82a24f8/cmake/FindDRACO.cmake#L4
# - Find DRACO
# Find the DRACO includes and library
#
# DRACO_INCLUDE_DIR - Where to find DRACO includes
# DRACO_FOUND - True if DRACO was found
IF(DRACO_INCLUDE_DIR)
SET(DRACO_FIND_QUIETLY TRUE)
ENDIF(DRACO_INCLUDE_DIR)
FIND_PATH(DRACO_INCLUDE_DIR "draco/draco_features.h"
PATHS
$ENV{DRACO_HOME}/include
$ENV{EXTERNLIBS}/DRACO/include
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
DOC "DRACO - Headers"
)
SET(DRACO_NAMES draco)
SET(DRACO_DBG_NAMES dracod)
FIND_LIBRARY(DRACO_LIBRARY NAMES ${DRACO_NAMES}
PATHS
$ENV{DRACO_HOME}
$ENV{EXTERNLIBS}/DRACO
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib lib64
DOC "DRACO - Library"
)
INCLUDE(FindPackageHandleStandardArgs)
SET(DRACO_LIBRARIES ${DRACO_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Draco DEFAULT_MSG DRACO_LIBRARY DRACO_INCLUDE_DIR)
MARK_AS_ADVANCED(DRACO_LIBRARY DRACO_INCLUDE_DIR)
IF(DRACO_FOUND)
SET(DRACO_INCLUDE_DIRS ${DRACO_INCLUDE_DIR})
set(draco_version_file
"${DRACO_INCLUDE_DIR}/draco/core/draco_version.h")
file(STRINGS "${draco_version_file}" draco_version REGEX "kDracoVersion")
list(GET draco_version 0 draco_version)
string(REPLACE "static const char kDracoVersion[] = " "" draco_version
"${draco_version}")
string(REPLACE ";" "" draco_version "${draco_version}")
string(REPLACE "\"" "" draco_version "${draco_version}")
set(DRACO_VERSION ${draco_version})
ENDIF(DRACO_FOUND)

View File

@ -1,22 +0,0 @@
# Find EXIV2
# ~~~~~~~~~~
# CMake module to search for EXIV2 library
#
# If it's found it sets EXIV2_FOUND to TRUE
# and following variables are set:
# EXIV2_INCLUDE_DIR
# EXIV2_LIBRARY
#
FIND_PATH(EXIV2_INCLUDE_DIR exiv2/exiv2.hpp $ENV{LIB_DIR}/include /usr/local/include /usr/include)
FIND_LIBRARY(EXIV2_LIBRARY NAMES exiv2 PATHS $ENV{LIB_DIR}/lib /usr/local/lib /usr/lib)
IF (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)
SET(EXIV2_FOUND TRUE)
MESSAGE(STATUS "Found exiv2: ${EXIV2_LIBRARY}")
ELSE (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)
MESSAGE(EXIV2_INCLUDE_DIR=${EXIV2_INCLUDE_DIR})
MESSAGE(EXIV2_LIBRARY=${EXIV2_LIBRARY})
MESSAGE(FATAL_ERROR "Could not find exiv2")
ENDIF (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)

View File

@ -1,35 +0,0 @@
# CMake module to search for FastCGI headers
#
# If it's found it sets FCGI_FOUND to TRUE
# and following variables are set:
# FCGI_INCLUDE_DIR
# FCGI_LIBRARY
FIND_PATH(FCGI_INCLUDE_DIR
fcgio.h
PATHS
/usr/include
/usr/local/include
/usr/include/fastcgi
"$ENV{LIB_DIR}/include"
$ENV{INCLUDE}
)
FIND_LIBRARY(FCGI_LIBRARY NAMES fcgi libfcgi PATHS
/usr/local/lib
/usr/lib
"$ENV{LIB_DIR}/lib"
"$ENV{LIB}"
)
IF (FCGI_INCLUDE_DIR AND FCGI_LIBRARY)
SET(FCGI_FOUND TRUE)
ENDIF (FCGI_INCLUDE_DIR AND FCGI_LIBRARY)
IF (FCGI_FOUND)
IF (NOT FCGI_FIND_QUIETLY)
MESSAGE(STATUS "Found FCGI: ${FCGI_LIBRARY}")
ENDIF (NOT FCGI_FIND_QUIETLY)
ELSE (FCGI_FOUND)
IF (FCGI_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find FCGI")
ENDIF (FCGI_FIND_REQUIRED)
ENDIF (FCGI_FOUND)

View File

@ -1,210 +0,0 @@
# Find GDAL
# ~~~~~~~~~
# Copyright (c) 2007, Magnus Homann <magnus at homann dot se>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
#
# Once run this will define:
#
# GDAL_FOUND = system has GDAL lib
#
# GDAL_LIBRARY = full path to the library
#
# GDAL_INCLUDE_DIR = where to find headers
find_package(GDAL CONFIG)
if(NOT GDAL_FOUND)
# Fallback logic for GDAL < 3.5, as soon as we switch to GDAL>=3.5 this file (Find_GDAL.cmake) can be deleted
INCLUDE (${CMAKE_SOURCE_DIR}/cmake/MacPlistMacros.cmake)
IF(WIN32)
IF (MINGW)
FIND_PATH(GDAL_INCLUDE_DIR gdal.h /usr/local/include /usr/include c:/msys/local/include PATH_SUFFIXES gdal)
FIND_LIBRARY(GDAL_LIBRARY NAMES gdal PATHS /usr/local/lib /usr/lib c:/msys/local/lib)
ENDIF (MINGW)
IF (MSVC)
FIND_PATH(GDAL_INCLUDE_DIR gdal.h "$ENV{LIB_DIR}/include/gdal" $ENV{INCLUDE})
FIND_LIBRARY(GDAL_LIBRARY NAMES gdal gdal_i PATHS
"$ENV{LIB_DIR}/lib" $ENV{LIB} /usr/lib c:/msys/local/lib)
IF (GDAL_LIBRARY)
SET (
GDAL_LIBRARY;odbc32;odbccp32
CACHE STRING INTERNAL)
ENDIF (GDAL_LIBRARY)
ENDIF (MSVC)
ELSEIF(APPLE AND QGIS_MAC_DEPS_DIR)
FIND_PATH(GDAL_INCLUDE_DIR gdal.h "$ENV{LIB_DIR}/include")
FIND_LIBRARY(GDAL_LIBRARY NAMES gdal PATHS "$ENV{LIB_DIR}/lib")
ELSE(WIN32)
IF(UNIX)
# try to use framework on mac
# want clean framework path, not unix compatibility path
IF (APPLE)
IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST"
OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY"
OR NOT CMAKE_FIND_FRAMEWORK)
SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
FIND_LIBRARY(GDAL_LIBRARY GDAL)
IF (GDAL_LIBRARY)
# they're all the same in a framework
SET (GDAL_INCLUDE_DIR ${GDAL_LIBRARY}/Headers CACHE PATH "Path to a file.")
# set GDAL_CONFIG to make later test happy, not used here, may not exist
SET (GDAL_CONFIG ${GDAL_LIBRARY}/unix/bin/gdal-config CACHE FILEPATH "Path to a program.")
# version in info.plist
GET_VERSION_PLIST (${GDAL_LIBRARY}/Resources/Info.plist GDAL_VERSION)
IF (NOT GDAL_VERSION)
MESSAGE (FATAL_ERROR "Could not determine GDAL version from framework.")
ENDIF (NOT GDAL_VERSION)
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}")
IF (GDAL_VERSION_MAJOR LESS 3)
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 3.2 or higher.")
ENDIF (GDAL_VERSION_MAJOR LESS 3)
IF ( (GDAL_VERSION_MAJOR EQUAL 3) AND (GDAL_VERSION_MINOR LESS 2) )
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 3.2 or higher.")
ENDIF( (GDAL_VERSION_MAJOR EQUAL 3) AND (GDAL_VERSION_MINOR LESS 2) )
ENDIF (GDAL_LIBRARY)
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
ENDIF ()
ENDIF (APPLE)
IF(CYGWIN)
FIND_LIBRARY(GDAL_LIBRARY NAMES gdal PATHS /usr/lib /usr/local/lib)
ENDIF(CYGWIN)
IF (NOT GDAL_INCLUDE_DIR OR NOT GDAL_LIBRARY OR NOT GDAL_CONFIG)
# didn't find OS X framework, and was not set by user
SET(GDAL_CONFIG_PREFER_PATH "$ENV{GDAL_HOME}/bin" CACHE STRING "preferred path to GDAL (gdal-config)")
SET(GDAL_CONFIG_PREFER_FWTOOLS_PATH "$ENV{FWTOOLS_HOME}/bin_safe" CACHE STRING "preferred path to GDAL (gdal-config) from FWTools")
FIND_PROGRAM(GDAL_CONFIG gdal-config
${GDAL_CONFIG_PREFER_PATH}
${GDAL_CONFIG_PREFER_FWTOOLS_PATH}
$ENV{LIB_DIR}/bin
/usr/local/bin/
/usr/bin/
)
# MESSAGE("DBG GDAL_CONFIG ${GDAL_CONFIG}")
IF (GDAL_CONFIG)
## extract gdal version
execute_process(COMMAND ${GDAL_CONFIG} --version
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE GDAL_VERSION )
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" GDAL_VERSION_MICRO "${GDAL_VERSION}")
# MESSAGE("DBG GDAL_VERSION ${GDAL_VERSION}")
# MESSAGE("DBG GDAL_VERSION_MAJOR ${GDAL_VERSION_MAJOR}")
# MESSAGE("DBG GDAL_VERSION_MINOR ${GDAL_VERSION_MINOR}")
# check for gdal version
# version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro)
# According to INSTALL, 2.1+ is required
IF (GDAL_VERSION_MAJOR LESS 3)
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 3.0 or higher.")
ENDIF (GDAL_VERSION_MAJOR LESS 3)
#IF ( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
# MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.1 or higher.")
#ENDIF( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
IF ( (GDAL_VERSION_MAJOR EQUAL 3) AND (GDAL_VERSION_MINOR EQUAL 0) AND (GDAL_VERSION_MICRO LESS 3) )
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 3.0.3 or higher.")
ENDIF( (GDAL_VERSION_MAJOR EQUAL 3) AND (GDAL_VERSION_MINOR EQUAL 0) AND (GDAL_VERSION_MICRO LESS 3) )
# set INCLUDE_DIR to prefix+include
execute_process(COMMAND ${GDAL_CONFIG} --prefix
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE GDAL_PREFIX)
#SET(GDAL_INCLUDE_DIR ${GDAL_PREFIX}/include CACHE STRING INTERNAL)
FIND_PATH(GDAL_INCLUDE_DIR
gdal.h
${GDAL_PREFIX}/include/gdal
${GDAL_PREFIX}/include
/usr/local/include
/usr/include
)
## extract link dirs for rpath
execute_process(COMMAND ${GDAL_CONFIG} --libs
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE GDAL_CONFIG_LIBS )
## split off the link dirs (for rpath)
## use regular expression to match wildcard equivalent "-L*<endchar>"
## with <endchar> is a space or a semicolon
STRING(REGEX MATCHALL "[-][L]([^ ;])+"
GDAL_LINK_DIRECTORIES_WITH_PREFIX
"${GDAL_CONFIG_LIBS}" )
# MESSAGE("DBG GDAL_LINK_DIRECTORIES_WITH_PREFIX=${GDAL_LINK_DIRECTORIES_WITH_PREFIX}")
## remove prefix -L because we need the pure directory for LINK_DIRECTORIES
IF (GDAL_LINK_DIRECTORIES_WITH_PREFIX)
STRING(REGEX REPLACE "[-][L]" "" GDAL_LINK_DIRECTORIES ${GDAL_LINK_DIRECTORIES_WITH_PREFIX} )
ENDIF (GDAL_LINK_DIRECTORIES_WITH_PREFIX)
## split off the name
## use regular expression to match wildcard equivalent "-l*<endchar>"
## with <endchar> is a space or a semicolon
STRING(REGEX MATCHALL "[-][l]([^ ;])+"
GDAL_LIB_NAME_WITH_PREFIX
"${GDAL_CONFIG_LIBS}" )
# MESSAGE("DBG GDAL_LIB_NAME_WITH_PREFIX=${GDAL_LIB_NAME_WITH_PREFIX}")
## remove prefix -l because we need the pure name
IF (GDAL_LIB_NAME_WITH_PREFIX)
STRING(REGEX REPLACE "[-][l]" "" GDAL_LIB_NAME ${GDAL_LIB_NAME_WITH_PREFIX} )
ENDIF (GDAL_LIB_NAME_WITH_PREFIX)
IF (APPLE)
IF (NOT GDAL_LIBRARY)
# work around empty GDAL_LIBRARY left by framework check
# while still preserving user setting if given
# ***FIXME*** need to improve framework check so below not needed
SET(GDAL_LIBRARY ${GDAL_LINK_DIRECTORIES}/lib${GDAL_LIB_NAME}.dylib CACHE STRING INTERNAL FORCE)
ENDIF (NOT GDAL_LIBRARY)
ELSE (APPLE)
FIND_LIBRARY(GDAL_LIBRARY NAMES ${GDAL_LIB_NAME} gdal PATHS ${GDAL_LINK_DIRECTORIES}/lib ${GDAL_LINK_DIRECTORIES})
ENDIF (APPLE)
ELSE(GDAL_CONFIG)
MESSAGE("FindGDAL.cmake: gdal-config not found. Please set it manually. GDAL_CONFIG=${GDAL_CONFIG}")
ENDIF(GDAL_CONFIG)
ENDIF (NOT GDAL_INCLUDE_DIR OR NOT GDAL_LIBRARY OR NOT GDAL_CONFIG)
ENDIF(UNIX)
ENDIF(WIN32)
IF (GDAL_INCLUDE_DIR AND GDAL_LIBRARY)
SET(GDAL_FOUND TRUE)
ENDIF (GDAL_INCLUDE_DIR AND GDAL_LIBRARY)
IF (GDAL_FOUND)
IF (NOT GDAL_FIND_QUIETLY)
FILE(READ ${GDAL_INCLUDE_DIR}/gdal_version.h gdal_version)
STRING(REGEX REPLACE "^.*GDAL_RELEASE_NAME +\"([^\"]+)\".*$" "\\1" GDAL_RELEASE_NAME "${gdal_version}")
MESSAGE(STATUS "Found GDAL: ${GDAL_LIBRARY} (${GDAL_RELEASE_NAME})")
ENDIF (NOT GDAL_FIND_QUIETLY)
add_library(GDAL::GDAL UNKNOWN IMPORTED)
target_link_libraries(GDAL::GDAL INTERFACE ${GDAL_LIBRARY})
target_include_directories(GDAL::GDAL INTERFACE ${GDAL_INCLUDE_DIR})
set_target_properties(GDAL::GDAL PROPERTIES IMPORTED_LOCATION ${GDAL_LIBRARY})
ELSE (GDAL_FOUND)
MESSAGE(GDAL_INCLUDE_DIR=${GDAL_INCLUDE_DIR})
MESSAGE(GDAL_LIBRARY=${GDAL_LIBRARY})
MESSAGE(FATAL_ERROR "Could not find GDAL")
ENDIF (GDAL_FOUND)
endif()

View File

@ -1,192 +0,0 @@
# Find GEOS
# ~~~~~~~~~
# Copyright (c) 2008, Mateusz Loskot <mateusz@loskot.net>
# (based on FindGDAL.cmake by Magnus Homann)
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# CMake module to search for GEOS library
#
# If it's found it sets GEOS_FOUND to TRUE
# and the following target is added
#
# GEOS::geos_c
find_package(GEOS CONFIG)
if(NOT GEOS_FOUND)
INCLUDE (${CMAKE_SOURCE_DIR}/cmake/MacPlistMacros.cmake)
IF(WIN32)
IF (MINGW)
FIND_PATH(GEOS_INCLUDE_DIR geos_c.h "$ENV{LIB_DIR}/include" /usr/local/include /usr/include c:/msys/local/include)
FIND_LIBRARY(GEOS_LIBRARY NAMES geos_c PATHS "$ENV{LIB_DIR}/lib" /usr/local/lib /usr/lib c:/msys/local/lib)
ENDIF (MINGW)
IF (MSVC)
FIND_PATH(GEOS_INCLUDE_DIR geos_c.h $ENV{LIB_DIR}/include $ENV{INCLUDE})
FIND_LIBRARY(GEOS_LIBRARY NAMES geos_c_i geos_c PATHS
"$ENV{LIB_DIR}/lib"
$ENV{LIB}
)
ENDIF (MSVC)
ELSEIF(APPLE AND QGIS_MAC_DEPS_DIR)
FIND_PATH(GEOS_INCLUDE_DIR geos_c.h "$ENV{LIB_DIR}/include" )
FIND_LIBRARY(GEOS_LIBRARY NAMES geos_c PATHS "$ENV{LIB_DIR}/lib" )
ELSE(WIN32)
IF(UNIX)
# try to use framework on mac
# want clean framework path, not unix compatibility path
IF (APPLE)
IF (CMAKE_FIND_FRAMEWORK MATCHES "FIRST"
OR CMAKE_FRAMEWORK_PATH MATCHES "ONLY"
OR NOT CMAKE_FIND_FRAMEWORK)
SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
FIND_LIBRARY(GEOS_LIBRARY GEOS)
IF (GEOS_LIBRARY)
# they're all the same in a framework
SET (GEOS_INCLUDE_DIR ${GEOS_LIBRARY}/Headers CACHE PATH "Path to a file.")
# set GEOS_CONFIG to make later test happy, not used here, may not exist
SET (GEOS_CONFIG ${GEOS_LIBRARY}/unix/bin/geos-config CACHE FILEPATH "Path to a program.")
# version in info.plist
GET_VERSION_PLIST (${GEOS_LIBRARY}/Resources/Info.plist GEOS_VERSION)
IF (NOT GEOS_VERSION)
MESSAGE (FATAL_ERROR "Could not determine GEOS version from framework.")
ENDIF (NOT GEOS_VERSION)
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GEOS_VERSION_MAJOR "${GEOS_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GEOS_VERSION_MINOR "${GEOS_VERSION}")
IF (GEOS_VERSION_MAJOR LESS 3)
MESSAGE (FATAL_ERROR "GEOS version is too old (${GEOS_VERSION}). Use 3.0.0 or higher.")
ENDIF (GEOS_VERSION_MAJOR LESS 3)
ENDIF (GEOS_LIBRARY)
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
ENDIF ()
ENDIF (APPLE)
IF(CYGWIN)
FIND_LIBRARY(GEOS_LIBRARY NAMES geos_c PATHS /usr/lib /usr/local/lib)
ENDIF(CYGWIN)
IF (NOT GEOS_INCLUDE_DIR OR NOT GEOS_LIBRARY OR NOT GEOS_CONFIG)
# didn't find OS X framework, and was not set by user
SET(GEOS_CONFIG_PREFER_PATH "$ENV{GEOS_HOME}/bin" CACHE STRING "preferred path to GEOS (geos-config)")
FIND_PROGRAM(GEOS_CONFIG geos-config
${GEOS_CONFIG_PREFER_PATH}
$ENV{LIB_DIR}/bin
/usr/local/bin/
/usr/bin/
)
#MESSAGE("DBG GEOS_CONFIG ${GEOS_CONFIG}")
IF (GEOS_CONFIG)
execute_process(COMMAND ${GEOS_CONFIG} --version
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE GEOS_VERSION)
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GEOS_VERSION_MAJOR "${GEOS_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GEOS_VERSION_MINOR "${GEOS_VERSION}")
IF (GEOS_VERSION_MAJOR LESS 3 OR (GEOS_VERSION_MAJOR EQUAL 3 AND GEOS_VERSION_MINOR LESS 9) )
MESSAGE (FATAL_ERROR "GEOS version is too old (${GEOS_VERSION}). Use 3.9.0 or higher.")
ENDIF (GEOS_VERSION_MAJOR LESS 3 OR (GEOS_VERSION_MAJOR EQUAL 3 AND GEOS_VERSION_MINOR LESS 9) )
# set INCLUDE_DIR to prefix+include
execute_process(COMMAND ${GEOS_CONFIG} --prefix
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE GEOS_PREFIX)
FIND_PATH(GEOS_INCLUDE_DIR
geos_c.h
${GEOS_PREFIX}/include
/usr/local/include
/usr/include
)
## extract link dirs for rpath
execute_process(COMMAND ${GEOS_CONFIG} --libs
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE GEOS_CONFIG_LIBS )
## split off the link dirs (for rpath)
## use regular expression to match wildcard equivalent "-L*<endchar>"
## with <endchar> is a space or a semicolon
STRING(REGEX MATCHALL "[-][L]([^ ;])+"
GEOS_LINK_DIRECTORIES_WITH_PREFIX
"${GEOS_CONFIG_LIBS}" )
#MESSAGE("DBG GEOS_LINK_DIRECTORIES_WITH_PREFIX=${GEOS_LINK_DIRECTORIES_WITH_PREFIX}")
## remove prefix -L because we need the pure directory for LINK_DIRECTORIES
IF (GEOS_LINK_DIRECTORIES_WITH_PREFIX)
STRING(REGEX REPLACE "[-][L]" "" GEOS_LINK_DIRECTORIES ${GEOS_LINK_DIRECTORIES_WITH_PREFIX} )
ENDIF (GEOS_LINK_DIRECTORIES_WITH_PREFIX)
### XXX - mloskot: geos-config --libs does not return -lgeos_c, so set it manually
## split off the name
## use regular expression to match wildcard equivalent "-l*<endchar>"
## with <endchar> is a space or a semicolon
#STRING(REGEX MATCHALL "[-][l]([^ ;])+"
# GEOS_LIB_NAME_WITH_PREFIX
# "${GEOS_CONFIG_LIBS}" )
#MESSAGE("DBG GEOS_CONFIG_LIBS=${GEOS_CONFIG_LIBS}")
#MESSAGE("DBG GEOS_LIB_NAME_WITH_PREFIX=${GEOS_LIB_NAME_WITH_PREFIX}")
SET(GEOS_LIB_NAME_WITH_PREFIX -lgeos_c CACHE STRING INTERNAL)
## remove prefix -l because we need the pure name
IF (GEOS_LIB_NAME_WITH_PREFIX)
STRING(REGEX REPLACE "[-][l]" "" GEOS_LIB_NAME ${GEOS_LIB_NAME_WITH_PREFIX} )
ENDIF (GEOS_LIB_NAME_WITH_PREFIX)
#MESSAGE("DBG GEOS_LIB_NAME=${GEOS_LIB_NAME}")
IF (APPLE)
IF (NOT GEOS_LIBRARY)
# work around empty GEOS_LIBRARY left by framework check
# while still preserving user setting if given
# ***FIXME*** need to improve framework check so below not needed
SET(GEOS_LIBRARY ${GEOS_LINK_DIRECTORIES}/lib${GEOS_LIB_NAME}.dylib CACHE STRING INTERNAL FORCE)
ENDIF (NOT GEOS_LIBRARY)
ELSE (APPLE)
FIND_LIBRARY(GEOS_LIBRARY NAMES ${GEOS_LIB_NAME} PATHS ${GEOS_LIB_DIRECTORIES}/lib)
ENDIF (APPLE)
#MESSAGE("DBG GEOS_LIBRARY=${GEOS_LIBRARY}")
ELSE(GEOS_CONFIG)
MESSAGE("FindGEOS.cmake: geos-config not found. Please set it manually. GEOS_CONFIG=${GEOS_CONFIG}")
ENDIF(GEOS_CONFIG)
ENDIF(NOT GEOS_INCLUDE_DIR OR NOT GEOS_LIBRARY OR NOT GEOS_CONFIG)
ENDIF(UNIX)
ENDIF(WIN32)
IF(GEOS_INCLUDE_DIR AND NOT GEOS_VERSION)
FILE(READ ${GEOS_INCLUDE_DIR}/geos_c.h VERSIONFILE)
STRING(REGEX MATCH "#define GEOS_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+" GEOS_VERSION ${VERSIONFILE})
STRING(REGEX MATCH "[0-9]+\\.[0-9]\\.[0-9]+" GEOS_VERSION ${GEOS_VERSION})
ENDIF(GEOS_INCLUDE_DIR AND NOT GEOS_VERSION)
IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
SET(GEOS_FOUND TRUE)
ENDIF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
IF (GEOS_FOUND)
add_library(GEOS::geos_c UNKNOWN IMPORTED)
target_link_libraries(GEOS::geos_c INTERFACE ${GEOS_LIBRARY})
target_include_directories(GEOS::geos_c INTERFACE ${GEOS_INCLUDE_DIR})
set_target_properties(GEOS::geos_c PROPERTIES IMPORTED_LOCATION ${GEOS_LIBRARY})
IF (NOT GEOS_FIND_QUIETLY)
MESSAGE(STATUS "Found GEOS: ${GEOS_LIBRARY} (${GEOS_VERSION})")
ENDIF (NOT GEOS_FIND_QUIETLY)
ELSE (GEOS_FOUND)
MESSAGE(GEOS_INCLUDE_DIR=${GEOS_INCLUDE_DIR})
MESSAGE(GEOS_LIBRARY=${GEOS_LIBRARY})
MESSAGE(FATAL_ERROR "Could not find GEOS")
ENDIF (GEOS_FOUND)
endif()

View File

@ -1,221 +0,0 @@
# Find GRASS
# ~~~~~~~~~~
# Copyright (c) 2007, Martin Dobias <wonder.sk at gmail.com>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Macro that checks for extra include directories set during GRASS compilation.
# This helps for platforms where GRASS is built against dependencies in
# non-standard locations; like on Mac, where the system gettext is too old and
# GRASS is built off of gettext in /usr/local/opt, or some other custom prefix.
# Such includes may need found again when including some GRASS headers.
MACRO (CHECK_GRASS_EXTRA_INCLUDE_DIRS GRASS_VERSION)
SET(GRASS_EXTRA_INCLUDE_DIRS${GRASS_VERSION} ""
CACHE STRING "Extra includes string used for GRASS${GRASS_VERSION}")
IF(UNIX AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_VERSION}}/Make/Platform.make
AND "${GRASS${GRASS_VERSION}_EXTRA_INCLUDE_DIRS}" STREQUAL "")
FILE(READ ${GRASS_INCLUDE_DIR${GRASS_VERSION}}/Make/Platform.make _platformfile)
STRING(REGEX MATCH "INCLUDE_DIRS *= *[^\n]*" _config_includes "${_platformfile}")
SET(_extra_includes "")
IF(NOT "${_config_includes}" STREQUAL "")
STRING(REGEX REPLACE "INCLUDE_DIRS *= *([^\n]*)" "\\1" _extra_includes "${_config_includes}")
ENDIF()
IF(NOT "${_extra_includes}" STREQUAL "")
SET(GRASS_EXTRA_INCLUDE_DIRS${GRASS_VERSION} ${_extra_includes}
CACHE STRING "Extra includes string used for GRASS${GRASS_VERSION}" FORCE)
ENDIF()
ENDIF()
MARK_AS_ADVANCED (GRASS_EXTRA_INCLUDE_DIRS${GRASS_VERSION})
ENDMACRO (CHECK_GRASS_EXTRA_INCLUDE_DIRS GRASS_VERSION)
# macro that checks for grass installation in specified directory
MACRO (CHECK_GRASS G_PREFIX)
#MESSAGE(STATUS "Find GRASS ${GRASS_FIND_VERSION} in ${G_PREFIX}")
FIND_PATH(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} grass/version.h ${G_PREFIX}/include DOC "Path to GRASS ${GRASS_FIND_VERSION} include directory")
#MESSAGE(STATUS "GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} = ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}")
IF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h)
FILE(READ ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h VERSIONFILE)
# We can avoid the following block using version_less version_equal and
# version_greater. Are there compatibility problems?
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[^ ]+" GRASS_VERSION${GRASS_FIND_VERSION} ${VERSIONFILE})
STRING(REGEX REPLACE "^([0-9]*)\\.[0-9]*\\..*$" "\\1" GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} ${GRASS_VERSION${GRASS_FIND_VERSION}})
STRING(REGEX REPLACE "^[0-9]*\\.([0-9]*)\\..*$" "\\1" GRASS_MINOR_VERSION${GRASS_FIND_VERSION} ${GRASS_VERSION${GRASS_FIND_VERSION}})
STRING(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.(.*)$" "\\1" GRASS_MICRO_VERSION${GRASS_FIND_VERSION} ${GRASS_VERSION${GRASS_FIND_VERSION}})
# Add micro version too?
# How to numerize RC versions?
MATH( EXPR GRASS_NUM_VERSION${GRASS_FIND_VERSION} "${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}*10000 + ${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}}*100")
#MESSAGE(STATUS "GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} = ${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}")
IF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
SET(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION} TRUE)
SET(GRASS_LIB_NAMES${GRASS_FIND_VERSION} gis dig2 dbmiclient dbmibase shape dgl rtree datetime linkm gproj)
IF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} LESS 7 )
LIST(APPEND GRASS_LIB_NAMES${GRASS_FIND_VERSION} vect)
LIST(APPEND GRASS_LIB_NAMES${GRASS_FIND_VERSION} form)
LIST(APPEND GRASS_LIB_NAMES${GRASS_FIND_VERSION} I)
ELSE(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} LESS 7 )
LIST(APPEND GRASS_LIB_NAMES${GRASS_FIND_VERSION} vector)
LIST(APPEND GRASS_LIB_NAMES${GRASS_FIND_VERSION} raster)
LIST(APPEND GRASS_LIB_NAMES${GRASS_FIND_VERSION} imagery)
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} LESS 7 )
FOREACH(LIB ${GRASS_LIB_NAMES${GRASS_FIND_VERSION}})
MARK_AS_ADVANCED ( GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} )
SET(LIB_PATH NOTFOUND)
# FIND_PATH and FIND_LIBRARY normally search standard locations
# before the specified paths. To search non-standard paths first,
# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH
# and then again with no specified paths to search the default
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s
# searching for the same item do nothing.
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} grass_${LIB}.${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}.${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} grass_${LIB}.${GRASS_MAJOR_VERSION${GRASS_FIND_VERSION}}.${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}} PATHS ${G_PREFIX}/lib)
IF(LIB_PATH)
SET(GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} ${LIB_PATH})
ELSE(LIB_PATH)
SET(GRASS_LIBRARY${GRASS_FIND_VERSION}_${LIB} NOTFOUND)
SET(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION} FALSE)
ENDIF (LIB_PATH)
ENDFOREACH(LIB)
# LIB_PATH is only temporary variable, so hide it (is it possible to delete a variable?)
UNSET(LIB_PATH CACHE)
# Find off_t size
IF( (GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL 7) AND (GRASS_MINOR_VERSION${GRASS_FIND_VERSION} GREATER 0) )
SET(GRASS_TEST_MAPSET ${CMAKE_BINARY_DIR}/grass-location/PERMANENT)
FILE(MAKE_DIRECTORY ${GRASS_TEST_MAPSET})
FILE(WRITE ${GRASS_TEST_MAPSET}/DEFAULT_WIND "")
FILE(WRITE ${GRASS_TEST_MAPSET}/WIND "")
# grass command is not in G_PREFIX but in some bin dir, so it must be in PATH
SET(GRASS_EXE grass7${GRASS_MINOR_VERSION${GRASS_FIND_VERSION}})
#MESSAGE(STATUS "GRASS_EXE = ${GRASS_EXE}")
EXECUTE_PROCESS(COMMAND ${GRASS_EXE} ${GRASS_TEST_MAPSET} --exec g.version -g
COMMAND grep build_off_t_size
COMMAND sed "s/.*\\([0-9]\\).*/\\1/"
ERROR_VARIABLE GRASS_TMP_ERROR
OUTPUT_VARIABLE GRASS_OFF_T_SIZE${GRASS_FIND_VERSION}
)
IF ( NOT ${GRASS_OFF_T_SIZE${GRASS_FIND_VERSION}} STREQUAL "" )
STRING(STRIP ${GRASS_OFF_T_SIZE${GRASS_FIND_VERSION}} GRASS_OFF_T_SIZE${GRASS_FIND_VERSION})
ENDIF()
#MESSAGE(STATUS "GRASS_OFF_T_SIZE${GRASS_FIND_VERSION} = ${GRASS_OFF_T_SIZE${GRASS_FIND_VERSION}}")
ENDIF( (GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL 7) AND (GRASS_MINOR_VERSION${GRASS_FIND_VERSION} GREATER 0) )
IF ( "${GRASS_OFF_T_SIZE${GRASS_FIND_VERSION}}" STREQUAL "" )
IF(EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/Make/Platform.make)
FILE(READ ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/Make/Platform.make PLATFORMFILE)
STRING(REGEX MATCH "LFS_CFLAGS *=[^\n]*" PLATFORM_LFS_CFLAGS ${PLATFORMFILE})
IF ( NOT "${PLATFORM_LFS_CFLAGS}" STREQUAL "" )
STRING(REGEX MATCH "_FILE_OFFSET_BITS=.." FILE_OFFSET_BITS ${PLATFORM_LFS_CFLAGS})
#MESSAGE(STATUS "FILE_OFFSET_BITS = ${FILE_OFFSET_BITS}")
IF ( NOT "${FILE_OFFSET_BITS}" STREQUAL "" )
STRING(REGEX MATCH "[0-9][0-9]" FILE_OFFSET_BITS ${FILE_OFFSET_BITS})
#MESSAGE(STATUS "FILE_OFFSET_BITS = ${FILE_OFFSET_BITS}")
IF ( "${FILE_OFFSET_BITS}" STREQUAL "32" )
SET( GRASS_OFF_T_SIZE${GRASS_FIND_VERSION} 4 )
ELSEIF( "${FILE_OFFSET_BITS}" STREQUAL "64" )
SET( GRASS_OFF_T_SIZE${GRASS_FIND_VERSION} 8 )
ENDIF()
ENDIF()
ENDIF()
ENDIF()
ENDIF()
IF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
SET(GRASS_FOUND${GRASS_FIND_VERSION} TRUE)
SET(GRASS_FOUND TRUE) # GRASS_FOUND is true if at least one version was found
SET(GRASS_PREFIX${GRASS_CACHE_VERSION} ${G_PREFIX})
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
ENDIF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
ENDIF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h)
MARK_AS_ADVANCED ( GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} )
ENDMACRO (CHECK_GRASS)
###################################
# search for grass installations
#MESSAGE(STATUS "GRASS_FIND_VERSION = ${GRASS_FIND_VERSION}")
# list of paths which to search - user's choice as first
SET (GRASS_PATHS ${GRASS_PREFIX${GRASS_CACHE_VERSION}} /usr/lib/grass /opt/grass $ENV{GRASS_PREFIX${GRASS_CACHE_VERSION}})
# os specific paths
IF (WIN32)
LIST(APPEND GRASS_PATHS c:/msys/local)
ENDIF (WIN32)
IF (UNIX)
IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
IF (GRASS_FIND_VERSION EQUAL 7)
FOREACH (VERSION_MINOR 9 8 7 6 5 4 3 2 1 0)
LIST (APPEND GRASS_PATHS /usr/local/grass${GRASS_FIND_VERSION}${VERSION_MINOR})
ENDFOREACH(VERSION_MINOR)
ENDIF (GRASS_FIND_VERSION EQUAL 7)
ELSE (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
FOREACH (VERSION_MINOR 9 8 7 6 5 4 3 2 1 0)
FOREACH (PATH /usr/lib64 /usr/lib)
LIST(APPEND GRASS_PATHS "${PATH}/grass${GRASS_FIND_VERSION}${VERSION_MINOR}")
ENDFOREACH (PATH)
ENDFOREACH(VERSION_MINOR)
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
ENDIF (UNIX)
IF (APPLE)
IF (QGIS_MAC_DEPS_DIR)
FOREACH (VERSION_MINOR 9 8 7 6 5 4 3 2 1 0)
LIST (APPEND GRASS_PATHS $ENV{LIB_DIR}/grass${GRASS_FIND_VERSION}${VERSION_MINOR})
ENDFOREACH(VERSION_MINOR)
ELSE (QGIS_MAC_DEPS_DIR)
IF (GRASS_FIND_VERSION EQUAL 7)
LIST(APPEND GRASS_PATHS
/Applications/GRASS-7.6.app/Contents/MacOS
/Applications/GRASS-7.4.app/Contents/MacOS
/Applications/GRASS-7.2.app/Contents/MacOS
/Applications/GRASS-7.0.app/Contents/MacOS
)
ENDIF ()
LIST(APPEND GRASS_PATHS /Applications/GRASS.app/Contents/Resources)
ENDIF (QGIS_MAC_DEPS_DIR)
ENDIF (APPLE)
IF (WITH_GRASS${GRASS_CACHE_VERSION})
FOREACH (G_PREFIX ${GRASS_PATHS})
IF (NOT GRASS_FOUND${GRASS_FIND_VERSION})
CHECK_GRASS(${G_PREFIX})
ENDIF (NOT GRASS_FOUND${GRASS_FIND_VERSION})
ENDFOREACH (G_PREFIX)
ENDIF (WITH_GRASS${GRASS_CACHE_VERSION})
###################################
IF (GRASS_FOUND${GRASS_FIND_VERSION})
IF (NOT GRASS_FIND_QUIETLY)
MESSAGE(STATUS "Found GRASS ${GRASS_FIND_VERSION}: ${GRASS_PREFIX${GRASS_CACHE_VERSION}} (${GRASS_VERSION${GRASS_FIND_VERSION}}, off_t size = ${GRASS_OFF_T_SIZE${GRASS_FIND_VERSION}})")
ENDIF (NOT GRASS_FIND_QUIETLY)
ELSE (GRASS_FOUND${GRASS_FIND_VERSION})
IF (WITH_GRASS${GRASS_CACHE_VERSION})
IF (GRASS_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find GRASS ${GRASS_FIND_VERSION}")
ELSE (GRASS_FIND_REQUIRED)
MESSAGE(STATUS "Could not find GRASS ${GRASS_FIND_VERSION}")
ENDIF (GRASS_FIND_REQUIRED)
ENDIF (WITH_GRASS${GRASS_CACHE_VERSION})
ENDIF (GRASS_FOUND${GRASS_FIND_VERSION})

Some files were not shown because too many files have changed in this diff Show More