Ticket #46388: patch-macosx-mac-app.py.diff
File patch-macosx-mac-app.py.diff, 1.5 KB (added by dliessi (Davide Liessi), 10 years ago) |
---|
-
macosx/mac-app.py
old new 17 17 macosx = os.path.realpath(os.path.dirname(__file__)) 18 18 root = os.path.dirname(macosx) 19 19 20 sys.path. append(root)20 sys.path.insert(0, root) 21 21 22 22 from frescobaldi_app import info 23 from frescobaldi_app.portmidi import pm_ctypes 23 try: 24 from frescobaldi_app.portmidi import pm_ctypes 25 dylib_name = pm_ctypes.dll_name 26 except ImportError: 27 dylib_name = None 24 28 25 29 icon = '{0}/icons/{1}.icns'.format(macosx, info.name) 26 30 ipstrings = '{0}/app_resources/InfoPlist.strings'.format(macosx) … … 40 44 (WARNING: some manual steps are required after the execution of this script)') 41 45 parser.add_argument('-p', '--portmidi', \ 42 46 help = 'full path of PortMIDI library (used only with \'-a\')', \ 43 default = pm_ctypes.dll_name)47 default = dylib_name) 44 48 parser.add_argument('-r', '--arch', \ 45 49 help = 'architecture set to include, e.g. i386, x86_64, intel; \ 46 50 if the value is None, the architecture of the current Python binary is used \ … … 52 56 If you really want to point the application bundle to \'{0}\',\n\ 53 57 use the \'-f\' or \'--force\' flag.'.format(args.script)) 54 58 55 if args.standalone and not os.path.isfile(args.portmidi):59 if args.standalone and not (isinstance(args.portmidi, basestring) and os.path.isfile(args.portmidi)): 56 60 sys.exit('Error: \'{0}\' does not exist or is not a file.'.format(args.portmidi)) 57 61 58 62 plist = dict(