]> git.saurik.com Git - cydia.git/commitdiff
Started the work to port Cydia back to a 2.0-era toolchain.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 17 Oct 2010 19:59:29 +0000 (12:59 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 17 Oct 2010 19:59:29 +0000 (12:59 -0700)
Cydia.mm
iPhonePrivate.h
makefile

index ef602ac8252366d85ec14a07ba8fe9e24af0f54f..17f0c3f2ecfd331616a0dbdd3c636cddab0f092d 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -1634,11 +1634,11 @@ typedef std::map< unsigned long, _H<Source> > SourceMap;
 }
 
 - (NSString *) depictionForPackage:(NSString *)package {
-    return depiction_.empty() ? nil : [depiction_ stringByReplacingOccurrencesOfString:@"*" withString:package];
+    return depiction_.empty() ? nil : [static_cast<id>(depiction_) stringByReplacingOccurrencesOfString:@"*" withString:package];
 }
 
 - (NSString *) supportForPackage:(NSString *)package {
-    return support_.empty() ? nil : [support_ stringByReplacingOccurrencesOfString:@"*" withString:package];
+    return support_.empty() ? nil : [static_cast<id>(support_) stringByReplacingOccurrencesOfString:@"*" withString:package];
 }
 
 - (NSDictionary *) record {
@@ -2180,7 +2180,7 @@ struct PackageNameOrdering :
         _end
 
         bool changed(false);
-        NSString *key([id_ lowercaseString]);
+        NSString *key([static_cast<id>(id_) lowercaseString]);
 
         _profile(Package$initWithVersion$Metadata)
             metadata_ = [Packages_ objectForKey:key];
@@ -2486,9 +2486,9 @@ struct PackageNameOrdering :
 
     UIImage *icon(nil);
     if (!icon_.empty())
-        if ([icon_ hasPrefix:@"file:///"])
+        if ([static_cast<id>(icon_) hasPrefix:@"file:///"])
             // XXX: correct escaping
-            icon = [UIImage imageAtPath:[icon_ substringFromIndex:7]];
+            icon = [UIImage imageAtPath:[static_cast<id>(icon_) substringFromIndex:7]];
     if (icon == nil) if (section != nil)
         icon = [UIImage imageAtPath:[NSString stringWithFormat:@"%@/Sections/%@.png", App_, section]];
     if (icon == nil) if (source_ != nil) if (NSString *dicon = [source_ defaultIcon])
index f93602f2181e807ac18831c5a890edb646df1c63..0a0ba34ad3888c0e203097f943a2e5630ff29b28 100644 (file)
@@ -295,11 +295,31 @@ typedef enum {
 @end
 // }}}
 
-// extern *; {{{
-extern "C" CFStringRef const kGSDisplayIdentifiersCapability;
+// #ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER {{{
+#ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+
+typedef enum {
+    UIModalPresentationFullScreen,
+    UIModalPresentationPageSheet,
+    UIModalPresentationFormSheet,
+    UIModalPresentationCurrentContext,
+} UIModalPresentationStyle;
 
-extern "C" float const UIWebViewGrowsAndShrinksToFitHeight;
-extern "C" float const UIWebViewScalesToFitScale;
+@class NSUndoManager;
+@class UIPasteboard;
+
+@interface UIViewController (iPad)
+- (void) setModalPresentationStyle:(UIModalPresentationStyle)style;
+@end
+
+#endif//AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+// }}}
+
+// extern *; {{{
+extern CFStringRef const kGSDisplayIdentifiersCapability;
+extern float const UIWebViewGrowsAndShrinksToFitHeight;
+extern float const UIWebViewScalesToFitScale;
 // }}}
 // extern "C" *(); {{{
 extern "C" UIImage *_UIImageWithName(NSString *name);
index 1d189f0adb5d61a6d1353d805373fb7fd55980e5..3898b49c99a4b49c849f0d6b9e51a50b09a0e93d 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,4 +1,10 @@
+ifeq (o,O)
+ios := 2.0
+gcc := 4.0
+else
 ios := 3.2
+gcc := 4.2
+endif
 
 flags := 
 link := 
@@ -34,7 +40,7 @@ link += -lpcre
 link += -multiply_defined suppress
 
 #cycc = cycc -r4.2 -i$(ios) -o$@
-gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++
+gxx := /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-$(gcc)
 cycc = $(gxx) -arch armv6 -o $@ -mcpu=arm1176jzf-s -miphoneos-version-min=$(ios) -isysroot $(sdk) -idirafter /usr/include -F/Library/Frameworks
 
 all: Cydia