Skip to content

Commit

Permalink
Executable Update
Browse files Browse the repository at this point in the history
AppInfo can now return the location of the application’s executable
binary.
  • Loading branch information
pdarragh committed May 14, 2014
1 parent d6053e8 commit 2598c3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='Management Tools',
version='1.2.3',
version='1.3.1',
url='https://github.com/univ-of-utah-marriott-library-apple/management_tools',
author='Pierce Darragh, Marriott Library IT Services',
author_email='mlib-its-mac-github@lists.utah.edu',
Expand Down
3 changes: 3 additions & 0 deletions src/management_tools/app_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__ (self, app):
self.plist = None
self.bid = None
self.name = None
self.executable = None

# First, find the path of the app.
if os.path.isdir(app):
Expand Down Expand Up @@ -63,6 +64,7 @@ def __init__ (self, app):
self.plist = PlistEditor(self.path + '/Contents/Info.plist')
self.bid = self.plist.read('CFBundleIdentifier')
self.name = self.plist.read('CFBundleName')
self.executable = self.path + '/Contents/MacOS/' + self.plist.read('CFBundleExecutable')
if not self.name:
self.name = self.bid.split('.')[-1].title()
else:
Expand All @@ -73,4 +75,5 @@ def __repr__ (self):
result += "\n\tBID: " + str(self.bid)
result += "\n\tPath: " + str(self.path)
result += "\n\tInfo.plist: " + str(self.plist)
result += "\n\tExecutable: " + str(self.executable)
return result

0 comments on commit 2598c3a

Please sign in to comment.