diff --git a/setup/installer/osx/app/main.py b/setup/installer/osx/app/main.py index 10d955d768..baf57d7d7d 100644 --- a/setup/installer/osx/app/main.py +++ b/setup/installer/osx/app/main.py @@ -612,7 +612,7 @@ class Py2App(object): @flush def create_gui_apps(self): info('\nCreating launcher apps for viewer and editor') - for launcher in ('ebook-viewer', 'ebook-edit'): + for launcher in ('ebook-viewer', 'ebook-edit', 'calibre-debug'): cc_dir = os.path.join(self.contents_dir, launcher + '.app', 'Contents') os.makedirs(cc_dir) for x in os.listdir(self.contents_dir): @@ -620,9 +620,12 @@ class Py2App(object): continue if x == 'Info.plist': plist = plistlib.readPlist(join(self.contents_dir, x)) - plist['CFBundleDisplayName'] = plist['CFBundleName'] = {'ebook-viewer':'E-book Viewer', 'ebook-edit':'Edit Book'}[launcher] - plist['CFBundleExecutable'] = launcher - plist['CFBundleIconFile'] = launcher + '.icns' + plist['CFBundleDisplayName'] = plist['CFBundleName'] = { + 'ebook-viewer':'E-book Viewer', 'ebook-edit':'Edit Book', 'calibre-debug': 'calibre (debug)', + }[launcher] + if launcher != 'calibre-debug': + plist['CFBundleExecutable'] = launcher + plist['CFBundleIconFile'] = launcher + '.icns' plist['CFBundleIdentifier'] = 'com.calibre-ebook.' + launcher plist.pop('CFBundleDocumentTypes') plistlib.writePlist(plist, join(cc_dir, x)) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 8fa8143c31..8361d558ad 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -294,8 +294,8 @@ def get_debug_executable(): e = sys.executable if getattr(sys, 'frozen', False) else sys.argv[0] if hasattr(sys, 'frameworks_dir'): base = os.path.dirname(sys.frameworks_dir) - if 'console.app' not in base: - base = os.path.join(base, 'console.app', 'Contents') + if 'calibre-debug.app' not in base: + base = os.path.join(base, 'calibre-debug.app', 'Contents') exe = os.path.basename(e) if '-debug' not in exe: exe += '-debug'