--- /dev/null
+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/
#!/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 "$@"
-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
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;
--- /dev/null
+#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;
+}