From fd825a2de02aa3cff4c93ccd114dec6940b6e129 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 11 Mar 2011 09:06:58 -0800 Subject: [PATCH] Add Cydia version to UI_ URL. --- MobileCydia.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 215b91e0..0fb9d494 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -715,6 +715,7 @@ bool IsWildcat_; static CGFloat ScreenScale_; static NSString *Idiom_; static NSString *Firmware_; +static NSString *Major_; static _H SessionData_; static _H 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(method_getImplementation(class_getInstanceMethod([Package class], @selector(cyname)))); -- 2.45.2