mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Eject for OS X (needs testing)
This commit is contained in:
parent
68641b30fd
commit
943f6f4c4b
@ -19,7 +19,7 @@ from modulegraph.find_modules import find_modules
|
||||
PYTHON = '/Library/Frameworks/Python.framework/Versions/Current/bin/python'
|
||||
|
||||
class BuildAPP(py2app):
|
||||
QT_PREFIX = '/Volumes/sw/qt'
|
||||
QT_PREFIX = '/Users/kovid/qt'
|
||||
LOADER_TEMPLATE = \
|
||||
r'''#!/usr/bin/env python
|
||||
import os, sys, glob
|
||||
@ -230,7 +230,7 @@ _check_symlinks_prescript()
|
||||
all_functions = main_functions['console'] + main_functions['gui']
|
||||
print
|
||||
print 'Adding PoDoFo'
|
||||
pdf = glob.glob(os.path.expanduser('~/podofo/*.dylib'))[0]
|
||||
pdf = glob.glob(os.path.expanduser('/Volumes/sw/podofo/*.dylib'))[0]
|
||||
shutil.copyfile(pdf, os.path.join(frameworks_dir, os.path.basename(pdf)))
|
||||
|
||||
|
||||
|
@ -493,9 +493,15 @@ class Device(DeviceConfig, DevicePlugin):
|
||||
|
||||
def eject_windows(self):
|
||||
pass
|
||||
|
||||
|
||||
def eject_osx(self):
|
||||
pass
|
||||
for x in ('_main_prefix', '_card_a_prefix', '_card_b_prefix'):
|
||||
x = getattr(self, x, None)
|
||||
if x is not None:
|
||||
try:
|
||||
subprocess.Popen(['diskutil', 'eject', x])
|
||||
except:
|
||||
pass
|
||||
|
||||
def eject_linux(self):
|
||||
drives = self.find_device_nodes()
|
||||
|
Loading…
x
Reference in New Issue
Block a user