3 Commits
1.0.1 ... 1.0.2

Author SHA1 Message Date
Shazron Abdullah
ea8e9dd53b Updated version to 1.0.2 2013-07-27 00:37:26 -07:00
Henrik Nilsson
512e741f8b Use xcode-select to locate gdb binary.
Gdb command change from finish to continue and quit (from @HenrikNilsson)
2013-07-27 00:34:05 -07:00
Shazron Abdullah
8990de9566 Updated Makefile to install 'Latest' symlink (#2) 2013-07-27 00:27:11 -07:00
3 changed files with 19 additions and 8 deletions

View File

@@ -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

View File

@@ -9,10 +9,10 @@
#include <getopt.h>
#include "MobileDevice.h"
#define APP_VERSION "1.0"
#define APP_VERSION "1.0.2"
#define FDVENDOR_PATH "/tmp/ios-deploy-remote-debugserver"
#define PREP_CMDS_PATH "/tmp/ios-deploy-gdb-prep-cmds"
#define GDB_SHELL "/Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin --arch armv7 -q -x " PREP_CMDS_PATH
#define GDB_SHELL "`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin --arch armv7 -q -x " PREP_CMDS_PATH
// approximation of what Xcode does:
#define GDB_PREP_CMDS CFSTR("set mi-show-protections off\n\
@@ -37,7 +37,9 @@
set inferior-auto-start-cfm off\n\
set sharedLibrary load-rules dyld \".*libobjc.*\" all dyld \".*CoreFoundation.*\" all dyld \".*Foundation.*\" all dyld \".*libSystem.*\" all dyld \".*AppKit.*\" all dyld \".*PBGDBIntrospectionSupport.*\" all dyld \".*/usr/lib/dyld.*\" all dyld \".*CarbonDataFormatters.*\" all dyld \".*libauto.*\" all dyld \".*CFDataFormatters.*\" all dyld \"/System/Library/Frameworks\\\\\\\\|/System/Library/PrivateFrameworks\\\\\\\\|/usr/lib\" extern dyld \".*\" all exec \".*\" all\n\
sharedlibrary apply-load-rules all\n\
set inferior-auto-start-dyld 1")
set inferior-auto-start-dyld 1\n\
continue\n\
quit\n")
typedef struct am_device * AMDeviceRef;
int AMDeviceSecureTransferPath(int zero, AMDeviceRef device, CFURLRef url, CFDictionaryRef options, void *callback, int cbarg);
@@ -95,7 +97,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 +125,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 +144,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);

View File

@@ -1,6 +1,6 @@
{
"name": "ios-deploy",
"version": "1.0.1",
"version": "1.0.2",
"description": "launch iOS apps iOS devices from the command line (Xcode 4)",
"main": "ios-deploy",
"scripts": {