qbs-src-3.3.0/0000755000175100017510000000000015214475517012510 5ustar runnerrunnerqbs-src-3.3.0/qbs-resources/0000755000175100017510000000000015214475516015304 5ustar runnerrunnerqbs-src-3.3.0/qbs-resources/modules/0000755000175100017510000000000015214475516016754 5ustar runnerrunnerqbs-src-3.3.0/qbs-resources/modules/qbsversion/0000755000175100017510000000000015214475516021147 5ustar runnerrunnerqbs-src-3.3.0/qbs-resources/modules/qbsversion/qbsversion.qbs0000644000175100017510000000115115214475516024047 0ustar runnerrunnerimport qbs.File import qbs.FileInfo import qbs.TextFile Module { Probe { id: qbsVersionProbe property var lastModified: File.lastModified(versionFilePath) property string versionFilePath: FileInfo.joinPaths(path, "..", "..", "..", "VERSION") property string version configure: { var tf = new TextFile(versionFilePath, TextFile.ReadOnly); try { version = tf.readAll().trim(); found = !!version; } finally { tf.close(); } } } version: qbsVersionProbe.version } qbs-src-3.3.0/qbs-resources/modules/qbsbuildconfig/0000755000175100017510000000000015214475516021747 5ustar runnerrunnerqbs-src-3.3.0/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs0000644000175100017510000001152215214475516025452 0ustar runnerrunnerimport qbs.FileInfo import qbs.Utilities Module { Depends { condition: project.withCode name: "cpp" } property bool enableAddressSanitizer: false property bool enableUbSanitizer: false property bool enableThreadSanitizer: false property bool enableUnitTests: false property bool enableProjectFileUpdates: true property bool enableRPath: true property bool installApiHeaders: true property bool enableBundledQt: false property bool staticBuild: false property string libDirName: "lib" property string appInstallDir: "bin" property string libInstallDir: qbs.targetOS.contains("windows") ? "bin" : libDirName property string importLibInstallDir: libDirName property string libexecInstallDir: qbs.targetOS.contains("windows") ? appInstallDir : "libexec/qbs" property string systemSettingsDir property bool installManPage: qbs.targetOS.contains("unix") property bool installHtml: true property bool installQch: false property bool generatePkgConfigFiles: installApiHeaders && qbs.targetOS.contains("unix") && !qbs.targetOS.contains("darwin") property bool generateQbsModules: installApiHeaders property string docInstallDir: "share/doc/qbs/html" property string pkgConfigInstallDir: FileInfo.joinPaths(libDirName, "pkgconfig") property string qbsModulesBaseDir: FileInfo.joinPaths(libDirName, "qbs", "modules") property string relativeLibexecPath: "../" + libexecInstallDir property string relativePluginsPath: "../" + libDirName property string relativeSearchPath: ".." property stringList libRPaths: { if (enableRPath && project.withCode && cpp.rpathOrigin && product.targetInstallDir) { return [FileInfo.joinPaths(cpp.rpathOrigin, FileInfo.relativePath( FileInfo.joinPaths('/', product.targetInstallDir), FileInfo.joinPaths('/', libDirName)))]; } return []; } property string resourcesInstallDir: "" property string pluginsInstallDir: libDirName + "/qbs/plugins" property string qmlTypeDescriptionsInstallDir: FileInfo.joinPaths(resourcesInstallDir, "share/qbs/qml-type-descriptions") property bool dumpJsLeaks: qbs.buildVariant === "debug" Properties { condition: project.withCode && qbs.toolchain.contains("gcc") property bool isClang: qbs.toolchain.contains("clang") property bool isMingw: qbs.toolchain.contains("mingw") property var versionAtLeast: { return function(v) { return Utilities.versionCompare(cpp.compilerVersion, v) >= 0 } } property var versionBelow: { return function(v) { return Utilities.versionCompare(cpp.compilerVersion, v) < 0 } } cpp.commonCompilerFlags: { var flags = ["-Wno-missing-field-initializers"]; if (enableAddressSanitizer) flags.push("-fno-omit-frame-pointer"); if (isClang) flags.push("-Wno-constant-logical-operand"); // workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105616 if (enableAddressSanitizer && !isClang && versionAtLeast("13")) { flags.push("-Wno-maybe-uninitialized"); } // workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395 if (isMingw && versionAtLeast("12") && versionBelow("13")) { flags.push("-Wno-attributes"); } return flags; } cpp.cxxFlags: { var flags = []; if ((!isClang && versionAtLeast("9")) || (isClang && !qbs.hostOS.contains("darwin") && versionAtLeast("10"))) { flags.push("-Wno-deprecated-copy"); } return flags; } cpp.driverFlags: { var flags = []; if (enableAddressSanitizer) flags.push("-fsanitize=address"); if (enableUbSanitizer) { flags.push("-fsanitize=undefined"); flags.push("-fno-sanitize=vptr"); } if (enableThreadSanitizer) flags.push("-fsanitize=thread"); return flags; } } Properties { condition: project.withCode && qbs.toolchain.contains("msvc") && product.Qt && Utilities.versionCompare(product.Qt.core.version, "6.3") >= 0 && Utilities.versionCompare(cpp.compilerVersion, "19.10") >= 0 && Utilities.versionCompare(qbs.version, "1.23") < 0 cpp.cxxFlags: "/permissive-" } Properties { condition: project.withCode && qbs.toolchain.contains("msvc") cpp.defines: "_UCRT_NOISY_NAN" } } qbs-src-3.3.0/qbs-resources/imports/0000755000175100017510000000000015214475516017001 5ustar runnerrunnerqbs-src-3.3.0/qbs-resources/imports/QbsProduct.qbs0000644000175100017510000000247415214475516021605 0ustar runnerrunnerProduct { Depends { name: "qbsbuildconfig" } Depends { name: "qbsversion" } Depends { name: "Qt.core"; versionAtLeast: minimumQtVersion } property string minimumQtVersion: "5.15.2" property bool install: true property bool hasCMakeFile: true property string targetInstallDir cpp.defines: { var res = [ "QT_NO_CAST_FROM_ASCII", "QT_NO_CAST_FROM_BYTEARRAY", "QT_NO_JAVA_STYLE_ITERATORS", "QT_NO_PROCESS_COMBINED_ARGUMENT_START", "QT_USE_QSTRINGBUILDER", "QT_DISABLE_DEPRECATED_BEFORE=0x050f00", "QT_DISABLE_DEPRECATED_UP_TO=0x050f00", "QT_WARN_DEPRECATED_BEFORE=0x060700", "QT_WARN_DEPRECATED_UP_TO=0x060700" ]; if (qbs.toolchain.contains("msvc")) res.push("_SCL_SECURE_NO_WARNINGS"); if (qbs.enableDebugCode) res.push("QT_STRICT_ITERATORS"); return res; } cpp.cxxLanguageVersion: "c++20" cpp.enableExceptions: true cpp.rpaths: qbsbuildconfig.libRPaths cpp.minimumMacosVersion: "11.0" Group { name: "CMake" condition: hasCMakeFile prefix: product.sourceDirectory + '/' files: "CMakeLists.txt" } } qbs-src-3.3.0/qbs-resources/imports/QbsUnittest.qbs0000644000175100017510000000035215214475516021775 0ustar runnerrunnerimport qbs.FileInfo import qbs.Utilities QbsAutotest { Depends { name: "Qt.core5compat"; condition: Utilities.versionCompare(Qt.core.version, "6.0.0") >= 0 } Depends { name: "quickjs"; cpp.link: false } } qbs-src-3.3.0/qbs-resources/imports/QbsAutotest.qbs0000644000175100017510000000145615214475516021774 0ustar runnerrunnerimport qbs.FileInfo import qbs.Utilities QbsProduct { type: ["application", "autotest"] consoleApplication: true property string testName name: "tst_" + testName property string targetInstallDir: qbsbuildconfig.appInstallDir Depends { name: "Qt.testlib" } Depends { name: "qbscore" } Depends { name: "qbsbuildconfig" } cpp.defines: [ // deliberately override base defines "QBS_TEST_SUITE_NAME=" + Utilities.cStringQuote(testName.toUpperCase().replace("-", "_")) ] cpp.includePaths: [ "../../../src", ] qbs.commonRunEnvironment: ({ "QBS_INSTALL_DIR": FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix) }) Group { fileTagsFilter: product.type qbs.install: true qbs.installDir: targetInstallDir } } qbs-src-3.3.0/qbs-resources/imports/QbsStaticLibrary.qbs0000644000175100017510000000031715214475516022733 0ustar runnerrunnerQbsProduct { type: "staticlibrary" Export { Depends { name: "cpp" } Depends { name: "Qt"; submodules: ["core"] } cpp.includePaths: [exportingProduct.sourceDirectory] } } qbs-src-3.3.0/qbs-resources/imports/QbsApp.qbs0000644000175100017510000000102715214475516020676 0ustar runnerrunnerimport qbs.FileInfo QbsProduct { Depends { name: "qbscore" } Depends { name: "qbsversion" } Depends { name: "qbsconsolelogger" } type: ["application", "qbsapplication"] version: qbsversion.version consoleApplication: true Group { fileTagsFilter: product.type .concat(qbs.debugInformation ? ["debuginfo_app"] : []) qbs.install: true qbs.installDir: targetInstallDir qbs.installSourceBase: buildDirectory } targetInstallDir: qbsbuildconfig.appInstallDir } qbs-src-3.3.0/qbs-resources/imports/QbsLibrary.qbs0000644000175100017510000000556615214475516021576 0ustar runnerrunnerimport qbs.FileInfo import qbs.Utilities QbsProduct { Depends { name: "cpp" } Depends { name: "Exporter.pkgconfig"; condition: generatePkgConfigFile } Depends { name: "Exporter.qbs"; condition: generateQbsModule } Depends { name: "span" } property string visibilityType: staticBuild ? "static" : "dynamic" property string headerInstallPrefix: "/include/qbs" property bool hasExporter: Utilities.versionCompare(qbs.version, "1.12") >= 0 property bool generatePkgConfigFile: qbsbuildconfig.generatePkgConfigFiles && hasExporter property bool generateQbsModule: install && qbsbuildconfig.generateQbsModules && hasExporter property bool staticBuild: Qt.core.staticBuild || qbsbuildconfig.staticBuild property stringList libType: [staticBuild ? "staticlibrary" : "dynamiclibrary"] version: qbsversion.version type: libType targetName: (qbs.enableDebugCode && qbs.targetOS.contains("windows")) ? (name + 'd') : name cpp.visibility: "minimal" cpp.defines: base.concat(visibilityType === "static" ? ["QBS_STATIC_LIB"] : ["QBS_LIBRARY"]) cpp.sonamePrefix: qbs.targetOS.contains("darwin") ? "@rpath" : undefined Properties { condition: qbs.toolchain.contains("gcc") cpp.soVersion: version.replace(/\.\d+$/, '') } Group { fileTagsFilter: libType.concat("dynamiclibrary_symlink") .concat(qbs.debugInformation ? ["debuginfo_dll"] : []) qbs.install: install qbs.installDir: targetInstallDir qbs.installSourceBase: buildDirectory } targetInstallDir: qbsbuildconfig.libInstallDir Group { fileTagsFilter: ["dynamiclibrary_import"] qbs.install: install qbs.installDir: qbsbuildconfig.importLibInstallDir } Group { fileTagsFilter: "Exporter.pkgconfig.pc" qbs.install: install qbs.installDir: qbsbuildconfig.pkgConfigInstallDir } Group { fileTagsFilter: "Exporter.qbs.module" qbs.install: install qbs.installDir: FileInfo.joinPaths(qbsbuildconfig.qbsModulesBaseDir, product.name) } Properties { condition: qbs.targetOS.contains("darwin") bundle.isBundle: false cpp.linkerFlags: ["-compatibility_version", cpp.soVersion] } Export { Depends { name: "cpp" } Depends { name: "Qt"; submodules: ["core"] } Depends { name: "span" } Properties { condition: exportingProduct.hasExporter prefixMapping: [{ prefix: exportingProduct.sourceDirectory, replacement: FileInfo.joinPaths(exportingProduct.qbs.installPrefix, exportingProduct.headerInstallPrefix) }] } cpp.includePaths: [exportingProduct.sourceDirectory] cpp.defines: exportingProduct.visibilityType === "static" ? ["QBS_STATIC_LIB"] : [] } } qbs-src-3.3.0/LICENSE.LGPLv30000644000175100017510000001756015214475516014533 0ustar runnerrunner GNU LESSER GENERAL PUBLIC LICENSE The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd. Contact: http://www.qt.io/licensing You may use, distribute and copy the Qt GUI Toolkit under the terms of GNU Lesser General Public License version 3, which is displayed below. ------------------------------------------------------------------------- GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this licensedocument, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License. “The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”. The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser 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 Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. qbs-src-3.3.0/scripts/0000755000175100017510000000000015214475516014176 5ustar runnerrunnerqbs-src-3.3.0/scripts/cpu-count.sh0000755000175100017510000000414415214475516016455 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2020 Ivan Komissarov ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# NPROC=`which nproc` SYSCTL=`which sysctl` CPU_COUNT=2 if [ ! -z "$NPROC" ]; then # Linux CPU_COUNT=`$NPROC --all` elif [ ! -z "$SYSCTL" ]; then # macOS CPU_COUNT=`$SYSCTL -n hw.physicalcpu_max` fi echo $CPU_COUNT qbs-src-3.3.0/scripts/print-cores.sh0000755000175100017510000000040315214475516016777 0ustar runnerrunner#!/bin/bash for file in $(find /cores -maxdepth 1 -name 'core.*' -print); do echo "================================ $file ================================" gdb -ex 'thread apply all bt' -ex 'quit' ./release/install-root/usr/local/bin/qbs $file done; qbs-src-3.3.0/scripts/scripts.qbs0000644000175100017510000000013415214475516016372 0ustar runnerrunnerProduct { name: "qbs dev scripts" files: [ "*.bat", "*.sh", ] } qbs-src-3.3.0/scripts/setup-conan-profiles.sh0000755000175100017510000000557615214475516020627 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2024 Ivan Komissarov (abbapoh@gmail.com). ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu ARCH=$(uname -m) case "$ARCH" in x86_64) ARCH=x64 ;; arm64) ARCH=arm64 ;; esac case "$OSTYPE" in *darwin*) HOST_OS=mac_$ARCH TOOLCHAIN=clang_64 ;; msys|cygwin) HOST_OS=win_x64 TOOLCHAIN=msvc_64 ;; *) HOST_OS= ;; esac while [ $# -gt 0 ]; do case "$1" in --host) HOST_OS="$2" shift ;; --toolchain) TOOLCHAIN=$(echo $2 | tr '[A-Z]' '[a-z]') shift ;; esac shift done if [ -z "${HOST_OS}" ]; then echo "No --host specified or auto-detection failed." >&2 exit 1 fi if [ -z "${TOOLCHAIN}" ]; then echo "No --toolchain specified or auto-detection failed." >&2 exit 1 fi echo $ARCH echo $HOST_OS echo $TOOLCHAIN mkdir -p "${HOME}/.conan2/profiles" SCRIPT_DIR=$( cd "$(dirname "$0")" ; pwd -P ) cp ${SCRIPT_DIR}/conan-profiles/${HOST_OS}/${TOOLCHAIN}/* "${HOME}/.conan2/profiles" qbs-src-3.3.0/scripts/build-qbs-doc.sh0000755000175100017510000000450115214475516017162 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2021 Ivan Komissarov (abbapoh@gmail.com). ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -e if [ -z "${QBS_BUILD_PROFILE}" ]; then QBS_BUILD_PROFILE=$(qbs config defaultProfile | cut -d: -f2 | tr -d '[:space:]') fi if [ -z "${QBS_BUILD_PROFILE}" ]; then echo "Either QBS_BUILD_PROFILE or a defaultProfile must be set." exit 1 fi # # Additional build options # BUILD_OPTIONS="\ profile:${QBS_BUILD_PROFILE} \ ${BUILD_OPTIONS} \ config:documentation \ " qbs build -p "qbs documentation" ${BUILD_OPTIONS} qbs-src-3.3.0/scripts/test-for-android.sh0000755000175100017510000000507315214475516017723 0ustar runnerrunner#!/usr/bin/env bash set -eu ############################################################################# ## ## Copyright (C) 2019 Richard Weickelt. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# export PATH="$1:$PATH" export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" # # These are set outside of this script, for instance in the Docker image # echo "Android SDK installed at ${ANDROID_SDK_ROOT}" echo "Android NDK installed at ${ANDROID_NDK_ROOT}" # Cleaning profiles qbs config --unset profiles.qbs_autotests-android # Setting auto test profiles qbs setup-android --ndk-dir ${ANDROID_NDK_ROOT} --sdk-dir ${ANDROID_HOME} qbs_autotests-android export QBS_AUTOTEST_PROFILE=qbs_autotests-android export QBS_AUTOTEST_ALWAYS_LOG_STDERR=true export QTEST_FUNCTION_TIMEOUT=9000000 qbs config --list tst_blackbox-android qbs-src-3.3.0/scripts/update-xcspecs.sh0000755000175100017510000000507315214475516017472 0ustar runnerrunner#!/bin/bash set -e ############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# # Update build specs from Xcode - this script should be run when new Xcode releases are made. specs_dir="$(xcrun --sdk macosx --show-sdk-platform-path)/Developer/Library/Xcode/Specifications" specs_out_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../share/qbs/modules/bundle" spec_files=("MacOSX Package Types.xcspec" "MacOSX Product Types.xcspec") for spec_file in "${spec_files[@]}" ; do printf "%s\\n" "$(plutil -convert json -r -o - "$specs_dir/$spec_file")" > \ "$specs_out_dir/${spec_file// /-}" done xcode_version="$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' \ "$(xcode-select --print-path)/../Info.plist")" echo "Updated build specs from Xcode $xcode_version" qbs-src-3.3.0/scripts/test-qt.sh0000755000175100017510000000433615214475516016144 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2021 Ivan Komissarov ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu # # Qbs is built with the address sanitizer enabled. # Suppress findings in some parts of Qbs / dependencies. # export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" export PATH="$1:$PATH" export QBS_AUTOTEST_PROFILE=${QBS_AUTOTEST_PROFILE:-qt} tst_blackbox-qt qbs-src-3.3.0/scripts/conan-profiles/0000755000175100017510000000000015214475516017115 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/mac_x64/0000755000175100017510000000000015214475516020356 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/mac_x64/clang_64/0000755000175100017510000000000015214475516021753 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/mac_x64/clang_64/qbs-test0000644000175100017510000000020615214475516023436 0ustar runnerrunner[settings] arch=x86_64 build_type=Release compiler=apple-clang compiler.cppstd=17 compiler.libcxx=libc++ compiler.version=13 os=Macos qbs-src-3.3.0/scripts/conan-profiles/mac_x64/clang_64/qbs-test-libs0000644000175100017510000000020615214475516024365 0ustar runnerrunner[settings] arch=x86_64 build_type=Release compiler=apple-clang compiler.cppstd=17 compiler.libcxx=libc++ compiler.version=13 os=Macos qbs-src-3.3.0/scripts/conan-profiles/win_x64/0000755000175100017510000000000015214475516020413 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/win_x64/mingw_64/0000755000175100017510000000000015214475516022045 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/win_x64/mingw_64/qbs-test0000644000175100017510000000020715214475516023531 0ustar runnerrunner[settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=11.2 os=Windows qbs-src-3.3.0/scripts/conan-profiles/win_x64/msvc_64/0000755000175100017510000000000015214475516021674 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/win_x64/msvc_64/qbs-test0000644000175100017510000000024215214475516023357 0ustar runnerrunner[settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=14 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=194 os=Windows qbs-src-3.3.0/scripts/conan-profiles/win_x64/msvc_64/qbs-test-libs0000644000175100017510000000024215214475516024306 0ustar runnerrunner[settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=14 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows qbs-src-3.3.0/scripts/conan-profiles/mac_arm64/0000755000175100017510000000000015214475516020666 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/mac_arm64/clang_64/0000755000175100017510000000000015214475516022263 5ustar runnerrunnerqbs-src-3.3.0/scripts/conan-profiles/mac_arm64/clang_64/qbs-test0000644000175100017510000000020515214475516023745 0ustar runnerrunner[settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=17 compiler.libcxx=libc++ compiler.version=13 os=Macos qbs-src-3.3.0/scripts/conan-profiles/mac_arm64/clang_64/qbs-test-libs0000644000175100017510000000020515214475516024674 0ustar runnerrunner[settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=17 compiler.libcxx=libc++ compiler.version=13 os=Macos qbs-src-3.3.0/scripts/install-dm.sh0000644000175100017510000001042315214475516016576 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2022 Denis Shienkov ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu function show_help() { cat < Root directory where to install the components. Maps to c:/dm on Windows by default. --version The desired toolchain version. Currently supported only 8.57 version. EOF } VERSION="8.57" INSTALL_DIR="/c/dm" while [ $# -gt 0 ]; do case "$1" in --directory|-d) INSTALL_DIR="$2" shift ;; --version) VERSION="$2" shift ;; --help|-h) show_help exit 0 ;; *) ;; esac shift done if [ -z "${INSTALL_DIR}" ]; then echo "No --directory specified or auto-detection failed." >&2 exit 1 fi if [ -z "${VERSION}" ]; then echo "No --version specified." >&2 exit 1 fi DOWNLOAD_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'dm-tmp'` DM_URL="http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm${VERSION//./}c.zip" UTILS_URL="http://ftp.digitalmars.com/bup.zip" DOS_LIBS_URL="http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm850dos.zip" DOSX_LIBS_URL="http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm831x.zip" DM_ZIP="${DOWNLOAD_DIR}/dm.zip" UTILS_ZIP="${DOWNLOAD_DIR}/utils.zip" DOS_LIBS_ZIP="${DOWNLOAD_DIR}/doslibs.zip" DOSX_LIBS_ZIP="${DOWNLOAD_DIR}/dosxlibs.zip" echo "Downloading compiler from ${DM_URL}..." >&2 curl --progress-bar -L -o ${DM_ZIP} ${DM_URL} >&2 echo "Downloading utils from ${UTILS_URL}..." >&2 curl --progress-bar -L -o ${UTILS_ZIP} ${UTILS_URL} >&2 echo "Downloading DOS libs from ${DOS_LIBS_URL}..." >&2 curl --progress-bar -L -o ${DOS_LIBS_ZIP} ${DOS_LIBS_URL} >&2 echo "Downloading DOSX libs from ${DOSX_LIBS_URL}..." >&2 curl --progress-bar -L -o ${DOSX_LIBS_ZIP} ${DOSX_LIBS_URL} >&2 echo "Unpacking compiler to ${INSTALL_DIR}..." >&2 7z x -y -o${INSTALL_DIR} ${DM_ZIP} >/dev/null 2>&1 echo "Unpacking utils to ${INSTALL_DIR}..." >&2 7z x -y -o${INSTALL_DIR} ${UTILS_ZIP} >/dev/null 2>&1 echo "Unpacking DOS libs to ${INSTALL_DIR}..." >&2 7z x -y -o${INSTALL_DIR} ${DOS_LIBS_ZIP} >/dev/null 2>&1 echo "Unpacking DOSX libs to ${INSTALL_DIR}..." >&2 7z x -y -o${INSTALL_DIR} ${DOSX_LIBS_ZIP} >/dev/null 2>&1 echo "${INSTALL_DIR}/dm/bin" rm -f ${DM_ZIP} rm -f ${UTILS_ZIP} rm -f ${DOS_LIBS_ZIP} rm -f ${DOSX_LIBS_ZIP} qbs-src-3.3.0/scripts/build-qbs-with-cmake.sh0000755000175100017510000000736415214475516020460 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2020 Ivan Komissarov (abbapoh@gmail.com). ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu # # It might be desired to keep settings for Qbs testing # in a separate folder. # export QBS_AUTOTEST_SETTINGS_DIR="${QBS_AUTOTEST_SETTINGS_DIR:-/tmp/qbs-settings}" BUILD_OPTIONS="\ -DWITH_UNIT_TESTS=1 \ -DQBS_INSTALL_HTML_DOCS=1 \ -DQBS_INSTALL_QCH_DOCS=1 \ ${BUILD_OPTIONS:-} \ " EXE_SUFFIX="" if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then EXE_SUFFIX=".exe" else BUILD_OPTIONS="\ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ ${BUILD_OPTIONS} \ " fi QMAKE_PATH="${QMAKE_PATH:-$(which qmake)${EXE_SUFFIX}}" QT_DIR=$(dirname ${QMAKE_PATH})/../ # Use shadow build mkdir -p build pushd build # # Build all default products of Qbs # cmake -GNinja -DQt5_DIR=${QT_DIR}/lib/cmake/Qt5/ ${BUILD_OPTIONS} .. cmake --build . cmake --install . --prefix "install-root" WITH_TESTS=${WITH_TESTS:-1} if [ "$WITH_TESTS" -eq 0 ]; then exit 0 fi QBS_AUTOTEST_PROFILE="${QBS_AUTOTEST_PROFILE:-}" # # Set up profiles for the freshly built Qbs if not # explicitly specified otherwise # if [[ "${QBS_AUTOTEST_PROFILE}" == "" ]]; then export QBS_AUTOTEST_PROFILE=autotestprofile RUN_OPTIONS="\ --settings-dir ${QBS_AUTOTEST_SETTINGS_DIR} \ " ./bin/qbs setup-toolchains \ ${RUN_OPTIONS} \ --detect ./bin/qbs setup-qt \ ${RUN_OPTIONS} \ "${QMAKE_PATH}" ${QBS_AUTOTEST_PROFILE} ./bin/qbs config \ ${RUN_OPTIONS} \ ${QBS_AUTOTEST_PROFILE}.baseProfile gcc fi # # Run all autotests with QBS_AUTOTEST_PROFILE. Some test cases might run for # over 10 minutes. Output an empty line every 9:50 minutes to prevent a 10min # timeout on Travis CI. # (while true; do echo "" && sleep 590; done) & trap "kill $!; wait $! 2>/dev/null || true; killall sleep || true" EXIT ctest -j $(nproc --all) --output-on-failure qbs-src-3.3.0/scripts/run-analyzer.sh0000755000175100017510000000766315214475516017200 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2019 Ivan Komissarov (abbapoh@gmail.com) ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# LLVM_INSTALL_DIR=${LLVM_INSTALL_DIR:-""} # on Debian, it might be necessary to setup which version of clang-tidy and run-clang-tidy.py # is desired: # update-alternatives --install /usr/bin/run-clang-tidy.py run-clang-tidy.py /usr/bin/run-clang-tidy-4.0.py 1 CLANG_TIDY=`which clang-tidy` RUN_CLANG_TIDY=`which run-clang-tidy` if [ -z "$RUN_CLANG_TIDY" ] || [ -z "$CLANG_TIDY" ]; then if [ ! -z "$LLVM_INSTALL_DIR" ]; then CLANG_TIDY="$LLVM_INSTALL_DIR/bin/clang-tidy" RUN_CLANG_TIDY="$LLVM_INSTALL_DIR/bin/run-clang-tidy" else echo "Can't find clang-tidy and/or run-clang-tidy.py in PATH, try setting LLVM_INSTALL_DIR" exit 1 fi fi SCRIPT_DIR=$(dirname "$0") CPU_COUNT=$("${SCRIPT_DIR}/cpu-count.sh") BUILD_OPTIONS="\ ${QBS_BUILD_PROFILE:+profile:${QBS_BUILD_PROFILE}} \ modules.cpp.treatWarningsAsErrors:true \ modules.qbs.buildVariant:release \ project.withTests:false \ ${BUILD_OPTIONS} \ config:analyzer " QBS_SRC_DIR=${QBS_SRC_DIR:-`pwd`} if [ ! -f "$QBS_SRC_DIR/qbs.qbs" ]; then echo "Can't find qbs.qbs in $QBS_SRC_DIR, try setting QBS_SRC_DIR" exit 1 fi set -e set -o pipefail qbs resolve -f "$QBS_SRC_DIR/qbs.qbs" $BUILD_OPTIONS qbs build -f "$QBS_SRC_DIR/qbs.qbs" $BUILD_OPTIONS qbs generate -g clangdb -f "$QBS_SRC_DIR/qbs.qbs" $BUILD_OPTIONS SCRIPT=" import json import os import sys dbFile = sys.argv[1] blacklist = ['qmljsgrammar.cpp', 'qmljsparser.cpp'] seenFiles = set() patched_db = [] with open(dbFile, 'r') as f: db = json.load(f) for item in db: file = item['file'] if (os.path.basename(file) not in blacklist) and (file not in seenFiles): seenFiles.add(file) patched_db.append(item) with open(dbFile, 'w') as f: f.write(json.dumps(patched_db, indent=2)) " python3 -c "${SCRIPT}" analyzer/compile_commands.json RUN_CLANG_TIDY+=" -p analyzer -clang-tidy-binary ${CLANG_TIDY} -j ${CPU_COUNT} -header-filter=\".*qbs.*\.h$\" -quiet" ${RUN_CLANG_TIDY} 2>/dev/null | tee results.txt echo "$(grep -c 'warning:' results.txt) warnings in total" qbs-src-3.3.0/scripts/install-qt.sh0000755000175100017510000004262315214475516016634 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2019 Richard Weickelt. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu function help() { cat < Root directory where to install the components. Maps to C:/Qt on Windows, /opt/Qt on Linux, /usr/local/Qt on Mac by default. -f, --force Force download and do not attempt to re-use an existing installation. --host The host operating system. Can be one of linux_x64, mac_x64, windows_x86. Auto-detected by default. --target The desired target platform. Can be one of desktop, android, ios. The default value is desktop. --toolchain The toolchain that has been used to build the binaries. Possible values depend on --host and --target, respectively: linux_x64 android any, android_armv7, android_arm64_v8a desktop gcc_64 (default) mac_x64 android any, android_armv7, android_arm64_v8a desktop clang_64 (default) ios ios windows_x86 android any, android_armv7, android_arm64_v8a desktop win64_mingw73, win64_msvc2017_64 (default) --version The desired Qt version. Currently supported are all versions above 5.9.0. EOF } TARGET_PLATFORM=desktop COMPONENTS= VERSION= FORCE_DOWNLOAD=false MD5_TOOL=md5sum case "$OSTYPE" in *linux*) HOST_OS=linux_x64 INSTALL_DIR=/opt/Qt TOOLCHAIN=gcc_64 ;; *darwin*) HOST_OS=mac_x64 INSTALL_DIR=/usr/local/Qt TOOLCHAIN=clang_64 MD5_TOOL="md5 -r" ;; msys|cygwin) HOST_OS=windows_x86 INSTALL_DIR=/c/Qt TOOLCHAIN=win64_msvc2015_64 ;; *) HOST_OS= INSTALL_DIR= ;; esac while [ $# -gt 0 ]; do case "$1" in --directory|-d) INSTALL_DIR="$2" shift ;; --force|-f) FORCE_DOWNLOAD=true ;; --host) HOST_OS="$2" shift ;; --target) TARGET_PLATFORM="$2" shift ;; --toolchain) TOOLCHAIN=$(echo $2 | tr '[:upper:]' '[:lower:]') shift ;; --version) VERSION="$2" shift ;; --help|-h) help exit 0 ;; *) COMPONENTS="${COMPONENTS} $1" ;; esac shift done if [ -z "${HOST_OS}" ]; then echo "No --host specified or auto-detection failed." >&2 exit 1 fi if [ -z "${INSTALL_DIR}" ]; then echo "No --directory specified or auto-detection failed." >&2 exit 1 fi if [ -z "${VERSION}" ]; then echo "No --version specified." >&2 exit 1 fi if [ -z "${COMPONENTS}" ]; then echo "No components specified." >&2 exit 1 fi case "$TARGET_PLATFORM" in android) ;; ios) ;; desktop) ;; wasm) ;; *) echo "Error: TARGET_PLATFORM=${TARGET_PLATFORM} is not valid." >&2 exit 1 ;; esac HASH=$(echo "${OSTYPE} ${TARGET_PLATFORM} ${TOOLCHAIN} ${VERSION} ${INSTALL_DIR}" | ${MD5_TOOL} | head -c 16) HASH_FILEPATH="${INSTALL_DIR}/${HASH}.manifest" INSTALLATION_IS_VALID=false if ! ${FORCE_DOWNLOAD} && [ -f "${HASH_FILEPATH}" ]; then INSTALLATION_IS_VALID=true while read filepath; do if [ ! -e "${filepath}" ]; then INSTALLATION_IS_VALID=false break fi done <"${HASH_FILEPATH}" fi if ${INSTALLATION_IS_VALID}; then echo "Already installed. Skipping download." >&2 exit 0 fi MIRRORS="\ http://ftp.acc.umu.se/mirror/qt.io/qtproject \ http://ftp.fau.de/qtproject \ http://download.qt.io \ " for MIRROR in ${MIRRORS}; do if curl "${MIRROR}/online" -s -f -o /dev/null; then break; else echo "Server ${MIRROR} not availabe. Trying next alternative..." >&2 MIRROR="" fi done DOWNLOAD_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'install-qt'` # # The repository structure is a mess. Try different URL variants # function compute_url(){ local COMPONENT=$1 local CURL="curl -s -L" local BASE_URL="${MIRROR}/online/qtsdkrepository/${HOST_OS}/${TARGET_PLATFORM}" local ANDROID_ARCH=$(echo ${TOOLCHAIN##android_}) if [[ "${COMPONENT}" =~ "qtcreator" ]]; then if [[ "${HOST_OS}" == "windows_x86" ]]; then # newer QtC versions do not supported x86 version anymore HOST_OS="windows_x64" fi SHORT_VERSION=${VERSION%??} BASE_URL="${MIRROR}/official_releases/qtcreator" REMOTE_PATH="${SHORT_VERSION}/${VERSION}/installer_source/${HOST_OS}/qtcreator.7z" echo "${BASE_URL}/${REMOTE_PATH}" return 0 elif [[ "${COMPONENT}" =~ "mingw" ]]; then REMOTE_BASE="tools_mingw90/qt.tools.${TOOLCHAIN}${VERSION//./}" REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "[[:alnum:]_.\-]*7z" | grep -v "meta" | head -1)" if [ ! -z "${REMOTE_PATH}" ]; then echo "${BASE_URL}/${REMOTE_BASE}/${REMOTE_PATH}" return 0 fi else HOST_OS_NAME=${HOST_OS//_x64/} HOST_OS_NAME=${HOST_OS_NAME//_arm64/} REMOTE_BASES=( # New repository format (>=6.8.0) # qt6_680/qt6_680/qt.qt6.680.clang_64/6.8.3-0-*qtbase-*.7z "qt6_${VERSION//./}/qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" # qt6_680/qt6_680/qt.qt6.680.linux_gcc_64/6.8.3-0-*qtbase-*.7z "qt6_${VERSION//./}/qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${HOST_OS_NAME}_${TOOLCHAIN}" # qt6_680/qt6_680/qt.qt6.680.addons.qt5compat.clang_64/6.8.3-0-*.7z "qt6_${VERSION//./}/qt6_${VERSION//./}/qt.qt6.${VERSION//./}.addons.${COMPONENT}.${TOOLCHAIN}" # qt6_680/qt6_680/qt.qt6.680.addons.qt5compat.linux_gcc_64/6.8.3-0-*.7z "qt6_${VERSION//./}/qt6_${VERSION//./}/qt.qt6.${VERSION//./}.addons.${COMPONENT}.${HOST_OS_NAME}_${TOOLCHAIN}" # New repository format (>=6.0.0) "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${HOST_OS_NAME}_${TOOLCHAIN}" "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${COMPONENT}.${HOST_OS_NAME}_${TOOLCHAIN}" "qt6_${VERSION//./}_${ANDROID_ARCH}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" "qt6_${VERSION//./}_${ANDROID_ARCH}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" "qt${VERSION//./_}/qt6_${VERSION//./}_${TOOLCHAIN}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" "qt${VERSION//./_}/qt6_${VERSION//./}_${TOOLCHAIN}/qt.qt6.${VERSION//./}.${COMPONENT}" "qt${VERSION//./_}/qt6_${VERSION//./}_${TOOLCHAIN}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" # New repository format (>=5.9.6) "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${TOOLCHAIN}" "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" # Multi-abi Android since 5.14 "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${TARGET_PLATFORM}" "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${COMPONENT}.${TARGET_PLATFORM}" # Older repository format (<5.9.0) "qt5_${VERSION//./}/qt.${VERSION//./}.${TOOLCHAIN}" "qt5_${VERSION//./}/qt.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" ) for REMOTE_BASE in ${REMOTE_BASES[*]}; do REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "[[:alnum:]_.\-]*7z" | grep "${COMPONENT}" | tail -1)" if [ ! -z "${REMOTE_PATH}" ]; then echo "${BASE_URL}/${REMOTE_BASE}/${REMOTE_PATH}" return 0 fi done fi echo "Could not determine a remote URL for ${COMPONENT} with version ${VERSION}">&2 exit 1 } function version { echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; } mkdir -p ${INSTALL_DIR} rm -f "${HASH_FILEPATH}" for COMPONENT in ${COMPONENTS}; do if [[ "${TOOLCHAIN}" =~ "win64_mingw" ]]; then TOOLCHAIN_DIR="${TOOLCHAIN/win64_/}_64" elif [[ "${TOOLCHAIN}" =~ "win32_mingw" ]]; then TOOLCHAIN_DIR="${TOOLCHAIN/win32_/}_32" elif [[ "${TOOLCHAIN}" =~ "win64_msvc" ]]; then TOOLCHAIN_DIR="${TOOLCHAIN/win64_/}" elif [[ "${TOOLCHAIN}" =~ "win32_msvc" ]]; then TOOLCHAIN_DIR="${TOOLCHAIN/win32_/}" elif [[ "${TOOLCHAIN}" =~ "any" ]] && [[ "${TARGET_PLATFORM}" == "android" ]]; then TOOLCHAIN_DIR="android" elif [[ "${HOST_OS}" == "mac_x64" ]] && [[ ! "$(version "${VERSION}")" < "$(version "6.1.2")" ]] && [[ "${TARGET_PLATFORM}" == "desktop" ]]; then TOOLCHAIN_DIR="macos" else TOOLCHAIN_DIR="${TOOLCHAIN}" fi if [[ "${COMPONENT}" =~ "qtcreator" ]] && [[ "${HOST_OS}" != "mac_x64" ]]; then UNPACK_DIR="${INSTALL_DIR}/Tools/QtCreator" ARCHIVER_DIR="${UNPACK_DIR}" mkdir -p ${UNPACK_DIR} elif [[ ! "${COMPONENT}" =~ "qtcreator" ]] && [[ "$(version "${VERSION}")" > "$(version "6.8.0")" ]]; then UNPACK_DIR="${INSTALL_DIR}" ARCHIVER_DIR="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}" if [[ "${COMPONENT}" =~ "icu" ]]; then ARCHIVER_DIR="${ARCHIVER_DIR}/lib" fi mkdir -p ${ARCHIVER_DIR} else UNPACK_DIR="${INSTALL_DIR}" ARCHIVER_DIR="${UNPACK_DIR}" fi if [ "$(version "${VERSION}")" -ge "$(version "6.0.0")" ]; then if [[ "${COMPONENT}" =~ "qtscript" ]] || [[ "${COMPONENT}" =~ "qtscxml" ]] || [[ "${COMPONENT}" =~ "qtx11extras" ]]; then echo "Component ${COMPONENT} was removed in Qt6, skipping" >&2 continue fi if [[ "${COMPONENT}" =~ "icu" ]] && [[ "${TARGET_PLATFORM}" =~ "wasm" ]]; then echo "Component ${COMPONENT} is not present in Qt6 (${TARGET_PLATFORM}), skipping" >&2 continue fi else if [[ "${COMPONENT}" =~ "qt5compat" ]] || [[ "${COMPONENT}" =~ "shadertools" ]]; then echo "Component ${COMPONENT} is not present in Qt ${VERSION}, skipping" >&2 continue fi fi URL="$(compute_url ${COMPONENT})" echo "Downloading ${COMPONENT} ${URL}..." >&2 curl --progress-bar -L -o ${DOWNLOAD_DIR}/package.7z ${URL} >&2 7z x -y -o${ARCHIVER_DIR} ${DOWNLOAD_DIR}/package.7z >/dev/null 2>&1 7z l -ba -slt -y ${DOWNLOAD_DIR}/package.7z | tr '\\' '/' | sed -n -e "s|^Path\ =\ |${ARCHIVER_DIR}/|p" >> "${HASH_FILEPATH}" 2>/dev/null rm -f ${DOWNLOAD_DIR}/package.7z # # conf file is needed for qmake # if [[ "${COMPONENT}" == "qtbase" ]]; then if [ "${TARGET_PLATFORM}" == "android" ] && [ ! "$(version "${VERSION}")" < "$(version "6.0.0")" ]; then CONF_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/target_qt.conf" ANDROID_QMAKE_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/qmake" if [ "${TOOLCHAIN}" == "android_armv7" ] && [ ! "$(version "${VERSION}")" < "$(version "6.4.2")" ]; then sed -i "s/\r//" "${CONF_FILE}" sed -i "s|HostLibraryExecutables=.\/bin|HostLibraryExecutables=.\/libexec|g" "${CONF_FILE}" chmod +x "${ANDROID_QMAKE_FILE}" sed -i "s|\\\|\/|g" "${ANDROID_QMAKE_FILE}" fi sed -i "s|target|../$TOOLCHAIN|g" "${CONF_FILE}" sed -i "/HostPrefix/ s|$|gcc_64|g" "${CONF_FILE}" QMAKE_FILE="${UNPACK_DIR}/${VERSION}/gcc_64/bin/qmake" sed -i "s|\/home\/qt\/work\/install\/bin\/qmake|$QMAKE_FILE|g" "${ANDROID_QMAKE_FILE}" sed -i "s|\/Users\/qt\/work\/install\/bin\/qmake|$QMAKE_FILE|g" "${ANDROID_QMAKE_FILE}" elif [ "${TARGET_PLATFORM}" == "ios" ] && [ ! "${VERSION}" \< "6.0.0" ]; then CONF_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/target_qt.conf" sed -i.bak "s|HostData=target|HostData=../$TOOLCHAIN|g" "${CONF_FILE}" sed -i.bak "s|HostPrefix=..\/..\/|HostPrefix=..\/..\/macos|g" "${CONF_FILE}" IOS_QMAKE_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/qmake" QMAKE_FILE="${UNPACK_DIR}/${VERSION}/macos/bin/qmake" sed -i.bak "s|\/Users\/qt\/work\/install\/bin\/qmake|${QMAKE_FILE}|g" "${IOS_QMAKE_FILE}" elif [ "${TARGET_PLATFORM}" == "wasm" ] && [ ! "${VERSION}" \< "6.0.0" ]; then CONF_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/target_qt.conf" sed -i.bak "s|HostData=target|HostData=../$TOOLCHAIN|g" "${CONF_FILE}" sed -i.bak "s|HostPrefix=..\/..\/|HostPrefix=..\/..\/gcc_64|g" "${CONF_FILE}" WASM_QMAKE_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/qmake" QMAKE_FILE="${UNPACK_DIR}/${VERSION}/gcc_64/bin/qmake" sed -i.bak "s|\/home\/qt\/work\/install\/bin\/qmake|${QMAKE_FILE}|g" "${WASM_QMAKE_FILE}" elif [ "${TARGET_PLATFORM}" == "desktop" ] && [ "${TOOLCHAIN}" == "win64_msvc2022_arm64_cross_compiled" ] && [ ! "${VERSION}" \< "6.0.0" ]; then CONF_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/target_qt.conf" sed -i.bak "s|HostData=target|HostData=../msvc2022_arm64_cross_compiled|g" "${CONF_FILE}" sed -i.bak "s|HostPrefix=..\/..\/|HostPrefix=..\/..\/msvc2022_64|g" "${CONF_FILE}" ARM64_QMAKE_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/qmake.bat" QMAKE_FILE='"%~dp0\\\\..\\\\..\\\\msvc2022_64\\\\bin\\\\qmake6.exe"' sed -i.bak "s|\\\\Users\\\\qt\\\\work\\\\install\\\\bin\\\\qmake6.exe|${QMAKE_FILE}|g" "${ARM64_QMAKE_FILE}" else CONF_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/bin/qt.conf" echo "[Paths]" > ${CONF_FILE} echo "Prefix = .." >> ${CONF_FILE} fi # Adjust the license to be able to run qmake # sed with -i requires intermediate file on Mac OS PRI_FILE="${UNPACK_DIR}/${VERSION}/${TOOLCHAIN_DIR}/mkspecs/qconfig.pri" sed -i.bak 's/Enterprise/OpenSource/g' "${PRI_FILE}" sed -i.bak 's/licheck.*//g' "${PRI_FILE}" rm "${PRI_FILE}.bak" # Print the directory so that the caller can # adjust the PATH variable. echo $(dirname "${CONF_FILE}") elif [[ "${COMPONENT}" =~ "mingw" ]]; then VERSION_DIR="${VERSION//./}" if [[ "${TOOLCHAIN}" =~ "win64_mingw" ]]; then if [[ "${VERSION}" == "9.0.0" ]]; then VERSION_DIR="1120" fi echo "${UNPACK_DIR}/Tools/mingw${VERSION_DIR}_64/bin" elif [[ "${TOOLCHAIN}" =~ "win32_mingw" ]]; then echo "${UNPACK_DIR}/Tools/mingw${VERSION_DIR}_32/bin" fi elif [[ "${COMPONENT}" =~ "qtcreator" ]]; then if [ "${HOST_OS}" == "mac_x64" ]; then echo "${UNPACK_DIR}/Qt Creator.app/Contents/MacOS" else echo "${UNPACK_DIR}/bin" fi fi done qbs-src-3.3.0/scripts/update-dmgbuild.sh0000755000175100017510000000441715214475516017612 0ustar runnerrunner#!/bin/bash set -e ############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# python_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../src/3rdparty/python" repos=(biplist.git@v1.0.3 dmgbuild.git@v1.3.2 ds_store@v1.1.2 mac_alias.git@v2.0.7) for repo in "${repos[@]}" ; do pip install -U --isolated "--prefix=$python_dir" --no-binary :all: --no-compile --no-deps \ "git+git://github.com/qbs/$repo" done rm "$python_dir/lib/python2.7/site-packages/dmgbuild/resources/"*.tiff qbs-src-3.3.0/scripts/test-qt4.sh0000755000175100017510000000454015214475516016225 0ustar runnerrunner#!/usr/bin/env bash set -eu ############################################################################# ## ## Copyright (C) 2020 Raphael Cotty. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# export PATH="$1:$PATH" export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" # Creating the qt4 profile qbs-setup-toolchains /usr/bin/g++ gcc qbs-setup-qt /usr/lib/x86_64-linux-gnu/qt4/bin/qmake qt4 # To avoid warnings due to qt4 include files qbs config profiles.gcc.cpp.cxxFlags "-Wno-deprecated-copy" qbs config profiles.qt4.baseProfile gcc qbs config --list export QBS_AUTOTEST_PROFILE=qt4 tst_blackbox-qt qbs-src-3.3.0/scripts/install-qbs.sh0000755000175100017510000001077415214475516016777 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2025 Ivan Komissarov (abbapoh@gmail.com). ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu set -o pipefail function help() { cat < Root directory where to install the components. Maps to C:/qbs on Windows, /opt/qbs on Linux by default. --host The host operating system. Can be one of linux-x86_64, windows-x86_64. Auto-detected by default. --version The desired Qbs version. EOF } case "$OSTYPE" in *linux*) HOST_OS=linux-x86_64 INSTALL_DIR=/opt/qbs ;; msys|cygwin) HOST_OS=windows-x86_64 INSTALL_DIR=/c/qbs ;; *) HOST_OS= INSTALL_DIR= ;; esac while [ $# -gt 0 ]; do case "$1" in --directory|-d) INSTALL_DIR="$2" shift ;; --host) HOST_OS="$2" shift ;; --version) VERSION="$2" shift ;; --help|-h) help exit 0 ;; *) echo "Unknown option: $1" >&2 help exit 1 ;; esac shift done if [ -z "${HOST_OS}" ]; then echo "No --host specified and auto-detection failed." >&2 exit 1 fi if [ -z "${INSTALL_DIR}" ]; then echo "No --directory specified and auto-detection failed." >&2 exit 1 fi if [ -z "${VERSION}" ]; then echo "No --version specified." >&2 exit 1 fi MIRRORS="\ http://ftp.acc.umu.se/mirror/qt.io/qtproject \ http://ftp.fau.de/qtproject \ http://download.qt.io \ " for MIRROR in ${MIRRORS}; do if curl "${MIRROR}/official_releases/qbs/${VERSION}/" -s -f -o /dev/null; then echo "Selected mirror: ${MIRROR}" >&2 break; else echo "Server ${MIRROR} not availabe. Trying next alternative..." >&2 MIRROR="" fi done BASE_FILENAME="qbs-${HOST_OS}-${VERSION}" DOWNLOAD_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'install-qbs'` rm -rf ${INSTALL_DIR}/${BASE_FILENAME} mkdir -p ${INSTALL_DIR} echo "Downloading Qbs ${VERSION}..." >&2 cd ${DOWNLOAD_DIR} if [[ ${HOST_OS} == "linux-x86_64" ]]; then FILENAME="${BASE_FILENAME}.tar.gz" curl -L "${MIRROR}/official_releases/qbs/${VERSION}/${FILENAME}" > ${FILENAME} tar -xzf ${FILENAME} elif [[ ${HOST_OS} == "windows-x86_64" ]]; then FILENAME="${BASE_FILENAME}.zip" curl -L "${MIRROR}/official_releases/qbs/${VERSION}/${FILENAME}" > ${FILENAME} 7z x -y -o${BASE_FILENAME} ${FILENAME} >/dev/null 2>&1 fi mv ${BASE_FILENAME} ${INSTALL_DIR} rm ${FILENAME} echo "${INSTALL_DIR}/${BASE_FILENAME}/bin" qbs-src-3.3.0/scripts/test-wasm.sh0000755000175100017510000000467015214475516016470 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2024 Ivan Komissarov ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu -o pipefail export PATH="$1:$PATH" SCRIPT_DIR=$( cd "$(dirname "$0")" ; pwd -P ) qbs config --unset profiles.qbs_autotests_wasm qbs config --unset profiles.qbs_autotests_wasm_qt export QBS_AUTOTEST_PROFILE=qbs_autotests_wasm_qt EMCC_PATH=${EMCC_PATH:-$(which emcc)} QMAKE_PATH=${QMAKE_PATH:-$(which qmake)} qbs setup-toolchains --type emscripten ${EMCC_PATH} qbs_autotests_wasm qbs setup-qt ${QMAKE_PATH} qbs_autotests_wasm_qt qbs config profiles.qbs_autotests_wasm_qt.baseProfile qbs_autotests_wasm qbs config --list ${SCRIPT_DIR}/test-qbs.sh $1 qbs-src-3.3.0/scripts/thread-sanitizer-suppressions.txt0000644000175100017510000000003315214475516022763 0ustar runnerrunnercalled_from_lib:libtsan.so qbs-src-3.3.0/scripts/test-qt-for-android.sh0000755000175100017510000000671115214475516020345 0ustar runnerrunner#!/usr/bin/env bash set -eu ############################################################################# ## ## Copyright (C) 2019 Richard Weickelt. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# export PATH="$1:$PATH" export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" # # These are set outside of this script, for instance in the Docker image # QT_INSTALL_DIR=/opt/Qt/${QT_VERSION} echo "Android SDK installed at ${ANDROID_SDK_ROOT}" echo "Android NDK installed at ${ANDROID_NDK_ROOT}" echo "Qt installed at ${QT_INSTALL_DIR}" # Cleaning profiles qbs config --unset profiles.qbs_autotests-android qbs config --unset profiles.qbs_autotests-android-qt # Setting auto test profiles qbs setup-android --ndk-dir ${ANDROID_NDK_ROOT} --sdk-dir ${ANDROID_SDK_ROOT} qbs_autotests-android qbs setup-android --ndk-dir ${ANDROID_NDK_ROOT} --sdk-dir ${ANDROID_SDK_ROOT} --qt-dir ${QT_INSTALL_DIR} qbs_autotests-android-qt export QBS_AUTOTEST_PROFILE=qbs_autotests-android export QBS_AUTOTEST_ALWAYS_LOG_STDERR=true export QTEST_FUNCTION_TIMEOUT=9000000 if [ ! "${QT_VERSION}" \< "5.14.0" ] && [ "${QT_VERSION}" \< "6.0.0" ]; then echo "Using multi-arch data sets for qml tests (only for qt version >= 5.14 and < 6.0.0) with all architectures" qbs config --list tst_blackbox-android fi; if [ ! "${QT_VERSION}" \< "6.3.0" ]; then echo "Using multi-arch data sets for qml tests (only for qt version >= 6.3.0) with all architectures" qbs config --list tst_blackbox-android fi; echo "Using single-arch (armv7a) data sets for qml tests" qbs config --unset profiles.qbs_autotests-android-qt.qbs.architectures qbs config profiles.qbs_autotests-android-qt.qbs.architecture armv7a qbs config --list tst_blackbox-android qbs-src-3.3.0/scripts/test-baremetal.sh0000755000175100017510000000447515214475516017460 0ustar runnerrunner#!/usr/bin/env bash set -eu ############################################################################# ## ## Copyright (C) 2020 Denis Shienkov ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" export PATH="$1:$PATH" export QBS_AUTOTEST_ALWAYS_LOG_STDERR=true echo "Auto-detecting the Qbs profiles." qbs-setup-toolchains --detect qbs-config --list profiles echo "Testing the Qbs toolchains." export QBS_AUTOTEST_PROFILE=${QBS_AUTOTEST_PROFILE:-arm-none-eabi-gcc-9_2} tst_blackbox-baremetal qbs-src-3.3.0/scripts/test-qbs.sh0000755000175100017510000000444615214475516016307 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2020 Ivan Komissarov ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu -o pipefail # # Qbs is built with the address sanitizer enabled. # Suppress findings in some parts of Qbs / dependencies. # export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" export PATH="$1:$PATH" export QBS_AUTOTEST_PROFILE=${QBS_AUTOTEST_PROFILE:-qt} echo "Running Qbs tests." find $1 -name "tst*" | xargs -I{} -n1 bash -c "{}" qbs-src-3.3.0/scripts/make-release-archives.bat0000644000175100017510000000670015214475516021026 0ustar runnerrunner@echo off REM Copyright (C) 2017 The Qt Company Ltd. REM Contact: https://www.qt.io/licensing/ REM REM This file is part of Qbs. REM REM $QT_BEGIN_LICENSE:LGPL$ REM Commercial License Usage REM Licensees holding valid commercial Qt licenses may use this file in REM accordance with the commercial license agreement provided with the REM Software or, alternatively, in accordance with the terms contained in REM a written agreement between you and The Qt Company. For licensing terms REM and conditions see https://www.qt.io/terms-conditions. For further REM information use the contact form at https://www.qt.io/contact-us. REM REM GNU Lesser General Public License Usage REM Alternatively, this file may be used under the terms of the GNU Lesser REM General Public License version 3 as published by the Free Software REM Foundation and appearing in the file LICENSE.LGPL3 included in the REM packaging of this file. Please review the following information to REM ensure the GNU Lesser General Public License version 3 requirements REM will be met: https://www.gnu.org/licenses/lgpl-3.0.html. REM REM GNU General Public License Usage REM Alternatively, this file may be used under the terms of the GNU REM General Public License version 2.0 or (at your option) the GNU General REM Public license version 3 or any later version approved by the KDE Free REM Qt Foundation. The licenses are as published by the Free Software REM Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 REM included in the packaging of this file. Please review the following REM information to ensure the GNU General Public License requirements will REM be met: https://www.gnu.org/licenses/gpl-2.0.html and REM https://www.gnu.org/licenses/gpl-3.0.html. REM REM $QT_END_LICENSE$ setlocal enabledelayedexpansion || exit /b if not exist VERSION ( echo This script must be run from the qbs source directory 1>&2 && exit /b 1 ) for /f %%j in (VERSION) do ( set "version=!version!%%j," ) set "version=%version:~0,-1%" set builddir=%TEMP%\qbs-release-%version% if exist "%builddir%" ( del /s /q "%builddir%" || exit /b ) qbs setup-toolchains --settings-dir "%builddir%\.settings" --detect || exit /b if exist "%QTDIR%" ( qbs setup-qt --settings-dir "%builddir%\.settings"^ "%QTDIR%\bin\qmake.exe" qt || exit /b ) else ( echo QTDIR environment variable not set or does not exist: %QTDIR% exit /b 1 ) if exist "%QTDIR64%" ( qbs setup-qt --settings-dir "%builddir%\.settings"^ "%QTDIR64%\bin\qmake.exe" qt64 || exit /b ) else ( echo QTDIR64 environment variable not set or does not exist: %QTDIR64% exit /b 1 ) REM Work around QBS-1142, where symlinks to UNC named paths aren't resolved REM properly, for example if this command is being run in a Docker container REM where the current directory is a symlink subst Q: "%CD%" && Q: qbs build --settings-dir "%builddir%\.settings"^ -f qbs.qbs -d "%builddir%\build"^ -p dist qbs.buildVariant:release project.withDocumentation:false products.qbs_archive.includeTopLevelDir:true^ modules.qbsbuildconfig.enableBundledQt:true^ config:release "qbs.installRoot:%builddir%\qbs-windows-x86-%version%" profile:qt^ config:release-64 "qbs.installRoot:%builddir%\qbs-windows-x86_64-%version%" profile:qt64 || exit /b copy /y "%builddir%\build\release\qbs.%version%.nupkg" dist || exit /b copy /y "%builddir%\build\release\qbs-windows-x86-%version%.zip" dist || exit /b copy /y "%builddir%\build\release-64\qbs-windows-x86_64-%version%.zip" dist || exit /b qbs-src-3.3.0/scripts/build-qbs-with-qbs.sh0000755000175100017510000001206115214475516020153 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2019 Richard Weickelt. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -e # # Qbs is built with the address sanitizer enabled. # Suppress findings in some parts of Qbs / dependencies. # export LSAN_OPTIONS="suppressions=$( cd "$(dirname "$0")" ; pwd -P )/address-sanitizer-suppressions.txt:print_suppressions=0" if [ -z "${QBS_BUILD_PROFILE}" ]; then QBS_BUILD_PROFILE=$(qbs config defaultProfile | cut -d: -f2 | tr -d '[:space:]') fi if [ -z "${QBS_BUILD_PROFILE}" ]; then echo "Either QBS_BUILD_PROFILE or a defaultProfile must be set." exit 1 fi # # Additional build options # BUILD_OPTIONS="\ profile:${QBS_BUILD_PROFILE} \ modules.qbsbuildconfig.enableUnitTests:true \ modules.cpp.treatWarningsAsErrors:true \ modules.qbsbuildconfig.enableBundledQt:true \ modules.cpp.separateDebugInformation:true \ ${BUILD_OPTIONS} \ config:release \ " # # Build all default products of Qbs # qbs resolve ${BUILD_OPTIONS} qbs build ${BUILD_OPTIONS} WITH_DOCS=${WITH_DOCS:-1} if [ "$WITH_DOCS" -ne 0 ]; then qbs build -p "qbs documentation" ${BUILD_OPTIONS} fi WITH_ARCHIVE=${WITH_ARCHIVE:-1} if [ "$WITH_ARCHIVE" -ne 0 ]; then qbs build -p "qbs_archive" ${BUILD_OPTIONS} fi WITH_TESTS=${WITH_TESTS:-1} if [ "$WITH_TESTS" -eq 0 ]; then exit 0 fi QMAKE_PATH=${QMAKE_PATH:-$(which qmake)} # # Set up profiles for the freshly built Qbs if not # explicitly specified otherwise # if [ -z "${QBS_AUTOTEST_PROFILE}" ]; then export QBS_AUTOTEST_PROFILE=autotestprofile export QBS_AUTOTEST_SETTINGS_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'qbs-settings'` QBS_AUTOTEST_QMAKE_PATH=${QBS_AUTOTEST_QMAKE_PATH:-${QMAKE_PATH}} RUN_OPTIONS="\ --settings-dir ${QBS_AUTOTEST_SETTINGS_DIR} \ " qbs run -p qbs_app ${BUILD_OPTIONS} -- setup-toolchains \ ${RUN_OPTIONS} \ --detect qbs run -p qbs_app ${BUILD_OPTIONS} -- setup-qt \ ${RUN_OPTIONS} \ "${QBS_AUTOTEST_QMAKE_PATH}" ${QBS_AUTOTEST_PROFILE} # Make sure that the Qt profile uses the same toolchain profile # that was used for building in case a custom QBS_BUILD_PROFILE # was set. Otherwise setup-qt automatically uses the default # toolchain profile. if [ -z "${QBS_AUTOTEST_BASE_PROFILE}" ]; then QBS_AUTOTEST_BASE_PROFILE=$(qbs config profiles.${QBS_BUILD_PROFILE}.baseProfile | cut -d: -f2) fi if [ ! -z "${QBS_AUTOTEST_BASE_PROFILE}" ]; then echo "Setting base profile for ${QBS_AUTOTEST_PROFILE} to ${QBS_AUTOTEST_BASE_PROFILE}" qbs run -p qbs_app ${BUILD_OPTIONS} -- config \ ${RUN_OPTIONS} \ profiles.${QBS_AUTOTEST_PROFILE}.baseProfile ${QBS_AUTOTEST_BASE_PROFILE} fi qbs run -p qbs_app ${BUILD_OPTIONS} -- config \ ${RUN_OPTIONS} \ --list # QBS_AUTOTEST_PROFILE has been added to the environment # which requires a resolve step qbs resolve ${BUILD_OPTIONS} fi # # Run all autotests with QBS_AUTOTEST_PROFILE. Some test cases might run for # over 10 minutes. Output an empty line every 9:50 minutes to prevent a 10min # timeout on Travis CI. # (while true; do echo "" && sleep 590; done) & trap "kill $!; wait $! 2>/dev/null || true; killall sleep || true" EXIT qbs build -p "autotest-runner" ${BUILD_OPTIONS} qbs-src-3.3.0/scripts/git-clang-format0000755000175100017510000006137215214475516017270 0ustar runnerrunner#!/usr/bin/env python3 # #===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===------------------------------------------------------------------------===# r""" clang-format git integration ============================ This file provides a clang-format integration for git. Put it somewhere in your path and ensure that it is executable. Then, "git clang-format" will invoke clang-format on the changes in current files or a specific commit. For further details, run: git clang-format -h Requires Python 2.7 or Python 3 """ from __future__ import absolute_import, division, print_function import argparse import collections import contextlib import errno import os import re import subprocess import sys usage = ('git clang-format [OPTIONS] [] [|--staged] ' '[--] [...]') desc = ''' If zero or one commits are given, run clang-format on all lines that differ between the working directory and , which defaults to HEAD. Changes are only applied to the working directory, or in the stage/index. Examples: To format staged changes, i.e everything that's been `git add`ed: git clang-format To also format everything touched in the most recent commit: git clang-format HEAD~1 If you're on a branch off main, to format everything touched on your branch: git clang-format main If two commits are given (requires --diff), run clang-format on all lines in the second that differ from the first . The following git-config settings set the default of the corresponding option: clangFormat.binary clangFormat.commit clangFormat.extensions clangFormat.style ''' # Name of the temporary index file in which save the output of clang-format. # This file is created within the .git directory. temp_index_basename = 'clang-format-index' Range = collections.namedtuple('Range', 'start, count') def main(): config = load_git_config() # In order to keep '--' yet allow options after positionals, we need to # check for '--' ourselves. (Setting nargs='*' throws away the '--', while # nargs=argparse.REMAINDER disallows options after positionals.) argv = sys.argv[1:] try: idx = argv.index('--') except ValueError: dash_dash = [] else: dash_dash = argv[idx:] argv = argv[:idx] default_extensions = ','.join([ # From clang/lib/Frontend/FrontendOptions.cpp, all lower case 'c', 'h', # C 'm', # ObjC 'mm', # ObjC++ 'cc', 'cp', 'cpp', 'c++', 'cxx', 'hh', 'hpp', 'hxx', 'inc', # C++ 'ccm', 'cppm', 'cxxm', 'c++m', # C++ Modules 'cu', 'cuh', # CUDA # Other languages that clang-format supports 'proto', 'protodevel', # Protocol Buffers 'java', # Java 'js', # JavaScript 'ts', # TypeScript 'cs', # C Sharp 'json', # Json 'sv', 'svh', 'v', 'vh', # Verilog ]) p = argparse.ArgumentParser( usage=usage, formatter_class=argparse.RawDescriptionHelpFormatter, description=desc) p.add_argument('--binary', default=config.get('clangformat.binary', 'clang-format'), help='path to clang-format'), p.add_argument('--commit', default=config.get('clangformat.commit', 'HEAD'), help='default commit to use if none is specified'), p.add_argument('--diff', action='store_true', help='print a diff instead of applying the changes') p.add_argument('--diffstat', action='store_true', help='print a diffstat instead of applying the changes') p.add_argument('--extensions', default=config.get('clangformat.extensions', default_extensions), help=('comma-separated list of file extensions to format, ' 'excluding the period and case-insensitive')), p.add_argument('-f', '--force', action='store_true', help='allow changes to unstaged files') p.add_argument('-p', '--patch', action='store_true', help='select hunks interactively') p.add_argument('-q', '--quiet', action='count', default=0, help='print less information') p.add_argument('--staged', '--cached', action='store_true', help='format lines in the stage instead of the working dir') p.add_argument('--style', default=config.get('clangformat.style', None), help='passed to clang-format'), p.add_argument('-v', '--verbose', action='count', default=0, help='print extra information') p.add_argument('--diff_from_common_commit', action='store_true', help=('diff from the last common commit for commits in ' 'separate branches rather than the exact point of the ' 'commits')) # We gather all the remaining positional arguments into 'args' since we need # to use some heuristics to determine whether or not was present. # However, to print pretty messages, we make use of metavar and help. p.add_argument('args', nargs='*', metavar='', help='revision from which to compute the diff') p.add_argument('ignored', nargs='*', metavar='...', help='if specified, only consider differences in these files') opts = p.parse_args(argv) opts.verbose -= opts.quiet del opts.quiet commits, files = interpret_args(opts.args, dash_dash, opts.commit) if len(commits) > 2: die('at most two commits allowed; %d given' % len(commits)) if len(commits) == 2: if opts.staged: die('--staged is not allowed when two commits are given') if not opts.diff: die('--diff is required when two commits are given') elif opts.diff_from_common_commit: die('--diff_from_common_commit is only allowed when two commits are given') if os.path.dirname(opts.binary): opts.binary = os.path.abspath(opts.binary) changed_lines = compute_diff_and_extract_lines(commits, files, opts.staged, opts.diff_from_common_commit) if opts.verbose >= 1: ignored_files = set(changed_lines) filter_by_extension(changed_lines, opts.extensions.lower().split(',')) # The computed diff outputs absolute paths, so we must cd before accessing # those files. cd_to_toplevel() filter_symlinks(changed_lines) if opts.verbose >= 1: ignored_files.difference_update(changed_lines) if ignored_files: print( 'Ignoring changes in the following files (wrong extension or symlink):') for filename in ignored_files: print(' %s' % filename) if changed_lines: print('Running clang-format on the following files:') for filename in changed_lines: print(' %s' % filename) if not changed_lines: if opts.verbose >= 0: print('no modified files to format') return 0 if len(commits) > 1: old_tree = commits[1] revision = old_tree elif opts.staged: old_tree = create_tree_from_index(changed_lines) revision = '' else: old_tree = create_tree_from_workdir(changed_lines) revision = None new_tree = run_clang_format_and_save_to_tree(changed_lines, revision, binary=opts.binary, style=opts.style) if opts.verbose >= 1: print('old tree: %s' % old_tree) print('new tree: %s' % new_tree) if old_tree == new_tree: if opts.verbose >= 0: print('clang-format did not modify any files') return 0 if opts.diff: return print_diff(old_tree, new_tree) if opts.diffstat: return print_diffstat(old_tree, new_tree) changed_files = apply_changes(old_tree, new_tree, force=opts.force, patch_mode=opts.patch) if (opts.verbose >= 0 and not opts.patch) or opts.verbose >= 1: print('changed files:') for filename in changed_files: print(' %s' % filename) return 1 def load_git_config(non_string_options=None): """Return the git configuration as a dictionary. All options are assumed to be strings unless in `non_string_options`, in which is a dictionary mapping option name (in lower case) to either "--bool" or "--int".""" if non_string_options is None: non_string_options = {} out = {} for entry in run('git', 'config', '--list', '--null').split('\0'): if entry: if '\n' in entry: name, value = entry.split('\n', 1) else: # A setting with no '=' ('\n' with --null) is implicitly 'true' name = entry value = 'true' if name in non_string_options: value = run('git', 'config', non_string_options[name], name) out[name] = value return out def interpret_args(args, dash_dash, default_commit): """Interpret `args` as "[commits] [--] [files]" and return (commits, files). It is assumed that "--" and everything that follows has been removed from args and placed in `dash_dash`. If "--" is present (i.e., `dash_dash` is non-empty), the arguments to its left (if present) are taken as commits. Otherwise, the arguments are checked from left to right if they are commits or files. If commits are not given, a list with `default_commit` is used.""" if dash_dash: if len(args) == 0: commits = [default_commit] else: commits = args for commit in commits: object_type = get_object_type(commit) if object_type not in ('commit', 'tag'): if object_type is None: die("'%s' is not a commit" % commit) else: die("'%s' is a %s, but a commit was expected" % (commit, object_type)) files = dash_dash[1:] elif args: commits = [] while args: if not disambiguate_revision(args[0]): break commits.append(args.pop(0)) if not commits: commits = [default_commit] files = args else: commits = [default_commit] files = [] return commits, files def disambiguate_revision(value): """Returns True if `value` is a revision, False if it is a file, or dies.""" # If `value` is ambiguous (neither a commit nor a file), the following # command will die with an appropriate error message. run('git', 'rev-parse', value, verbose=False) object_type = get_object_type(value) if object_type is None: return False if object_type in ('commit', 'tag'): return True die('`%s` is a %s, but a commit or filename was expected' % (value, object_type)) def get_object_type(value): """Returns a string description of an object's type, or None if it is not a valid git object.""" cmd = ['git', 'cat-file', '-t', value] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() if p.returncode != 0: return None return convert_string(stdout.strip()) def compute_diff_and_extract_lines(commits, files, staged, diff_common_commit): """Calls compute_diff() followed by extract_lines().""" diff_process = compute_diff(commits, files, staged, diff_common_commit) changed_lines = extract_lines(diff_process.stdout) diff_process.stdout.close() diff_process.wait() if diff_process.returncode != 0: # Assume error was already printed to stderr. sys.exit(2) return changed_lines def compute_diff(commits, files, staged, diff_common_commit): """Return a subprocess object producing the diff from `commits`. The return value's `stdin` file object will produce a patch with the differences between the working directory (or stage if --staged is used) and the first commit if a single one was specified, or the difference between both specified commits, filtered on `files` (if non-empty). Zero context lines are used in the patch.""" git_tool = 'diff-index' extra_args = [] if len(commits) == 2: git_tool = 'diff-tree' if diff_common_commit: commits = [f'{commits[0]}...{commits[1]}'] elif staged: extra_args += ['--cached'] cmd = ['git', git_tool, '-p', '-U0'] + extra_args + commits + ['--'] cmd.extend(files) p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) p.stdin.close() return p def extract_lines(patch_file): """Extract the changed lines in `patch_file`. The return value is a dictionary mapping filename to a list of (start_line, line_count) pairs. The input must have been produced with ``-U0``, meaning unidiff format with zero lines of context. The return value is a dict mapping filename to a list of line `Range`s.""" matches = {} for line in patch_file: line = convert_string(line) match = re.search(r'^\+\+\+\ [^/]+/(.*)', line) if match: filename = match.group(1).rstrip('\r\n\t') match = re.search(r'^@@ -[0-9,]+ \+(\d+)(,(\d+))?', line) if match: start_line = int(match.group(1)) line_count = 1 if match.group(3): line_count = int(match.group(3)) if line_count == 0: line_count = 1 if start_line == 0: continue matches.setdefault(filename, []).append(Range(start_line, line_count)) return matches def filter_by_extension(dictionary, allowed_extensions): """Delete every key in `dictionary` that doesn't have an allowed extension. `allowed_extensions` must be a collection of lowercase file extensions, excluding the period.""" allowed_extensions = frozenset(allowed_extensions) for filename in list(dictionary.keys()): base_ext = filename.rsplit('.', 1) if len(base_ext) == 1 and '' in allowed_extensions: continue if len(base_ext) == 1 or base_ext[1].lower() not in allowed_extensions: del dictionary[filename] def filter_symlinks(dictionary): """Delete every key in `dictionary` that is a symlink.""" for filename in list(dictionary.keys()): if os.path.islink(filename): del dictionary[filename] def cd_to_toplevel(): """Change to the top level of the git repository.""" toplevel = run('git', 'rev-parse', '--show-toplevel') os.chdir(toplevel) def create_tree_from_workdir(filenames): """Create a new git tree with the given files from the working directory. Returns the object ID (SHA-1) of the created tree.""" return create_tree(filenames, '--stdin') def create_tree_from_index(filenames): # Copy the environment, because the files have to be read from the original # index. env = os.environ.copy() def index_contents_generator(): for filename in filenames: git_ls_files_cmd = ['git', 'ls-files', '--stage', '-z', '--', filename] git_ls_files = subprocess.Popen(git_ls_files_cmd, env=env, stdin=subprocess.PIPE, stdout=subprocess.PIPE) stdout = git_ls_files.communicate()[0] yield convert_string(stdout.split(b'\0')[0]) return create_tree(index_contents_generator(), '--index-info') def run_clang_format_and_save_to_tree(changed_lines, revision=None, binary='clang-format', style=None): """Run clang-format on each file and save the result to a git tree. Returns the object ID (SHA-1) of the created tree.""" # Copy the environment when formatting the files in the index, because the # files have to be read from the original index. env = os.environ.copy() if revision == '' else None def iteritems(container): try: return container.iteritems() # Python 2 except AttributeError: return container.items() # Python 3 def index_info_generator(): for filename, line_ranges in iteritems(changed_lines): if revision is not None: if len(revision) > 0: git_metadata_cmd = ['git', 'ls-tree', '%s:%s' % (revision, os.path.dirname(filename)), os.path.basename(filename)] else: git_metadata_cmd = ['git', 'ls-files', '--stage', '--', filename] git_metadata = subprocess.Popen(git_metadata_cmd, env=env, stdin=subprocess.PIPE, stdout=subprocess.PIPE) stdout = git_metadata.communicate()[0] mode = oct(int(stdout.split()[0], 8)) else: mode = oct(os.stat(filename).st_mode) # Adjust python3 octal format so that it matches what git expects if mode.startswith('0o'): mode = '0' + mode[2:] blob_id = clang_format_to_blob(filename, line_ranges, revision=revision, binary=binary, style=style, env=env) yield '%s %s\t%s' % (mode, blob_id, filename) return create_tree(index_info_generator(), '--index-info') def create_tree(input_lines, mode): """Create a tree object from the given input. If mode is '--stdin', it must be a list of filenames. If mode is '--index-info' is must be a list of values suitable for "git update-index --index-info", such as " ". Any other mode is invalid.""" assert mode in ('--stdin', '--index-info') cmd = ['git', 'update-index', '--add', '-z', mode] with temporary_index_file(): p = subprocess.Popen(cmd, stdin=subprocess.PIPE) for line in input_lines: p.stdin.write(to_bytes('%s\0' % line)) p.stdin.close() if p.wait() != 0: die('`%s` failed' % ' '.join(cmd)) tree_id = run('git', 'write-tree') return tree_id def clang_format_to_blob(filename, line_ranges, revision=None, binary='clang-format', style=None, env=None): """Run clang-format on the given file and save the result to a git blob. Runs on the file in `revision` if not None, or on the file in the working directory if `revision` is None. Revision can be set to an empty string to run clang-format on the file in the index. Returns the object ID (SHA-1) of the created blob.""" clang_format_cmd = [binary] if style: clang_format_cmd.extend(['-style='+style]) clang_format_cmd.extend([ '-lines=%s:%s' % (start_line, start_line+line_count-1) for start_line, line_count in line_ranges]) if revision is not None: clang_format_cmd.extend(['-assume-filename='+filename]) git_show_cmd = ['git', 'cat-file', 'blob', '%s:%s' % (revision, filename)] git_show = subprocess.Popen(git_show_cmd, env=env, stdin=subprocess.PIPE, stdout=subprocess.PIPE) git_show.stdin.close() clang_format_stdin = git_show.stdout else: clang_format_cmd.extend([filename]) git_show = None clang_format_stdin = subprocess.PIPE try: clang_format = subprocess.Popen(clang_format_cmd, stdin=clang_format_stdin, stdout=subprocess.PIPE) if clang_format_stdin == subprocess.PIPE: clang_format_stdin = clang_format.stdin except OSError as e: if e.errno == errno.ENOENT: die('cannot find executable "%s"' % binary) else: raise clang_format_stdin.close() hash_object_cmd = ['git', 'hash-object', '-w', '--path='+filename, '--stdin'] hash_object = subprocess.Popen(hash_object_cmd, stdin=clang_format.stdout, stdout=subprocess.PIPE) clang_format.stdout.close() stdout = hash_object.communicate()[0] if hash_object.returncode != 0: die('`%s` failed' % ' '.join(hash_object_cmd)) if clang_format.wait() != 0: die('`%s` failed' % ' '.join(clang_format_cmd)) if git_show and git_show.wait() != 0: die('`%s` failed' % ' '.join(git_show_cmd)) return convert_string(stdout).rstrip('\r\n') @contextlib.contextmanager def temporary_index_file(tree=None): """Context manager for setting GIT_INDEX_FILE to a temporary file and deleting the file afterward.""" index_path = create_temporary_index(tree) old_index_path = os.environ.get('GIT_INDEX_FILE') os.environ['GIT_INDEX_FILE'] = index_path try: yield finally: if old_index_path is None: del os.environ['GIT_INDEX_FILE'] else: os.environ['GIT_INDEX_FILE'] = old_index_path os.remove(index_path) def create_temporary_index(tree=None): """Create a temporary index file and return the created file's path. If `tree` is not None, use that as the tree to read in. Otherwise, an empty index is created.""" gitdir = run('git', 'rev-parse', '--git-dir') path = os.path.join(gitdir, temp_index_basename) if tree is None: tree = '--empty' run('git', 'read-tree', '--index-output='+path, tree) return path def print_diff(old_tree, new_tree): """Print the diff between the two trees to stdout.""" # We use the porcelain 'diff' and not plumbing 'diff-tree' because the output # is expected to be viewed by the user, and only the former does nice things # like color and pagination. # # We also only print modified files since `new_tree` only contains the files # that were modified, so unmodified files would show as deleted without the # filter. return subprocess.run(['git', 'diff', '--diff-filter=M', '--exit-code', old_tree, new_tree]).returncode def print_diffstat(old_tree, new_tree): """Print the diffstat between the two trees to stdout.""" # We use the porcelain 'diff' and not plumbing 'diff-tree' because the output # is expected to be viewed by the user, and only the former does nice things # like color and pagination. # # We also only print modified files since `new_tree` only contains the files # that were modified, so unmodified files would show as deleted without the # filter. return subprocess.run(['git', 'diff', '--diff-filter=M', '--exit-code', '--stat', old_tree, new_tree]).returncode def apply_changes(old_tree, new_tree, force=False, patch_mode=False): """Apply the changes in `new_tree` to the working directory. Bails if there are local changes in those files and not `force`. If `patch_mode`, runs `git checkout --patch` to select hunks interactively.""" changed_files = run('git', 'diff-tree', '--diff-filter=M', '-r', '-z', '--name-only', old_tree, new_tree).rstrip('\0').split('\0') if not force: unstaged_files = run('git', 'diff-files', '--name-status', *changed_files) if unstaged_files: print('The following files would be modified but ' 'have unstaged changes:', file=sys.stderr) print(unstaged_files, file=sys.stderr) print('Please commit, stage, or stash them first.', file=sys.stderr) sys.exit(2) if patch_mode: # In patch mode, we could just as well create an index from the new tree # and checkout from that, but then the user will be presented with a # message saying "Discard ... from worktree". Instead, we use the old # tree as the index and checkout from new_tree, which gives the slightly # better message, "Apply ... to index and worktree". This is not quite # right, since it won't be applied to the user's index, but oh well. with temporary_index_file(old_tree): subprocess.run(['git', 'checkout', '--patch', new_tree], check=True) index_tree = old_tree else: with temporary_index_file(new_tree): run('git', 'checkout-index', '-f', '--', *changed_files) return changed_files def run(*args, **kwargs): stdin = kwargs.pop('stdin', '') verbose = kwargs.pop('verbose', True) strip = kwargs.pop('strip', True) for name in kwargs: raise TypeError("run() got an unexpected keyword argument '%s'" % name) p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) stdout, stderr = p.communicate(input=stdin) stdout = convert_string(stdout) stderr = convert_string(stderr) if p.returncode == 0: if stderr: if verbose: print('`%s` printed to stderr:' % ' '.join(args), file=sys.stderr) print(stderr.rstrip(), file=sys.stderr) if strip: stdout = stdout.rstrip('\r\n') return stdout if verbose: print('`%s` returned %s' % (' '.join(args), p.returncode), file=sys.stderr) if stderr: print(stderr.rstrip(), file=sys.stderr) sys.exit(2) def die(message): print('error:', message, file=sys.stderr) sys.exit(2) def to_bytes(str_input): # Encode to UTF-8 to get binary data. if isinstance(str_input, bytes): return str_input return str_input.encode('utf-8') def to_string(bytes_input): if isinstance(bytes_input, str): return bytes_input return bytes_input.encode('utf-8') def convert_string(bytes_input): try: return to_string(bytes_input.decode('utf-8')) except AttributeError: # 'str' object has no attribute 'decode'. return str(bytes_input) except UnicodeError: return str(bytes_input) if __name__ == '__main__': sys.exit(main()) qbs-src-3.3.0/scripts/make-release-archives.sh0000755000175100017510000000424015214475516020672 0ustar runnerrunner#!/bin/sh set -e ############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# test $# -eq 1 || { echo "Usage: $(basename "$0") " >&2; exit 1; } tag=${1} version=${tag#v} dir_name=qbs-src-${version} git archive --format=tar.gz "--prefix=${dir_name}/" -o "dist/${dir_name}.tar.gz" "${tag}" git archive --format=zip "--prefix=${dir_name}/" -o "dist/${dir_name}.zip" "${tag}" qbs-src-3.3.0/scripts/address-sanitizer-suppressions.txt0000644000175100017510000000012415214475516023142 0ustar runnerrunnerleak:QThread::QThread leak:QThreadPrivate::QThreadPrivate leak:QArrayData::allocate qbs-src-3.3.0/scripts/install-ow.sh0000755000175100017510000000756615214475516016644 0ustar runnerrunner#!/usr/bin/env bash ############################################################################# ## ## Copyright (C) 2022 Denis Shienkov ## Contact: https://www.qt.io/licensing/ ## ## This file is part of Qbs. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance with the commercial license agreement provided with the ## Software or, alternatively, in accordance with the terms contained in ## a written agreement between you and The Qt Company. For licensing terms ## and conditions see https://www.qt.io/terms-conditions. For further ## information use the contact form at https://www.qt.io/contact-us. ## ## GNU Lesser General Public License Usage ## Alternatively, this file may be used under the terms of the GNU Lesser ## General Public License version 3 as published by the Free Software ## Foundation and appearing in the file LICENSE.LGPL3 included in the ## packaging of this file. Please review the following information to ## ensure the GNU Lesser General Public License version 3 requirements ## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ## ## GNU General Public License Usage ## Alternatively, this file may be used under the terms of the GNU ## General Public License version 2.0 or (at your option) the GNU General ## Public license version 3 or any later version approved by the KDE Free ## Qt Foundation. The licenses are as published by the Free Software ## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ## included in the packaging of this file. Please review the following ## information to ensure the GNU General Public License requirements will ## be met: https://www.gnu.org/licenses/gpl-2.0.html and ## https://www.gnu.org/licenses/gpl-3.0.html. ## ## $QT_END_LICENSE$ ## ############################################################################# set -eu set -o pipefail function show_help() { cat < Root directory where to install the components. Maps to c:/watcom on Windows, /opt/watcom on Linux by default. --version The desired toolchain version. Currently supported only 2.0 version. EOF } VERSION=2.0 INSTALL_DIR= BIN_DIR= if [[ "$OSTYPE" =~ "linux" ]]; then INSTALL_DIR="/opt/watcom" if [[ "$HOSTTYPE" == "x86_64" ]]; then BIN_DIR="binl64" elif [[ "$HOSTTYPE" == "x86" ]]; then BIN_DIR="binl" fi elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then INSTALL_DIR="/c/watcom" if [[ "$HOSTTYPE" == "x86_64" ]]; then BIN_DIR="binnt64" elif [[ "$HOSTTYPE" == "x86" ]]; then BIN_DIR="binnt" fi fi while [ $# -gt 0 ]; do case "$1" in --directory|-d) INSTALL_DIR="$2" shift ;; --version) VERSION="$2" shift ;; --help|-h) show_help exit 0 ;; *) ;; esac shift done if [ -z "${INSTALL_DIR}" ]; then echo "No --directory specified or auto-detection failed." >&2 exit 1 fi if [ -z "${VERSION}" ]; then echo "No --version specified." >&2 exit 1 fi DOWNLOAD_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'ow-tmp'` VERSION_MAJOR=`echo $VERSION | cut -d. -f1` VERSION_MINOR=`echo $VERSION | cut -d. -f2` OW_URL="https://github.com/open-watcom/open-watcom-v${VERSION_MAJOR}/releases/download/Current-build/ow-snapshot.tar.xz" OW_TAR="${DOWNLOAD_DIR}/ow.tar.xz" echo "Downloading compiler from ${OW_URL}..." >&2 curl --progress-bar -L -o ${OW_TAR} ${OW_URL} >&2 echo "Unpacking compiler to ${INSTALL_DIR}..." >&2 7z x "${OW_TAR}" -so | 7z x -aoa -si -ttar -o"${INSTALL_DIR}" >/dev/null 2>&1 echo "${INSTALL_DIR}/${BIN_DIR}" rm -f ${OW_TAR} qbs-src-3.3.0/.clang-format0000644000175100017510000000636115214475516015070 0ustar runnerrunner# .clang-format for Qbs # based on https://github.com/qt-creator/qt-creator/blob/v12.0.1/.clang-format # # This is for clang-format >= 5.0. # # Use ../../tests/clang-format-test/clang-format-test.cpp for documenting problems # or testing changes. # --- Language: Cpp AccessModifierOffset: -4 AlignAfterOpenBracket: AlwaysBreak AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlines: DontAlign AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: Yes BinPackArguments: false BinPackParameters: false BraceWrapping: AfterClass: true AfterControlStatement: Never AfterEnum: false AfterFunction: true AfterNamespace: false AfterObjCDeclaration: false AfterStruct: true AfterUnion: false BeforeCatch: false BeforeElse: false IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false BreakBeforeBinaryOperators: All BreakBeforeBraces: Custom BreakBeforeInheritanceComma: false BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false BreakConstructorInitializers: BeforeComma BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true ColumnLimit: 100 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true ForEachMacros: - forever # avoids { wrapped to next line - foreach - Q_FOREACH - BOOST_FOREACH IncludeCategories: - Regex: '^