diff --git a/CI/before-deploy-osx.sh b/CI/before-deploy-osx.sh index 4e698b82f..49fa42dcb 100755 --- a/CI/before-deploy-osx.sh +++ b/CI/before-deploy-osx.sh @@ -19,6 +19,15 @@ hr "Moving CEF out to preserve linking" mv ./rundir/RelWithDebInfo/obs-plugins/CEF.app ./ mv ./rundir/RelWithDebInfo/obs-plugins/obs-browser.so ./ +# Move obslua +hr "Moving OBS LUA" +mv ./rundir/RelWithDebInfo/data/obs-scripting/obslua.so ./rundir/RelWithDebInfo/bin/ + +# Move obspython +hr "Moving OBS Python" +mv ./rundir/RelWithDebInfo/data/obs-scripting/_obspython.so ./rundir/RelWithDebInfo/bin/ +mv ./rundir/RelWithDebInfo/data/obs-scripting/obspython.py ./rundir/RelWithDebInfo/bin/ + # Package everything into a nice .app hr "Packaging .app" STABLE=false diff --git a/CI/before-script-osx.sh b/CI/before-script-osx.sh index d20a4f9ed..6cff70dab 100755 --- a/CI/before-script-osx.sh +++ b/CI/before-script-osx.sh @@ -3,9 +3,7 @@ export PATH=/usr/local/opt/ccache/libexec:$PATH mkdir build cd build -cmake -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib \ --DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/include/python3.6m \ --DENABLE_SPARKLE_UPDATER=ON \ +cmake -DENABLE_SPARKLE_UPDATER=ON \ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 \ -DDepsPath=/tmp/obsdeps \ -DVLCPath=$PWD/../../vlc-master \ diff --git a/CI/install-dependencies-osx.sh b/CI/install-dependencies-osx.sh index 2faa02a71..4d5329661 100755 --- a/CI/install-dependencies-osx.sh +++ b/CI/install-dependencies-osx.sh @@ -6,10 +6,6 @@ set -v git fetch --unshallow -# Fix ruby issue on OSX https://github.com/travis-ci/travis-ci/issues/6307 -gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 -rvm get stable - # Leave obs-studio folder cd ../ @@ -21,7 +17,7 @@ sudo installer -pkg ./Packages.pkg -target / brew update #Base OBS Deps and ccache -brew install qt5 jack speexdsp ccache python3 swig +brew install qt5 jack speexdsp ccache swig export PATH=/usr/local/opt/ccache/libexec:$PATH ccache -s || echo "CCache is not available." diff --git a/CI/install/osx/build_app.py b/CI/install/osx/build_app.py index 907e11300..447db9b5e 100644 --- a/CI/install/osx/build_app.py +++ b/CI/install/osx/build_app.py @@ -197,6 +197,8 @@ for path, external, copy_as in inspected: filename = path rpath = "" if external: + if copy_as == "Python": + continue id_ = "-id '@rpath/%s'"%copy_as filename = prefix + "bin/" +copy_as rpath = "-add_rpath @loader_path/ -add_rpath @executable_path/" diff --git a/CI/util/build-package-deps-osx.sh b/CI/util/build-package-deps-osx.sh index 077cfc6d2..12fb805b9 100755 --- a/CI/util/build-package-deps-osx.sh +++ b/CI/util/build-package-deps-osx.sh @@ -129,7 +129,7 @@ unzip ./n3.2.2.zip cd ./FFmpeg-n3.2.2 mkdir build cd ./build -../configure --extra-ldflags="-mmacosx-version-min=10.9" --enable-shared --disable-static --shlibdir="/tmp/obsdeps/bin" --enable-gpl --disable-doc --enable-libx264 --enable-libopus --enable-libvorbis --enable-libvpx +../configure --extra-ldflags="-mmacosx-version-min=10.9" --enable-shared --disable-static --shlibdir="/tmp/obsdeps/bin" --enable-gpl --disable-doc --enable-libx264 --enable-libopus --enable-libvorbis --enable-libvpx --disable-outdev=sdl make -j 12 find . -name \*.dylib -exec cp \{\} $DEPS_DEST/bin/ \; rsync -avh --include="*/" --include="*.h" --exclude="*" ../* $DEPS_DEST/include/ diff --git a/UI/CMakeLists.txt b/UI/CMakeLists.txt index 265f1dc0b..b5dc3dd25 100644 --- a/UI/CMakeLists.txt +++ b/UI/CMakeLists.txt @@ -276,7 +276,7 @@ if (APPLE) TARGET obs APPEND PROPERTY INSTALL_RPATH - "/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/lib/" + "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/" "/Library/Frameworks/Python.framework/Versions/3.6/lib/" "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/" ) diff --git a/deps/obs-scripting/obspython/CMakeLists.txt b/deps/obs-scripting/obspython/CMakeLists.txt index 5edb4027a..f5475e994 100644 --- a/deps/obs-scripting/obspython/CMakeLists.txt +++ b/deps/obs-scripting/obspython/CMakeLists.txt @@ -45,6 +45,17 @@ function(install_plugin_bin_swig target additional_target) set_target_properties(${additional_target} PROPERTIES PREFIX "") + if (APPLE) + set_property( + TARGET ${additional_target} + APPEND + PROPERTY INSTALL_RPATH + "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/" + "/Library/Frameworks/Python.framework/Versions/3.6/lib/" + "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/" + ) + endif() + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/obspython.py" DESTINATION "${OBS_SCRIPT_PLUGIN_DESTINATION}") install(TARGETS "${additional_target}"