]> git.saurik.com Git - uikittools.git/commitdiff
Added sbdidlaunch for Cydia bootstrap.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 20 Jun 2010 16:25:55 +0000 (16:25 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 20 Jun 2010 16:25:55 +0000 (16:25 +0000)
control
makefile
sbdidlaunch.mm [new file with mode: 0644]

diff --git a/control b/control
index 0ae3e662d7374e4322aeb3490bbee6e8e2ac6b43..bc6448de7507119e98bdb1ca57358c5900291423 100644 (file)
--- a/control
+++ b/control
@@ -4,7 +4,7 @@ Section: Utilities
 Installed-Size: %S
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
 Installed-Size: %S
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 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) <saurik@saurik.com>
 Description: UIKit/GraphicsServices command line access
 Name: UIKit Tools
 Author: Jay Freeman (saurik) <saurik@saurik.com>
index d55c38afff874eb709f2bb84e50db4ec6c240274..7e6f0b9e0ddfbe70a13f3933c8765459ec2948cc 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,4 +1,4 @@
-uikittools = uiduid uishoot uicache uiopen gssc
+uikittools = uiduid uishoot uicache uiopen gssc sbdidlaunch
 
 all: $(uikittools)
 
 
 all: $(uikittools)
 
@@ -8,7 +8,7 @@ clean:
 .PHONY: all clean package
 
 %: %.mm
 .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
        ldid -S $@
 
 package: all
diff --git a/sbdidlaunch.mm b/sbdidlaunch.mm
new file mode 100644 (file)
index 0000000..91dbcfe
--- /dev/null
@@ -0,0 +1,29 @@
+#import <CoreFoundation/CoreFoundation.h>
+
+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;
+}