Updated ios-deploy to compile using clang
This commit is contained in:
parent
bd6bdc34f6
commit
cca4ef14d2
4
Makefile
4
Makefile
@ -1,7 +1,7 @@
|
|||||||
IOS_CC = clang
|
IOS_CC = clang
|
||||||
IOS_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
|
IOS_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
|
||||||
|
|
||||||
all: ios-deploy
|
all: clean ios-deploy
|
||||||
|
|
||||||
demo.app: demo Info.plist
|
demo.app: demo Info.plist
|
||||||
mkdir -p demo.app
|
mkdir -p demo.app
|
||||||
@ -13,7 +13,7 @@ demo: demo.c
|
|||||||
$(IOS_CC) -arch armv7 -isysroot $(IOS_SDK) -framework CoreFoundation -o demo demo.c
|
$(IOS_CC) -arch armv7 -isysroot $(IOS_SDK) -framework CoreFoundation -o demo demo.c
|
||||||
|
|
||||||
ios-deploy: ios-deploy.c
|
ios-deploy: ios-deploy.c
|
||||||
gcc -o ios-deploy -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks ios-deploy.c
|
$(IOS_CC) -o ios-deploy -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks ios-deploy.c
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
mkdir -p $(prefix)/bin
|
mkdir -p $(prefix)/bin
|
||||||
|
10
ios-deploy.c
10
ios-deploy.c
@ -44,6 +44,8 @@ int AMDeviceSecureTransferPath(int zero, AMDeviceRef device, CFURLRef url, CFDic
|
|||||||
int AMDeviceSecureInstallApplication(int zero, AMDeviceRef device, CFURLRef url, CFDictionaryRef options, void *callback, int cbarg);
|
int AMDeviceSecureInstallApplication(int zero, AMDeviceRef device, CFURLRef url, CFDictionaryRef options, void *callback, int cbarg);
|
||||||
int AMDeviceMountImage(AMDeviceRef device, CFStringRef image, CFDictionaryRef options, void *callback, int cbarg);
|
int AMDeviceMountImage(AMDeviceRef device, CFStringRef image, CFDictionaryRef options, void *callback, int cbarg);
|
||||||
int AMDeviceLookupApplications(AMDeviceRef device, int zero, CFDictionaryRef* result);
|
int AMDeviceLookupApplications(AMDeviceRef device, int zero, CFDictionaryRef* result);
|
||||||
|
int AMDeviceTransferApplication(unsigned int fd, CFStringRef path, void* ptr, void *transfer_callback, void* ptr2);
|
||||||
|
int AMDeviceInstallApplication(unsigned int fd, CFStringRef path, CFDictionaryRef options, void *install_callback, void* ptr);
|
||||||
|
|
||||||
bool found_device = false, debug = false, verbose = false;
|
bool found_device = false, debug = false, verbose = false;
|
||||||
char *app_path = NULL;
|
char *app_path = NULL;
|
||||||
@ -125,11 +127,11 @@ CFStringRef copy_developer_disk_image_path(AMDeviceRef device) {
|
|||||||
found = path_exists(path);
|
found = path_exists(path);
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s/Library/Developer/Xcode/iOS DeviceSupport/@%/DeveloperDiskImage.dmg"), home, version);
|
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s/Library/Developer/Xcode/iOS DeviceSupport/%@/DeveloperDiskImage.dmg"), home, version);
|
||||||
found = path_exists(path);
|
found = path_exists(path);
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Developer/Platforms/iPhoneOS.platform/DeviceSupport/@%/DeveloperDiskImage.dmg"), version);
|
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Developer/Platforms/iPhoneOS.platform/DeviceSupport/%@/DeveloperDiskImage.dmg"), version);
|
||||||
found = path_exists(path);
|
found = path_exists(path);
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
@ -414,7 +416,7 @@ void handle_device(AMDeviceRef device) {
|
|||||||
|
|
||||||
CFRelease(relative_url);
|
CFRelease(relative_url);
|
||||||
|
|
||||||
int afcFd;
|
unsigned int afcFd;
|
||||||
assert(AMDeviceStartService(device, CFSTR("com.apple.afc"), &afcFd, NULL) == 0);
|
assert(AMDeviceStartService(device, CFSTR("com.apple.afc"), &afcFd, NULL) == 0);
|
||||||
assert(AMDeviceStopSession(device) == 0);
|
assert(AMDeviceStopSession(device) == 0);
|
||||||
assert(AMDeviceDisconnect(device) == 0);
|
assert(AMDeviceDisconnect(device) == 0);
|
||||||
@ -431,7 +433,7 @@ void handle_device(AMDeviceRef device) {
|
|||||||
assert(AMDeviceValidatePairing(device) == 0);
|
assert(AMDeviceValidatePairing(device) == 0);
|
||||||
assert(AMDeviceStartSession(device) == 0);
|
assert(AMDeviceStartSession(device) == 0);
|
||||||
|
|
||||||
int installFd;
|
unsigned int installFd;
|
||||||
assert(AMDeviceStartService(device, CFSTR("com.apple.mobile.installation_proxy"), &installFd, NULL) == 0);
|
assert(AMDeviceStartService(device, CFSTR("com.apple.mobile.installation_proxy"), &installFd, NULL) == 0);
|
||||||
|
|
||||||
assert(AMDeviceStopSession(device) == 0);
|
assert(AMDeviceStopSession(device) == 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user