Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Use Qt6 by default when available #6877

Merged
merged 1 commit into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ env:
CEF_HASH_MAC_ARM64: '98679b92eea6ea9959ac5aa54f46ca60681d8a86c768c35f496dbdd409bf0642'
CEF_BUILD_VERSION_LINUX: '5060'
CEF_BUILD_VERSION_WIN: '5060'
QT_VERSION_MAC: '5.15.5'
QT_HASH_MAC_X86_64: 'a4c129dcf27bbb774009649e279b948cca3cf07f8ecca24b552518a2a3933bd6'
QT_HASH_MAC_ARM64: '60784aef00bec6bd79d37a748934c6667b477415946b7d18203670e878451cd7'
QT_HASH_MAC_UNIVERSAL: '3bc1dc256189071744a5cc39e70ff6b427de63ed8985124c7400b285a8926051'
QT_VERSION_WIN: '5.15.5'
QT_VERSION_MAC: '6.3.1'
QT_HASH_MAC_X86_64: '018552ee442ef8a7653f86460d5249e3e03c787629767af9faa85a3369fd8576'
QT_HASH_MAC_ARM64: '4f24e220037e1f777148ea6efbd494007cbf56848d861181e025699f66dd15bd'
QT_HASH_MAC_UNIVERSAL: 'c1dd451d86f5bb6ba86f4c97f2b0b11a9fa49d14fb91f2ec0934adf2b420477d'
QT_VERSION_WIN: '6.3.1'
DEPS_VERSION_MAC: '2022-07-29'
DEPS_HASH_MAC_X86_64: '7c83e4700455b39796fb84cadf2790bac2d05c0ee47da15edf5c120702d9df9b'
DEPS_HASH_MAC_ARM64: '4bd295bd854c8a20011a82ab2181f7e1ad48d05d0a259a4618fc72ef3ecd281f'
Expand Down
20 changes: 16 additions & 4 deletions CI/linux/01_install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,25 @@ install_obs-deps() {
fi
}

install_qt-deps() {
install_qt5-deps() {
shift
status "Install Qt dependencies"
trap "caught_error 'install_qt-deps'" ERR
status "Install Qt5 dependencies"
trap "caught_error 'install_qt5-deps'" ERR

sudo apt-get install -y $@
}

install_qt6-deps() {
shift
status "Install Qt6 dependencies"
trap "caught_error 'install_qt6-deps'" ERR

_QT6_AVAILABLE="$(sudo apt-cache madison ${1})"
if [ "${_QT6_AVAILABLE}" ]; then
sudo apt-get install -y $@
fi
}

install_cef() {
shift
status "Setup for dependency CEF v${1}"
Expand Down Expand Up @@ -80,7 +91,8 @@ install_dependencies() {
libluajit-5.1-dev python3-dev libx11-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-xinerama0-dev \
libxcb-composite0-dev libxinerama-dev libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev swig libcmocka-dev \
libpci-dev libxss-dev libglvnd-dev libgles2-mesa libgles2-mesa-dev libwayland-dev libxkbcommon-dev"
"qt-deps qtbase5-dev qtbase5-private-dev libqt5svg5-dev qtwayland5"
"qt5-deps qtbase5-dev qtbase5-private-dev libqt5svg5-dev qtwayland5"
"qt6-deps qt6-base-dev qt6-base-private-dev libqt6svg6-dev qt6-wayland"
"cef ${LINUX_CEF_BUILD_VERSION:-${CI_LINUX_CEF_VERSION}}"
"plugin-deps libasound2-dev libfdk-aac-dev libfontconfig-dev libfreetype6-dev libjack-jackd2-dev \
libpulse-dev libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev libdrm-dev"
Expand Down
6 changes: 3 additions & 3 deletions CI/macos/01_install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ install_qt-deps() {
_HASH="${2}"
fi

check_and_fetch "https://github.com/obsproject/obs-deps/releases/download/${1}/macos-deps-qt5-${1}-${_ARCH}.tar.xz" "${_HASH}"
check_and_fetch "https://github.com/obsproject/obs-deps/releases/download/${1}/macos-deps-qt6-${1}-${_ARCH}.tar.xz" "${_HASH}"
mkdir -p obs-deps
step "Unpack..."
/usr/bin/tar -xf "./macos-deps-qt5-${1}-${_ARCH}.tar.xz" -C ./obs-deps
/usr/bin/tar -xf "./macos-deps-qt6-${1}-${_ARCH}.tar.xz" -C ./obs-deps
/usr/bin/xattr -r -d com.apple.quarantine ./obs-deps
}

Expand Down Expand Up @@ -90,7 +90,7 @@ install_cef() {
status "Set up dependency CEF v${1}"
ensure_dir "${DEPS_BUILD_DIR}"
unset _SKIP

RytoEX marked this conversation as resolved.
Show resolved Hide resolved
if [ "${CI}" -a "${RESTORED_CEF}" ]; then
_SKIP=TRUE
elif [ -d "${DEPS_BUILD_DIR}/cef_binary_${1}_macos_${ARCH:-x86_64}" -a -f "${DEPS_BUILD_DIR}/cef_binary_${1}_macos_${ARCH:-x86_64}/build/libcef_dll_wrapper/libcef_dll_wrapper.a" ]; then
Expand Down
4 changes: 2 additions & 2 deletions CI/windows/01_install_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ function Install-qt-deps {

Write-Step "Download..."
$ProgressPreference = $(if ($Quiet.isPresent) { 'SilentlyContinue' } else { 'Continue' })
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-deps/releases/download/${Version}/windows-deps-qt5-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-qt5-${Version}-${ArchSuffix}.zip"
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-deps/releases/download/${Version}/windows-deps-qt6-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-qt6-${Version}-${ArchSuffix}.zip"
$ProgressPreference = "Continue"

Write-Step "Unpack..."

Expand-Archive -Path "windows-deps-qt5-${Version}-${ArchSuffix}.zip" -DestinationPath "${DepsBuildDir}/windows-deps-${Version}-${ArchSuffix}" -Force
Expand-Archive -Path "windows-deps-qt6-${Version}-${ArchSuffix}.zip" -DestinationPath "${DepsBuildDir}/windows-deps-${Version}-${ArchSuffix}" -Force
} else {
Write-Step "Found existing pre-built Qt..."
}
Expand Down
8 changes: 4 additions & 4 deletions cmake/Modules/ObsHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ macro(find_qt)
QUIET)

if(NOT _QT_VERSION AND QT_VERSION STREQUAL AUTO)
if(TARGET Qt5::Core)
if(TARGET Qt6::Core)
set(_QT_VERSION
5
6
CACHE INTERNAL "")
elseif(TARGET Qt6::Core)
elseif(TARGET Qt5::Core)
set(_QT_VERSION
6
5
CACHE INTERNAL "")
endif()
obs_status(STATUS "Qt version: ${_QT_VERSION}")
Expand Down