]> git.saurik.com Git - cydia.git/commitdiff
Add Cydia version to UI_ URL.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 11 Mar 2011 17:06:58 +0000 (09:06 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 11 Mar 2011 17:06:58 +0000 (09:06 -0800)
MobileCydia.mm

index 215b91e069557ded1f2813ce8bb86539a2f2b360..0fb9d49457b3b0eed2c960a73633c5ab346ce4a4 100644 (file)
@@ -715,6 +715,7 @@ bool IsWildcat_;
 static CGFloat ScreenScale_;
 static NSString *Idiom_;
 static NSString *Firmware_;
+static NSString *Major_;
 
 static _H<NSMutableDictionary> SessionData_;
 static _H<NSObject> HostConfig_;
@@ -10032,8 +10033,11 @@ int main(int argc, char *argv[]) {
     }
 
     Pcre pattern("^([0-9]+\\.[0-9]+)");
+
     if (pattern([device systemVersion]))
         Firmware_ = pattern[1];
+    if (pattern(Cydia_))
+        Major_ = pattern[1];
 
     SessionData_ = [NSMutableDictionary dictionaryWithCapacity:4];
 
@@ -10047,10 +10051,9 @@ int main(int argc, char *argv[]) {
     }
 
     NSString *ui(@"ui/ios");
-    if (Firmware_ != nil)
-        ui = [ui stringByAppendingString:[NSString stringWithFormat:@"-%@", Firmware_]];
     if (Idiom_ != nil)
         ui = [ui stringByAppendingString:[NSString stringWithFormat:@"~%@", Idiom_]];
+    ui = [ui stringByAppendingString:[NSString stringWithFormat:@"/%@", Major_]];
     UI_ = CydiaURL(ui);
 
     PackageName = reinterpret_cast<CYString &(*)(Package *, SEL)>(method_getImplementation(class_getInstanceMethod([Package class], @selector(cyname))));