diff options
author | Memphiz <memphis@machzwo.de> | 2014-06-22 22:09:06 +0200 |
---|---|---|
committer | Trent Nelson <trent.nelson@pivosgroup.com> | 2014-07-08 15:26:52 +0800 |
commit | c39c6edd129af3b57c1dc9e9ba2a9ba76e02cba8 (patch) | |
tree | d7535ddfc86b23ee8e373cb210e42ba15db19816 | |
parent | c481d23789ab29d94d0675fb2cbf6a425abdc657 (diff) |
Merge pull request #4926 from Memphiz/osxfixpython
[osx/depends] - add a fake Info.plist to target python26 for allowing codesign...
-rwxr-xr-x | tools/darwin/Support/copyframeworks-osx.command | 10 | ||||
-rw-r--r-- | xbmc/osx/DarwinUtils.mm | 14 |
2 files changed, 17 insertions, 7 deletions
diff --git a/tools/darwin/Support/copyframeworks-osx.command b/tools/darwin/Support/copyframeworks-osx.command index 1635c5640d..234b116422 100755 --- a/tools/darwin/Support/copyframeworks-osx.command +++ b/tools/darwin/Support/copyframeworks-osx.command @@ -54,15 +54,15 @@ TARGET_NAME=$PRODUCT_NAME TARGET_CONTENTS=$TARGET_BUILD_DIR/$TARGET_NAME/Contents TARGET_BINARY=$TARGET_CONTENTS/MacOS/XBMC -TARGET_FRAMEWORKS=$TARGET_CONTENTS/Frameworks -DYLIB_NAMEPATH=@executable_path/../Frameworks +TARGET_FRAMEWORKS=$TARGET_CONTENTS/Libraries +DYLIB_NAMEPATH=@executable_path/../Libraries XBMC_HOME=$TARGET_CONTENTS/Resources/XBMC mkdir -p "$TARGET_CONTENTS/MacOS" mkdir -p "$TARGET_CONTENTS/Resources" # start clean so we don't keep old dylibs -rm -rf "$TARGET_CONTENTS/Frameworks" -mkdir -p "$TARGET_CONTENTS/Frameworks" +rm -rf "$TARGET_CONTENTS/Libraries" +mkdir -p "$TARGET_CONTENTS/Libraries" echo "Package $TARGET_BUILD_DIR/XBMC" cp -f "$TARGET_BUILD_DIR/XBMC" "$TARGET_BINARY" @@ -82,7 +82,7 @@ for a in $(otool -L "$TARGET_BINARY" | grep "$EXTERNAL_LIBS" | awk ' { print $1 done echo "Package $EXTERNAL_LIBS/lib/python2.6" -mkdir -p "$TARGET_CONTENTS/Frameworks/lib" +mkdir -p "$TARGET_CONTENTS/Libraries/lib" PYTHONSYNC="rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests" ${PYTHONSYNC} "$EXTERNAL_LIBS/lib/python2.6" "$TARGET_FRAMEWORKS/lib/" rm -rf "$TARGET_FRAMEWORKS/lib/python2.6/config" diff --git a/xbmc/osx/DarwinUtils.mm b/xbmc/osx/DarwinUtils.mm index 6a7c659b9f..f7ce3da1e6 100644 --- a/xbmc/osx/DarwinUtils.mm +++ b/xbmc/osx/DarwinUtils.mm @@ -273,11 +273,21 @@ int GetDarwinFrameworkPath(bool forPython, char* path, uint32_t *pathsize) } // d) XBMC application running under OSX - pathname = [[NSBundle mainBundle] privateFrameworksPath]; + pathname = [[NSBundle mainBundle] executablePath]; if (pathname && strstr([pathname UTF8String], "Contents")) { - // check for 'Contents' if we are running as real xbmc.app strcpy(path, [pathname UTF8String]); + // ExectuablePath is <product>.app/Contents/MacOS/<executable> + char *lastSlash = strrchr(path, '/'); + if (lastSlash) + { + *lastSlash = '\0';//remove /<executable> + lastSlash = strrchr(path, '/'); + if (lastSlash) + *lastSlash = '\0';//remove /MacOS + } + strcat(path, "/Libraries");//add /Libraries + //we should have <product>.app/Contents/Libraries now *pathsize = strlen(path); //CLog::Log(LOGDEBUG, "DarwinFrameworkPath(d) -> %s", path); return 0; |