diff --git a/GemStone.xcodeproj/project.pbxproj b/GemStone.xcodeproj/project.pbxproj index 8d7b783..a8c7e4b 100644 --- a/GemStone.xcodeproj/project.pbxproj +++ b/GemStone.xcodeproj/project.pbxproj @@ -809,13 +809,14 @@ CODE_SIGN_IDENTITY = "Developer ID Application"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1.4.7; + CURRENT_PROJECT_VERSION = 1.4.6; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 72G58AHU7P; ENABLE_HARDENED_RUNTIME = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "GemStone/GemStone-Prefix.pch"; INFOPLIST_FILE = "GemStone/GemStone-Info.plist"; + MARKETING_VERSION = 1.4.6; PRODUCT_BUNDLE_IDENTIFIER = com.GemTalk.GemStone; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -833,12 +834,13 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1.4.7; + CURRENT_PROJECT_VERSION = 1.4.6; DEVELOPMENT_TEAM = 72G58AHU7P; ENABLE_HARDENED_RUNTIME = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "GemStone/GemStone-Prefix.pch"; INFOPLIST_FILE = "GemStone/GemStone-Info.plist"; + MARKETING_VERSION = 1.4.6; PRODUCT_BUNDLE_IDENTIFIER = com.GemTalk.GemStone; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; diff --git a/GemStone/AppController.m b/GemStone/AppController.m index 974c208..00d4335 100644 --- a/GemStone/AppController.m +++ b/GemStone/AppController.m @@ -43,9 +43,10 @@ @interface AppController() // Versions Tab @property (weak) IBOutlet NSTextField *lastUpdateDateField; // Databases Tab +@property (weak) IBOutlet NSButton *addDatabaseButton; +@property (weak) IBOutlet NSButton *deleteDatabaseButton; @property (weak) IBOutlet NSArrayController *databaseListController; @property (weak) IBOutlet NSTableView *databaseTableView; -@property IBOutlet NSTextView *infoPanelTextView; @property (weak) IBOutlet NSArrayController *logFileListController; @property (weak) IBOutlet NSButton *removeButton; @property (weak) IBOutlet NSArrayController *versionListController; @@ -67,6 +68,7 @@ @interface AppController() @property (weak) IBOutlet NSButton *upgradeSeasideCheckbox; @property (weak) IBOutlet NSPanel *infoPanel; +@property IBOutlet NSTextView *infoPanelTextView; @property (weak) IBOutlet NSPanel *taskProgressPanel; @property IBOutlet NSTextView *taskProgressText; @property (weak) IBOutlet NSProgressIndicator *taskProgressIndicator; @@ -154,7 +156,7 @@ - (IBAction)cancelTask:(id)sender { [self.operations cancelAllOperations]; [self taskFinishedAfterDelay]; } else { // Presumably this means that the title was changed to "Close" - [self taskFinished]; + [self closeTaskProgressPanel]; } } @@ -187,11 +189,17 @@ - (IBAction)clickedDataFile:(id)sender { - (IBAction)closeInfoPanel:(id)sender { [self.taskProgressText setString:[NSMutableString new]]; dispatch_async(dispatch_get_main_queue(), ^{ - [self.infoPanel orderOut:nil]; - [[NSApp mainWindow] endSheet:self.infoPanel]; + [[NSApp mainWindow] endSheet:self.infoPanel returnCode:0]; }); } +- (void)closeTaskProgressPanel { + [self.taskProgressText setString:[NSMutableString new]]; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSApp mainWindow] endSheet:self.taskProgressPanel returnCode:0]; + }); +} + - (void)criticalAlert:(NSString *)textString details:(NSString *)detailsString { NSArray *args = [NSArray arrayWithObjects:textString, detailsString, nil]; [self performSelectorOnMainThread:@selector(criticalAlertA:) withObject:args waitUntilDone:NO]; @@ -480,14 +488,17 @@ - (void)removeVersionDone { } - (void)refreshInstalledVersionsList { + Boolean hasAnyInstalledVersions = false; [self.versionPopupController removeObjects:[self.versionPopupController arrangedObjects]]; for (Version *version in [self.versionListController arrangedObjects]) { [version updateIsInstalled]; if ([version isInstalled]) { [self.versionPopupController addObject:[version name]]; + hasAnyInstalledVersions = true; } } [self.lastUpdateDateField setObjectValue:[self.mySetup versionsDownloadDate]]; + [self.addDatabaseButton setEnabled:hasAnyInstalledVersions]; } - (void)refreshUpgradeVersionsList { @@ -583,7 +594,7 @@ - (IBAction)showHelperToolInfo:(id)sender { ""; [self.infoPanelTextView setString:string]; [[NSApp mainWindow]beginSheet:self.infoPanel completionHandler:^(NSModalResponse returnCode) { - return; + [self.infoPanel orderOut:self]; }]; } @@ -616,10 +627,6 @@ - (void)taskErrorA:(NSString *)aString { [self taskFinishedAfterDelay]; } -- (void)taskFinished { - [self closeInfoPanel:self]; -} - - (void)taskFinishedAfterDelay { [self performSelectorOnMainThread:@selector(taskFinishedAfterDelayA) withObject:nil @@ -636,24 +643,24 @@ - (void)taskFinishedAfterDelayA { - (void)taskFinishedAfterDelayB { if ([[self.mySetup taskCloseWhenDoneCode] boolValue]) { - [self taskFinished]; + [self closeTaskProgressPanel]; } } - (void)taskProgress:(NSString *)aString { - Boolean isVisible = [self.taskProgressPanel isVisible]; NSUInteger length = [aString length]; Boolean hasLength = 0 < length; - if (isVisible && hasLength) { + if (hasLength) { [self performSelectorOnMainThread:@selector(taskProgressA:) withObject:aString waitUntilDone:YES]; } else { - NSLog(@"taskProgress: - %i %lu '%@'", isVisible, (unsigned long)length, aString); + NSLog(@"taskProgress: \"\""); } } - (void)taskProgressA:(NSString *)aString { + if (![self.taskProgressPanel isVisible]) return; NSArray *array = [aString componentsSeparatedByString:@"\r"]; NSRange range = {self.taskProgressText.string.length, 0}; [self.taskProgressText insertText:[array objectAtIndex:0] replacementRange:range]; @@ -692,7 +699,7 @@ - (void)taskStartA:(NSString *)aString { if (![self.taskProgressPanel isVisible]) { [[NSApp mainWindow] beginSheet:self.taskProgressPanel completionHandler:^(NSModalResponse returnCode) { - return; + [self.taskProgressPanel orderOut:self]; }]; [self.taskProgressIndicator setIndeterminate:YES]; [self.taskProgressIndicator startAnimation:self]; diff --git a/GemStone/Base.lproj/MainMenu.xib b/GemStone/Base.lproj/MainMenu.xib index 470f83d..26a55b6 100644 --- a/GemStone/Base.lproj/MainMenu.xib +++ b/GemStone/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -15,6 +15,7 @@ + @@ -24,6 +25,7 @@ + @@ -716,6 +718,7 @@ + @@ -800,7 +803,7 @@ Gw - + @@ -1052,7 +1055,7 @@ Gw - + @@ -1061,7 +1064,7 @@ Gw - + @@ -1080,7 +1083,7 @@ Gw - + @@ -1109,7 +1112,7 @@ Gw - + @@ -1118,7 +1121,7 @@ Gw - + @@ -1150,7 +1153,6 @@ Gw - @@ -1165,7 +1167,6 @@ Gw - @@ -1182,7 +1183,6 @@ Gw - @@ -1222,18 +1222,18 @@ Gw - + - + - + @@ -1242,7 +1242,6 @@ Gw - @@ -1272,7 +1271,6 @@ Gw - @@ -1293,7 +1291,6 @@ Gw - @@ -1310,7 +1307,6 @@ Gw - @@ -1326,7 +1322,6 @@ Gw - @@ -1686,7 +1681,7 @@ Gw - + @@ -1697,7 +1692,6 @@ Gw - @@ -1747,7 +1741,7 @@ Gw - + @@ -2391,7 +2385,6 @@ Gw - @@ -2407,7 +2400,6 @@ Gw - @@ -2423,7 +2415,6 @@ Gw - @@ -2440,7 +2431,6 @@ Gw - @@ -2622,7 +2612,6 @@ Gw - @@ -2636,7 +2625,6 @@ Gw - @@ -2650,7 +2638,6 @@ Gw - @@ -2663,7 +2650,6 @@ Gw - @@ -2863,7 +2849,6 @@ Gw - @@ -2883,7 +2868,6 @@ Gw - @@ -2903,7 +2887,6 @@ Gw - @@ -2923,7 +2906,6 @@ Gw - @@ -2943,7 +2925,6 @@ Gw - @@ -2963,7 +2944,6 @@ Gw - @@ -2983,7 +2963,6 @@ Gw - @@ -3003,7 +2982,6 @@ Gw - diff --git a/GemStone/DownloadVersionList.m b/GemStone/DownloadVersionList.m index 937116d..fc42016 100644 --- a/GemStone/DownloadVersionList.m +++ b/GemStone/DownloadVersionList.m @@ -28,13 +28,9 @@ - (void)dataString:(NSString *)aString { - (void)done { NSString *string = self.standardOutput; self.standardOutput = nil; - NSUInteger loc = [string rangeOfString:@">"].location; - if (NSNotFound == loc) { - AppError(@"invalid data returned from version list"); - } string = [NSString stringWithFormat:@"%@%@", - @"", + string]; string = [string stringByReplacingOccurrencesOfString:@"]\">" withString:@"]\" />"]; string = [string stringByReplacingOccurrencesOfString:@"
" withString:@"
"]; string = [string stringByReplacingOccurrencesOfString:@" " withString:@""]; @@ -43,21 +39,27 @@ - (void)done { if (error) { AppError(@"error parsing version list HTML: %@", [error description]); } - NSArray *nodes = [doc nodesForXPath:@"/html/body/div/table/tbody/tr" error:&error]; - NSRange nodeRange = {1, [nodes count] - 1}; - nodes = [nodes subarrayWithRange:nodeRange]; - NSDateFormatter *inFormatter = [NSDateFormatter new]; - [inFormatter setDateFormat:@"yyyy-MMM-dd hh:mm:ss"]; + NSArray *nodes = [doc nodesForXPath:@"/html/body/pre" error:&error]; + if (error) { + AppError(@"error parsing version list node: %@", [error description]); + } + nodes = [[nodes objectAtIndex:0] children]; + NSRange nodeRange = {1, [nodes count] - 1}; + nodes = [nodes subarrayWithRange:nodeRange]; + NSDateFormatter *inFormatter = [NSDateFormatter new]; + [inFormatter setDateFormat:@"dd-MMM-yyyy"]; NSDateFormatter *outFormatter = [NSDateFormatter new]; [outFormatter setDateFormat:@"yyyy-mm-dd"]; - _versions = [NSMutableArray arrayWithCapacity:[nodes count]]; - for (id node in nodes) { - NSArray *fields = [node nodesForXPath:@"td" error:&error]; - NSString *name = [[fields objectAtIndex:0] stringValue]; - NSDate *date = [inFormatter dateFromString:[[fields objectAtIndex:1] stringValue]]; - NSRange range = {13, [name length] - 29}; - name = [name substringWithRange:range]; - NSDictionary *version = [NSMutableDictionary dictionaryWithCapacity:3]; + _versions = [NSMutableArray arrayWithCapacity:[nodes count] / 2]; + for (int i = 0; i < [nodes count]; i += 2) { + NSString *name = [[[nodes objectAtIndex:i] attributeForName:@"href"] stringValue]; + NSRange range = {13, [name length] - 29}; + name = [name substringWithRange:range]; + NSString *data = [[nodes objectAtIndex:i + 1] stringValue]; + NSArray *fields = [data componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + fields = [fields filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"length > 0"]]; + NSDate *date = [inFormatter dateFromString:[fields objectAtIndex:0]]; + NSDictionary *version = [NSMutableDictionary dictionaryWithCapacity:2]; [version setValue:name forKey:@"name"]; [version setValue:date forKey:@"date"]; [self.versions addObject:version]; diff --git a/GemStone/GemStone-Info.plist b/GemStone/GemStone-Info.plist index 88e9cd5..66f9999 100644 --- a/GemStone/GemStone-Info.plist +++ b/GemStone/GemStone-Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.7 + 1.4.6 CFBundleVersion - 147 + 146 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion @@ -31,7 +31,7 @@ SMPrivilegedExecutables com.GemTalk.GemStone.Helper - anchor apple generic and identifier "com.GemTalk.GemStone.Helper" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "72G58AHU7P") + anchor apple generic and identifier "com.GemTalk.GemStone.Helper" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "72G58AHU7P") diff --git a/GemStone/Images.xcassets/AppIcon.appiconset/GS1024.png b/GemStone/Images.xcassets/AppIcon.appiconset/GS1024.png index dccb4e7..8a07c39 100644 Binary files a/GemStone/Images.xcassets/AppIcon.appiconset/GS1024.png and b/GemStone/Images.xcassets/AppIcon.appiconset/GS1024.png differ diff --git a/GemStone/Images.xcassets/AppIcon.appiconset/GS128.png b/GemStone/Images.xcassets/AppIcon.appiconset/GS128.png index da4f763..69ac5a7 100644 Binary files a/GemStone/Images.xcassets/AppIcon.appiconset/GS128.png and b/GemStone/Images.xcassets/AppIcon.appiconset/GS128.png differ diff --git a/GemStone/Images.xcassets/AppIcon.appiconset/GS16.png b/GemStone/Images.xcassets/AppIcon.appiconset/GS16.png index ac784e8..a1a5054 100644 Binary files a/GemStone/Images.xcassets/AppIcon.appiconset/GS16.png and b/GemStone/Images.xcassets/AppIcon.appiconset/GS16.png differ diff --git a/GemStone/Images.xcassets/AppIcon.appiconset/GS256.png b/GemStone/Images.xcassets/AppIcon.appiconset/GS256.png index 66f5c81..c4a47a4 100644 Binary files a/GemStone/Images.xcassets/AppIcon.appiconset/GS256.png and b/GemStone/Images.xcassets/AppIcon.appiconset/GS256.png differ diff --git a/GemStone/Images.xcassets/AppIcon.appiconset/GS32.png b/GemStone/Images.xcassets/AppIcon.appiconset/GS32.png index f856fc5..f170802 100644 Binary files a/GemStone/Images.xcassets/AppIcon.appiconset/GS32.png and b/GemStone/Images.xcassets/AppIcon.appiconset/GS32.png differ diff --git a/GemStone/Images.xcassets/AppIcon.appiconset/GS512.png b/GemStone/Images.xcassets/AppIcon.appiconset/GS512.png index 13829aa..d732ca4 100644 Binary files a/GemStone/Images.xcassets/AppIcon.appiconset/GS512.png and b/GemStone/Images.xcassets/AppIcon.appiconset/GS512.png differ diff --git a/GemStone/Images.xcassets/AppIcon.appiconset/GS64.png b/GemStone/Images.xcassets/AppIcon.appiconset/GS64.png index 73fc35f..7a4ede4 100644 Binary files a/GemStone/Images.xcassets/AppIcon.appiconset/GS64.png and b/GemStone/Images.xcassets/AppIcon.appiconset/GS64.png differ diff --git a/GemStone/Version.h b/GemStone/Version.h index 3035dc8..e8520e1 100644 --- a/GemStone/Version.h +++ b/GemStone/Version.h @@ -8,7 +8,7 @@ #import -#define kDownloadSite "http://seaside.gemtalksystems.com/downloads/i386.Darwin/" +#define kDownloadSite "https://downloads.gemtalksystems.com/platforms/i386.Darwin/" @interface Version : NSManagedObject { NSNumber *_isInstalledCode; diff --git a/Helper/Info.plist b/Helper/Info.plist index 822968d..7f3ebaf 100644 --- a/Helper/Info.plist +++ b/Helper/Info.plist @@ -9,9 +9,9 @@ CFBundleName GemStone.Helper CFBundleShortVersionString - 1.4.7 + 1.4.6 CFBundleVersion - 147 + 146 SMAuthorizedClients anchor apple generic and identifier "com.GemTalk.GemStone" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "72G58AHU7P")