diff --git a/Source/Installer/AppDelegate.m b/Source/Installer/AppDelegate.m index 26b84b73..2abde5b2 100644 --- a/Source/Installer/AppDelegate.m +++ b/Source/Installer/AppDelegate.m @@ -103,6 +103,12 @@ static NSString *const kTargetFullBinPartialPath = @"~/Library/Input Methods/McB [NSApp terminate:self]; } + // alno need to restart SystemUIServer to reflect icon changes if the replaced version <= 0.9.4 + if (_currentVersion && [_currentVersion compare:@"0.9.4"] != NSOrderedDescending) { + NSTask *restartSystemUIServerTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/killall" arguments:[NSArray arrayWithObjects: @"-9", @"SystemUIServer", nil]]; + [restartSystemUIServerTask waitUntilExit]; + } + NSRunAlertPanel(NSLocalizedString(@"Installation Successful", nil), NSLocalizedString(@"McBopomofo is ready to use.", nil), NSLocalizedString(@"OK", nil), nil, nil); [NSApp terminate:self]; }