yolobs-studio/CI/install-dependencies-osx.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

82 lines
3 KiB
Bash
Raw Normal View History

2018-12-16 16:14:58 +00:00
hr() {
echo "───────────────────────────────────────────────────"
echo $1
echo "───────────────────────────────────────────────────"
}
2017-04-19 19:54:15 +00:00
# Exit if something fails
set -e
2017-06-29 19:01:10 +00:00
# Echo all commands before executing
set -v
2019-07-27 12:47:10 +00:00
if [[ $TRAVIS ]]; then
git fetch --unshallow
fi
2017-04-19 19:54:15 +00:00
2019-12-10 19:31:54 +00:00
git fetch origin --tags
2017-04-19 19:54:15 +00:00
# Leave obs-studio folder
cd ../
# Install Packages app so we can build a package later
# http://s.sudre.free.fr/Software/Packages/about.html
2018-12-16 16:14:58 +00:00
hr "Downloading Packages app"
wget --quiet --retry-connrefused --waitretry=1 https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
2017-04-19 19:54:15 +00:00
sudo installer -pkg ./Packages.pkg -target /
brew update
2017-06-29 19:01:10 +00:00
#Base OBS Deps and ccache
2020-10-01 20:15:25 +00:00
for DEPENDENCY in jack speexdsp ccache mbedtls freetype fdk-aac cmocka; do
if [ ! -d "$(brew --cellar)/${DEPENDENCY}" ]; then
brew install $DEPENDENCY
else
brew upgrade $DEPENDENCY
fi
done
2020-03-25 08:07:22 +00:00
brew install https://gist.githubusercontent.com/DDRBoxman/9c7a2b08933166f4b61ed9a44b242609/raw/ef4de6c587c6bd7f50210eccd5bd51ff08e6de13/qt.rb
2020-05-27 20:57:19 +00:00
if [ -d "$(brew --cellar)/swig" ]; then
brew unlink swig
fi
2019-07-27 12:47:10 +00:00
brew install https://gist.githubusercontent.com/DDRBoxman/4cada55c51803a2f963fa40ce55c9d3e/raw/572c67e908bfbc1bcb8c476ea77ea3935133f5b5/swig.rb
2017-06-29 19:01:10 +00:00
2019-12-10 19:31:54 +00:00
pip install dmgbuild
2017-06-29 19:01:10 +00:00
export PATH=/usr/local/opt/ccache/libexec:$PATH
ccache -s || echo "CCache is not available."
2017-04-19 19:54:15 +00:00
# Fetch and untar prebuilt OBS deps that are compatible with older versions of OSX
2018-12-16 16:14:58 +00:00
hr "Downloading OBS deps"
2020-05-27 20:57:19 +00:00
wget --quiet --retry-connrefused --waitretry=1 https://github.com/obsproject/obs-deps/releases/download/2020-04-24/osx-deps-2020-04-24.tar.gz
tar -xf ./osx-deps-2020-04-24.tar.gz -C /tmp
2017-04-19 19:54:15 +00:00
# Fetch vlc codebase
2018-12-16 16:14:58 +00:00
hr "Downloading VLC repo"
2020-05-27 20:57:19 +00:00
wget --quiet --retry-connrefused --waitretry=1 https://downloads.videolan.org/vlc/3.0.8/vlc-3.0.8.tar.xz
tar -xf vlc-3.0.8.tar.xz
2017-04-19 19:54:15 +00:00
# Get sparkle
2018-12-16 16:14:58 +00:00
hr "Downloading Sparkle framework"
2020-05-27 20:57:19 +00:00
wget --quiet --retry-connrefused --waitretry=1 -O sparkle.tar.bz2 https://github.com/sparkle-project/Sparkle/releases/download/1.23.0/Sparkle-1.23.0.tar.bz2
2017-04-19 19:54:15 +00:00
mkdir ./sparkle
tar -xf ./sparkle.tar.bz2 -C ./sparkle
sudo cp -R ./sparkle/Sparkle.framework /Library/Frameworks/Sparkle.framework
# CEF Stuff
2018-12-16 16:14:58 +00:00
hr "Downloading CEF"
wget --quiet --retry-connrefused --waitretry=1 https://obs-nightly.s3-us-west-2.amazonaws.com/cef_binary_${CEF_BUILD_VERSION}_macosx64.tar.bz2
2017-04-19 19:54:15 +00:00
tar -xf ./cef_binary_${CEF_BUILD_VERSION}_macosx64.tar.bz2
cd ./cef_binary_${CEF_BUILD_VERSION}_macosx64
2018-02-19 19:54:37 +00:00
# remove a broken test
sed -i '.orig' '/add_subdirectory(tests\/ceftests)/d' ./CMakeLists.txt
2019-07-27 12:47:10 +00:00
# target 10.11
sed -i '.orig' s/\"10.9\"/\"10.11\"/ ./cmake/cef_variables.cmake
2017-04-19 19:54:15 +00:00
mkdir build
cd ./build
2018-12-16 16:14:58 +00:00
cmake -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 ..
2017-04-19 19:54:15 +00:00
make -j4
mkdir libcef_dll
cd ../../