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

63 lines
2.4 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
git fetch --unshallow
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
2018-12-16 16:14:58 +00:00
brew install jack speexdsp ccache swig mbedtls
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9a70413d137839de0054571e5f85fd07ee400955/Formula/qt.rb
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"
wget --quiet --retry-connrefused --waitretry=1 https://obs-nightly.s3.amazonaws.com/osx-deps-2018-08-09.tar.gz
tar -xf ./osx-deps-2018-08-09.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"
wget --quiet --retry-connrefused --waitretry=1 -O vlc-master.zip https://github.com/videolan/vlc/archive/master.zip
2017-04-19 19:54:15 +00:00
unzip -q ./vlc-master.zip
# Get sparkle
2018-12-16 16:14:58 +00:00
hr "Downloading Sparkle framework"
wget --quiet --retry-connrefused --waitretry=1 -O sparkle.tar.bz2 https://github.com/sparkle-project/Sparkle/releases/download/1.20.0/Sparkle-1.20.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
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 ../../