mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
CI: Update Linux build scripts to use CMake presets
Also adds source package generation and updates Cirrus CI script.
This commit is contained in:
@@ -1,19 +1,29 @@
|
||||
autoload -Uz log_debug log_group
|
||||
|
||||
log_group 'Check Linux build requirements'
|
||||
log_debug 'Checking Linux distribution name and version...'
|
||||
log_group 'Check Ubuntu build requirements'
|
||||
log_debug 'Checking Ubuntu distribution name and version...'
|
||||
|
||||
# Check for Ubuntu version 22.10 or later, which have srt and librist available via apt-get
|
||||
typeset -g -i UBUNTU_2210_OR_LATER=0
|
||||
if [[ -f /etc/os_release ]] {
|
||||
if [[ -f /etc/os-release ]] {
|
||||
local dist_name
|
||||
local dist_version
|
||||
read -r dist_name dist_version <<< "$(source /etc/os_release; print "${NAME} ${VERSION_ID}")"
|
||||
read -r dist_name dist_version <<< "$(source /etc/os-release; print "${NAME} ${VERSION_ID}")"
|
||||
|
||||
if [[ ${dist_name} != Ubuntu ]] {
|
||||
log_error "Not running on an Ubuntu distribution. Aborting"
|
||||
log_group
|
||||
return 2
|
||||
}
|
||||
|
||||
autoload -Uz is-at-least
|
||||
if [[ ${dist_name} == Ubuntu ]] && is-at-least 22.10 ${dist_version}; then
|
||||
if is-at-least 22.10 ${dist_version}; then
|
||||
typeset -g -i UBUNTU_2210_OR_LATER=1
|
||||
fi
|
||||
} else {
|
||||
log_error "Unable to determine local Linux distribution, but Ubuntu is required. Aborting"
|
||||
log_group
|
||||
return 2
|
||||
}
|
||||
|
||||
local -a dependencies=("${(fA)$(<${SCRIPT_HOME}/.Aptfile)}")
|
||||
@@ -40,9 +40,9 @@ if (( ! deps_version )) {
|
||||
log_group 'Setting up pre-built Chromium Embedded Framework...'
|
||||
|
||||
pushd ${project_root}/.deps
|
||||
local _filename="cef_binary_${deps_version}_${target//-/_}${deps_revision:+"_v${deps_revision}"}.tar.xz"
|
||||
local _filename="cef_binary_${deps_version}_${target//ubuntu-/linux_}${deps_revision:+"_v${deps_revision}"}.tar.xz"
|
||||
local _url=${deps_baseurl}/${_filename}
|
||||
local _target="cef_binary_${deps_version}_${target//-/_}"
|
||||
local _target="cef_binary_${deps_version}_${target//ubuntu-/linux_}"
|
||||
typeset -g CEF_VERSION=${deps_version}
|
||||
|
||||
log_debug "Running curl ${curl_opts} ${_url}"
|
||||
@@ -75,14 +75,14 @@ if [[ ${CPUTYPE} != ${target##*-} ]] {
|
||||
}
|
||||
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
build-essential libglib2.0-dev \
|
||||
lsb-release dh-cmake \
|
||||
libcurl4-openssl-dev \
|
||||
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev \
|
||||
libswresample-dev libswscale-dev \
|
||||
libjansson-dev \
|
||||
libx11-xcb-dev \
|
||||
libgles2-mesa-dev libgles2-mesa \
|
||||
libgles2-mesa-dev \
|
||||
libwayland-dev \
|
||||
libpipewire-0.3-dev \
|
||||
libpulse-dev \
|
||||
@@ -95,11 +95,13 @@ sudo apt-get install -y --no-install-recommends \
|
||||
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 libxss-dev libglvnd-dev \
|
||||
libxkbcommon-dev \
|
||||
libxkbcommon-dev libatk1.0-dev libatk-bridge2.0-dev libxcomposite-dev libxdamage-dev \
|
||||
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 \
|
||||
libpci-dev libdrm-dev \
|
||||
nlohmann-json3-dev libwebsocketpp-dev libasio-dev libvpl-dev libvpl2 libqrcodegencpp-dev
|
||||
nlohmann-json3-dev libwebsocketpp-dev libasio-dev libqrcodegencpp-dev
|
||||
|
||||
if [[ ${target##*-} == x86_64 ]] sudo apt-get install -y --no-install-recommends libvpl-dev libvpl2
|
||||
|
||||
if (( UBUNTU_2210_OR_LATER )) sudo apt-get install -y --no-install-recommends librist-dev libsrt-openssl-dev
|
||||
|
||||
Reference in New Issue
Block a user