mirror of
https://github.com/TermiT/Flycut.git
synced 2025-02-23 07:25:28 +08:00
32 lines
763 B
Mathematica
32 lines
763 B
Mathematica
|
//
|
||
|
// AppDelegate.m
|
||
|
// FlycutHelper
|
||
|
//
|
||
|
// Created by Gennadii Potapov on 21/1/20.
|
||
|
//
|
||
|
|
||
|
#import "AppDelegate.h"
|
||
|
|
||
|
@interface AppDelegate ()
|
||
|
|
||
|
@property (weak) IBOutlet NSWindow *window;
|
||
|
@end
|
||
|
|
||
|
@implementation AppDelegate
|
||
|
|
||
|
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||
|
NSArray *pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents];
|
||
|
pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
|
||
|
NSString *path = [NSString pathWithComponents:pathComponents];
|
||
|
[[NSWorkspace sharedWorkspace] launchApplication:path];
|
||
|
[NSApp terminate:nil];
|
||
|
}
|
||
|
|
||
|
|
||
|
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||
|
// Insert code here to tear down your application
|
||
|
}
|
||
|
|
||
|
|
||
|
@end
|