From: Jay Freeman (saurik) Date: Tue, 3 Nov 2009 00:10:06 +0000 (+0000) Subject: Added initial stub for WebCycript. X-Git-Tag: v0.9.4000~63 X-Git-Url: https://git.saurik.com/cydget.git/commitdiff_plain/a10751710e669da6046d125c3e549ad52b2de4a0 Added initial stub for WebCycript. --- diff --git a/LockScreen.mk b/LockScreen.mk new file mode 100644 index 0000000..b54d6da --- /dev/null +++ b/LockScreen.mk @@ -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 f1bebcf..bc5a6f2 100644 --- a/control +++ b/control @@ -1,6 +1,6 @@ Package: cydget Priority: optional -Section: Tweaks +Section: Development Maintainer: Jay Freeman (saurik) 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) 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 index 0000000..c215f0c --- /dev/null +++ b/cycript/CydgetCentral.plist @@ -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 index 0000000..c4be864 --- /dev/null +++ b/cycript/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + WebCycriptLockScreen + CFBundleIdentifier + com.saurik.WebCycriptLockScreen + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + DTPlatformName + iphoneos + MinimumOSVersion + 2.1 + NSPrincipalClass + WebCycriptLockScreenController + + diff --git a/cycript/LockScreen.mm b/cycript/LockScreen.mm new file mode 100644 index 0000000..e74e7d2 --- /dev/null +++ b/cycript/LockScreen.mm @@ -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 + +#import +#import +#import +#import + +#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 index 0000000..5a255d7 --- /dev/null +++ b/cycript/control @@ -0,0 +1,12 @@ +Package: cydget-webcycript +Priority: optional +Section: Development +Maintainer: Jay Freeman (saurik) +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) +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 index 0000000..6d212b3 --- /dev/null +++ b/cycript/make.sh @@ -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 index 0000000..09d4f33 --- /dev/null +++ b/cycript/makefile @@ -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