Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #40 from TheNewNormal/v0.5.3
Browse files Browse the repository at this point in the history
V0.5.3
  • Loading branch information
rimusz committed Feb 22, 2016
2 parents ea56c27 + 53bd198 commit c4dcc2c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
29 changes: 27 additions & 2 deletions src/Kube-Solo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,36 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[self.statusItem setMenu:self.statusMenu];
[self.statusItem setImage: [NSImage imageNamed:@"StatusItemIcon"]];
[self.statusItem setHighlightMode:YES];

// get resourcePath
NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
NSLog(@"App resource path: '%@'", resourcePath);

NSString *dmgPath = @"/Volumes/Kube-Solo/Kube-Solo.app/Contents/Resources";
NSLog(@"DMG resource path: '%@'", dmgPath);

// check resourcePath and exit the App if it runs from the dmg
if ( [resourcePath isEqual: dmgPath] ) {
// show alert message
NSString *message = [NSString stringWithFormat:NSLocalizedString(@"DmgAlertMessage", nil)];
NSString *infoText = NSLocalizedString(@"DmgAlertInformativeText", nil);
[self alertWithMessage:message infoText:infoText];

// show quitting App message
[self notifyUserWithTitle:NSLocalizedString(@"QuittingNotificationTitle", nil) text:nil];

// exiting App
[[NSApplication sharedApplication] terminate:self];
}


BOOL isDir;
// check if the Apps' home folder exits
if ([[NSFileManager defaultManager] fileExistsAtPath:[[NSURL ks_homeURL] path] isDirectory:&isDir] && isDir) {
NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
// write down App's resource path a file
[resourcePath writeToURL:[NSURL ks_resourcePathURL] atomically:YES encoding:NSUTF8StringEncoding error:nil];


// write down App's version a file
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
[version writeToURL:[NSURL ks_appVersionURL] atomically:YES encoding:NSUTF8StringEncoding error:nil];

Expand Down Expand Up @@ -256,6 +280,7 @@ - (IBAction)initialInstall:(id)sender {
}
}


- (IBAction)About:(id)sender {
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
NSString *message = [NSString stringWithFormat:NSLocalizedString(@"AboutAlertMessage", nil), version];
Expand Down
4 changes: 2 additions & 2 deletions src/Kube-Solo/Kube-Solo-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.5.2</string>
<string>0.5.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>159</string>
<string>163</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 2 additions & 0 deletions src/Kube-Solo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@
"HomeFolderExistsAlertInformativeText" = "Folder %@ exists, please delete or rename that folder !!!";
"AboutAlertMessage" = "Kube-Solo for OS X v%@";
"AboutInformativeText" = "It is a simple wrapper around corectl + CoreOS VM, which allows to control Kube-Solo via Status Bar !!!";
"DmgAlertMessage" = "Kube Solo App cannot be started from DMG !!!";
"DmgAlertInformativeText" = "Please copy App e.g. to your Applications folder ...";
Binary file modified src/bin/corectl
Binary file not shown.
2 changes: 1 addition & 1 deletion src/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ do
VALID_MAIN=0
echo " "
echo "Set CoreOS Release Channel:"
echo " 1) Alpha "
echo " 1) Alpha (may not always function properly)"
echo " 2) Beta "
echo " 3) Stable (recommended)"
echo " "
Expand Down

0 comments on commit c4dcc2c

Please sign in to comment.