This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
forked from obsproject/obs-studio
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from WatchBeam/obs_merge
Obs merge
- Loading branch information
Showing
249 changed files
with
9,676 additions
and
659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
os: osx | ||
osx_image: xcode7.1 | ||
env: | ||
matrix: | ||
- CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake | ||
global: | ||
# AWS S3 creds | ||
# access key | ||
- secure: "MfhOg+84yb4ZHB2tM8PIPFQX2Y+WLN0I0iiAgyLC4KaHPUoNOyloe9yk6OjV7Lj7SZWqTlQUsqHa8S9mOUswGIody1Ydglo4RvyGOKCd8I6b2ri/jE8qHVuD9sO+sNlIxq4YqqG/qReTsbSs2YEgLneZUCYLCk/fihl8L6eVuSc=" | ||
# secret | ||
- secure: "JRQVU2zgC3hY6CEY+Crmh/upp93En0BzKaLcsuBT538johNlK7m5hn3m2UOw63seLvBvVaKKWUDj9N986a3DwcXxWPMyF/9ctXgNWy39WzaVWxrbVR5nQB1fdiRp5YEgkoVN+gEm3OVF7sV5AGzh5/8CvEdRCoTLIGgMGHxW9mc=" | ||
|
||
language: cpp | ||
|
||
before_install: "./CI/install-dependencies-osx.sh" | ||
before_script: "./CI/before-script-osx.sh" | ||
script: cd ./build && make -j4 && cd - | ||
before_deploy: "./CI/before-deploy-osx.sh" | ||
|
||
deploy: | ||
provider: s3 | ||
access_key_id: $AWS_ACCESS_KEY | ||
secret_access_key: $AWS_SECRET_KEY | ||
skip_cleanup: true | ||
local_dir: nightly | ||
bucket: obs-nightly | ||
region: us-west-2 | ||
acl: public_read | ||
on: | ||
repo: jp9000/obs-studio | ||
|
||
# The channel name "azubu.il.us.quakenet.org#obs-dev" is encrypted against jp9000/obs-studio to prevent IRC spam of forks | ||
notifications: | ||
irc: | ||
skip_join: true | ||
template: | ||
- "%{message} %{build_url}" | ||
channels: | ||
- secure: k9j7+ogVODMlveZdd5pP73AVLCFl1VbzVaVon0ECn3EQcxnLSpiZbc6l+PnIUKgee5pRKtUB4breufgmr4puq3s69YeQiOVKk5gx2yJGZ5jGacbSne0xTspzPxapiEbVUkcJ2L7gKntDG4+SUiW67dtt4G26O7zsErDF/lY/woQ= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export GIT_HASH=$(git rev-parse --short HEAD) | ||
export FILE_DATE=$(date +%Y-%m-%d.%H:%M:%S) | ||
export FILENAME=$FILE_DATE-$GIT_HASH-osx.zip | ||
mkdir nightly | ||
cd ./build | ||
sudo python ../CI/install/osx/build_app.py | ||
zip -r -X $FILENAME OBS.app | ||
mv ./$FILENAME ../nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mkdir build | ||
cd build | ||
cmake -DBUILD_BROWSER=ON -DCEF_ROOT_DIR=$PWD/../../cef_binary_3.2704.1434.gec3e9ed_macosx64 .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
brew update | ||
|
||
#Base OBS Deps | ||
brew install ffmpeg x264 qt5 python cmake | ||
|
||
# CEF Stuff | ||
cd ../ | ||
curl -kLO http://opensource.spotify.com/cefbuilds/cef_binary_3.2704.1434.gec3e9ed_macosx64.tar.bz2 | ||
tar -xf ./cef_binary_3.2704.1434.gec3e9ed_macosx64.tar.bz2 | ||
cd ./cef_binary_3.2704.1434.gec3e9ed_macosx64 | ||
mkdir build | ||
cd ./build | ||
cmake -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-std=c++11 -stdlib=libc++" .. | ||
make -j4 | ||
mkdir libcef_dll | ||
mv ./libcef_dll_wrapper/libcef_dll_wrapper.a ./libcef_dll/libcef_dll_wrapper.a | ||
cd ../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
#!/usr/bin/env python | ||
|
||
candidate_paths = "bin obs-plugins data".split() | ||
|
||
plist_path = "../cmake/osxbundle/Info.plist" | ||
icon_path = "../cmake/osxbundle/obs.icns" | ||
run_path = "../cmake/osxbundle/obslaunch.sh" | ||
|
||
#not copied | ||
blacklist = """/usr /System""".split() | ||
|
||
#copied | ||
whitelist = """/usr/local""".split() | ||
|
||
# | ||
# | ||
# | ||
|
||
|
||
from sys import argv | ||
from glob import glob | ||
from subprocess import check_output, call | ||
from collections import namedtuple | ||
from shutil import copy, copytree, rmtree | ||
from os import makedirs, rename, walk, path as ospath | ||
import plistlib | ||
|
||
import argparse | ||
parser = argparse.ArgumentParser(description='obs-studio package util') | ||
parser.add_argument('-d', '--base-dir', dest='dir', default='rundir/RelWithDebInfo') | ||
parser.add_argument('-n', '--build-number', dest='build_number', default='0') | ||
parser.add_argument('-k', '--public-key', dest='public_key', default='OBSPublicDSAKey.pem') | ||
parser.add_argument('-f', '--sparkle-framework', dest='sparkle', default=None) | ||
parser.add_argument('-b', '--base-url', dest='base_url', default='https://builds.catchexception.org/obs-studio') | ||
parser.add_argument('-u', '--user', dest='user', default='jp9000') | ||
parser.add_argument('-c', '--channel', dest='channel', default='master') | ||
parser.add_argument('-s', '--stable', dest='stable', required=False, action='store_true', default=False) | ||
parser.add_argument('-p', '--prefix', dest='prefix', default='') | ||
args = parser.parse_args() | ||
|
||
def cmd(cmd): | ||
import subprocess | ||
import shlex | ||
return subprocess.check_output(shlex.split(cmd)).rstrip('\r\n') | ||
|
||
LibTarget = namedtuple("LibTarget", ("path", "external", "copy_as")) | ||
|
||
inspect = list() | ||
|
||
inspected = set() | ||
|
||
build_path = args.dir | ||
build_path = build_path.replace("\\ ", " ") | ||
|
||
def add(name, external=False, copy_as=None): | ||
if external and copy_as is None: | ||
copy_as = name.split("/")[-1] | ||
if name[0] != "/": | ||
name = build_path+"/"+name | ||
t = LibTarget(name, external, copy_as) | ||
if t in inspected: | ||
return | ||
inspect.append(t) | ||
inspected.add(t) | ||
|
||
|
||
for i in candidate_paths: | ||
print("Checking " + i) | ||
for root, dirs, files in walk(build_path+"/"+i): | ||
for file_ in files: | ||
path = root + "/" + file_ | ||
try: | ||
out = check_output("{0}otool -L '{1}'".format(args.prefix, path), shell=True, | ||
universal_newlines=True) | ||
if "is not an object file" in out: | ||
continue | ||
except: | ||
continue | ||
rel_path = path[len(build_path)+1:] | ||
print(repr(path), repr(rel_path)) | ||
add(rel_path) | ||
|
||
def add_plugins(path, replace): | ||
for img in glob(path.replace( | ||
"lib/QtCore.framework/Versions/5/QtCore", | ||
"plugins/%s/*"%replace).replace( | ||
"Library/Frameworks/QtCore.framework/Versions/5/QtCore", | ||
"share/qt5/plugins/%s/*"%replace)): | ||
if "_debug" in img: | ||
continue | ||
add(img, True, img.split("plugins/")[-1]) | ||
|
||
actual_sparkle_path = '@loader_path/Frameworks/Sparkle.framework/Versions/A/Sparkle' | ||
|
||
while inspect: | ||
target = inspect.pop() | ||
print("inspecting", repr(target)) | ||
path = target.path | ||
if path[0] == "@": | ||
continue | ||
out = check_output("{0}otool -L '{1}'".format(args.prefix, path), shell=True, | ||
universal_newlines=True) | ||
|
||
if "QtCore" in path: | ||
add_plugins(path, "platforms") | ||
add_plugins(path, "imageformats") | ||
add_plugins(path, "accessible") | ||
|
||
|
||
for line in out.split("\n")[1:]: | ||
new = line.strip().split(" (")[0] | ||
if '@' in new and "sparkle.framework" in new.lower(): | ||
actual_sparkle_path = new | ||
print "Using sparkle path:", repr(actual_sparkle_path) | ||
if not new or new[0] == "@" or new.endswith(path.split("/")[-1]): | ||
continue | ||
whitelisted = False | ||
for i in whitelist: | ||
if new.startswith(i): | ||
whitelisted = True | ||
if not whitelisted: | ||
blacklisted = False | ||
for i in blacklist: | ||
if new.startswith(i): | ||
blacklisted = True | ||
break | ||
if blacklisted: | ||
continue | ||
add(new, True) | ||
|
||
changes = list() | ||
for path, external, copy_as in inspected: | ||
if not external: | ||
continue #built with install_rpath hopefully | ||
changes.append("-change '%s' '@rpath/%s'"%(path, copy_as)) | ||
changes = " ".join(changes) | ||
|
||
info = plistlib.readPlist(plist_path) | ||
|
||
latest_tag = cmd('git describe --tags --abbrev=0') | ||
log = cmd('git log --pretty=oneline {0}...HEAD'.format(latest_tag)) | ||
|
||
from os import path | ||
# set version | ||
if args.stable: | ||
info["CFBundleVersion"] = latest_tag | ||
info["CFBundleShortVersionString"] = latest_tag | ||
info["SUFeedURL"] = '{0}/stable/updates.xml'.format(args.base_url) | ||
else: | ||
info["CFBundleVersion"] = args.build_number | ||
info["CFBundleShortVersionString"] = '{0}.{1}'.format(latest_tag, args.build_number) | ||
info["SUFeedURL"] = '{0}/{1}/{2}/updates.xml'.format(args.base_url, args.user, args.channel) | ||
|
||
info["SUPublicDSAKeyFile"] = path.basename(args.public_key) | ||
info["OBSFeedsURL"] = '{0}/feeds.xml'.format(args.base_url) | ||
|
||
app_name = info["CFBundleName"]+".app" | ||
icon_file = "tmp/Contents/Resources/%s"%info["CFBundleIconFile"] | ||
|
||
copytree(build_path, "tmp/Contents/Resources/", symlinks=True) | ||
copy(icon_path, icon_file) | ||
plistlib.writePlist(info, "tmp/Contents/Info.plist") | ||
makedirs("tmp/Contents/MacOS") | ||
copy(run_path, "tmp/Contents/MacOS/%s"%info["CFBundleExecutable"]) | ||
try: | ||
copy(args.public_key, "tmp/Contents/Resources") | ||
except: | ||
pass | ||
|
||
if args.sparkle is not None: | ||
copytree(args.sparkle, "tmp/Contents/Frameworks/Sparkle.framework", symlinks=True) | ||
|
||
prefix = "tmp/Contents/Resources/" | ||
sparkle_path = '@loader_path/{0}/Frameworks/Sparkle.framework/Versions/A/Sparkle' | ||
|
||
cmd('{0}install_name_tool -change {1} {2} {3}/bin/obs'.format( | ||
args.prefix, actual_sparkle_path, sparkle_path.format('../..'), prefix)) | ||
|
||
|
||
|
||
for path, external, copy_as in inspected: | ||
id_ = "" | ||
filename = path | ||
rpath = "" | ||
if external: | ||
id_ = "-id '@rpath/%s'"%copy_as | ||
filename = prefix + "bin/" +copy_as | ||
rpath = "-add_rpath @loader_path/ -add_rpath @executable_path/" | ||
if "/" in copy_as: | ||
try: | ||
dirs = copy_as.rsplit("/", 1)[0] | ||
makedirs(prefix + "bin/" + dirs) | ||
except: | ||
pass | ||
copy(path, filename) | ||
else: | ||
filename = path[len(build_path)+1:] | ||
id_ = "-id '@rpath/../%s'"%filename | ||
if not filename.startswith("bin"): | ||
print(filename) | ||
rpath = "-add_rpath '@loader_path/{}/'".format(ospath.relpath("bin/", ospath.dirname(filename))) | ||
filename = prefix + filename | ||
|
||
cmd = "{0}install_name_tool {1} {2} {3} '{4}'".format(args.prefix, changes, id_, rpath, filename) | ||
call(cmd, shell=True) | ||
|
||
try: | ||
rename("tmp", app_name) | ||
except: | ||
print("App already exists") | ||
rmtree("tmp") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.