diff options
author | Sylvain CECCHETTO <cecchetto.sylvain@me.com> | 2020-08-22 00:33:53 +0200 |
---|---|---|
committer | Sylvain CECCHETTO <cecchetto.sylvain@me.com> | 2020-08-26 11:04:48 +0200 |
commit | 41072b989f1d5b8dcade088b52b1a92629c636e2 (patch) | |
tree | fb88958ae42fef7a95b7e30b4df008da4a73df63 | |
parent | f11d5f00941e9cbb45919ce4879ec360b6c55b24 (diff) |
[tools/codesign][tvOS] Do fake sign, needed for jailbroken devices
-rwxr-xr-x | tools/darwin/Support/Codesign.command | 37 | ||||
-rw-r--r-- | tools/depends/target/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/darwin-embedded-entitlements/Makefile | 15 | ||||
-rw-r--r-- | tools/depends/target/darwin-embedded-entitlements/darwin_embedded_entitlements.xml (renamed from tools/depends/target/iosentitlements/ios11_entitlements.xml) | 0 | ||||
-rw-r--r-- | tools/depends/target/iosentitlements/Makefile | 15 |
5 files changed, 34 insertions, 35 deletions
diff --git a/tools/darwin/Support/Codesign.command b/tools/darwin/Support/Codesign.command index 1231127eb2..e26780ec58 100755 --- a/tools/darwin/Support/Codesign.command +++ b/tools/darwin/Support/Codesign.command @@ -6,7 +6,7 @@ set -x LIST_BINARY_EXTENSIONS="dylib so 0 vis pvr app" GEN_ENTITLEMENTS="$NATIVEPREFIX/bin/gen_entitlements.py" -IOS11_ENTITLEMENTS="$XBMC_DEPENDS/share/ios11_entitlements.xml" +DARWIN_EMBEDDED_ENTITLEMENTS="$XBMC_DEPENDS/share/darwin_embedded_entitlements.xml" LDID="$NATIVEPREFIX/bin/ldid" if [ "${PLATFORM_NAME}" == "macosx" ]; then @@ -25,25 +25,24 @@ if [[ "$MACOS" || "${PLATFORM_NAME}" == "iphoneos" || "${PLATFORM_NAME}" == "app CONTENTS_PATH="${CODESIGNING_FOLDER_PATH}" fi - # todo: is this required anymore? - if [ "${PLATFORM_NAME}" == "iphoneos" ]; then - #do fake sign - needed for jailbroken ios5.1 devices for some reason - if [ -f ${LDID} ]; then - find ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/ -name "*.dylib" | xargs ${LDID} -S${IOS11_ENTITLEMENTS} - find ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/ -name "*.so" | xargs ${LDID} -S${IOS11_ENTITLEMENTS} - ${LDID} -S${IOS11_ENTITLEMENTS} ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME} + # do fake sign - needed for iOS >=5.1 and tvOS >=10.2 jailbroken devices + # see http://www.saurik.com/id/8 + if [[ "${PLATFORM_NAME}" == "iphoneos" || "${PLATFORM_NAME}" == "appletvos" ]]; then + if [ -f "${LDID}" ]; then + find "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/" -iname "*.dylib" -or -iname "*.so" | xargs "${LDID}" -S"${DARWIN_EMBEDDED_ENTITLEMENTS}" + "${LDID}" "-S${DARWIN_EMBEDDED_ENTITLEMENTS}" "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME}" - #repackage python eggs - EGGS=$(find "${CONTENTS_PATH}" -name "*.egg" -type f) - for i in $EGGS; do - echo $i - mkdir del - unzip -q $i -d del - find ./del/ -name "*.so" -type f | xargs ${LDID} -S${IOS11_ENTITLEMENTS} - rm $i - cd del && zip -qr $i ./* && cd .. - rm -r ./del/ - done + # repackage python eggs + EGGS=$(find "${CONTENTS_PATH}" -iname "*.egg" -type f) + for i in "$EGGS"; do + echo "$i" + mkdir del + unzip -q "$i" -d del + find ./del/ -iname "*.so" -type f | xargs "${LDID}" -S"${DARWIN_EMBEDDED_ENTITLEMENTS}" + rm "$i" + cd del && zip -qr "$i" ./* && cd .. + rm -r ./del/ + done fi fi diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index f352c3c70a..74734b3d83 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -29,7 +29,7 @@ ifeq ($(OS),darwin_embedded) DEPENDS += boblight EXCLUDED_DEPENDS += libshairplay libplist endif - DEPENDS += iosentitlements + DEPENDS += darwin-embedded-entitlements endif ifeq ($(OS),osx) diff --git a/tools/depends/target/darwin-embedded-entitlements/Makefile b/tools/depends/target/darwin-embedded-entitlements/Makefile new file mode 100644 index 0000000000..b8b1e36368 --- /dev/null +++ b/tools/depends/target/darwin-embedded-entitlements/Makefile @@ -0,0 +1,15 @@ +include ../../Makefile.include +DEPS= ../../Makefile.include Makefile darwin_embedded_entitlements.xml + +DARWIN_EMBEDDED_ENT=$(PREFIX)/share/darwin_embedded_entitlements.xml + +all: $(DARWIN_EMBEDDED_ENT) + +$(DARWIN_EMBEDDED_ENT): + mkdir -p $(PREFIX)/share + cp darwin_embedded_entitlements.xml $(DARWIN_EMBEDDED_ENT) + + +clean: +distclean:: + rm -f $(DARWIN_EMBEDDED_ENT) diff --git a/tools/depends/target/iosentitlements/ios11_entitlements.xml b/tools/depends/target/darwin-embedded-entitlements/darwin_embedded_entitlements.xml index ca7826950b..ca7826950b 100644 --- a/tools/depends/target/iosentitlements/ios11_entitlements.xml +++ b/tools/depends/target/darwin-embedded-entitlements/darwin_embedded_entitlements.xml diff --git a/tools/depends/target/iosentitlements/Makefile b/tools/depends/target/iosentitlements/Makefile deleted file mode 100644 index eaf99e84e0..0000000000 --- a/tools/depends/target/iosentitlements/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include ../../Makefile.include -DEPS= ../../Makefile.include Makefile ios11_entitlements.xml - -IOS11_ENT=$(PREFIX)/share/ios11_entitlements.xml - -all: $(IOS11_ENT) - -$(IOS11_ENT): - mkdir -p $(PREFIX)/share - cp ios11_entitlements.xml $(IOS11_ENT) - - -clean: -distclean:: - rm -f $(IOS11_ENT) |