]> git.saurik.com Git - cydget.git/commitdiff
Added initial stub for WebCycript.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 3 Nov 2009 00:10:06 +0000 (00:10 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 3 Nov 2009 00:10:06 +0000 (00:10 +0000)
LockScreen.mk [new file with mode: 0644]
control
cycript/CydgetCentral.plist [new file with mode: 0644]
cycript/Info.plist [new file with mode: 0644]
cycript/LockScreen.mm [new file with mode: 0644]
cycript/control [new file with mode: 0644]
cycript/make.sh [new file with mode: 0755]
cycript/makefile [new file with mode: 0644]

diff --git a/LockScreen.mk b/LockScreen.mk
new file mode 100644 (file)
index 0000000..b54d6da
--- /dev/null
@@ -0,0 +1,38 @@
+ifndef base
+base := ..
+endif
+
+ifndef PKG_TARG
+target :=
+else
+target := $(PKG_TARG)-
+endif
+
+link := -framework CoreFoundation -framework Foundation -F${PKG_ROOT}/System/Library/PrivateFrameworks -L$(base)/../mobilesubstrate -framework SpringBoardUI -framework UIKit
+
+all: $(name)LockScreen $(control)
+
+clean:
+       rm -f $(name)LockScreen
+
+$(name)LockScreen: LockScreen.mm makefile $(base)/../mobilesubstrate/substrate.h
+       $(target)g++ -bundle -mthumb -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -lobjc -I$(base)/../mobilesubstrate $(link) $(flags)
+       ldid -S $@
+
+deb := $(shell grep ^Package: control | cut -d ' ' -f 2-)_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb
+
+package: $(deb)
+
+$(deb): $(name)LockScreen
+       rm -rf package
+       mkdir -p package/DEBIAN
+       mkdir -p package/Library/MobileSubstrate/DynamicLibraries
+       cp -a control $(control) package/DEBIAN
+       mkdir -p package/System/Library/SpringBoardPlugins/$(name)LockScreen.bundle
+       cp -a Info.plist package/System/Library/SpringBoardPlugins/$(name)LockScreen.bundle
+       cp -a $(name)LockScreen package/System/Library/SpringBoardPlugins/$(name)LockScreen.bundle
+       dpkg-deb -b package $(deb)
+
+extra:
+
+.PHONY: all clean extra package
diff --git a/control b/control
index f1bebcffc3026ac74cb2e9464978027402de9f23..bc5a6f25a59d36b6ea8b7642e6fe4dbd17ee8333 100644 (file)
--- a/control
+++ b/control
@@ -1,6 +1,6 @@
 Package: cydget
 Priority: optional
-Section: Tweaks
+Section: Development
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
 Version: 0.9.3066-1
@@ -10,4 +10,4 @@ Depends: mobilesubstrate (>= 0.9.2587-1)
 Replaces: cydialer (<< 0.9.17)
 Author: Jay Freeman (saurik) <saurik@saurik.com>
 Depiction: http://cydia.saurik.com/info/cydget/
-Tag: purpose::extension, role::enduser
+Tag: purpose::library, role::developer
diff --git a/cycript/CydgetCentral.plist b/cycript/CydgetCentral.plist
new file mode 100644 (file)
index 0000000..c215f0c
--- /dev/null
@@ -0,0 +1,4 @@
+Plugin = "WebCycriptLockScreen";
+Configuration = {
+    Site = "http://www.cydget.org/central/";
+};
diff --git a/cycript/Info.plist b/cycript/Info.plist
new file mode 100644 (file)
index 0000000..c4be864
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+        <key>CFBundleDevelopmentRegion</key>
+        <string>English</string>
+        <key>CFBundleExecutable</key>
+        <string>WebCycriptLockScreen</string>
+        <key>CFBundleIdentifier</key>
+        <string>com.saurik.WebCycriptLockScreen</string>
+        <key>CFBundleInfoDictionaryVersion</key>
+        <string>6.0</string>
+        <key>CFBundlePackageType</key>
+        <string>BNDL</string>
+        <key>CFBundleSignature</key>
+        <string>????</string>
+        <key>CFBundleVersion</key>
+        <string>1.0</string>
+        <key>DTPlatformName</key>
+        <string>iphoneos</string>
+        <key>MinimumOSVersion</key>
+        <string>2.1</string>
+        <key>NSPrincipalClass</key>
+        <string>WebCycriptLockScreenController</string>
+</dict>
+</plist>
diff --git a/cycript/LockScreen.mm b/cycript/LockScreen.mm
new file mode 100644 (file)
index 0000000..e74e7d2
--- /dev/null
@@ -0,0 +1,79 @@
+/* CydgetScript - open-source IntelliDial replacement
+ * Copyright (C) 2009  Jay Freeman (saurik)
+*/
+
+/*
+ *        Redistribution and use in source and binary
+ * forms, with or without modification, are permitted
+ * provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the
+ *    above copyright notice, this list of conditions
+ *    and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the
+ *    above copyright notice, this list of conditions
+ *    and the following disclaimer in the documentation
+ *    and/or other materials provided with the
+ *    distribution.
+ * 3. The name of the author may not be used to endorse
+ *    or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <substrate.h>
+
+#import <GraphicsServices/GraphicsServices.h>
+#import <UIKit/UIKit.h>
+#import <AddressBook/AddressBook.h>
+#import <SpringBoardUI/SBAwayViewPluginController.h>
+
+#define _transient
+#define _forever for (;;)
+
+_disused static unsigned trace_;
+
+#define _trace() do { \
+    NSLog(@"_trace(%u)@%s:%u[%s]\n", \
+        trace_++, __FILE__, __LINE__, __FUNCTION__\
+    ); \
+} while (false)
+
+@interface WebCydgetLockScreenView : UIView {
+}
+
+@end
+
+@implementation WebCydgetLockScreenView
+@end
+
+@interface WebCycriptLockScreenController : SBAwayViewPluginController {
+}
+
+@end
+
+@implementation WebCycriptLockScreenController
+
++ (id) rootViewController {
+    return [[[self alloc] init] autorelease];
+}
+
+- (void) loadView {
+    [self setView:[[[WebCydgetLockScreenView alloc] init] autorelease]];
+}
+
+@end
diff --git a/cycript/control b/cycript/control
new file mode 100644 (file)
index 0000000..5a255d7
--- /dev/null
@@ -0,0 +1,12 @@
+Package: cydget-webcycript
+Priority: optional
+Section: Development
+Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
+Architecture: iphoneos-arm
+Version: 0.9.3067-1
+Description: write LockCydgets using Cycript and HTML
+Name: Cydget WebCycript
+Depends: cydget, cycript
+Author: Jay Freeman (saurik) <saurik@saurik.com>
+Depiction: http://cydia.saurik.com/info/cydget-webcycript/
+Tag: purpose::library, role::developer
diff --git a/cycript/make.sh b/cycript/make.sh
new file mode 100755 (executable)
index 0000000..6d212b3
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+PKG_ARCH=iphoneos-arm /apl/tel/exec.sh - make package "$@"
diff --git a/cycript/makefile b/cycript/makefile
new file mode 100644 (file)
index 0000000..09d4f33
--- /dev/null
@@ -0,0 +1,8 @@
+name := WebCycript
+flags := -lcycript -L/dat/src/cycript
+base := ../../tweaks
+include ../LockScreen.mk
+
+extra:
+       mkdir -p package/System/Library/LockCydgets/CydgetCentral.cydget
+       cp -a CydgetCentral.plist package/System/Library/LockCydgets/CydgetCentral.cydget/Info.plist