Updated Makefile to install 'Latest' symlink (#2)
This commit is contained in:
parent
41165f433a
commit
8990de9566
8
Makefile
8
Makefile
@ -1,5 +1,6 @@
|
||||
IOS_CC = gcc
|
||||
IOS_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
|
||||
IOS_SDK = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
|
||||
DEVICE_SUPPORT = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/DeviceSupport
|
||||
|
||||
all: clean ios-deploy
|
||||
|
||||
@ -15,7 +16,10 @@ demo: demo.c
|
||||
ios-deploy: ios-deploy.c
|
||||
$(IOS_CC) -o ios-deploy -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks ios-deploy.c
|
||||
|
||||
install: ios-deploy
|
||||
symlink:
|
||||
cd $(DEVICE_SUPPORT); ln -sfn "`find . -type d -maxdepth 1 -exec basename {} \; | tail -1`" Latest
|
||||
|
||||
install: symlink ios-deploy
|
||||
mkdir -p $(prefix)/bin
|
||||
cp ios-deploy $(prefix)/bin
|
||||
|
||||
|
@ -95,7 +95,7 @@ CFStringRef copy_device_support_path(AMDeviceRef device) {
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/%@"), version);
|
||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest"));
|
||||
found = path_exists(path);
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ CFStringRef copy_developer_disk_image_path(AMDeviceRef device) {
|
||||
found = path_exists(path);
|
||||
|
||||
if (!found) {
|
||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Developer/Platforms/iPhoneOS.platform/DeviceSupport/%@ (%@/DeveloperDiskImage.dmg)"), version, build);
|
||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Developer/Platforms/iPhoneOS.platform/DeviceSupport/%@ (%@)/DeveloperDiskImage.dmg)"), version, build);
|
||||
found = path_exists(path);
|
||||
}
|
||||
if (!found) {
|
||||
@ -142,6 +142,11 @@ CFStringRef copy_developer_disk_image_path(AMDeviceRef device) {
|
||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest/DeveloperDiskImage.dmg"));
|
||||
found = path_exists(path);
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest/DeveloperDiskImage.dmg"));
|
||||
found = path_exists(path);
|
||||
}
|
||||
|
||||
CFRelease(version);
|
||||
CFRelease(build);
|
||||
|
Loading…
x
Reference in New Issue
Block a user