CI: Add necessary build system changes for universal and M1 builds
parent
c993b6059a
commit
8fba906be4
|
@ -21,7 +21,7 @@ jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Publish to Flathub
|
name: Publish to Flathub
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
if: github.event_name == 'release'
|
if: "${{ github.event_name == 'release' && ( matrix.branch != 'stable' || (!contains(github.ref, '-beta') && !contains(github.ref, '-rc')) ) }}"
|
||||||
env:
|
env:
|
||||||
FLATPAK_BUILD_PATH: flatpak_app/files/share
|
FLATPAK_BUILD_PATH: flatpak_app/files/share
|
||||||
container:
|
container:
|
||||||
|
@ -31,21 +31,13 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
branch: [stable, beta]
|
branch: [stable, beta]
|
||||||
steps:
|
steps:
|
||||||
- name: Check if job should run
|
|
||||||
id: should_run
|
|
||||||
if: "${{ matrix.branch != 'stable' || (!contains(github.ref, '-beta') && !contains(github.ref, '-rc')) }}"
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=should_run::yes"
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2.3.3
|
uses: actions/checkout@v2.3.3
|
||||||
if: steps.should_run.outputs.should_run == 'yes'
|
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
- name: Build Flatpak Manifest
|
- name: Build Flatpak Manifest
|
||||||
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@master
|
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@master
|
||||||
if: steps.should_run.outputs.should_run == 'yes'
|
|
||||||
with:
|
with:
|
||||||
bundle: obs-studio-${{ github.sha }}.flatpak
|
bundle: obs-studio-${{ github.sha }}.flatpak
|
||||||
manifest-path: CI/flatpak/com.obsproject.Studio.json
|
manifest-path: CI/flatpak/com.obsproject.Studio.json
|
||||||
|
@ -56,26 +48,23 @@ jobs:
|
||||||
- name: Validate AppStream
|
- name: Validate AppStream
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
|
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
|
||||||
if: steps.should_run.outputs.should_run == 'yes'
|
|
||||||
run: |
|
run: |
|
||||||
appstream-util validate appdata/com.obsproject.Studio.appdata.xml
|
appstream-util validate appdata/com.obsproject.Studio.appdata.xml
|
||||||
|
|
||||||
- name: Verify icon and metadata in app-info
|
- name: Verify icon and metadata in app-info
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
|
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
|
||||||
if: steps.should_run.outputs.should_run == 'yes'
|
|
||||||
run: |
|
run: |
|
||||||
test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "Missing 128x128 icon in app-info" ; exit 1; }
|
test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "Missing 128x128 icon in app-info" ; exit 1; }
|
||||||
test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "Missing com.obsproject.Studio.xml.gz in app-info" ; exit 1; }
|
test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "Missing com.obsproject.Studio.xml.gz in app-info" ; exit 1; }
|
||||||
|
|
||||||
- name: Commit screenshots to the OSTree repository
|
- name: Commit screenshots to the OSTree repository
|
||||||
if: steps.should_run.outputs.should_run == 'yes'
|
|
||||||
run: |
|
run: |
|
||||||
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
|
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
|
||||||
|
|
||||||
- name: Publish to Flathub Beta
|
- name: Publish to Flathub Beta
|
||||||
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4
|
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4
|
||||||
if: steps.should_run.outputs.should_run == 'yes' && matrix.branch == 'beta'
|
if: matrix.branch == 'beta'
|
||||||
with:
|
with:
|
||||||
flat-manager-url: https://hub.flathub.org/
|
flat-manager-url: https://hub.flathub.org/
|
||||||
repository: beta
|
repository: beta
|
||||||
|
@ -83,7 +72,7 @@ jobs:
|
||||||
|
|
||||||
- name: Publish to Flathub
|
- name: Publish to Flathub
|
||||||
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4
|
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4
|
||||||
if: steps.should_run.outputs.should_run == 'yes' && matrix.branch == 'stable'
|
if: matrix.branch == 'stable'
|
||||||
with:
|
with:
|
||||||
flat-manager-url: https://hub.flathub.org/
|
flat-manager-url: https://hub.flathub.org/
|
||||||
repository: stable
|
repository: stable
|
||||||
|
|
|
@ -12,14 +12,22 @@ on:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
CACHE_REVISION: '004'
|
||||||
CEF_BUILD_VERSION_MAC: '4638'
|
CEF_BUILD_VERSION_MAC: '4638'
|
||||||
|
CEF_HASH_MAC_X86_64: '2fe4cc39b1373b85086e4030dedd2a250d5dbbed8c2f8780002d6cd6214b6bc2'
|
||||||
|
CEF_HASH_MAC_ARM64: '27809aac427b9c97b0dadcab04371c5f8211f36c6f3e1caa00822de89c5ed249'
|
||||||
CEF_BUILD_VERSION_LINUX: '4638'
|
CEF_BUILD_VERSION_LINUX: '4638'
|
||||||
CEF_BUILD_VERSION_WIN: '4638'
|
CEF_BUILD_VERSION_WIN: '4638'
|
||||||
QT_VERSION_MAC: '5.15.2'
|
QT_VERSION_MAC: '5.15.2'
|
||||||
|
QT_HASH_MAC_X86_64: '35a58fee8dfd70d3d2dcc0ae0b77132c04a451c6f041a02dc41b207b375fc74b'
|
||||||
|
QT_HASH_MAC_ARM64: 'e99146b9c7775c245a2d22f2ef24fc111fccd71bad0f03b64db707124ffb8707'
|
||||||
QT_VERSION_WIN: '5.15.2'
|
QT_VERSION_WIN: '5.15.2'
|
||||||
DEPS_VERSION_MAC: '2022-02-13'
|
DEPS_VERSION_MAC: '2022-02-13'
|
||||||
DEPS_VERSION_WIN: '2022-01-31'
|
DEPS_HASH_MAC_X86_64: '1a8715d66e664b857942deaded0dc46c4f6cd22e88f01ed1188f3bd3fcf632c4'
|
||||||
|
DEPS_HASH_MAC_ARM64: '2cfcaf05765400c696908f242aea87b6e1848e1a48cd3edc2eb7f8cb249c9d48'
|
||||||
|
DEPS_VERSION_WIN: '2022-03-16'
|
||||||
VLC_VERSION_MAC: '3.0.8'
|
VLC_VERSION_MAC: '3.0.8'
|
||||||
|
VLC_HASH_MAC: 'e0149ef4a20a19b9ecd87309c2d27787ee3f47dfd47c6639644bc1f6fd95bdf6'
|
||||||
VLC_VERSION_WIN: '3.0.0-git'
|
VLC_VERSION_WIN: '3.0.0-git'
|
||||||
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
|
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
|
||||||
TWITCH_HASH: ${{ secrets.TWITCH_HASH }}
|
TWITCH_HASH: ${{ secrets.TWITCH_HASH }}
|
||||||
|
@ -60,11 +68,12 @@ jobs:
|
||||||
runs-on: [macos-11]
|
runs-on: [macos-11]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: ['x86_64']
|
arch: ['x86_64', 'arm64']
|
||||||
if: always()
|
if: always()
|
||||||
needs: [clang_check]
|
needs: [clang_check]
|
||||||
env:
|
env:
|
||||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
MACOSX_DEPLOYMENT_TARGET_X86_64: '10.13'
|
||||||
|
MACOSX_DEPLOYMENT_TARGET_ARM64: '11.0'
|
||||||
SPARKLE_VERSION: '1.26.0'
|
SPARKLE_VERSION: '1.26.0'
|
||||||
SPARKLE_HASH: '8312cbf7528297a49f1b97692c33cb8d33254c396dc51be394e9484e4b6833a0'
|
SPARKLE_HASH: '8312cbf7528297a49f1b97692c33cb8d33254c396dc51be394e9484e4b6833a0'
|
||||||
BLOCKED_FORMULAS: 'speexdsp curl php composer'
|
BLOCKED_FORMULAS: 'speexdsp curl php composer'
|
||||||
|
@ -109,7 +118,7 @@ jobs:
|
||||||
CACHE_NAME: 'cef-cache'
|
CACHE_NAME: 'cef-cache'
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_MAC }}_macos_${{ matrix.arch }}
|
path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_MAC }}_macos_${{ matrix.arch }}
|
||||||
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_MAC }}-${{ matrix.arch }}
|
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_MAC }}-${{ matrix.arch }}-${{ env.CACHE_REVISION }}
|
||||||
|
|
||||||
- name: 'Restore VLC dependency from cache'
|
- name: 'Restore VLC dependency from cache'
|
||||||
id: vlc-cache
|
id: vlc-cache
|
||||||
|
@ -118,7 +127,7 @@ jobs:
|
||||||
CACHE_NAME: 'vlc-cache'
|
CACHE_NAME: 'vlc-cache'
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/obs-build-dependencies/vlc-${{ env.VLC_VERSION_MAC }}
|
path: ${{ github.workspace }}/obs-build-dependencies/vlc-${{ env.VLC_VERSION_MAC }}
|
||||||
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.VLC_VERSION_MAC }}
|
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.VLC_VERSION_MAC }}-${{ env.CACHE_REVISION }}
|
||||||
|
|
||||||
- name: 'Restore Sparkle dependency from cache'
|
- name: 'Restore Sparkle dependency from cache'
|
||||||
id: sparkle-cache
|
id: sparkle-cache
|
||||||
|
@ -126,8 +135,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CACHE_NAME: 'sparkle-cache'
|
CACHE_NAME: 'sparkle-cache'
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/obs-build-dependencies/sparkle
|
path: ${{ github.workspace }}/obs-build-dependencies/obs-deps/lib/Sparkle.framework
|
||||||
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.SPARKLE_VERSION }}
|
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.SPARKLE_VERSION }}-${{ env.CACHE_REVISION }}
|
||||||
|
|
||||||
- name: 'Setup build environment'
|
- name: 'Setup build environment'
|
||||||
run: |
|
run: |
|
||||||
|
@ -166,13 +175,13 @@ jobs:
|
||||||
run: CI/macos/02_build_obs.sh --codesign --architecture "${{ matrix.arch }}"
|
run: CI/macos/02_build_obs.sh --codesign --architecture "${{ matrix.arch }}"
|
||||||
|
|
||||||
- name: 'Run tests'
|
- name: 'Run tests'
|
||||||
if: success()
|
if: ${{ success() && matrix.arch == 'x86_64' }}
|
||||||
run: cmake --build build -t test
|
run: cmake --build build -t test
|
||||||
|
|
||||||
- name: 'Create build artifact'
|
- name: 'Create build artifact'
|
||||||
if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
|
if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
|
||||||
run: |
|
run: |
|
||||||
CI/macos/03_package_obs.sh --codesign
|
CI/macos/03_package_obs.sh --codesign --architecture "${{ matrix.arch }}"
|
||||||
ARTIFACT_NAME=$(basename $(/usr/bin/find build -type f -name "obs-studio-*.dmg" -depth 1 | head -1))
|
ARTIFACT_NAME=$(basename $(/usr/bin/find build -type f -name "obs-studio-*.dmg" -depth 1 | head -1))
|
||||||
echo "FILE_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
|
echo "FILE_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
@ -232,7 +241,7 @@ jobs:
|
||||||
CACHE_NAME: 'cef-cache'
|
CACHE_NAME: 'cef-cache'
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_LINUX }}_linux64
|
path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_LINUX }}_linux64
|
||||||
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_LINUX }}
|
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_LINUX }}-${{ env.CACHE_REVISION }}
|
||||||
|
|
||||||
- name: 'Install dependencies'
|
- name: 'Install dependencies'
|
||||||
env:
|
env:
|
||||||
|
@ -300,7 +309,7 @@ jobs:
|
||||||
CACHE_NAME: 'vlc-cache'
|
CACHE_NAME: 'vlc-cache'
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/obs-build-dependencies/vlc-${{ env.VLC_VERSION_WIN }}
|
path: ${{ github.workspace }}/obs-build-dependencies/vlc-${{ env.VLC_VERSION_WIN }}
|
||||||
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.VLC_VERSION_WIN }}
|
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.VLC_VERSION_WIN }}-${{ env.CACHE_REVISION }}
|
||||||
|
|
||||||
- name: 'Restore Chromium Embedded Framework from cache'
|
- name: 'Restore Chromium Embedded Framework from cache'
|
||||||
id: cef-cache
|
id: cef-cache
|
||||||
|
@ -309,7 +318,7 @@ jobs:
|
||||||
CACHE_NAME: 'cef-cache'
|
CACHE_NAME: 'cef-cache'
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_WIN }}_windows${{ matrix.arch }}_minimal
|
path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_WIN }}_windows${{ matrix.arch }}_minimal
|
||||||
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_WIN }}
|
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_WIN }}-${{ env.CACHE_REVISION }}
|
||||||
|
|
||||||
- name: 'Install dependencies'
|
- name: 'Install dependencies'
|
||||||
env:
|
env:
|
||||||
|
@ -432,7 +441,7 @@ jobs:
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: ['x86_64']
|
arch: ['x86_64', 'arm64']
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -65,6 +65,7 @@ print_usage() {
|
||||||
"-h, --help : Print this help\n" \
|
"-h, --help : Print this help\n" \
|
||||||
"-q, --quiet : Suppress most build process output\n" \
|
"-q, --quiet : Suppress most build process output\n" \
|
||||||
"-v, --verbose : Enable more verbose build process output\n" \
|
"-v, --verbose : Enable more verbose build process output\n" \
|
||||||
|
"-a, --architecture : Specify build architecture (default: x86_64, alternative: arm64)\n" \
|
||||||
"-d, --skip-dependency-checks : Skip dependency checks (default: off)\n" \
|
"-d, --skip-dependency-checks : Skip dependency checks (default: off)\n" \
|
||||||
"-b, --bundle : Create relocatable application bundle (default: off)\n" \
|
"-b, --bundle : Create relocatable application bundle (default: off)\n" \
|
||||||
"-p, --package : Create distributable disk image (default: off)\n" \
|
"-p, --package : Create distributable disk image (default: off)\n" \
|
||||||
|
@ -94,6 +95,7 @@ obs-build-main() {
|
||||||
-h | --help ) print_usage; exit 0 ;;
|
-h | --help ) print_usage; exit 0 ;;
|
||||||
-q | --quiet ) export QUIET=TRUE; shift ;;
|
-q | --quiet ) export QUIET=TRUE; shift ;;
|
||||||
-v | --verbose ) export VERBOSE=TRUE; shift ;;
|
-v | --verbose ) export VERBOSE=TRUE; shift ;;
|
||||||
|
-a | --architecture ) ARCH="${2}"; shift 2 ;;
|
||||||
-d | --skip-dependency-checks ) SKIP_DEP_CHECKS=TRUE; shift ;;
|
-d | --skip-dependency-checks ) SKIP_DEP_CHECKS=TRUE; shift ;;
|
||||||
-p | --package ) PACKAGE=TRUE; shift ;;
|
-p | --package ) PACKAGE=TRUE; shift ;;
|
||||||
-c | --codesign ) CODESIGN=TRUE; shift ;;
|
-c | --codesign ) CODESIGN=TRUE; shift ;;
|
||||||
|
|
|
@ -416,7 +416,7 @@
|
||||||
"config-opts": [
|
"config-opts": [
|
||||||
"-DCMAKE_BUILD_TYPE=Release",
|
"-DCMAKE_BUILD_TYPE=Release",
|
||||||
"-DENABLE_WAYLAND=ON",
|
"-DENABLE_WAYLAND=ON",
|
||||||
"-DENABLE_BROWSER_SOURCE=ON",
|
"-DENABLE_BROWSER=ON",
|
||||||
"-DCEF_ROOT_DIR=/app/cef",
|
"-DCEF_ROOT_DIR=/app/cef",
|
||||||
"-DUSE_XDG=ON",
|
"-DUSE_XDG=ON",
|
||||||
"-DENABLE_ALSA=OFF",
|
"-DENABLE_ALSA=OFF",
|
||||||
|
|
|
@ -3,3 +3,5 @@ brew "ccache"
|
||||||
brew "ninja"
|
brew "ninja"
|
||||||
brew "freetype"
|
brew "freetype"
|
||||||
brew "cmocka"
|
brew "cmocka"
|
||||||
|
brew "swig"
|
||||||
|
brew "coreutils"
|
||||||
|
|
|
@ -11,11 +11,20 @@
|
||||||
# Setup build environment
|
# Setup build environment
|
||||||
WORKFLOW_CONTENT=$(/bin/cat "${CI_WORKFLOW}")
|
WORKFLOW_CONTENT=$(/bin/cat "${CI_WORKFLOW}")
|
||||||
CI_DEPS_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+DEPS_VERSION_MAC: '([0-9\-]+)'/\1/p")
|
CI_DEPS_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+DEPS_VERSION_MAC: '([0-9\-]+)'/\1/p")
|
||||||
|
CI_DEPS_HASH_X86_64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+DEPS_HASH_MAC_X86_64: '([0-9a-f]+)'/\1/p")
|
||||||
|
CI_DEPS_HASH_ARM64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+DEPS_HASH_MAC_ARM64: '([0-9a-f]+)'/\1/p")
|
||||||
CI_VLC_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+VLC_VERSION_MAC: '([0-9\.]+)'/\1/p")
|
CI_VLC_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+VLC_VERSION_MAC: '([0-9\.]+)'/\1/p")
|
||||||
|
CI_VLC_HASH=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+VLC_HASH_MAC: '([0-9a-f]+)'/\1/p")
|
||||||
CI_SPARKLE_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+SPARKLE_VERSION: '([0-9\.]+)'/\1/p")
|
CI_SPARKLE_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+SPARKLE_VERSION: '([0-9\.]+)'/\1/p")
|
||||||
|
CI_SPARKLE_HASH=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+SPARKLE_HASH: '([0-9a-f]+)'/\1/p")
|
||||||
CI_QT_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+QT_VERSION_MAC: '([0-9\.]+)'/\1/p" | /usr/bin/head -1)
|
CI_QT_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+QT_VERSION_MAC: '([0-9\.]+)'/\1/p" | /usr/bin/head -1)
|
||||||
CI_MACOSX_DEPLOYMENT_TARGET=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+MACOSX_DEPLOYMENT_TARGET: '([0-9\.]+)'/\1/p")
|
CI_QT_HASH_X86_64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+QT_HASH_MAC_X86_64: '([0-9a-f]+)'/\1/p")
|
||||||
|
CI_QT_HASH_ARM64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+QT_HASH_MAC_ARM64: '([0-9a-f]+)'/\1/p")
|
||||||
|
CI_MACOSX_DEPLOYMENT_TARGET_X86_64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+MACOSX_DEPLOYMENT_TARGET_X86_64: '([0-9\.]+)'/\1/p")
|
||||||
|
CI_MACOSX_DEPLOYMENT_TARGET_ARM64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+MACOSX_DEPLOYMENT_TARGET_ARM64: '([0-9\.]+)'/\1/p")
|
||||||
CI_MACOS_CEF_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+CEF_BUILD_VERSION_MAC: '([0-9]+)'/\1/p")
|
CI_MACOS_CEF_VERSION=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+CEF_BUILD_VERSION_MAC: '([0-9]+)'/\1/p")
|
||||||
|
CI_CEF_HASH_X86_64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+CEF_HASH_MAC_X86_64: '([0-9a-f]+)'/\1/p")
|
||||||
|
CI_CEF_HASH_ARM64=$(echo "${WORKFLOW_CONTENT}" | /usr/bin/sed -En "s/[ ]+CEF_HASH_MAC_ARM64: '([0-9a-f]+)'/\1/p")
|
||||||
|
|
||||||
MACOS_VERSION="$(/usr/bin/sw_vers -productVersion)"
|
MACOS_VERSION="$(/usr/bin/sw_vers -productVersion)"
|
||||||
MACOS_MAJOR="$(echo ${MACOS_VERSION} | /usr/bin/cut -d '.' -f 1)"
|
MACOS_MAJOR="$(echo ${MACOS_VERSION} | /usr/bin/cut -d '.' -f 1)"
|
||||||
|
@ -37,6 +46,21 @@ fi
|
||||||
|
|
||||||
## DEFINE UTILITIES ##
|
## DEFINE UTILITIES ##
|
||||||
check_macos_version() {
|
check_macos_version() {
|
||||||
|
ARCH="${ARCH:-${CURRENT_ARCH}}"
|
||||||
|
if [ "${ARCH}" = "x86_64" ]; then
|
||||||
|
CI_MACOSX_DEPLOYMENT_TARGET="${CI_MACOSX_DEPLOYMENT_TARGET_X86_64}"
|
||||||
|
CI_CEF_HASH="${CI_CEF_HASH_X86_64}"
|
||||||
|
CI_QT_HASH="${CI_QT_HASH_X86_64}"
|
||||||
|
CI_DEPS_HASH="${CI_DEPS_HASH_X86_64}"
|
||||||
|
elif [ "${ARCH}" = "arm64" ]; then
|
||||||
|
CI_MACOSX_DEPLOYMENT_TARGET="${CI_MACOSX_DEPLOYMENT_TARGET_ARM64}"
|
||||||
|
CI_CEF_HASH="${CI_CEF_HASH_ARM64}"
|
||||||
|
CI_QT_HASH="${CI_QT_HASH_ARM64}"
|
||||||
|
CI_DEPS_HASH="${CI_DEPS_HASH_ARM64}"
|
||||||
|
else
|
||||||
|
caught_error "Unsupported architecture '${ARCH}' provided"
|
||||||
|
fi
|
||||||
|
|
||||||
step "Check macOS version..."
|
step "Check macOS version..."
|
||||||
MIN_VERSION=${MACOSX_DEPLOYMENT_TARGET:-${CI_MACOSX_DEPLOYMENT_TARGET}}
|
MIN_VERSION=${MACOSX_DEPLOYMENT_TARGET:-${CI_MACOSX_DEPLOYMENT_TARGET}}
|
||||||
MIN_MAJOR=$(echo ${MIN_VERSION} | /usr/bin/cut -d '.' -f 1)
|
MIN_MAJOR=$(echo ${MIN_VERSION} | /usr/bin/cut -d '.' -f 1)
|
||||||
|
|
|
@ -15,19 +15,22 @@ install_obs-deps() {
|
||||||
status "Set up precompiled macOS OBS dependencies v${1}"
|
status "Set up precompiled macOS OBS dependencies v${1}"
|
||||||
ensure_dir "${DEPS_BUILD_DIR}"
|
ensure_dir "${DEPS_BUILD_DIR}"
|
||||||
step "Download..."
|
step "Download..."
|
||||||
${CURLCMD:-curl} https://github.com/obsproject/obs-deps/releases/download/${1}/macos-deps-${1}.tar.gz
|
check_and_fetch "https://github.com/obsproject/obs-deps/releases/download/${1}/macos-deps-${1}-${ARCH:-x86_64}.tar.xz" "${2}"
|
||||||
|
mkdir -p obs-deps
|
||||||
step "Unpack..."
|
step "Unpack..."
|
||||||
/usr/bin/tar -xf "./macos-deps-${1}.tar.gz" -C /tmp
|
/usr/bin/tar -xf "./macos-deps-${1}-${ARCH:-x86_64}.tar.xz" -C ./obs-deps
|
||||||
|
/usr/bin/xattr -r -d com.apple.quarantine ./obs-deps
|
||||||
}
|
}
|
||||||
|
|
||||||
install_qt-deps() {
|
install_qt-deps() {
|
||||||
status "Set up precompiled dependency Qt v${1}"
|
status "Set up precompiled dependency Qt v${1}"
|
||||||
ensure_dir "${DEPS_BUILD_DIR}"
|
ensure_dir "${DEPS_BUILD_DIR}"
|
||||||
step "Download..."
|
step "Download..."
|
||||||
${CURLCMD:-curl} https://github.com/obsproject/obs-deps/releases/download/${2}/macos-qt-${1}-${2}.tar.gz
|
check_and_fetch "https://github.com/obsproject/obs-deps/releases/download/${1}/macos-deps-qt-${1}-${ARCH:-x86_64}.tar.xz" "${2}"
|
||||||
|
mkdir -p obs-deps
|
||||||
step "Unpack..."
|
step "Unpack..."
|
||||||
/usr/bin/tar -xf ./macos-qt-${1}-${2}.tar.gz -C /tmp
|
/usr/bin/tar -xf "./macos-deps-qt-${1}-${ARCH:-x86_64}.tar.xz" -C ./obs-deps
|
||||||
/usr/bin/xattr -r -d com.apple.quarantine /tmp/obsdeps
|
/usr/bin/xattr -r -d com.apple.quarantine ./obs-deps
|
||||||
}
|
}
|
||||||
|
|
||||||
install_vlc() {
|
install_vlc() {
|
||||||
|
@ -58,16 +61,17 @@ install_sparkle() {
|
||||||
|
|
||||||
if [ "${CI}" -a "${RESTORED_SPARKLE}" ]; then
|
if [ "${CI}" -a "${RESTORED_SPARKLE}" ]; then
|
||||||
_SKIP=TRUE
|
_SKIP=TRUE
|
||||||
elif [ -d "${DEPS_BUILD_DIR}/sparkle/Sparkle.framework" -a -f "${DEPS_BUILD_DIR}/sparkle/Sparkle.framework/Sparkle" ]; then
|
elif [ -d "${DEPS_BUILD_DIR}/obs-deps/Frameworks/Sparkle.framework" -a -f "${DEPS_BUILD_DIR}/obs-deps/Frameworks/Sparkle.framework/Sparkle" ]; then
|
||||||
_SKIP=TRUE
|
_SKIP=TRUE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${_SKIP}" ]; then
|
if [ -z "${_SKIP}" ]; then
|
||||||
step "Download..."
|
step "Download..."
|
||||||
${CURLCMD:-curl} https://github.com/sparkle-project/Sparkle/releases/download/${1}/Sparkle-${1}.tar.xz
|
check_and_fetch "https://github.com/sparkle-project/Sparkle/releases/download/${1}/Sparkle-${1}.tar.xz" "${2}"
|
||||||
step "Unpack..."
|
step "Unpack..."
|
||||||
ensure_dir "${DEPS_BUILD_DIR}/sparkle"
|
ensure_dir "${DEPS_BUILD_DIR}/sparkle"
|
||||||
/usr/bin/tar -xf ../Sparkle-${1}.tar.xz
|
/usr/bin/tar -xf ../Sparkle-${1}.tar.xz
|
||||||
|
cp -cpR "${DEPS_BUILD_DIR}"/sparkle/Sparkle.framework "${DEPS_BUILD_DIR}"/obs-deps/lib/
|
||||||
else
|
else
|
||||||
step "Found existing Sparkle Framework..."
|
step "Found existing Sparkle Framework..."
|
||||||
fi
|
fi
|
||||||
|
@ -86,14 +90,14 @@ install_cef() {
|
||||||
|
|
||||||
if [ -z "${_SKIP}" ]; then
|
if [ -z "${_SKIP}" ]; then
|
||||||
step "Download..."
|
step "Download..."
|
||||||
${CURLCMD:-curl} https://cdn-fastly.obsproject.com/downloads/cef_binary_${1}_macos_${ARCH:-x86_64}.tar.xz
|
check_and_fetch "https://cdn-fastly.obsproject.com/downloads/cef_binary_${1}_macos_${ARCH:-x86_64}.tar.xz" "${2}"
|
||||||
step "Unpack..."
|
step "Unpack..."
|
||||||
/usr/bin/tar -xf cef_binary_${1}_macos_${ARCH:-x86_64}.tar.xz
|
/usr/bin/tar -xf cef_binary_${1}_macos_${ARCH:-x86_64}.tar.xz
|
||||||
cd cef_binary_${1}_macos_${ARCH:-x86_64}
|
cd cef_binary_${1}_macos_${ARCH:-x86_64}
|
||||||
step "Fix tests..."
|
step "Fix tests..."
|
||||||
|
|
||||||
/usr/bin/sed -i '.orig' '/add_subdirectory(tests\/ceftests)/d' ./CMakeLists.txt
|
/usr/bin/sed -i '.orig' '/add_subdirectory(tests\/ceftests)/d' ./CMakeLists.txt
|
||||||
/usr/bin/sed -E -i '' 's/"10.(9|10)"/"'${MACOSX_DEPLOYMENT_TARGET:-${CI_MACOSX_DEPLOYMENT_TARGET}}'"/' ./cmake/cef_variables.cmake
|
/usr/bin/sed -E -i '' 's/"10.(9|10|11)"/"'${MACOSX_DEPLOYMENT_TARGET:-${CI_MACOSX_DEPLOYMENT_TARGET}}'"/' ./cmake/cef_variables.cmake
|
||||||
|
|
||||||
step "Run CMake..."
|
step "Run CMake..."
|
||||||
check_ccache
|
check_ccache
|
||||||
|
@ -120,11 +124,11 @@ install_dependencies() {
|
||||||
trap "caught_error 'install_dependencies'" ERR
|
trap "caught_error 'install_dependencies'" ERR
|
||||||
|
|
||||||
BUILD_DEPS=(
|
BUILD_DEPS=(
|
||||||
"obs-deps ${MACOS_DEPS_VERSION:-${CI_DEPS_VERSION}}"
|
"obs-deps ${MACOS_DEPS_VERSION:-${CI_DEPS_VERSION}} ${MACOS_DEPS_HASH:-${CI_DEPS_HASH}}"
|
||||||
"qt-deps ${QT_VERSION:-${CI_QT_VERSION}} ${MACOS_DEPS_VERSION:-${CI_DEPS_VERSION}}"
|
"qt-deps ${MACOS_DEPS_VERSION:-${CI_DEPS_VERSION}} ${QT_HASH:-${CI_QT_HASH}}"
|
||||||
"cef ${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}}"
|
"cef ${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}} ${CEF_HASH:-${CI_CEF_HASH}}"
|
||||||
"vlc ${VLC_VERSION:-${CI_VLC_VERSION}}"
|
"vlc ${VLC_VERSION:-${CI_VLC_VERSION}} ${VLC_HASH:-${CI_VLC_HASH}}"
|
||||||
"sparkle ${SPARKLE_VERSION:-${CI_SPARKLE_VERSION}}"
|
"sparkle ${SPARKLE_VERSION:-${CI_SPARKLE_VERSION}} ${SPARKLE_HASH:-${CI_SPARKLE_HASH}}"
|
||||||
)
|
)
|
||||||
|
|
||||||
install_homebrew_deps
|
install_homebrew_deps
|
||||||
|
@ -133,7 +137,7 @@ install_dependencies() {
|
||||||
set -- ${DEPENDENCY}
|
set -- ${DEPENDENCY}
|
||||||
trap "caught_error ${DEPENDENCY}" ERR
|
trap "caught_error ${DEPENDENCY}" ERR
|
||||||
FUNC_NAME="install_${1}"
|
FUNC_NAME="install_${1}"
|
||||||
${FUNC_NAME} ${2} ${3}
|
${FUNC_NAME} ${2} ${3} ${4}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,16 @@ _configure_obs() {
|
||||||
GENERATOR="Ninja"
|
GENERATOR="Ninja"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${CI}" -a "${ARCH}" = "x86_64" ]; then
|
||||||
|
UNITTEST_OPTIONS="-DENABLE_UNIT_TESTS=ON"
|
||||||
|
fi
|
||||||
|
|
||||||
cmake -S . -B ${BUILD_DIR} -G ${GENERATOR} \
|
cmake -S . -B ${BUILD_DIR} -G ${GENERATOR} \
|
||||||
-DCEF_ROOT_DIR="${DEPS_BUILD_DIR}/cef_binary_${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}}_macos_${ARCH:-x86_64}" \
|
-DCEF_ROOT_DIR="${DEPS_BUILD_DIR}/cef_binary_${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}}_macos_${ARCH:-x86_64}" \
|
||||||
|
-DENABLE_BROWSER=ON \
|
||||||
-DVLC_PATH="${DEPS_BUILD_DIR}/vlc-${VLC_VERSION:-${CI_VLC_VERSION}}" \
|
-DVLC_PATH="${DEPS_BUILD_DIR}/vlc-${VLC_VERSION:-${CI_VLC_VERSION}}" \
|
||||||
-DCMAKE_PREFIX_PATH="/tmp/obsdeps;${DEPS_BUILD_DIR}/sparkle" \
|
-DENABLE_VLC=ON \
|
||||||
|
-DCMAKE_PREFIX_PATH="${DEPS_BUILD_DIR}/obs-deps" \
|
||||||
-DBROWSER_LEGACY=$(test "${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}}" -le 3770 && echo "ON" || echo "OFF") \
|
-DBROWSER_LEGACY=$(test "${MACOS_CEF_BUILD_VERSION:-${CI_MACOS_CEF_VERSION}}" -le 3770 && echo "ON" || echo "OFF") \
|
||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-${CI_MACOSX_DEPLOYMENT_TARGET}} \
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-${CI_MACOSX_DEPLOYMENT_TARGET}} \
|
||||||
-DCMAKE_OSX_ARCHITECTURES=${CMAKE_ARCHS} \
|
-DCMAKE_OSX_ARCHITECTURES=${CMAKE_ARCHS} \
|
||||||
|
@ -79,7 +85,8 @@ _configure_obs() {
|
||||||
${YOUTUBE_OPTIONS} \
|
${YOUTUBE_OPTIONS} \
|
||||||
${TWITCH_OPTIONS} \
|
${TWITCH_OPTIONS} \
|
||||||
${RESTREAM_OPTIONS} \
|
${RESTREAM_OPTIONS} \
|
||||||
${CI:+-DENABLE_UNIT_TESTS=ON -DBUILD_FOR_DISTRIBUTION=${BUILD_FOR_DISTRIBUTION} -DOBS_BUILD_NUMBER=${GITHUB_RUN_ID}} \
|
${UNITTEST_OPTIONS} \
|
||||||
|
${CI:+-DBUILD_FOR_DISTRIBUTION=${BUILD_FOR_DISTRIBUTION} -DOBS_BUILD_NUMBER=${GITHUB_RUN_ID}} \
|
||||||
${QUIET:+-Wno-deprecated -Wno-dev --log-level=ERROR}
|
${QUIET:+-Wno-deprecated -Wno-dev --log-level=ERROR}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,8 @@ package-obs-standalone() {
|
||||||
source "${CHECKOUT_DIR}/CI/include/build_support.sh"
|
source "${CHECKOUT_DIR}/CI/include/build_support.sh"
|
||||||
source "${CHECKOUT_DIR}/CI/include/build_support_macos.sh"
|
source "${CHECKOUT_DIR}/CI/include/build_support_macos.sh"
|
||||||
|
|
||||||
check_macos_version
|
|
||||||
check_archs
|
check_archs
|
||||||
|
check_macos_version
|
||||||
|
|
||||||
step "Fetch OBS tags..."
|
step "Fetch OBS tags..."
|
||||||
/usr/bin/git fetch origin --tags
|
/usr/bin/git fetch origin --tags
|
||||||
|
@ -154,6 +154,7 @@ print_usage() {
|
||||||
"-h, --help : Print this help\n" \
|
"-h, --help : Print this help\n" \
|
||||||
"-q, --quiet : Suppress most build process output\n" \
|
"-q, --quiet : Suppress most build process output\n" \
|
||||||
"-v, --verbose : Enable more verbose build process output\n" \
|
"-v, --verbose : Enable more verbose build process output\n" \
|
||||||
|
"-a, --architecture : Specify build architecture (default: x86_64, alternative: arm64)\n" \
|
||||||
"-c, --codesign : Codesign OBS and all libraries (default: ad-hoc only)\n" \
|
"-c, --codesign : Codesign OBS and all libraries (default: ad-hoc only)\n" \
|
||||||
"-n, --notarize : Notarize OBS (default: off)\n" \
|
"-n, --notarize : Notarize OBS (default: off)\n" \
|
||||||
"--notarize-image [IMAGE] : Specify existing OBS disk image for notarization\n" \
|
"--notarize-image [IMAGE] : Specify existing OBS disk image for notarization\n" \
|
||||||
|
@ -168,6 +169,7 @@ package-obs-main() {
|
||||||
-h | --help ) print_usage; exit 0 ;;
|
-h | --help ) print_usage; exit 0 ;;
|
||||||
-q | --quiet ) export QUIET=TRUE; shift ;;
|
-q | --quiet ) export QUIET=TRUE; shift ;;
|
||||||
-v | --verbose ) export VERBOSE=TRUE; shift ;;
|
-v | --verbose ) export VERBOSE=TRUE; shift ;;
|
||||||
|
-a | --architecture ) ARCH="${2}"; shift 2 ;;
|
||||||
-c | --codesign ) CODESIGN=TRUE; shift ;;
|
-c | --codesign ) CODESIGN=TRUE; shift ;;
|
||||||
-n | --notarize ) NOTARIZE=TRUE; CODESIGN=TRUE; shift ;;
|
-n | --notarize ) NOTARIZE=TRUE; CODESIGN=TRUE; shift ;;
|
||||||
--build-dir ) BUILD_DIR="${2}"; shift 2 ;;
|
--build-dir ) BUILD_DIR="${2}"; shift 2 ;;
|
||||||
|
|
|
@ -26,16 +26,18 @@ Function Install-obs-deps {
|
||||||
Write-Status "Setup for pre-built Windows OBS dependencies v${Version}"
|
Write-Status "Setup for pre-built Windows OBS dependencies v${Version}"
|
||||||
Ensure-Directory $DepsBuildDir
|
Ensure-Directory $DepsBuildDir
|
||||||
|
|
||||||
if (!(Test-Path "$DepsBuildDir/dependencies${Version}")) {
|
$ArchSuffix = "$(if ($BuildArch -eq "64-bit") { "x64" } else { "x86" })"
|
||||||
|
|
||||||
|
if (!(Test-Path "${DepsBuildDir}/windows-deps-${Version}-${ArchSuffix}")) {
|
||||||
|
|
||||||
Write-Step "Download..."
|
Write-Step "Download..."
|
||||||
$ProgressPreference = $(if ($Quiet.isPresent) { "SilentlyContinue" } else { "Continue" })
|
$ProgressPreference = $(if ($Quiet.isPresent) { "SilentlyContinue" } else { "Continue" })
|
||||||
Invoke-WebRequest -Uri "https://cdn-fastly.obsproject.com/downloads/dependencies${Version}.zip" -UseBasicParsing -OutFile "dependencies${Version}.zip"
|
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-deps/releases/download/win-${Version}/windows-deps-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-${Version}-${ArchSuffix}.zip"
|
||||||
$ProgressPreference = "Continue"
|
$ProgressPreference = "Continue"
|
||||||
|
|
||||||
Write-Step "Unpack..."
|
Write-Step "Unpack..."
|
||||||
|
|
||||||
Expand-Archive -Path "dependencies${Version}.zip"
|
Expand-Archive -Path "windows-deps-${Version}-${ArchSuffix}.zip" -DestinationPath "${DepsBuildDir}/windows-deps-${Version}-${ArchSuffix}" -Force
|
||||||
} else {
|
} else {
|
||||||
Write-Step "Found existing pre-built dependencies..."
|
Write-Step "Found existing pre-built dependencies..."
|
||||||
}
|
}
|
||||||
|
@ -50,18 +52,18 @@ function Install-qt-deps {
|
||||||
Write-Status "Setup for pre-built dependency Qt v${Version}"
|
Write-Status "Setup for pre-built dependency Qt v${Version}"
|
||||||
Ensure-Directory $DepsBuildDir
|
Ensure-Directory $DepsBuildDir
|
||||||
|
|
||||||
if (!(Test-Path "$DepsBuildDir/Qt_${Version}")) {
|
$ArchSuffix = "$(if ($BuildArch -eq "64-bit") { "x64" } else { "x86" })"
|
||||||
|
|
||||||
|
if (!(Test-Path "${DepsBuildDir}/windows-deps-${Version}-${ArchSuffix}/mkspecs")) {
|
||||||
|
|
||||||
Write-Step "Download..."
|
Write-Step "Download..."
|
||||||
$ProgressPreference = $(if ($Quiet.isPresent) { 'SilentlyContinue' } else { 'Continue' })
|
$ProgressPreference = $(if ($Quiet.isPresent) { 'SilentlyContinue' } else { 'Continue' })
|
||||||
Invoke-WebRequest -Uri "https://cdn-fastly.obsproject.com/downloads/Qt_${Version}.7z" -UseBasicParsing -OutFile "Qt_${Version}.7z"
|
Invoke-WebRequest -Uri "https://cdn-fastly.obsproject.com/downloads/windows-deps-qt-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-qt-${Version}-${ArchSuffix}.zip"
|
||||||
$ProgressPreference = "Continue"
|
$ProgressPreference = "Continue"
|
||||||
|
|
||||||
Write-Step "Unpack..."
|
Write-Step "Unpack..."
|
||||||
|
|
||||||
# TODO: Replace with zip and properly package Qt to share directory with other deps
|
Expand-Archive -Path "windows-deps-qt-${Version}-${ArchSuffix}.zip" -DestinationPath "${DepsBuildDir}/windows-deps-${Version}-${ArchSuffix}" -Force
|
||||||
Invoke-Expression "7z x Qt_${Version}.7z"
|
|
||||||
Move-Item -Path "${Version}" -Destination "Qt_${Version}"
|
|
||||||
} else {
|
} else {
|
||||||
Write-Step "Found existing pre-built Qt..."
|
Write-Step "Found existing pre-built Qt..."
|
||||||
}
|
}
|
||||||
|
@ -108,7 +110,7 @@ function Install-cef {
|
||||||
$ProgressPreference = "Continue"
|
$ProgressPreference = "Continue"
|
||||||
|
|
||||||
Write-Step "Unpack..."
|
Write-Step "Unpack..."
|
||||||
Invoke-Expression "7z x cef_binary_${Version}_windows_${ArchSuffix}.zip"
|
Expand-Archive -Path "cef_binary_${Version}_windows_${ArchSuffix}.zip" -Force
|
||||||
} else {
|
} else {
|
||||||
Write-Step "Found existing CEF framework and loader library..."
|
Write-Step "Found existing CEF framework and loader library..."
|
||||||
}
|
}
|
||||||
|
@ -119,13 +121,11 @@ function Install-Dependencies {
|
||||||
[String]$BuildArch = $(if (Test-Path variable:BuildArch) { "${BuildArch}" })
|
[String]$BuildArch = $(if (Test-Path variable:BuildArch) { "${BuildArch}" })
|
||||||
)
|
)
|
||||||
|
|
||||||
if($Choco.isPresent) {
|
Install-Windows-Dependencies
|
||||||
Install-Windows-Dependencies
|
|
||||||
}
|
|
||||||
|
|
||||||
$BuildDependencies = @(
|
$BuildDependencies = @(
|
||||||
@('obs-deps', $WindowsDepsVersion),
|
@('obs-deps', $WindowsDepsVersion),
|
||||||
@('qt-deps', $WindowsQtVersion),
|
@('qt-deps', $WindowsDepsVersion),
|
||||||
@('vlc', $WindowsVlcVersion),
|
@('vlc', $WindowsVlcVersion),
|
||||||
@('cef', $WindowsCefVersion)
|
@('cef', $WindowsCefVersion)
|
||||||
)
|
)
|
||||||
|
|
|
@ -27,6 +27,13 @@ function Build-OBS {
|
||||||
[String]$BuildConfiguration = $(if (Test-Path variable:BuildConfiguration) { "${BuildConfiguration}" })
|
[String]$BuildConfiguration = $(if (Test-Path variable:BuildConfiguration) { "${BuildConfiguration}" })
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$NumProcessors = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
|
||||||
|
|
||||||
|
if ( $NumProcessors -gt 1 ) {
|
||||||
|
$env:UseMultiToolTask = $true
|
||||||
|
$env:EnforceProcessCountAcrossBuilds = $true
|
||||||
|
}
|
||||||
|
|
||||||
Write-Status "Build OBS"
|
Write-Status "Build OBS"
|
||||||
|
|
||||||
Configure-OBS
|
Configure-OBS
|
||||||
|
@ -41,11 +48,16 @@ function Configure-OBS {
|
||||||
Ensure-Directory ${CheckoutDir}
|
Ensure-Directory ${CheckoutDir}
|
||||||
Write-Status "Configuration of OBS build system..."
|
Write-Status "Configuration of OBS build system..."
|
||||||
|
|
||||||
|
$NumProcessors = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
|
||||||
|
|
||||||
|
if ( $NumProcessors -gt 1 ) {
|
||||||
|
$env:UseMultiToolTask = $true
|
||||||
|
$env:EnforceProcessCountAcrossBuilds = $true
|
||||||
|
}
|
||||||
|
|
||||||
# TODO: Clean up archive and directory naming across dependencies
|
# TODO: Clean up archive and directory naming across dependencies
|
||||||
$QtDirectory = "${CheckoutDir}/../obs-build-dependencies/Qt_${WindowsQtVersion}/msvc2019$(if (${BuildArch} -eq "64-bit") { "_64" })"
|
$CmakePrefixPath = Resolve-Path -Path "${CheckoutDir}/../obs-build-dependencies/windows-deps-${WindowsDepsVersion}-$(if (${BuildArch} -eq "64-bit") { "x64" } else { "x86" })"
|
||||||
$DepsDirectory = "${CheckoutDir}/../obs-build-dependencies/dependencies${WindowsDepsVersion}/win$(if (${BuildArch} -eq "64-bit") { "64" } else { "32" })"
|
$CefDirectory = Resolve-Path -Path "${CheckoutDir}/../obs-build-dependencies/cef_binary_${WindowsCefVersion}_windows_$(if (${BuildArch} -eq "64-bit") { "x64" } else { "x86" })"
|
||||||
$CefDirectory = "${CheckoutDir}/../obs-build-dependencies/cef_binary_${WindowsCefVersion}_windows_$(if (${BuildArch} -eq "64-bit") { "x64" } else { "x86" })"
|
|
||||||
$CmakePrefixPath = "${QtDirectory};${DepsDirectory}/bin;${DepsDirectory}"
|
|
||||||
$BuildDirectoryActual = "${BuildDirectory}$(if (${BuildArch} -eq "64-bit") { "64" } else { "32" })"
|
$BuildDirectoryActual = "${BuildDirectory}$(if (${BuildArch} -eq "64-bit") { "64" } else { "32" })"
|
||||||
$GeneratorPlatform = "$(if (${BuildArch} -eq "64-bit") { "x64" } else { "Win32" })"
|
$GeneratorPlatform = "$(if (${BuildArch} -eq "64-bit") { "x64" } else { "Win32" })"
|
||||||
|
|
||||||
|
@ -54,9 +66,11 @@ function Configure-OBS {
|
||||||
"-G `"${CmakeGenerator}`"",
|
"-G `"${CmakeGenerator}`"",
|
||||||
"-DCMAKE_GENERATOR_PLATFORM=`"${GeneratorPlatform}`"",
|
"-DCMAKE_GENERATOR_PLATFORM=`"${GeneratorPlatform}`"",
|
||||||
"-DCMAKE_SYSTEM_VERSION=`"${CmakeSystemVersion}`"",
|
"-DCMAKE_SYSTEM_VERSION=`"${CmakeSystemVersion}`"",
|
||||||
"-DCMAKE_PREFIX_PATH=`"${CmakePrefixPath}`"",
|
"-DCMAKE_PREFIX_PATH:PATH=`"${CmakePrefixPath}`"",
|
||||||
"-DCEF_ROOT_DIR=`"${CefDirectory}`"",
|
"-DCEF_ROOT_DIR:PATH=`"${CefDirectory}`"",
|
||||||
"-DVLC_PATH=`"${CheckoutDir}/../obs-build-dependencies/vlc-${WindowsVlcVersion}`"",
|
"-DENABLE_BROWSER=ON",
|
||||||
|
"-DVLC_PATH:PATH=`"${CheckoutDir}/../obs-build-dependencies/vlc-${WindowsVlcVersion}`"",
|
||||||
|
"-DENABLE_VLC=ON",
|
||||||
"-DCMAKE_INSTALL_PREFIX=`"${BuildDirectoryActual}/install`"",
|
"-DCMAKE_INSTALL_PREFIX=`"${BuildDirectoryActual}/install`"",
|
||||||
"-DVIRTUALCAM_GUID=`"${Env:VIRTUALCAM-GUID}`"",
|
"-DVIRTUALCAM_GUID=`"${Env:VIRTUALCAM-GUID}`"",
|
||||||
"-DTWITCH_CLIENTID=`"${Env:TWITCH_CLIENTID}`"",
|
"-DTWITCH_CLIENTID=`"${Env:TWITCH_CLIENTID}`"",
|
||||||
|
|
|
@ -103,7 +103,6 @@ macro(setup_obs_project)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_FOR_DISTRIBUTION OR DEFINED ENV{CI})
|
if(BUILD_FOR_DISTRIBUTION OR DEFINED ENV{CI})
|
||||||
set_option(CMAKE_PREFIX_PATH "/tmp/obsdeps")
|
|
||||||
set_option(ENABLE_SPARKLE_UPDATER ON)
|
set_option(ENABLE_SPARKLE_UPDATER ON)
|
||||||
set_option(ENABLE_RTMPS ON)
|
set_option(ENABLE_RTMPS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -363,12 +363,13 @@ function(setup_obs_bundle target)
|
||||||
COMPONENT obs_resources)
|
COMPONENT obs_resources)
|
||||||
|
|
||||||
if(ENABLE_SPARKLE_UPDATER)
|
if(ENABLE_SPARKLE_UPDATER)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${target}
|
TARGET ${target}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND
|
COMMAND
|
||||||
/bin/sh -c
|
/bin/sh -c
|
||||||
"plutil -replace SUFeedURL -string https://obsproject.com/osx_update/stable/updates.xml \"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Info.plist\""
|
"plutil -replace SUFeedURL -string https://obsproject.com/osx_update/stable/updates_${CMAKE_OSX_ARCHITECTURES}.xml \"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Info.plist\""
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.13</string>
|
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>LSAppNapIsDisabled</key>
|
<key>LSAppNapIsDisabled</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<string>MacOSX</string>
|
<string>MacOSX</string>
|
||||||
</array>
|
</array>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.13</string>
|
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
|
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -21,7 +21,9 @@
|
||||||
<string>MacOSX</string>
|
<string>MacOSX</string>
|
||||||
</array>
|
</array>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.13</string>
|
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>(c) 2012-${CURRENT_YEAR} Hugh Bailey</string>
|
||||||
<key>CFPlugInFactories</key>
|
<key>CFPlugInFactories</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6</key>
|
<key>7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6</key>
|
||||||
|
|
|
@ -9,9 +9,21 @@ if(POLICY CMP0011)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add additional search paths for dylibbundler
|
# Add additional search paths for dylibbundler
|
||||||
|
list(APPEND _FIXUP_BUNDLES
|
||||||
|
"-s \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks\"")
|
||||||
list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/lib\"")
|
list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/lib\"")
|
||||||
list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/Frameworks\"")
|
list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/Frameworks\"")
|
||||||
|
|
||||||
|
foreach(_PREFIX_PATH IN LISTS _DEPENDENCY_PREFIX)
|
||||||
|
list(APPEND _FIXUP_BUNDLES "-s \"${_PREFIX_PATH}/lib\"")
|
||||||
|
file(GLOB _DYLIBS "${_PREFIX_PATH}/lib/*.dylib")
|
||||||
|
file(
|
||||||
|
COPY ${_DYLIBS}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks
|
||||||
|
FOLLOW_SYMLINK_CHAIN)
|
||||||
|
unset(_DYLIBS)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# Unlinked modules need to be supplied manually to dylibbundler
|
# Unlinked modules need to be supplied manually to dylibbundler
|
||||||
|
|
||||||
# Find all modules (plugin and standalone)
|
# Find all modules (plugin and standalone)
|
||||||
|
|
Loading…
Reference in New Issue