diff --git a/mingw-w64-qt-creator/PKGBUILD b/mingw-w64-qt-creator/PKGBUILD index 808860e81e..8638a615aa 100644 --- a/mingw-w64-qt-creator/PKGBUILD +++ b/mingw-w64-qt-creator/PKGBUILD @@ -7,25 +7,21 @@ pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" __pre= _base_ver=4.15.2 pkgver=${_base_ver}${_pre} -pkgrel=2 +pkgrel=3 pkgdesc='Cross-platform IDE (mingw-w64)' url='https://www.qt.io/' -install=qt-creator-${CARCH}.install +install=qt-creator-${MSYSTEM}.install arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') license=('GPL3') -depends=("${MINGW_PACKAGE_PREFIX}-qt5-tools" +depends=("${MINGW_PACKAGE_PREFIX}-qt5-declarative" + "${MINGW_PACKAGE_PREFIX}-qt5-tools" "${MINGW_PACKAGE_PREFIX}-qt5-svg" "${MINGW_PACKAGE_PREFIX}-qt5-quick3d" "${MINGW_PACKAGE_PREFIX}-qt5-quickcontrols" - "${MINGW_PACKAGE_PREFIX}-qt5-quickcontrols2" "${MINGW_PACKAGE_PREFIX}-qt5-serialport" - "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-make" "${MINGW_PACKAGE_PREFIX}-qbs") -makedepends=("${MINGW_PACKAGE_PREFIX}-clang" - "${MINGW_PACKAGE_PREFIX}-cmake") -options=('docs' 'staticlibs') # 'debug' '!strip') optdepends=("${MINGW_PACKAGE_PREFIX}-gdb: for the debugger" "${MINGW_PACKAGE_PREFIX}-cmake: for cmake project support" "${MINGW_PACKAGE_PREFIX}-clang: for clang code model" @@ -34,6 +30,9 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-gdb: for the debugger" #'mercurial: for mercurial support' #'bzr: for bazaar support' ) +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-clang") +options=('docs' 'staticlibs') # 'debug' '!strip') _pkgfqn="${_realname}-opensource-src-${_base_ver}${__pre}" source=(#https://download.qt.io/development_releases/qtcreator/${_base_ver%.*}/${_base_ver}${__pre}/${_pkgfqn}.tar.xz https://download.qt.io/official_releases/qtcreator/${pkgver%.*}/${pkgver}/${_pkgfqn}.tar.xz diff --git a/mingw-w64-qt-creator/qt-creator-CLANG32.install b/mingw-w64-qt-creator/qt-creator-CLANG32.install new file mode 100644 index 0000000000..6a0182b95e --- /dev/null +++ b/mingw-w64-qt-creator/qt-creator-CLANG32.install @@ -0,0 +1,144 @@ +post_install() { + local _msys2_machine + local _mingw_variant_c + local _mingw_variant_cxx + local _mingw_variant_arch + local _mingw_variant_bit + + if [ -f "clang32/bin/sdktool.exe" ]; then + + cd clang32/bin + + if [ -f "/usr/bin/gcc.exe" ]; then + # Add the MSYS2 toolchain. + _msys2_machine=$(/usr/bin/gcc.exe -dumpmachine) + if [ "${_msys2_machine}" = "x86_64-pc-msys" ]; then + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" \ + "--language" "1" \ + "--name" "MSYS2 64bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" \ + "--language" "2" \ + "--name" "MSYS2 64bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + else + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" \ + "--language" "1" \ + "--name" "MSYS2 32bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" \ + "--language" "2" \ + "--name" "MSYS2 32bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + fi + fi + + # Add MinGW-w64 toolchains. Don't check for existence since + # the user may add toolchains after Qt Creator. + for _mingw_variant in "MINGW64" "CLANG64" "UCRT64" "MINGW32" "CLANG32"; do + + if [ "${_mingw_variant}" = "MINGW64" -o "${_mingw_variant}" = "UCRT64" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "CLANG64" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "MINGW32" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + elif [ "${_mingw_variant}" = "CLANG32" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + fi + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}" > /dev/null 2>&1 || true + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--language" "1" \ + "--name" "MinGW-w64 ${_mingw_variant} C Compiler (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_c}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--language" "2" \ + "--name" "MinGW-w64 ${_mingw_variant} C++ Compiler (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_cxx}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addDebugger \ + "--id" "MinGW.w64.GDB_${_mingw_variant}" \ + "--name" "MinGW-w64 ${_mingw_variant} GDB (${_mingw_variant_bit})" \ + "--engine" "1" \ + "--binary" "/${_mingw_variant,,}/bin/gdb.exe" \ + "--abis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmCMake "--id" "MinGW.w64.CMake_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addCMake \ + "--id" "MinGW.w64.CMake_${_mingw_variant}" \ + "--name" "MinGW-w64 ${_mingw_variant} CMake (${_mingw_variant_bit})" \ + "--path" "/${_mingw_variant,,}/bin/cmake.exe" + + ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64_${_mingw_variant}=" > /dev/null 2>&1 || true + ./sdktool.exe addQt \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--name" "Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--type" "Qt4ProjectManager.QtVersion.Desktop" \ + "--qmake" "/${_mingw_variant,,}/bin/qmake.exe" + + ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" > /dev/null 2>&1 || true + ./sdktool.exe addKit \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" \ + "--name" "Desktop Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--Ctoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--Cxxtoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--qt" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--debuggerid" "MinGW.w64.GDB_${_mingw_variant}" \ + "--cmake" "MinGW.w64.CMake_${_mingw_variant}" \ + "--devicetype" "Desktop" + + done + + cd - + fi +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qt-creator/qt-creator-CLANG64.install b/mingw-w64-qt-creator/qt-creator-CLANG64.install new file mode 100644 index 0000000000..417b154fb7 --- /dev/null +++ b/mingw-w64-qt-creator/qt-creator-CLANG64.install @@ -0,0 +1,143 @@ +post_install() { + local _msys2_machine + local _mingw_variant_c + local _mingw_variant_cxx + local _mingw_variant_arch + local _mingw_variant_bit + + if [ -f "clang64/bin/sdktool.exe" ]; then + + cd clang64/bin + + if [ -f "/usr/bin/gcc.exe" ]; then + # Add the MSYS2 toolchain. + _msys2_machine=$(/usr/bin/gcc.exe -dumpmachine) + if [ "${_msys2_machine}" = "x86_64-pc-msys" ]; then + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" \ + "--language" "1" \ + "--name" "MSYS2 64bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" \ + "--language" "2" \ + "--name" "MSYS2 64bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + else + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" \ + "--language" "1" \ + "--name" "MSYS2 32bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" \ + "--language" "2" \ + "--name" "MSYS2 32bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + fi + fi + + # Add MinGW-w64 toolchains. Don't check for existence since + # the user may add toolchains after Qt Creator. + for _mingw_variant in "MINGW64" "CLANG64" "UCRT64" "MINGW32" "CLANG32"; do + + if [ "${_mingw_variant}" = "MINGW64" -o "${_mingw_variant}" = "UCRT64" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "CLANG64" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "MINGW32" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + elif [ "${_mingw_variant}" = "CLANG32" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + fi + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}" > /dev/null 2>&1 || true + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--language" "1" \ + "--name" "MinGW-w64 ${_mingw_variant} C (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_c}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--language" "2" \ + "--name" "MinGW-w64 ${_mingw_variant} C++ (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_cxx}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addDebugger \ + "--id" "MinGW.w64.GDB_${_mingw_variant}" \ + "--name" "MinGW-w64 GDB (${_mingw_variant})" \ + "--engine" "1" \ + "--binary" "/${_mingw_variant,,}/bin/gdb.exe" \ + "--abis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmCMake "--id" "MinGW.w64.CMake_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addCMake \ + "--id" "MinGW.w64.CMake_${_mingw_variant}" \ + "--name" "MinGW-w64 CMake (${_mingw_variant})" \ + "--path" "/${_mingw_variant,,}/bin/cmake.exe" + + ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64_${_mingw_variant}=" > /dev/null 2>&1 || true + ./sdktool.exe addQt \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--name" "Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--type" "Qt4ProjectManager.QtVersion.Desktop" \ + "--qmake" "/${_mingw_variant,,}/bin/qmake.exe" + + ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" > /dev/null 2>&1 || true + ./sdktool.exe addKit \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" \ + "--name" "Desktop Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--Ctoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--Cxxtoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--qt" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--debuggerid" "MinGW.w64.GDB_${_mingw_variant}" \ + "--devicetype" "Desktop" + + done + + cd - + fi +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qt-creator/qt-creator-MINGW32.install b/mingw-w64-qt-creator/qt-creator-MINGW32.install new file mode 100644 index 0000000000..71635b0223 --- /dev/null +++ b/mingw-w64-qt-creator/qt-creator-MINGW32.install @@ -0,0 +1,143 @@ +post_install() { + local _msys2_machine + local _mingw_variant_c + local _mingw_variant_cxx + local _mingw_variant_arch + local _mingw_variant_bit + + if [ -f "mingw32/bin/sdktool.exe" ]; then + + cd mingw32/bin + + if [ -f "/usr/bin/gcc.exe" ]; then + # Add the MSYS2 toolchain. + _msys2_machine=$(/usr/bin/gcc.exe -dumpmachine) + if [ "${_msys2_machine}" = "x86_64-pc-msys" ]; then + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" \ + "--language" "1" \ + "--name" "MSYS2 64bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" \ + "--language" "2" \ + "--name" "MSYS2 64bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + else + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" \ + "--language" "1" \ + "--name" "MSYS2 32bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" \ + "--language" "2" \ + "--name" "MSYS2 32bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + fi + fi + + # Add MinGW-w64 toolchains. Don't check for existence since + # the user may add toolchains after Qt Creator. + for _mingw_variant in "MINGW64" "CLANG64" "UCRT64" "MINGW32" "CLANG32"; do + + if [ "${_mingw_variant}" = "MINGW64" -o "${_mingw_variant}" = "UCRT64" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "CLANG64" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "MINGW32" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + elif [ "${_mingw_variant}" = "CLANG32" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + fi + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}" > /dev/null 2>&1 || true + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--language" "1" \ + "--name" "MinGW-w64 ${_mingw_variant} C (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_c}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--language" "2" \ + "--name" "MinGW-w64 ${_mingw_variant} C++ (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_cxx}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addDebugger \ + "--id" "MinGW.w64.GDB_${_mingw_variant}" \ + "--name" "MinGW-w64 GDB (${_mingw_variant})" \ + "--engine" "1" \ + "--binary" "/${_mingw_variant,,}/bin/gdb.exe" \ + "--abis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmCMake "--id" "MinGW.w64.CMake_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addCMake \ + "--id" "MinGW.w64.CMake_${_mingw_variant}" \ + "--name" "MinGW-w64 CMake (${_mingw_variant})" \ + "--path" "/${_mingw_variant,,}/bin/cmake.exe" + + ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64_${_mingw_variant}=" > /dev/null 2>&1 || true + ./sdktool.exe addQt \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--name" "Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--type" "Qt4ProjectManager.QtVersion.Desktop" \ + "--qmake" "/${_mingw_variant,,}/bin/qmake.exe" + + ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" > /dev/null 2>&1 || true + ./sdktool.exe addKit \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" \ + "--name" "Desktop Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--Ctoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--Cxxtoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--qt" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--debuggerid" "MinGW.w64.GDB_${_mingw_variant}" \ + "--devicetype" "Desktop" + + done + + cd - + fi +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qt-creator/qt-creator-MINGW64.install b/mingw-w64-qt-creator/qt-creator-MINGW64.install new file mode 100644 index 0000000000..e5fce26470 --- /dev/null +++ b/mingw-w64-qt-creator/qt-creator-MINGW64.install @@ -0,0 +1,143 @@ +post_install() { + local _msys2_machine + local _mingw_variant_c + local _mingw_variant_cxx + local _mingw_variant_arch + local _mingw_variant_bit + + if [ -f "mingw64/bin/sdktool.exe" ]; then + + cd mingw64/bin + + if [ -f "/usr/bin/gcc.exe" ]; then + # Add the MSYS2 toolchain. + _msys2_machine=$(/usr/bin/gcc.exe -dumpmachine) + if [ "${_msys2_machine}" = "x86_64-pc-msys" ]; then + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" \ + "--language" "1" \ + "--name" "MSYS2 64bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" \ + "--language" "2" \ + "--name" "MSYS2 64bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + else + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" \ + "--language" "1" \ + "--name" "MSYS2 32bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" \ + "--language" "2" \ + "--name" "MSYS2 32bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + fi + fi + + # Add MinGW-w64 toolchains. Don't check for existence since + # the user may add toolchains after Qt Creator. + for _mingw_variant in "MINGW64" "CLANG64" "UCRT64" "MINGW32" "CLANG32"; do + + if [ "${_mingw_variant}" = "MINGW64" -o "${_mingw_variant}" = "UCRT64" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "CLANG64" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "MINGW32" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + elif [ "${_mingw_variant}" = "CLANG32" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + fi + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}" > /dev/null 2>&1 || true + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--language" "1" \ + "--name" "MinGW-w64 ${_mingw_variant} C (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_c}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--language" "2" \ + "--name" "MinGW-w64 ${_mingw_variant} C++ (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_cxx}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addDebugger \ + "--id" "MinGW.w64.GDB_${_mingw_variant}" \ + "--name" "MinGW-w64 GDB (${_mingw_variant})" \ + "--engine" "1" \ + "--binary" "/${_mingw_variant,,}/bin/gdb.exe" \ + "--abis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmCMake "--id" "MinGW.w64.CMake_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addCMake \ + "--id" "MinGW.w64.CMake_${_mingw_variant}" \ + "--name" "MinGW-w64 CMake (${_mingw_variant})" \ + "--path" "/${_mingw_variant,,}/bin/cmake.exe" + + ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64_${_mingw_variant}=" > /dev/null 2>&1 || true + ./sdktool.exe addQt \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--name" "Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--type" "Qt4ProjectManager.QtVersion.Desktop" \ + "--qmake" "/${_mingw_variant,,}/bin/qmake.exe" + + ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" > /dev/null 2>&1 || true + ./sdktool.exe addKit \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" \ + "--name" "Desktop Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--Ctoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--Cxxtoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--qt" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--debuggerid" "MinGW.w64.GDB_${_mingw_variant}" \ + "--devicetype" "Desktop" + + done + + cd - + fi +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qt-creator/qt-creator-UCRT64.install b/mingw-w64-qt-creator/qt-creator-UCRT64.install new file mode 100644 index 0000000000..d86313639d --- /dev/null +++ b/mingw-w64-qt-creator/qt-creator-UCRT64.install @@ -0,0 +1,143 @@ +post_install() { + local _msys2_machine + local _mingw_variant_c + local _mingw_variant_cxx + local _mingw_variant_arch + local _mingw_variant_bit + + if [ -f "ucrt64/bin/sdktool.exe" ]; then + + cd ucrt64/bin + + if [ -f "/usr/bin/gcc.exe" ]; then + # Add the MSYS2 toolchain. + _msys2_machine=$(/usr/bin/gcc.exe -dumpmachine) + if [ "${_msys2_machine}" = "x86_64-pc-msys" ]; then + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" \ + "--language" "1" \ + "--name" "MSYS2 64bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" \ + "--language" "2" \ + "--name" "MSYS2 64bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-64bit" \ + "--supportedAbis" "x86-windows-msys-pe-64bit" + else + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" > /dev/null 2>&1 || true + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" > /dev/null 2>&1 || true + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" \ + "--language" "1" \ + "--name" "MSYS2 32bit GCC (MSYS2)" \ + "--path" "/usr/bin/gcc.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" \ + "--language" "2" \ + "--name" "MSYS2 32bit G++ (MSYS2)" \ + "--path" "/usr/bin/g++.exe" \ + "--abi" "x86-windows-msys-pe-32bit" \ + "--supportedAbis" "x86-windows-msys-pe-32bit" + fi + fi + + # Add MinGW-w64 toolchains. Don't check for existence since + # the user may add toolchains after Qt Creator. + for _mingw_variant in "MINGW64" "CLANG64" "UCRT64" "MINGW32" "CLANG32"; do + + if [ "${_mingw_variant}" = "MINGW64" -o "${_mingw_variant}" = "UCRT64" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "CLANG64" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="64bit" + elif [ "${_mingw_variant}" = "MINGW32" ]; then + _mingw_variant_c="gcc" + _mingw_variant_cxx="g++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + elif [ "${_mingw_variant}" = "CLANG32" ]; then + _mingw_variant_c="clang" + _mingw_variant_cxx="clang++" + _mingw_variant_arch="x86" + _mingw_variant_bit="32bit" + fi + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}" > /dev/null 2>&1 || true + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--language" "1" \ + "--name" "MinGW-w64 ${_mingw_variant} C (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_c}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" > /dev/null 2>&1 || true + ./sdktool.exe addTC \ + "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--language" "2" \ + "--name" "MinGW-w64 ${_mingw_variant} C++ (MSYS2)" \ + "--path" "/${_mingw_variant,,}/bin/${_mingw_variant_cxx}.exe" \ + "--abi" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" \ + "--supportedAbis" "${_mingw_variant}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addDebugger \ + "--id" "MinGW.w64.GDB_${_mingw_variant}" \ + "--name" "MinGW-w64 GDB (${_mingw_variant})" \ + "--engine" "1" \ + "--binary" "/${_mingw_variant,,}/bin/gdb.exe" \ + "--abis" "${_mingw_variant_arch}-windows-msys-pe-${_mingw_variant_bit}" + + ./sdktool.exe rmCMake "--id" "MinGW.w64.CMake_${_mingw_variant}" > /dev/null 2>&1 || true + ./sdktool.exe addCMake \ + "--id" "MinGW.w64.CMake_${_mingw_variant}" \ + "--name" "MinGW-w64 CMake (${_mingw_variant})" \ + "--path" "/${_mingw_variant,,}/bin/cmake.exe" + + ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64_${_mingw_variant}=" > /dev/null 2>&1 || true + ./sdktool.exe addQt \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--name" "Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--type" "Qt4ProjectManager.QtVersion.Desktop" \ + "--qmake" "/${_mingw_variant,,}/bin/qmake.exe" + + ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" > /dev/null 2>&1 || true + ./sdktool.exe addKit \ + "--id" "qt.M2_MinGW-w64_${_mingw_variant}_kit" \ + "--name" "Desktop Qt MinGW-w64 ${_mingw_variant} (MSYS2)" \ + "--Ctoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_C" \ + "--Cxxtoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_${_mingw_variant}_CXX" \ + "--qt" "qt.M2_MinGW-w64_${_mingw_variant}" \ + "--debuggerid" "MinGW.w64.GDB_${_mingw_variant}" \ + "--devicetype" "Desktop" + + done + + cd - + fi +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-qt-creator/qt-creator-i686.install b/mingw-w64-qt-creator/qt-creator-i686.install deleted file mode 100644 index f3a7a3bfa8..0000000000 --- a/mingw-w64-qt-creator/qt-creator-i686.install +++ /dev/null @@ -1,174 +0,0 @@ -post_install() { - local _msys2_machine - local _library_variant_suffix - local _library_variant_idsuffix - local _library_variant_prefix - local _mingw_variant_suffix - local _mingw_variant_idsuffix - - if [ -f "mingw32/bin/sdktool.exe" ]; then - - cd mingw32/bin - - # Delete old debuggers.xml since it will suffer from the - # problem fixed by https://codereview.qt-project.org/#/c/94248/ - # This can be removed after a few releases as it will remove - # any debuggers added by the user. - [ -f "$APPDATA"/QtProject/qtcreator/debuggers.xml ] && rm -rf "$APPDATA"/QtProject/qtcreator/debuggers.xml > /dev/null 2>&1 || true - - if [ -f "/usr/bin/gcc.exe" ]; then - # Add the MSYS2 toolchain. - _msys2_machine=$(/usr/bin/gcc.exe -dumpmachine) - if [ "${_msys2_machine}" = "x86_64-pc-msys" ]; then - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" \ - "--language" "1" \ - "--name" "MSYS2 64bit GCC (MSYS2)" \ - "--path" "/usr/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" \ - "--language" "2" \ - "--name" "MSYS2 64bit G++ (MSYS2)" \ - "--path" "/usr/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - else - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" \ - "--language" "1" \ - "--name" "MSYS2 32bit GCC (MSYS2)" \ - "--path" "/usr/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" \ - "--language" "2" \ - "--name" "MSYS2 32bit G++ (MSYS2)" \ - "--path" "/usr/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - fi - fi - - # Add MinGW-w64 toolchains. Don't check for existence since - # the user may add toolchains after Qt Creator. - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_C" \ - "--language" "1" \ - "--name" "MinGW-w64 64bit GCC (MSYS2)" \ - "--path" "/mingw64/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_CXX" \ - "--language" "2" \ - "--name" "MinGW-w64 64bit G++ (MSYS2)" \ - "--path" "/mingw64/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_C" \ - "--language" "1" \ - "--name" "MinGW-w64 32bit GCC (MSYS2)" \ - "--path" "/mingw32/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_CXX" \ - "--language" "2" \ - "--name" "MinGW-w64 32bit G++ (MSYS2)" \ - "--path" "/mingw32/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_i686" > /dev/null 2>&1 || true - ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_x86_64" > /dev/null 2>&1 || true - - ./sdktool.exe addDebugger \ - "--id" "MinGW.w64.GDB_i686" \ - "--name" "MinGW-w64 GDB (32bit)" \ - "--engine" "1" \ - "--binary" "/mingw32/bin/gdb.exe" \ - "--abis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe addDebugger \ - "--id" "MinGW.w64.GDB_x86_64" \ - "--name" "MinGW-w64 GDB (64bit)" \ - "--engine" "1" \ - "--binary" "/mingw64/bin/gdb.exe" \ - "--abis" "x86-windows-msys-pe-64bit" - - # Same with Qt. Add both 32 and 64bit, static and non-static. - for _library_variant in "shared" "static"; do - - if [ "${_library_variant}" = "shared" ]; then - _library_variant_suffix="" - _library_variant_idsuffix="" - _library_variant_prefix="" - else - _library_variant_suffix=" (static)" - _library_variant_idsuffix="_static" - _library_variant_prefix="/qt5-static" - fi - - for _mingw_variant in "mingw32" "mingw64"; do - - if [ "${_mingw_variant}" = "mingw32" ]; then - _mingw_variant_suffix=" 32bit" - _mingw_variant_idsuffix="_i686" - else - _mingw_variant_suffix=" 64bit" - _mingw_variant_idsuffix="_x86_64" - fi - - ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" > /dev/null 2>&1 || true - ./sdktool.exe addQt \ - "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ - "--name" "Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ - "--type" "Qt4ProjectManager.QtVersion.Desktop" \ - "--qmake" "/${_mingw_variant}${_library_variant_prefix}/bin/qmake.exe" - - ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" > /dev/null 2>&1 || true - ./sdktool.exe addKit \ - "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" \ - "--name" "Desktop Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ - "--Ctoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64${_mingw_variant_idsuffix}_C" \ - "--Cxxtoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64${_mingw_variant_idsuffix}_CXX" \ - "--qt" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ - "--debuggerid" "MinGW.w64.GDB${_mingw_variant_idsuffix}" \ - "--devicetype" "Desktop" - - done - - done - - cd - - fi -} - -post_upgrade() { - post_install -} diff --git a/mingw-w64-qt-creator/qt-creator-x86_64.install b/mingw-w64-qt-creator/qt-creator-x86_64.install deleted file mode 100644 index 5ffb2c2edb..0000000000 --- a/mingw-w64-qt-creator/qt-creator-x86_64.install +++ /dev/null @@ -1,174 +0,0 @@ -post_install() { - local _msys2_machine - local _library_variant_suffix - local _library_variant_idsuffix - local _library_variant_prefix - local _mingw_variant_suffix - local _mingw_variant_idsuffix - - if [ -f "mingw64/bin/sdktool.exe" ]; then - - cd mingw64/bin - - # Delete old debuggers.xml since it will suffer from the - # problem fixed by https://codereview.qt-project.org/#/c/94248/ - # This can be removed after a few releases as it will remove - # any debuggers added by the user. - [ -f "$APPDATA"/QtProject/qtcreator/debuggers.xml ] && rm -rf "$APPDATA"/QtProject/qtcreator/debuggers.xml > /dev/null 2>&1 || true - - if [ -f "/usr/bin/gcc.exe" ]; then - # Add the MSYS2 toolchain. - _msys2_machine=$(/usr/bin/gcc.exe -dumpmachine) - if [ "${_msys2_machine}" = "x86_64-pc-msys" ]; then - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_C" \ - "--language" "1" \ - "--name" "MSYS2 64bit GCC (MSYS2)" \ - "--path" "/usr/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_x86_64_CXX" \ - "--language" "2" \ - "--name" "MSYS2 64bit G++ (MSYS2)" \ - "--path" "/usr/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - else - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_C" \ - "--language" "1" \ - "--name" "MSYS2 32bit GCC (MSYS2)" \ - "--path" "/usr/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MSYS2_i686_CXX" \ - "--language" "2" \ - "--name" "MSYS2 32bit G++ (MSYS2)" \ - "--path" "/usr/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - fi - fi - - # Add MinGW-w64 toolchains. Don't check for existence since - # the user may add toolchains after Qt Creator. - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_C" \ - "--language" "1" \ - "--name" "MinGW-w64 64bit GCC (MSYS2)" \ - "--path" "/mingw64/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_x86_64_CXX" \ - "--language" "2" \ - "--name" "MinGW-w64 64bit G++ (MSYS2)" \ - "--path" "/mingw64/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-64bit" \ - "--supportedAbis" "x86-windows-msys-pe-64bit" - - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_C" > /dev/null 2>&1 || true - ./sdktool.exe rmTC "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_CXX" > /dev/null 2>&1 || true - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_C" \ - "--language" "1" \ - "--name" "MinGW-w64 32bit GCC (MSYS2)" \ - "--path" "/mingw32/bin/gcc.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe addTC \ - "--id" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64_i686_CXX" \ - "--language" "2" \ - "--name" "MinGW-w64 32bit G++ (MSYS2)" \ - "--path" "/mingw32/bin/g++.exe" \ - "--abi" "x86-windows-msys-pe-32bit" \ - "--supportedAbis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_i686" > /dev/null 2>&1 || true - ./sdktool.exe rmDebugger "--id" "MinGW.w64.GDB_x86_64" > /dev/null 2>&1 || true - - ./sdktool.exe addDebugger \ - "--id" "MinGW.w64.GDB_i686" \ - "--name" "MinGW-w64 GDB (32bit)" \ - "--engine" "1" \ - "--binary" "/mingw32/bin/gdb.exe" \ - "--abis" "x86-windows-msys-pe-32bit" - - ./sdktool.exe addDebugger \ - "--id" "MinGW.w64.GDB_x86_64" \ - "--name" "MinGW-w64 GDB (64bit)" \ - "--engine" "1" \ - "--binary" "/mingw64/bin/gdb.exe" \ - "--abis" "x86-windows-msys-pe-64bit" - - # Same with Qt. Add both 32 and 64bit, static and non-static. - for _library_variant in "shared" "static"; do - - if [ "${_library_variant}" = "shared" ]; then - _library_variant_suffix="" - _library_variant_idsuffix="" - _library_variant_prefix="" - else - _library_variant_suffix=" (static)" - _library_variant_idsuffix="_static" - _library_variant_prefix="/qt5-static" - fi - - for _mingw_variant in "mingw32" "mingw64"; do - - if [ "${_mingw_variant}" = "mingw32" ]; then - _mingw_variant_suffix=" 32bit" - _mingw_variant_idsuffix="_i686" - else - _mingw_variant_suffix=" 64bit" - _mingw_variant_idsuffix="_x86_64" - fi - - ./sdktool.exe rmQt "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" > /dev/null 2>&1 || true - ./sdktool.exe addQt \ - "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ - "--name" "Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ - "--type" "Qt4ProjectManager.QtVersion.Desktop" \ - "--qmake" "/${_mingw_variant}${_library_variant_prefix}/bin/qmake.exe" - - ./sdktool.exe rmKit "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" > /dev/null 2>&1 || true - ./sdktool.exe addKit \ - "--id" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}_kit" \ - "--name" "Desktop Qt ${_library_variant_suffix} MinGW-w64${_mingw_variant_suffix} (MSYS2)" \ - "--Ctoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64${_mingw_variant_idsuffix}_C" \ - "--Cxxtoolchain" "ProjectExplorer.ToolChain.Mingw:M2_MinGW-w64${_mingw_variant_idsuffix}_CXX" \ - "--qt" "qt.M2_MinGW-w64${_mingw_variant_idsuffix}${_library_variant_idsuffix}" \ - "--debuggerid" "MinGW.w64.GDB${_mingw_variant_idsuffix}" \ - "--devicetype" "Desktop" - - done - - done - - cd - - fi -} - -post_upgrade() { - post_install -}