Skip to content

Commit

Permalink
add letsmove to move application on first start
Browse files Browse the repository at this point in the history
  • Loading branch information
dshnkao committed Apr 25, 2017
1 parent 9a721f7 commit 1113a7b
Show file tree
Hide file tree
Showing 5 changed files with 562 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SpaceId.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
1906705F1E4B36F700D3A7A4 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1906705D1E4B36F700D3A7A4 /* MainMenu.xib */; };
190670611E4B3B6A00D3A7A4 /* StatusItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 190670601E4B3B6A00D3A7A4 /* StatusItem.swift */; };
190670631E4C84B100D3A7A4 /* Preference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 190670621E4C84B100D3A7A4 /* Preference.swift */; };
1972EE901EAEE1CF00658284 /* PFMoveApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 1972EE8E1EAEE1CF00658284 /* PFMoveApplication.h */; };
1972EE911EAEE1CF00658284 /* PFMoveApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 1972EE8F1EAEE1CF00658284 /* PFMoveApplication.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
19A7AC7D1E44D493004FBE39 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19A7AC7C1E44D493004FBE39 /* AppDelegate.swift */; };
19A7AC9A1E44D4C0004FBE39 /* Space.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19A7AC971E44D4C0004FBE39 /* Space.swift */; };
19A7AC9C1E44D4C0004FBE39 /* SpaceInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19A7AC991E44D4C0004FBE39 /* SpaceInfo.swift */; };
Expand Down Expand Up @@ -47,6 +49,8 @@
1906705E1E4B36F700D3A7A4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
190670601E4B3B6A00D3A7A4 /* StatusItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatusItem.swift; sourceTree = "<group>"; };
190670621E4C84B100D3A7A4 /* Preference.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Preference.swift; sourceTree = "<group>"; };
1972EE8E1EAEE1CF00658284 /* PFMoveApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFMoveApplication.h; sourceTree = "<group>"; };
1972EE8F1EAEE1CF00658284 /* PFMoveApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFMoveApplication.m; sourceTree = "<group>"; };
19A7AC791E44D493004FBE39 /* SpaceId.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpaceId.app; sourceTree = BUILT_PRODUCTS_DIR; };
19A7AC7C1E44D493004FBE39 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
19A7AC831E44D493004FBE39 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -98,6 +102,8 @@
isa = PBXGroup;
children = (
19A7ACD21E46D4BF004FBE39 /* SpaceId-Bridging-Header.h */,
1972EE8E1EAEE1CF00658284 /* PFMoveApplication.h */,
1972EE8F1EAEE1CF00658284 /* PFMoveApplication.m */,
19A7AC831E44D493004FBE39 /* Info.plist */,
19A7AC7C1E44D493004FBE39 /* AppDelegate.swift */,
19A7ACC91E46225E004FBE39 /* ButtonImage.swift */,
Expand All @@ -120,6 +126,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
1972EE901EAEE1CF00658284 /* PFMoveApplication.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -232,6 +239,7 @@
files = (
19A7AC9A1E44D4C0004FBE39 /* Space.swift in Sources */,
19A7ACCA1E46225E004FBE39 /* ButtonImage.swift in Sources */,
1972EE911EAEE1CF00658284 /* PFMoveApplication.m in Sources */,
190670631E4C84B100D3A7A4 /* Preference.swift in Sources */,
190670611E4B3B6A00D3A7A4 /* StatusItem.swift in Sources */,
19A7AC7D1E44D493004FBE39 /* AppDelegate.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions SpaceId/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ReloadDelegate {
let buttonImage = ButtonImage()

func applicationDidFinishLaunching(_ aNotification: Notification) {
PFMoveToApplicationsFolderIfNecessary ()
statusItem.delegate = self
NSApp.setActivationPolicy(.accessory)
observer.setupObservers(using: updateSpaceNumber)
Expand Down
17 changes: 17 additions & 0 deletions SpaceId/PFMoveApplication.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// PFMoveApplication.h, version 1.22
// LetsMove
//
// Created by Andy Kim at Potion Factory LLC on 9/17/09
//
// The contents of this file are dedicated to the public domain.

#ifdef __cplusplus
extern "C" {
#endif

void PFMoveToApplicationsFolderIfNecessary(void);

#ifdef __cplusplus
}
#endif
Loading

0 comments on commit 1113a7b

Please sign in to comment.