2018-04-12 16:24:38 -07:00
|
|
|
hr() {
|
|
|
|
echo "───────────────────────────────────────────────────"
|
|
|
|
echo $1
|
|
|
|
echo "───────────────────────────────────────────────────"
|
|
|
|
}
|
|
|
|
|
2017-02-16 18:28:22 -08:00
|
|
|
# Exit if something fails
|
|
|
|
set -e
|
|
|
|
|
2017-05-08 06:10:51 -07:00
|
|
|
# Echo all commands before executing
|
|
|
|
set -v
|
|
|
|
|
2019-02-21 14:33:58 -08:00
|
|
|
if [ -v "$TRAVIS" ]; then
|
|
|
|
git fetch --unshallow
|
|
|
|
fi
|
2017-02-25 09:31:44 -08:00
|
|
|
|
2017-01-21 22:49:01 -08:00
|
|
|
# Leave obs-studio folder
|
|
|
|
cd ../
|
|
|
|
|
2017-02-05 09:46:49 -08:00
|
|
|
# Install Packages app so we can build a package later
|
|
|
|
# http://s.sudre.free.fr/Software/Packages/about.html
|
2018-04-12 16:24:38 -07:00
|
|
|
hr "Downloading Packages app"
|
|
|
|
wget --quiet --retry-connrefused --waitretry=1 https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
|
2017-01-15 09:17:13 -08:00
|
|
|
sudo installer -pkg ./Packages.pkg -target /
|
|
|
|
|
2016-10-09 15:26:44 -07:00
|
|
|
brew update
|
2016-10-13 17:30:23 -07:00
|
|
|
|
2017-02-27 02:10:39 -08:00
|
|
|
#Base OBS Deps and ccache
|
2019-05-02 16:39:59 -07:00
|
|
|
brew install jack speexdsp ccache mbedtls
|
2019-02-02 18:05:36 -08:00
|
|
|
brew install https://gist.githubusercontent.com/DDRBoxman/b3956fab6073335a4bf151db0dcbd4ad/raw/ed1342a8a86793ea8c10d8b4d712a654da121ace/qt.rb
|
2019-05-02 16:39:59 -07:00
|
|
|
brew install https://gist.githubusercontent.com/DDRBoxman/4cada55c51803a2f963fa40ce55c9d3e/raw/572c67e908bfbc1bcb8c476ea77ea3935133f5b5/swig.rb
|
2017-02-27 02:10:39 -08:00
|
|
|
|
|
|
|
export PATH=/usr/local/opt/ccache/libexec:$PATH
|
|
|
|
ccache -s || echo "CCache is not available."
|
2017-01-07 16:03:17 -08:00
|
|
|
|
2017-02-05 09:46:49 -08:00
|
|
|
# Fetch and untar prebuilt OBS deps that are compatible with older versions of OSX
|
2018-04-12 16:24:38 -07:00
|
|
|
hr "Downloading OBS deps"
|
2018-08-17 23:26:22 -07:00
|
|
|
wget --quiet --retry-connrefused --waitretry=1 https://obs-nightly.s3.amazonaws.com/osx-deps-2018-08-09.tar.gz
|
2018-08-09 19:47:47 -07:00
|
|
|
tar -xf ./osx-deps-2018-08-09.tar.gz -C /tmp
|
2016-10-13 17:30:23 -07:00
|
|
|
|
2017-02-05 09:46:49 -08:00
|
|
|
# Fetch vlc codebase
|
2018-04-12 16:24:38 -07:00
|
|
|
hr "Downloading VLC repo"
|
2018-11-30 12:33:04 -08:00
|
|
|
wget --quiet --retry-connrefused --waitretry=1 https://downloads.videolan.org/vlc/3.0.4/vlc-3.0.4.tar.xz
|
|
|
|
tar -xf vlc-3.0.4.tar.xz
|
2017-01-21 22:49:01 -08:00
|
|
|
|
2017-02-05 09:46:49 -08:00
|
|
|
# Get sparkle
|
2018-04-12 16:24:38 -07:00
|
|
|
hr "Downloading Sparkle framework"
|
2018-08-01 21:08:24 -07:00
|
|
|
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-02-05 09:46:49 -08:00
|
|
|
mkdir ./sparkle
|
|
|
|
tar -xf ./sparkle.tar.bz2 -C ./sparkle
|
2017-03-05 18:33:53 -08:00
|
|
|
sudo cp -R ./sparkle/Sparkle.framework /Library/Frameworks/Sparkle.framework
|
2017-02-05 09:46:49 -08:00
|
|
|
|
2016-10-10 20:49:45 -07:00
|
|
|
# CEF Stuff
|
2018-04-12 16:24:38 -07: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-03-01 13:27:33 -08:00
|
|
|
tar -xf ./cef_binary_${CEF_BUILD_VERSION}_macosx64.tar.bz2
|
|
|
|
cd ./cef_binary_${CEF_BUILD_VERSION}_macosx64
|
2017-08-18 13:52:04 -07:00
|
|
|
# remove a broken test
|
|
|
|
sed -i '.orig' '/add_subdirectory(tests\/ceftests)/d' ./CMakeLists.txt
|
2016-10-10 20:49:45 -07:00
|
|
|
mkdir build
|
|
|
|
cd ./build
|
2018-08-01 21:08:20 -07: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 ..
|
2016-10-10 20:49:45 -07:00
|
|
|
make -j4
|
|
|
|
mkdir libcef_dll
|
|
|
|
cd ../../
|