| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #!/bin/bash
- ##############################################################################
- # macOS dependency management function
- ##############################################################################
- #
- # This script file can be included in build scripts for macOS or run directly.
- #
- ##############################################################################
- # Halt on errors
- set -eE
- install_dependencies() {
- status "Install Homebrew dependencies"
- trap "caught_error 'install_dependencies'" ERR
- install_homebrew_deps
- }
- install-dependencies-standalone() {
- CHECKOUT_DIR="$(/usr/bin/git rev-parse --show-toplevel)"
- PRODUCT_NAME="OBS-Studio"
- DEPS_BUILD_DIR="${CHECKOUT_DIR}/../obs-build-dependencies"
- source "${CHECKOUT_DIR}/CI/include/build_support.sh"
- source "${CHECKOUT_DIR}/CI/include/build_support_macos.sh"
- status "Setup of OBS build dependencies"
- check_macos_version
- check_archs
- install_dependencies
- }
- print_usage() {
- echo -e "Usage: ${0}\n" \
- "-h, --help : Print this help\n" \
- "-q, --quiet : Suppress most build process output\n" \
- "-v, --verbose : Enable more verbose build process output\n" \
- "-a, --architecture : Specify build architecture (default: x86_64, alternative: arm64)\n"
- }
- install-dependencies-main() {
- if [ -z "${_RUN_OBS_BUILD_SCRIPT}" ]; then
- while true; do
- case "${1}" in
- -h | --help ) print_usage; exit 0 ;;
- -q | --quiet ) export QUIET=TRUE; shift ;;
- -v | --verbose ) export VERBOSE=TRUE; shift ;;
- -a | --architecture ) ARCH="${2}"; shift 2 ;;
- -- ) shift; break ;;
- * ) break ;;
- esac
- done
- install-dependencies-standalone
- fi
- }
- install-dependencies-main $*
|