diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2015-08-21 05:32:58 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2015-08-21 05:32:58 -0700 |
commit | 15babeef559bba763d48d47f65dff17b0c56a7e7 (patch) | |
tree | 9c34e58ca516b442cfcac14811a54373cf251712 | |
parent | e4b7adc1e02c9f0e16cc9ae2841192b386f6d4ea (diff) | |
download | ldid-15babeef559bba763d48d47f65dff17b0c56a7e7.tar.gz ldid-15babeef559bba763d48d47f65dff17b0c56a7e7.tar.zst ldid-15babeef559bba763d48d47f65dff17b0c56a7e7.zip |
Add libplist (and libcnary) so to sign Info.plist.
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | .gitmodules | 3 | ||||
-rwxr-xr-x | deb.sh | 10 | ||||
-rwxr-xr-x | ios.sh | 17 | ||||
-rw-r--r-- | ldid.cpp | 2 | ||||
m--------- | libplist | 0 | ||||
-rwxr-xr-x | make.sh | 44 |
7 files changed, 60 insertions, 20 deletions
@@ -1,6 +1,6 @@ +ios +out ldid -ldid.arm -ldid.o ldid.deb debs _ diff --git a/.gitmodules b/.gitmodules index 691ae3a..f360e2a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "minimal"] path = minimal url = git://git.saurik.com/minimal.git +[submodule "libplist"] + path = libplist + url = http://git.libimobiledevice.org/libplist.git @@ -0,0 +1,10 @@ +#!/bin/bash +rm -rf _ +mkdir -p _/usr/bin +cp -a ios/ldid _/usr/bin/ldid +mkdir -p _/DEBIAN +./control.sh _ >_/DEBIAN/control +mkdir -p debs +ln -sf debs/ldid_$(./version.sh)_iphoneos-arm.deb ldid.deb +dpkg-deb -b _ ldid.deb +readlink ldid.deb @@ -1,17 +1,2 @@ #!/bin/bash - -set -e -x - -sudo xcode-select --switch /Applications/Xcode-4.6.3.app -cycc -i2.0 -oldid.arm -- -c -std=c++11 ldid.cpp -I. -cycc -i2.0 -oldid.arm -- ldid.arm -x c sha1.c lookup2.c -I . - -rm -rf _ -mkdir -p _/usr/bin -cp -a ldid.arm _/usr/bin/ldid -mkdir -p _/DEBIAN -./control.sh _ >_/DEBIAN/control -mkdir -p debs -ln -sf debs/ldid_$(./version.sh)_iphoneos-arm.deb ldid.deb -dpkg-deb -b _ ldid.deb -readlink ldid.deb +./make.sh true @@ -31,6 +31,8 @@ extern "C" { #include <string> #include <vector> +#include <plist/plist.h> + struct fat_header { uint32_t magic; uint32_t nfat_arch; diff --git a/libplist b/libplist new file mode 160000 +Subproject 9ca25d293fe7f8aca8d952fc7bb91464fe2d34a @@ -1,7 +1,23 @@ #!/bin/bash set -e +shopt -s extglob +if [[ $# == 0 ]]; then + ios=false +else + ios=$1 +fi + +if "${ios}"; then + +out=ios +sudo xcode-select --switch /Applications/Xcode-4.6.3.app +flags=(cycc -- -miphoneos-version-min=2.0 -arch armv6) + +else + +out=out sudo xcode-select --switch /Applications/Xcode-5.1.1.app if which xcrun &>/dev/null; then @@ -15,8 +31,32 @@ else flags=(g++) fi +fi + +sdk=$(xcodebuild -sdk iphoneos -version Path) + flags+=(-I.) +flags+=(-I"${sdk}"/usr/include/libxml2) +flags+=(-Ilibplist/include) +flags+=(-Ilibplist/libcnary/include) + +mkdir -p "${out}" +os=() + +for c in libplist/libcnary/!(cnary).c libplist/src/*.c; do + o=${c%.c}.o + o="${out}"/${o##*/} + os+=("${o}") + if [[ "${c}" -nt "${o}" ]]; then + "${flags[@]}" -c -o "${o}" -x c "${c}" + fi +done set -x -"${flags[@]}" -c -std=c++11 -o ldid.o ldid.cpp -"${flags[@]}" -o ldid ldid.o -x c lookup2.c -x c sha1.c + +"${flags[@]}" -c -std=c++11 -o "${out}"/ldid.o ldid.cpp +"${flags[@]}" -o "${out}"/ldid "${out}"/ldid.o "${os[@]}" -x c lookup2.c -x c sha1.c -lxml2 + +if ! "${ios}"; then + ln -sf out/ldid . +fi |