diff options
author | Sam Bingner <sam@bingner.com> | 2018-09-30 22:50:49 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-05-27 14:24:09 -1000 |
commit | 014888d50dcedd8f2a7bcac53bc0ffc1fbb6555f (patch) | |
tree | 9078a1592efb2b78c6da195d1ba12bf6717d8809 /Sources.mm | |
parent | 6f6bdfbcbb3b5dc0a67e28cfe36523e0433ecbeb (diff) |
Make Cydia compatible back to iOS5 - unable to support older with this apt version due to newer apt requiring functions provided via libc++ on iOS
Diffstat (limited to 'Sources.mm')
-rw-r--r-- | Sources.mm | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -42,13 +42,21 @@ void CydiaWriteSources() { FILE *file(fopen(sources, "w")); _assert(file != NULL); - fprintf(file, "deb http://apt.bingner.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber); + if (kCFCoreFoundationVersionNumber >= 1443) { + fprintf(file, "deb https://apt.bingner.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber); + } else { + fprintf(file, "deb http://apt.saurik.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber); + fprintf(file, "deb https://apt.bingner.com/ ./\n"); + } for (NSString *key in [Sources_ allKeys]) { if ([key hasPrefix:@"deb:http:"] && [Sources_ objectForKey:[NSString stringWithFormat:@"deb:https:%s", [key UTF8String] + 9]]) continue; NSDictionary *source([Sources_ objectForKey:key]); + // Ignore it if main source is added again + if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"]) + continue; NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]); |