From 250ccb19b3104102d52a65de0065f6afaf2fc1a5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 20 Jun 2010 16:25:55 +0000 Subject: Added sbdidlaunch for Cydia bootstrap. --- control | 2 +- makefile | 4 ++-- sbdidlaunch.mm | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 sbdidlaunch.mm diff --git a/control b/control index 0ae3e66..bc6448d 100644 --- a/control +++ b/control @@ -4,7 +4,7 @@ Section: Utilities Installed-Size: %S Maintainer: Jay Freeman (saurik) Architecture: iphoneos-arm -Version: 1.0.3162-1 +Version: 1.0.3198-1 Description: UIKit/GraphicsServices command line access Name: UIKit Tools Author: Jay Freeman (saurik) diff --git a/makefile b/makefile index d55c38a..7e6f0b9 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -uikittools = uiduid uishoot uicache uiopen gssc +uikittools = uiduid uishoot uicache uiopen gssc sbdidlaunch all: $(uikittools) @@ -8,7 +8,7 @@ clean: .PHONY: all clean package %: %.mm - $${PKG_TARG}-g++ -o $@ $< -framework CoreFoundation -framework Foundation -framework UIKit -framework GraphicsServices -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks -lobjc + $${PKG_TARG}-g++ -o $@ $< -framework CoreFoundation -framework Foundation -framework UIKit -framework GraphicsServices -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks -lobjc -framework SpringBoardServices ldid -S $@ package: all diff --git a/sbdidlaunch.mm b/sbdidlaunch.mm new file mode 100644 index 0000000..91dbcfe --- /dev/null +++ b/sbdidlaunch.mm @@ -0,0 +1,29 @@ +#import + +extern "C" void *SBSSpringBoardServerPort(); + +void OnDidLaunch( + CFNotificationCenterRef center, + void *observer, + CFStringRef name, + const void *object, + CFDictionaryRef info +) { + CFRunLoopStop(CFRunLoopGetCurrent()); +} + +int main() { + CFNotificationCenterAddObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + NULL, + &OnDidLaunch, + CFSTR("SBSpringBoardDidLaunchNotification"), + NULL, + NULL + ); + + if (SBSSpringBoardServerPort() == NULL) + CFRunLoopRun(); + + return 0; +} -- cgit v1.2.3