1 | """ |
---|
2 | A setup file to build Frescobaldi.app with py2app. |
---|
3 | |
---|
4 | Initial version by Henning Hraban Ramm. |
---|
5 | """ |
---|
6 | |
---|
7 | from setuptools import setup |
---|
8 | |
---|
9 | APPNAME = 'frescobaldi' |
---|
10 | APP = ['%%PREFIX%%/bin/{0}'.format(APPNAME)] |
---|
11 | NAME = 'Frescobaldi' |
---|
12 | VERSION = '%%VERSION%%' |
---|
13 | |
---|
14 | plist = dict( |
---|
15 | CFBundleName = NAME, |
---|
16 | CFBundleDisplayName = NAME, |
---|
17 | CFBundleShortVersionString = VERSION, |
---|
18 | CFBundleVersion = VERSION, |
---|
19 | CFBundleExecutable = NAME, |
---|
20 | CFBundleIdentifier = 'org.{0}.{0}'.format(APPNAME), |
---|
21 | CFBundleIconFile = '{0}.icns'.format(APPNAME), |
---|
22 | NSHumanReadableCopyright = 'Copyright 2008-2012 Wilbert Berendsen.', |
---|
23 | CFBundleDocumentTypes = [ |
---|
24 | { |
---|
25 | 'CFBundleTypeExtensions': ['ly', 'lyi', 'ily'], |
---|
26 | 'CFBundleTypeName':'LilyPond file', |
---|
27 | 'CFBundleTypeRole':'Editor', |
---|
28 | }, |
---|
29 | { |
---|
30 | 'CFBundleTypeExtensions': ['tex', 'lytex', 'latex'], |
---|
31 | 'CFBundleTypeName':'LaTeX file', |
---|
32 | 'CFBundleTypeRole':'Editor', |
---|
33 | }, |
---|
34 | { |
---|
35 | 'CFBundleTypeExtensions': ['docbook', 'lyxml'], |
---|
36 | 'CFBundleTypeName':'DocBook file', |
---|
37 | 'CFBundleTypeRole':'Editor', |
---|
38 | }, |
---|
39 | { |
---|
40 | 'CFBundleTypeExtensions': ['html'], |
---|
41 | 'CFBundleTypeName':'HTML file', |
---|
42 | 'CFBundleTypeRole':'Editor', |
---|
43 | 'LSItemContentTypes': ['public.html'] |
---|
44 | }, |
---|
45 | { |
---|
46 | 'CFBundleTypeExtensions': ['xml'], |
---|
47 | 'CFBundleTypeName':'XML file', |
---|
48 | 'CFBundleTypeRole':'Editor', |
---|
49 | 'LSItemContentTypes': ['public.xml'] |
---|
50 | }, |
---|
51 | { |
---|
52 | 'CFBundleTypeExtensions': ['itely', 'tely', 'texi', 'texinfo'], |
---|
53 | 'CFBundleTypeName':'Texinfo file', |
---|
54 | 'CFBundleTypeRole':'Editor', |
---|
55 | }, |
---|
56 | { |
---|
57 | 'CFBundleTypeExtensions': ['scm'], |
---|
58 | 'CFBundleTypeName':'Scheme file', |
---|
59 | 'CFBundleTypeRole':'Editor', |
---|
60 | }, |
---|
61 | { |
---|
62 | 'CFBundleTypeExtensions': ['*'], |
---|
63 | 'CFBundleTypeName':'Text file', |
---|
64 | 'CFBundleTypeRole':'Editor', |
---|
65 | 'LSItemContentTypes': ['public.text'] |
---|
66 | } |
---|
67 | ] |
---|
68 | ) |
---|
69 | |
---|
70 | OPTIONS = { |
---|
71 | 'argv_emulation': True, |
---|
72 | 'semi_standalone': True, |
---|
73 | 'alias': True, |
---|
74 | 'plist': plist, |
---|
75 | } |
---|
76 | |
---|
77 | setup( |
---|
78 | app=APP, |
---|
79 | name=NAME, |
---|
80 | options={'py2app': OPTIONS}, |
---|
81 | setup_requires=['py2app'], |
---|
82 | ) |
---|