From 1c75d895fc97fce79c501047ed65b37fce9a0847 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Sat, 11 Nov 2023 11:52:11 -0800 Subject: [PATCH] build: Block qt.mirror.constant.com as a Qt download mirror. (#7148) --- CMakeModules/DownloadExternals.cmake | 7 +++++-- CMakeModules/aqt_config.ini | 29 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 CMakeModules/aqt_config.ini diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index c7abe8e528..706102a339 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -1,4 +1,6 @@ +set(CURRENT_MODULE_DIR ${CMAKE_CURRENT_LIST_DIR}) + # This function downloads Qt using aqt. The path of the downloaded content will be added to the CMAKE_PREFIX_PATH. # Params: # target: Qt dependency to install. Specify a version number to download Qt, or "tools_(name)" for a specific build tool. @@ -52,16 +54,17 @@ function(download_qt target) get_external_prefix(qt base_path) file(MAKE_DIRECTORY "${base_path}") + set(install_args -c "${CURRENT_MODULE_DIR}/aqt_config.ini") if (DOWNLOAD_QT_TOOL) set(prefix "${base_path}/Tools") - set(install_args install-tool --outputdir ${base_path} ${host} desktop ${target}) + set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target}) else() set(prefix "${base_path}/${target}/${arch_path}") if (host_arch_path) set(host_flag "--autodesktop") set(host_prefix "${base_path}/${target}/${host_arch_path}") endif() - set(install_args install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} ${host_flag} + set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} ${host_flag} -m qtmultimedia --archives qttranslations qttools qtsvg qtbase) endif() diff --git a/CMakeModules/aqt_config.ini b/CMakeModules/aqt_config.ini new file mode 100644 index 0000000000..8d84d2906d --- /dev/null +++ b/CMakeModules/aqt_config.ini @@ -0,0 +1,29 @@ +[aqt] +concurrency: 2 + +[mirrors] +trusted_mirrors: + https://download.qt.io +blacklist: + https://qt.mirror.constant.com + https://mirrors.ocf.berkeley.edu + https://mirrors.ustc.edu.cn + https://mirrors.tuna.tsinghua.edu.cn + https://mirrors.geekpie.club + https://mirrors-wan.geekpie.club + https://mirrors.sjtug.sjtu.edu.cn +fallbacks: + https://qtproject.mirror.liquidtelecom.com/ + https://mirrors.aliyun.com/qt/ + https://ftp.jaist.ac.jp/pub/qtproject/ + https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/ + https://qt-mirror.dannhauer.de/ + https://ftp.fau.de/qtproject/ + https://mirror.netcologne.de/qtproject/ + https://mirrors.dotsrc.org/qtproject/ + https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/ + https://master.qt.io/ + https://mirrors.ukfast.co.uk/sites/qt.io/ + https://ftp2.nluug.nl/languages/qt/ + https://ftp1.nluug.nl/languages/qt/ +