diff --git a/CMakeLists.txt b/CMakeLists.txt index 40bcbb956a1a..5898713e3933 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_AUTORCC ON) # set path to additional CMake modules set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) # POLICIES -if(NOT "${CMAKE_VERSION}" VERSION_LESS "3.27") +if("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.27") # include(Dart) still used, as is the "Experimental" target cmake_policy(SET CMP0145 OLD) endif() @@ -695,8 +695,10 @@ if (ENABLE_TESTS) set (PUSH_TO_CDASH FALSE CACHE BOOL "Determines whether test results should be pushed to CDASH site") set(QT_USE_QTTEST TRUE) enable_testing() - # Adds some testing specific build targets e.g. make Experimental - include(Dart) + if (PUSH_TO_CDASH) + # Adds some testing specific build targets e.g. make Experimental + include(Dart) + endif() # Additional test configuration options e.g. max upload size of test report configure_file( "${CMAKE_SOURCE_DIR}/cmake_templates/CTestCustom.cmake.in" diff --git a/scripts/jenkins_run.sh b/scripts/jenkins_run.sh deleted file mode 100755 index c9237e8497d8..000000000000 --- a/scripts/jenkins_run.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -if [ -d build ] -then - rm -rf build -fi - -mkdir build -cd build || exit -cmake .. -#xvfb-run --auto-servernum --server-num=1 --server-args="-screen 0 1024x768x24" make Experimental || true -make Experimental || true -#TRES=0 -#ctest -T test --no-compress-output || true -if [ -f Testing/TAG ] ; then - xsltproc ../tests/ctest2junix.xsl Testing/$(head -n 1 < Testing/TAG)/Test.xml > CTestResults.xml -fi diff --git a/scripts/listpulls.pl b/scripts/listpulls.pl deleted file mode 100644 index 39f4b78d3c10..000000000000 --- a/scripts/listpulls.pl +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; - -use JSON; -use LWP::UserAgent; - -my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 }); -my $res = $ua->get( "https://api.github.com/repos/qgis/qgis/pulls" ); - -die "pull request retrieval failed: " . $res->status_line unless $res->is_success; - -my %assigned; - -printf "%5s %-16s %s\n", "#", "Assignee", "Title"; -foreach my $pull ( sort { $a->{number} <=> $b->{number} } @{ JSON::from_json( $res->decoded_content ) } ) { - my $assignee = $pull->{assignee}->{login}; - $assignee = "" unless defined $assignee; - - push @{ $assigned{$assignee} }, $pull->{number}; - - printf "%5d %-16s %s\n", $pull->{number}, $assignee || "", $pull->{title}; -} - -print "\nASSIGNMENTS:\n"; - -foreach my $assignee ( sort keys %assigned ) { - printf "%-22s %s\n", $assignee || "unassigned", join( ", ", sort { $a <=> $b } @{ $assigned{$assignee} } ); -} diff --git a/scripts/remove_non_svn_files.sh b/scripts/remove_non_svn_files.sh deleted file mode 100644 index 792cfec9351b..000000000000 --- a/scripts/remove_non_svn_files.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -########################################################################### -# remove_non_svn_files.sh -# --------------------- -# Date : August 2008 -# Copyright : (C) 2008 by Tim Sutton -# Email : tim at kartoza 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. # -# # -########################################################################### - - -# -# A simple script to get rid of files that are not -# managed by svn. It will request confirmation before -# deleting each file. -# - -for FILE in $(svn status |grep "^?" | awk '{print $2}');do rm -i -r $FILE; done diff --git a/scripts/sipdiff b/scripts/sipdiff deleted file mode 100755 index 9994a0d903aa..000000000000 --- a/scripts/sipdiff +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash - -DIR=$(git rev-parse --show-toplevel) - -# ARGUMENTS -SIPIFY=NO -while getopts ":s" opt; do - case $opt in - s) - # sipify header - SIPIFY=YES - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - esac -done -shift $(($OPTIND - 1)) - - - -for file in $*; do - d=${file#*/} - d=${d%/*} - f=${file##*/} - f=${f%.*} - header="src/$d/$f.h" - - if ! grep -Fxq "$d/$f.sip" python/auto_sip.blocklist; then - echo -e "\033[0;31m$d/$f.sip is an automatically generated SIP file\033[0m" - echo -e " g) \x1B[4mg\x1B[0menerate the SIP file \033[0;32m./scripts/sipify.pl $header > python/$d/$f.sip\033[0m" - echo -e " s) \x1B[4ms\x1B[0mhow the diff" - SHOW=NO - while read -n 1 n; do - echo "" - case $n in - g) - echo "Generating the SIP file ..." - pushd ${DIR} - ./scripts/sipify.pl $header > python/$d/$f.sip - popd - break - ;; - s) - SHOW=YES - break - ;; - *) - invalid option - ;; - esac - done - if [[ $SHOW =~ NO ]]; then - continue - fi - fi - - if [[ $SIPIFY =~ YES ]]; then - tempfile=$(mktemp ${DIR}/${f}XXXX --suffix=.h) - ${DIR}/scripts/sipify.pl ${DIR}/$header > $tempfile - else - tempfile=$header - fi - vimdiff $tempfile python/$d/$f.sip - -done diff --git a/scripts/widgets_tree.py b/scripts/widgets_tree.py deleted file mode 100644 index 10a2b4efe024..000000000000 --- a/scripts/widgets_tree.py +++ /dev/null @@ -1,204 +0,0 @@ -#!/usr/bin/env python3 - -""" -*************************************************************************** - widgets_tree.py - --------------------- - Date : May 2011 - Copyright : (C) 2011 by Martin Dobias - Email : wonder dot sk at gmail 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__ = "Martin Dobias" -__date__ = "May 2011" -__copyright__ = "(C) 2011, Martin Dobias" - -""" -Reads .ui files from ../src/ui/ directory and write to stdout an XML describing -widgets tree. - -Python bindings must be compiled and in PYTHONPATH - -QGIS libraries must be in LD_LIBRARY_PATH - -Output should go to ../resources/customization.xml - -""" - -import glob -import os -import sys - -# qwt_plot is missing somehow but it may depend on installed packages -from qgis.PyQt import Qwt5 as qwt_plot -from qgis.PyQt.QtWidgets import ( - QCheckBox, - QComboBox, - QDateEdit, - QDateTimeEdit, - QDial, - QDialog, - QDialogButtonBox, - QGroupBox, - QLabel, - QLCDNumber, - QLineEdit, - QListView, - QProgressBar, - QPushButton, - QRadioButton, - QScrollArea, - QScrollBar, - QSlider, - QSpinBox, - QStackedWidget, - QTableView, - QTabWidget, - QTextBrowser, - QTextEdit, - QTimeEdit, - QWidget, -) -from qgis.PyQt.QtXml import QDomDocument -from qgis.PyQt.uic import loadUi - -sys.modules["qwt_plot"] = qwt_plot - -# loadUi is looking for custom widget in module which is lowercase version of -# the class, which do not exist (AFAIK) -> preload them, problems anyway: -# missing in gui: QgsColorRampComboBox, QgsRendererRulesTreeWidget, -# QgsRendererRulesTreeWidget -# and QgsProjectionSelector cannot open db file -from qgis import gui - -for m in [ - "qgscolorbutton", - "qgscolorrampcombobox", - "qgsprojectionselector", - "qgslabelpreview", - "qgsrulebasedrendererwidget", - "qgscollapsiblegroupbox", - "qgsblendmodecombobox", - "qgsexpressionbuilderwidget", - "qgsrasterformatsaveoptionswidget", - "qgsrasterpyramidsoptionswidget", - "qgsscalecombobox", - "qgsfilterlineedit", - "qgsdualview", -]: - sys.modules[m] = gui - - -class UiInspector: - - def __init__(self): - self.ui_dir = os.path.abspath( - os.path.join(os.path.dirname(__file__), "../src/ui/*.ui") - ) - self.printMsg("Loading UI files " + self.ui_dir) - # list of widget classes we want to follow - self.follow = [ - QWidget, - QDialog, - QCheckBox, - QComboBox, - QDial, - QPushButton, - QLabel, - QLCDNumber, - QLineEdit, - QRadioButton, - QScrollBar, - QSlider, - QSpinBox, - QTextEdit, - QDateEdit, - QTimeEdit, - QDateTimeEdit, - QListView, - QProgressBar, - QTableView, - QTabWidget, - QTextBrowser, - QDialogButtonBox, - QScrollArea, - QGroupBox, - QStackedWidget, - ] - - def printMsg(self, msg): - sys.stderr.write(msg + "\n") - - def widgetXml(self, element, widget, level=0, label=None): - # print tostring ( element ) - # self.printMsg ( "class: " + str( type ( widget ) ) ) - # self.printMsg ( "objectName: " + widget.objectName() ) - # self.printMsg ( "windowTitle: " + widget.windowTitle() ) - - if not widget.objectName(): - return - - lab = label - if hasattr(widget, "text"): - lab = widget.text() - if widget.windowTitle(): - label = widget.windowTitle() - if not lab: - lab = "" - - subElement = self.doc.createElement("widget") - subElement.setAttribute("class", widget.__class__.__name__) - subElement.setAttribute("objectName", widget.objectName()) - subElement.setAttribute("label", lab) - element.appendChild(subElement) - - # print str ( widget.children () ) - # tab widget label is stored in QTabWidget->QTabBarPrivate->tabList->QTab .. - if type(widget) in [QTabWidget]: - children = list( - {"widget": widget.widget(i), "label": widget.tabText(i)} - for i in range(0, widget.count()) - ) - else: - children = list({"widget": c, "label": None} for c in widget.children()) - for child in children: - w = child["widget"] - if w.isWidgetType() and (type(w) in self.follow): - self.widgetXml(subElement, w, level + 1, child["label"]) - - def xml(self): - self.doc = QDomDocument() - element = self.doc.createElement("qgiswidgets") - self.doc.appendChild(element) - for p in glob.glob(self.ui_dir): - self.printMsg("Loading " + p) - # qgsrasterlayerpropertiesbase.ui is giving: No module named qwt_plot - try: - widget = loadUi(p) - # print dir ( ui ) - self.widgetXml(element, widget) - except Exception as e: - self.printMsg(str(e)) - - return self.doc.toString(2) - - -if __name__ == "__main__": - from qgis.PyQt.QtCore import QApplication - - app = QApplication(sys.argv) # required by loadUi - inspector = UiInspector() - xml = inspector.xml() - sys.stdout.write(xml) - sys.stdout.flush() - - del app - sys.exit(0)