summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-08-18 18:00:24 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2009-08-18 18:00:24 +0000
commit2a72f832e35d56a748537c894b00a236bae8f16a (patch)
treebd051fda8c5ed41ab9d87a4bfe1c83590e3794fc
parent7fb7ce13deab7a4d127f5f04e0c82069a6cf2014 (diff)
UIKit Tools is not part of Telesphoreo.
-rw-r--r--control11
-rwxr-xr-xmake.sh2
-rw-r--r--makefile19
-rw-r--r--uicache.mm10
-rw-r--r--uiopen.mm14
5 files changed, 51 insertions, 5 deletions
diff --git a/control b/control
new file mode 100644
index 0000000..1163b4f
--- /dev/null
+++ b/control
@@ -0,0 +1,11 @@
+Package: uikittools
+Priority: optional
+Section: Utilities
+Installed-Size: %S
+Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
+Architecture: iphoneos-arm
+Version: 1.0.2995-1
+Description: UIKit-related command line access utilities
+Name: UIKit Tools
+Author: Jay Freeman (saurik) <saurik@saurik.com>
+Depiction: http://cydia.saurik.com/info/uikittools/
diff --git a/make.sh b/make.sh
index 5ae4611..946114b 100755
--- a/make.sh
+++ b/make.sh
@@ -1,2 +1,2 @@
#!/bin/bash
-PATH=/apl/n42/pre/bin:$PATH exec /apl/tel/exec.sh uikittools make "$@"
+PATH=/apl/n42/pre/bin:$PATH exec /apl/tel/exec.sh - make "$@"
diff --git a/makefile b/makefile
index 60cb272..8386a18 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,21 @@
-all: uiduid uishoot uicache
+uikittools = uiduid uishoot uicache uiopen
+
+all: $(uikittools)
+
+clean:
+ rm -f $(uikittools)
+
+.PHONY: all clean package
%: %.mm
$${PKG_TARG}-g++ -o $@ $< -framework CoreFoundation -framework Foundation -framework UIKit -lobjc
+ ldid -S $@
+
+package: all
+ rm -rf package
+ mkdir -p package/usr/bin
+ cp -a $(uikittools) package/usr/bin
+ mkdir -p package/DEBIAN
+ cp -a control package/DEBIAN
+ rpl '%S' "$$(du -ks package | cut -d $$'\t' -f 1)" package/DEBIAN/control
+ dpkg-deb -b package uikittools_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb
diff --git a/uicache.mm b/uicache.mm
index 71f67d8..e08fe5d 100644
--- a/uicache.mm
+++ b/uicache.mm
@@ -54,9 +54,13 @@ int main() {
NSString *plist = [path stringByAppendingPathComponent:@"Info.plist"];
if (NSMutableDictionary *info = [[NSMutableDictionary alloc] initWithContentsOfFile:plist]) {
[info autorelease];
- [info setObject:path forKey:@"Path"];
- [info setObject:@"System" forKey:@"ApplicationType"];
- [system addInfoDictionary:info];
+ if ([info objectForKey:@"CFBundleIdentifier"] == nil)
+ fprintf(stderr, "%s missing CFBundleIdentifier", [app UTF8String]);
+ else {
+ [info setObject:path forKey:@"Path"];
+ [info setObject:@"System" forKey:@"ApplicationType"];
+ [system addInfoDictionary:info];
+ }
}
}
} else goto error;
diff --git a/uiopen.mm b/uiopen.mm
new file mode 100644
index 0000000..ab4e2fe
--- /dev/null
+++ b/uiopen.mm
@@ -0,0 +1,14 @@
+#import <UIKit/UIKit.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+ if (argc != 2)
+ fprintf(stderr, "usage: %s <url>\n", argv[0]);
+ else {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[UIApplication alloc] openURL:[NSURL URLWithString:[NSString stringWithUTF8String:argv[1]]]];
+ [pool release];
+ }
+
+ return 0;
+}