]> git.saurik.com Git - veency.git/commitdiff
Ported build environment from tweak.mk to Theos.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 26 Jan 2014 23:59:12 +0000 (15:59 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 27 Jan 2014 00:01:46 +0000 (16:01 -0800)
.gitignore [new file with mode: 0644]
CoreFoundation/CFUserNotification.h [new symlink]
Tweak.mm
control
makefile
theos [new symlink]
version.sh [new file with mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..e512e52
--- /dev/null
@@ -0,0 +1,4 @@
+obj
+*.deb
+.theos
+_
diff --git a/CoreFoundation/CFUserNotification.h b/CoreFoundation/CFUserNotification.h
new file mode 120000 (symlink)
index 0000000..4007e0d
--- /dev/null
@@ -0,0 +1 @@
+/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFUserNotification.h
\ No newline at end of file
index 6ebe403f679340b830b9e8d24ebf5cf4414f56fb..a25550390a8157d8b0352b2e4be0668c06327924 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
 #define _unlikely(expr) \
     __builtin_expect(expr, 0)
 
-#include <CydiaSubstrate.h>
+#include <substrate.h>
 
 #include <rfb/rfb.h>
 #include <rfb/keysym.h>
 
-#include <mach/mach_port.h>
+#include <mach/mach.h>
 #include <sys/mman.h>
 #include <sys/sysctl.h>
 
-#import <QuartzCore/CAWindowServer.h>
-#import <QuartzCore/CAWindowServerDisplay.h>
+#undef assert
 
+#include <CoreFoundation/CFUserNotification.h>
 #import <CoreGraphics/CGGeometry.h>
 #import <GraphicsServices/GraphicsServices.h>
 #import <Foundation/Foundation.h>
-#import <IOMobileFramebuffer/IOMobileFramebuffer.h>
-#import <IOKit/IOKitLib.h>
 #import <UIKit/UIKit.h>
 
-#import <SpringBoard/SBAlertItemsController.h>
-#import <SpringBoard/SBDismissOnlyAlertItem.h>
-#import <SpringBoard/SBStatusBarController.h>
-
+extern "C" {
 #include "SpringBoardAccess.h"
+}
 
 MSClassHook(UIApplication)
 
+@interface UIApplication (Apple)
+- (void) addStatusBarImageNamed:(NSString *)name;
+- (void) removeStatusBarImageNamed:(NSString *)name;
+@end
+
+@interface CAWindowServerDisplay : NSObject
+- (mach_port_t) clientPortAtPosition:(CGPoint)position;
+@end
+
+@interface CAWindowServer : NSObject
++ (CAWindowServer *) serverIfRunning;
+- (NSArray *) displays;
+@end
+
+@interface UIModalView : UIView
+- (id) addButtonWithTitle:(NSString *)title;
+- (void) setBodyText:(NSString *)text;
+- (void) setDelegate:(id)delegate;
+- (void) setTitle:(NSString *)title;
+@end
+
+@interface SBAlertItem : NSObject
+- (void) dismiss;
+- (UIModalView *) alertSheet;
+@end
+
+@interface SBAlertItemsController : NSObject
++ (SBAlertItemsController *) sharedInstance;
+- (void) activateAlertItem:(SBAlertItem *)item;
+@end
+
+@interface SBStatusBarController : NSObject
++ (SBStatusBarController *) sharedStatusBarController;
+- (void) addStatusBarItem:(NSString *)item;
+- (void) removeStatusBarItem:(NSString *)item;
+@end
+
+typedef void *CoreSurfaceBufferRef;
+
+extern CFStringRef kCoreSurfaceBufferGlobal;
+extern CFStringRef kCoreSurfaceBufferMemoryRegion;
+extern CFStringRef kCoreSurfaceBufferPitch;
+extern CFStringRef kCoreSurfaceBufferWidth;
+extern CFStringRef kCoreSurfaceBufferHeight;
+extern CFStringRef kCoreSurfaceBufferPixelFormat;
+extern CFStringRef kCoreSurfaceBufferAllocSize;
+
+extern "C" CoreSurfaceBufferRef CoreSurfaceBufferCreate(CFDictionaryRef dict);
+extern "C" int CoreSurfaceBufferLock(CoreSurfaceBufferRef surface, unsigned int lockType);
+extern "C" int CoreSurfaceBufferUnlock(CoreSurfaceBufferRef surface);
+extern "C" void *CoreSurfaceBufferGetBaseAddress(CoreSurfaceBufferRef surface);
+
 extern "C" void CoreSurfaceBufferFlushProcessorCaches(CoreSurfaceBufferRef buffer);
 
+typedef void *CoreSurfaceAcceleratorRef;
+
+extern "C" int CoreSurfaceAcceleratorCreate(CFAllocatorRef allocator, int type, CoreSurfaceAcceleratorRef *accel);
+extern "C" unsigned int CoreSurfaceAcceleratorTransferSurface(CoreSurfaceAcceleratorRef accelerator, CoreSurfaceBufferRef dest, CoreSurfaceBufferRef src, CFDictionaryRef options/*, void *, void *, void **/);
+
+typedef void *IOMobileFramebufferRef;
+
+extern "C" kern_return_t IOMobileFramebufferSwapSetLayer(
+    IOMobileFramebufferRef fb,
+    int layer,
+    CoreSurfaceBufferRef buffer,
+    CGRect bounds,
+    CGRect frame,
+    int flags
+);
+
+extern "C" void IOMobileFramebufferGetDisplaySize(IOMobileFramebufferRef connect, CGSize *size);
+extern "C" void IOMobileFramebufferIsMainDisplay(IOMobileFramebufferRef connect, int *main);
+
 static size_t width_;
 static size_t height_;
 static NSUInteger ratio_ = 0;
@@ -138,7 +205,9 @@ MSClassHook(SBAlertItem)
 MSClassHook(SBAlertItemsController)
 MSClassHook(SBStatusBarController)
 
-@class VNCAlertItem;
+@interface VNCAlertItem : SBAlertItem
+@end
+
 static Class $VNCAlertItem;
 
 static NSString *DialogTitle(@"Remote Access Request");
diff --git a/control b/control
index 6ec0a58f6103caa6a5782a27e6b903eb82809d00..18316b2ab68d336b2481f98b0a3f3c0cc011df38 100644 (file)
--- a/control
+++ b/control
@@ -5,7 +5,6 @@ Priority: optional
 Section: Networking
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3379
 Description: a VNC /server/ for the iPhone
 Name: Veency
 Depends: mobilesubstrate (>= 0.9.2966-1), libvncserver, com.saurik.iphone.ske, preferenceloader, jp.ashikase.mousesupport | firmware (<< 3.0), libstatusbar | firmware (<< 4.0), firmware (<< 6.0) | ch.ringwald.springboardaccess
index 97e4fc440dd3a0e5e17f21f51836971324696b09..d7852c1585436960355368f150ffe4fc85cacdaa 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,11 +1,29 @@
-name := Veency
-id := vncs
-flags := -lvncserver -framework IOMobileFramebuffer -framework CoreSurface -framework IOKit -framework GraphicsServices -I/apl/inc/iPhoneOS-2.0 -framework QuartzCore -weak_reference_mismatches weak
-flags += -fvisibility=hidden
-flags += SpringBoardAccess.c
-base := ../tweaks
-include ../tweaks/tweak.mk
-
-extra:
-       mkdir -p package/System/Library/CoreServices/SpringBoard.app
-       cp -a Default_Veency.png FSO_Veency.png package/System/Library/CoreServices/SpringBoard.app
+TARGET := iphone:7.0:2.0
+ARCHS := armv6 #arm64
+PACKAGE_VERSION := $(shell ./version.sh)
+
+include theos/makefiles/common.mk
+
+TWEAK_NAME := Veency
+Veency_FILES := Tweak.mm SpringBoardAccess.c
+
+Veency_FRAMEWORKS := 
+Veency_FRAMEWORKS += CoreSurface
+Veency_FRAMEWORKS += GraphicsServices
+Veency_FRAMEWORKS += IOMobileFramebuffer
+Veency_FRAMEWORKS += QuartzCore
+Veency_FRAMEWORKS += UIKit
+
+ADDITIONAL_OBJCFLAGS += -Wno-gnu
+ADDITIONAL_OBJCFLAGS += -Wno-dangling-else
+
+ADDITIONAL_OBJCFLAGS += -Isysroot/usr/include
+ADDITIONAL_OBJCFLAGS += -idirafter .
+
+ADDITIONAL_CFLAGS += -fvisibility=hidden
+
+ADDITIONAL_LDFLAGS += -Lsysroot/usr/lib -lvncserver
+ADDITIONAL_LDFLAGS += -F/System/Library/PrivateFrameworks
+ADDITIONAL_LDFLAGS += -weak_reference_mismatches weak
+
+include $(THEOS_MAKE_PATH)/tweak.mk
diff --git a/theos b/theos
new file mode 120000 (symlink)
index 0000000..e30945d
--- /dev/null
+++ b/theos
@@ -0,0 +1 @@
+/opt/theos
\ No newline at end of file
diff --git a/version.sh b/version.sh
new file mode 100755 (executable)
index 0000000..87a1e1d
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+git describe --always --tags --dirty="+" --match="v[0-9]*" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@'