]> git.saurik.com Git - fiveicondock.git/commitdiff
Port build environment from tweak.mk to new cycc.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 7 May 2014 23:23:01 +0000 (16:23 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 7 May 2014 23:23:01 +0000 (16:23 -0700)
.gitignore [new file with mode: 0644]
FiveIconDock.mm [new file with mode: 0644]
Tweak.mm [deleted file]
Tweak.plist [deleted file]
control [deleted file]
make.sh
makefile [deleted file]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..63dc3ec
--- /dev/null
@@ -0,0 +1,2 @@
+*.dylib
+*.deb
diff --git a/FiveIconDock.mm b/FiveIconDock.mm
new file mode 100644 (file)
index 0000000..2bce488
--- /dev/null
@@ -0,0 +1,144 @@
+#include <CydiaSubstrate/CydiaSubstrate.h>
+
+%apt Package: com.saurik.iphone.fid
+%apt Author: Jay Freeman (saurik) <saurik@saurik.com>
+
+%apt Name: Five Icon Dock
+%apt Description: fits even more stuff right down there
+%apt Depiction: http://cydia.saurik.com/info/com.saurik.iphone.fid/
+%apt Tag: purpose::extension, role::enduser
+
+%apt Depends: mobilesubstrate (>= 0.9.3005-1), firmware (>= 2.2), firmware (<< 3.0) | com.chpwn.iconsupport (>= 1.7.3-1)
+%apt Conflicts: gsc.wildcat
+
+%bundle com.apple.springboard
+
+%flag -framework Foundation
+
+#import <Foundation/NSArray.h>
+#import <Foundation/NSAutoreleasePool.h>
+#import <Foundation/NSNull.h>
+
+#import <CoreGraphics/CGGeometry.h>
+
+@interface ISIconSupport : NSObject {
+}
+
++ (ISIconSupport *) sharedInstance;
+- (void) addExtension:(NSString *)name;
+
+@end
+
+@interface SBDockIconListView : NSObject {
+}
+- (NSArray *) icons;
+@end
+
+MSClassHook(SBButtonBar)
+MSClassHook(SBDockIconListView)
+MSClassHook(SBIcon)
+MSClassHook(SBIconModel)
+
+MSMetaClassHook(SBDockIconListView)
+MSMetaClassHook(SBIconModel)
+
+__attribute__((__constructor__))
+static void MSFixClass() {
+    if ($SBIcon == nil)
+        $SBIcon = objc_getClass("SBIconView");
+}
+
+MSInstanceMessageHook1(float, SBButtonBar, leftMarginForIconRowArray, NSArray *, row) {
+    return [row indexOfObject:[NSNull null]] == NSNotFound ? 4 : MSOldCall(row);
+}
+
+MSInstanceMessageHook0(int, SBButtonBar, maxIconColumns) {
+    return 5;
+}
+
+MSClassMessageHook1(int, SBDockIconListView, iconColumnsForInterfaceOrientation, int, orientation) {
+    return 5;
+}
+
+static unsigned $SBButtonBar$count(SBButtonBar *self) {
+    MSIvarHook(NSArray *, _iconMatrix);
+    NSArray *row([_iconMatrix objectAtIndex:0]);
+    unsigned count(0);
+    for (id icon in row)
+        if (icon != [NSNull null])
+            ++count;
+    return count;
+}
+
+MSInstanceMessageHook0(float, SBButtonBar, topIconPadding) {
+    return 313370 + $SBButtonBar$count(self);
+}
+
+MSInstanceMessageHook1(void, SBIcon, setOrigin, CGPoint, origin) {
+    unsigned count(origin.y);
+    if (count < 313370)
+        goto set;
+    count -= 313370;
+
+    if (count > 40)
+        origin.x = 256;
+    else if (count > 10 || count < 0)
+        goto set;
+    else if (count == 5)
+        origin.x = (origin.x - 4) / 76 * 63 + 4;
+
+    origin.y = 11;
+  set:
+    MSOldCall(origin);
+}
+
+MSInstanceMessageHook2(CGPoint, SBButtonBar, originForIconAtX,Y, int, x, int, y) {
+    CGPoint origin;//(MSOldCall(x, y, ));
+    //NSLog(@"f:%u,%u=(%f,%f)", x, y, origin.x, origin.y);
+    origin.y = 11;
+
+    unsigned count($SBButtonBar$count(self)), gap;
+    unsigned space(320 - 60 * count);
+
+    if (count >= 4)
+        gap = space / (count + 1);
+    else // I hate people who love Apple.
+        gap = 16;
+
+    origin.x = (space - gap * (count - 1)) / 2 + (60 + gap) * x;
+
+    return origin;
+}
+
+// XXX: merge with previous function if possible, but not until after iPhone 4
+MSInstanceMessageHook2(CGPoint, SBDockIconListView, originForIconAtX,Y, int, x, int, y) {
+    CGPoint origin;//(MSOldCall(x, y, ));
+    //NSLog(@"f:%u,%u=(%f,%f)", x, y, origin.x, origin.y);
+    origin.y = 11;
+
+    unsigned count([[self icons] count]), gap;
+    unsigned space(320 - 60 * count);
+
+    if (count >= 4)
+        gap = space / (count + 1);
+    else // I hate people who love Apple.
+        gap = 16;
+
+    origin.x = (space - gap * (count - 1)) / 2 + (60 + gap) * x;
+
+    return origin;
+}
+
+/*MSClassMessageHook0(int, SBIconModel, maxIconListCount) {
+    return 16;
+}*/
+
+MSInitialize {
+    NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]);
+
+    if (dlopen("/Library/MobileSubstrate/DynamicLibraries/IconSupport.dylib", RTLD_GLOBAL | RTLD_LAZY) != NULL)
+        if (Class $ISIconSupport = objc_getClass("ISIconSupport"))
+            [[$ISIconSupport sharedInstance] addExtension:@"com.saurik.iphone.fid"];
+
+    [pool release];
+}
diff --git a/Tweak.mm b/Tweak.mm
deleted file mode 100644 (file)
index 0f83a4c..0000000
--- a/Tweak.mm
+++ /dev/null
@@ -1,133 +0,0 @@
-#include <substrate.h>
-
-#import <Foundation/NSArray.h>
-#import <Foundation/NSAutoreleasePool.h>
-#import <Foundation/NSNull.h>
-
-#import <CoreGraphics/CGGeometry.h>
-
-#import <SpringBoard/SBButtonBar.h>
-#import <SpringBoard/SBIcon.h>
-#import <SpringBoard/SBIconModel.h>
-
-@interface ISIconSupport : NSObject {
-}
-
-+ (ISIconSupport *) sharedInstance;
-- (void) addExtension:(NSString *)name;
-
-@end
-
-@interface SBDockIconListView : NSObject {
-}
-- (NSArray *) icons;
-@end
-
-MSClassHook(SBButtonBar)
-MSClassHook(SBDockIconListView)
-MSClassHook(SBIcon)
-MSClassHook(SBIconModel)
-
-MSMetaClassHook(SBDockIconListView)
-MSMetaClassHook(SBIconModel)
-
-__attribute__((__constructor__))
-static void MSFixClass() {
-    if ($SBIcon == nil)
-        $SBIcon = objc_getClass("SBIconView");
-}
-
-MSInstanceMessageHook1(float, SBButtonBar, leftMarginForIconRowArray, NSArray *, row) {
-    return [row indexOfObject:[NSNull null]] == NSNotFound ? 4 : MSOldCall(row);
-}
-
-MSInstanceMessageHook0(int, SBButtonBar, maxIconColumns) {
-    return 5;
-}
-
-MSClassMessageHook1(int, SBDockIconListView, iconColumnsForInterfaceOrientation, int, orientation) {
-    return 5;
-}
-
-static unsigned $SBButtonBar$count(SBButtonBar *self) {
-    MSIvarHook(NSArray *, _iconMatrix);
-    NSArray *row([_iconMatrix objectAtIndex:0]);
-    unsigned count(0);
-    for (id icon in row)
-        if (icon != [NSNull null])
-            ++count;
-    return count;
-}
-
-MSInstanceMessageHook0(float, SBButtonBar, topIconPadding) {
-    return 313370 + $SBButtonBar$count(self);
-}
-
-MSInstanceMessageHook1(void, SBIcon, setOrigin, CGPoint, origin) {
-    unsigned count(origin.y);
-    if (count < 313370)
-        goto set;
-    count -= 313370;
-
-    if (count > 40)
-        origin.x = 256;
-    else if (count > 10 || count < 0)
-        goto set;
-    else if (count == 5)
-        origin.x = (origin.x - 4) / 76 * 63 + 4;
-
-    origin.y = 11;
-  set:
-    MSOldCall(origin);
-}
-
-MSInstanceMessageHook2(CGPoint, SBButtonBar, originForIconAtX,Y, int, x, int, y) {
-    CGPoint origin;//(MSOldCall(x, y, ));
-    //NSLog(@"f:%u,%u=(%f,%f)", x, y, origin.x, origin.y);
-    origin.y = 11;
-
-    unsigned count($SBButtonBar$count(self)), gap;
-    unsigned space(320 - 60 * count);
-
-    if (count >= 4)
-        gap = space / (count + 1);
-    else // I hate people who love Apple.
-        gap = 16;
-
-    origin.x = (space - gap * (count - 1)) / 2 + (60 + gap) * x;
-
-    return origin;
-}
-
-// XXX: merge with previous function if possible, but not until after iPhone 4
-MSInstanceMessageHook2(CGPoint, SBDockIconListView, originForIconAtX,Y, int, x, int, y) {
-    CGPoint origin;//(MSOldCall(x, y, ));
-    //NSLog(@"f:%u,%u=(%f,%f)", x, y, origin.x, origin.y);
-    origin.y = 11;
-
-    unsigned count([[self icons] count]), gap;
-    unsigned space(320 - 60 * count);
-
-    if (count >= 4)
-        gap = space / (count + 1);
-    else // I hate people who love Apple.
-        gap = 16;
-
-    origin.x = (space - gap * (count - 1)) / 2 + (60 + gap) * x;
-
-    return origin;
-}
-
-/*MSClassMessageHook0(int, SBIconModel, maxIconListCount) {
-    return 16;
-}*/
-
-MSInitialize {
-    NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]);
-
-    if (dlopen("/Library/MobileSubstrate/DynamicLibraries/IconSupport.dylib", RTLD_GLOBAL | RTLD_LAZY) != NULL)
-        if (Class $ISIconSupport = objc_getClass("ISIconSupport"))
-            [[$ISIconSupport sharedInstance] addExtension:@"com.saurik.iphone.fid"];
-
-    [pool release];
-}
diff --git a/Tweak.plist b/Tweak.plist
deleted file mode 100644 (file)
index f94fd41..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Filter = {Bundles = ("com.apple.springboard");};
diff --git a/control b/control
deleted file mode 100644 (file)
index 1b19917..0000000
--- a/control
+++ /dev/null
@@ -1,12 +0,0 @@
-Package: com.saurik.iphone.fid
-Priority: optional
-Section: Tweaks
-Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
-Architecture: iphoneos-arm
-Version: 0.9.3381-1
-Description: fits even more stuff right down there
-Name: Five Icon Dock
-Depends: mobilesubstrate (>= 0.9.3005-1), firmware (>= 2.2), firmware (<< 3.0) | com.chpwn.iconsupport (>= 1.7.3-1)
-Conflicts: gsc.wildcat
-Author: Jay Freeman (saurik) <saurik@saurik.com>
-Depiction: http://cydia.saurik.com/info/com.saurik.iphone.fid/
diff --git a/make.sh b/make.sh
index 2d9cc22ea4d2e9e3f4deff753688bd70dbe6a4f3..c39f5dc8ac68f7e7e57d27b02ad258422f493472 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1,7 +1,2 @@
 #!/bin/bash
-set -e
-export PKG_ARCH=${PKG_ARCH-iphoneos-arm}
-PATH=/apl/n42/pre/bin:$PATH /apl/tel/exec.sh com.saurik.winterboard make "$@"
-export CODESIGN_ALLOCATE=$(which arm-apple-darwin9-codesign_allocate)
-/apl/tel/util/ldid -S *.dylib
-make package
+exec cycc -i2.0 -s -p FiveIconDock.mm
diff --git a/makefile b/makefile
deleted file mode 100644 (file)
index 43dade7..0000000
--- a/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-name := FiveIconDock
-include ../tweak.mk