From 522c43f8273d8d9435167df9669f734a12fb4c71 Mon Sep 17 00:00:00 2001 From: Colin Edwards Date: Thu, 13 Oct 2016 19:30:23 -0500 Subject: [PATCH] CI: Use python2 to run package script --- CI/before-deploy-osx.sh | 2 +- CI/install-dependencies-osx.sh | 5 ++++- CI/install/osx/build_app.py | 25 ++++++++++--------------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CI/before-deploy-osx.sh b/CI/before-deploy-osx.sh index 0ccb931f9..48dab13dd 100755 --- a/CI/before-deploy-osx.sh +++ b/CI/before-deploy-osx.sh @@ -3,6 +3,6 @@ export FILE_DATE=$(date +%Y-%m-%d.%H:%M:%S) export FILENAME=$FILE_DATE-$GIT_HASH-osx.zip mkdir nightly cd ./build -sudo python3 ../CI/install/osx/build_app.py +sudo python ../CI/install/osx/build_app.py zip -r -X $FILENAME OBS.app mv ./$FILENAME ../nightly diff --git a/CI/install-dependencies-osx.sh b/CI/install-dependencies-osx.sh index 739132711..5a7d7836b 100755 --- a/CI/install-dependencies-osx.sh +++ b/CI/install-dependencies-osx.sh @@ -1,2 +1,5 @@ brew update -brew install ffmpeg x264 qt5 python3 \ No newline at end of file + +#Base OBS Deps +brew install ffmpeg x264 qt5 python + diff --git a/CI/install/osx/build_app.py b/CI/install/osx/build_app.py index f47a47428..58a0178f3 100644 --- a/CI/install/osx/build_app.py +++ b/CI/install/osx/build_app.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python3.3 +#!/usr/bin/env python candidate_paths = "bin obs-plugins data".split() -plist_path = "../cmake/osxbundle/info.plist" +plist_path = "../cmake/osxbundle/Info.plist" icon_path = "../cmake/osxbundle/obs.icns" run_path = "../cmake/osxbundle/obslaunch.sh" @@ -75,7 +75,7 @@ for i in candidate_paths: if "is not an object file" in out: continue except: - pass + continue rel_path = path[len(build_path)+1:] print(repr(path), repr(rel_path)) add(rel_path) @@ -98,13 +98,8 @@ while inspect: path = target.path if path[0] == "@": continue - try: - out = check_output("{0}otool -L '{1}'".format(args.prefix, path), shell=True, + 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: - pass if "QtCore" in path: add_plugins(path, "platforms") @@ -116,7 +111,7 @@ while inspect: 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)) + print "Using sparkle path:", repr(actual_sparkle_path) if not new or new[0] == "@" or new.endswith(path.split("/")[-1]): continue whitelisted = False @@ -142,8 +137,8 @@ changes = " ".join(changes) info = plistlib.readPlist(plist_path) -latest_tag="TACO" #= cmd('git describe --tags --abbrev=0') -log ="BUTTS"#cmd('git log --pretty=oneline {0}...HEAD'.format(latest_tag)) +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 @@ -178,8 +173,8 @@ if args.sparkle is not None: 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)) +cmd('{0}install_name_tool -change {1} {2} {3}/bin/obs'.format( + args.prefix, actual_sparkle_path, sparkle_path.format('../..'), prefix)) @@ -213,4 +208,4 @@ try: rename("tmp", app_name) except: print("App already exists") - rmtree("tmp") + rmtree("tmp") \ No newline at end of file