]> git.saurik.com Git - uikittools.git/commitdiff
UIKit Tools is not part of Telesphoreo.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 18 Aug 2009 18:00:24 +0000 (18:00 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 18 Aug 2009 18:00:24 +0000 (18:00 +0000)
control [new file with mode: 0644]
make.sh
makefile
uicache.mm
uiopen.mm [new file with mode: 0644]

diff --git a/control b/control
new file mode 100644 (file)
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 5ae4611e9982b9cf954ce2ca89caaa3cbebdcd3a..946114b336a49b021b117fdc414fec7fbeacc7ed 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1,2 +1,2 @@
 #!/bin/bash
 #!/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 "$@"
index 60cb272183ef0046138451447433d119c7df12a9..8386a1821b29628c1389b8350cea418d8058a6e5 100644 (file)
--- 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
 
 %: %.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
index 71f67d828d43f8bd0ce0655c6e605e275557f9d4..e08fe5d49ea2bfa27b928671832ab8e835cb1505 100644 (file)
@@ -54,9 +54,13 @@ int main() {
                     NSString *plist = [path stringByAppendingPathComponent:@"Info.plist"];
                     if (NSMutableDictionary *info = [[NSMutableDictionary alloc] initWithContentsOfFile:plist]) {
                         [info autorelease];
                     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;
                     }
                 }
         } else goto error;
diff --git a/uiopen.mm b/uiopen.mm
new file mode 100644 (file)
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;
+}