From: Jay Freeman (saurik) Date: Sun, 26 Jan 2014 23:59:12 +0000 (-0800) Subject: Ported build environment from tweak.mk to Theos. X-Git-Tag: v0.9.3400~20 X-Git-Url: https://git.saurik.com/veency.git/commitdiff_plain/523e945c3909b831cd1bde6bb8e508ff54452f99 Ported build environment from tweak.mk to Theos. --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e512e52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +obj +*.deb +.theos +_ diff --git a/CoreFoundation/CFUserNotification.h b/CoreFoundation/CFUserNotification.h new file mode 120000 index 0000000..4007e0d --- /dev/null +++ b/CoreFoundation/CFUserNotification.h @@ -0,0 +1 @@ +/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFUserNotification.h \ No newline at end of file diff --git a/Tweak.mm b/Tweak.mm index 6ebe403..a255503 100644 --- a/Tweak.mm +++ b/Tweak.mm @@ -26,35 +26,102 @@ #define _unlikely(expr) \ __builtin_expect(expr, 0) -#include +#include #include #include -#include +#include #include #include -#import -#import +#undef assert +#include #import #import #import -#import -#import #import -#import -#import -#import - +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 6ec0a58..18316b2 100644 --- a/control +++ b/control @@ -5,7 +5,6 @@ Priority: optional Section: Networking Maintainer: Jay Freeman (saurik) 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 diff --git a/makefile b/makefile index 97e4fc4..d7852c1 100644 --- 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 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 index 0000000..87a1e1d --- /dev/null +++ b/version.sh @@ -0,0 +1,2 @@ +#!/bin/bash +git describe --always --tags --dirty="+" --match="v[0-9]*" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@@'