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 | 'LSItemContentTypes': ['org.lilypond.lilypond'] |
---|
29 | }, |
---|
30 | { |
---|
31 | 'CFBundleTypeExtensions': ['tex', 'lytex', 'latex'], |
---|
32 | 'CFBundleTypeName':'LaTeX file', |
---|
33 | 'CFBundleTypeRole':'Editor', |
---|
34 | 'LSItemContentTypes': ['org.tug.tex'] |
---|
35 | }, |
---|
36 | { |
---|
37 | 'CFBundleTypeExtensions': ['docbook', 'lyxml'], |
---|
38 | 'CFBundleTypeName':'DocBook file', |
---|
39 | 'CFBundleTypeRole':'Editor', |
---|
40 | 'LSItemContentTypes': ['org.docbook.docbook'] |
---|
41 | }, |
---|
42 | { |
---|
43 | 'CFBundleTypeExtensions': ['html'], |
---|
44 | 'CFBundleTypeName':'HTML file', |
---|
45 | 'CFBundleTypeRole':'Editor', |
---|
46 | 'LSItemContentTypes': ['public.html'] |
---|
47 | }, |
---|
48 | { |
---|
49 | 'CFBundleTypeExtensions': ['xml'], |
---|
50 | 'CFBundleTypeName':'XML file', |
---|
51 | 'CFBundleTypeRole':'Editor', |
---|
52 | 'LSItemContentTypes': ['public.xml'] |
---|
53 | }, |
---|
54 | { |
---|
55 | 'CFBundleTypeExtensions': ['itely', 'tely', 'texi', 'texinfo'], |
---|
56 | 'CFBundleTypeName':'Texinfo file', |
---|
57 | 'CFBundleTypeRole':'Editor', |
---|
58 | 'LSItemContentTypes': ['org.gnu.texinfo'] |
---|
59 | }, |
---|
60 | { |
---|
61 | 'CFBundleTypeExtensions': ['scm'], |
---|
62 | 'CFBundleTypeName':'Scheme file', |
---|
63 | 'CFBundleTypeRole':'Editor', |
---|
64 | 'LSItemContentTypes': ['org.scheme.scheme'] |
---|
65 | }, |
---|
66 | { |
---|
67 | 'CFBundleTypeExtensions': ['*'], |
---|
68 | 'CFBundleTypeName':'Text file', |
---|
69 | 'CFBundleTypeRole':'Editor', |
---|
70 | 'LSItemContentTypes': ['public.text'] |
---|
71 | } |
---|
72 | ], |
---|
73 | UTExportedTypeDeclarations = [ |
---|
74 | { |
---|
75 | 'UTTypeTagSpecification': { 'public.filename-extension': ['ly', 'lyi', 'ily'] }, |
---|
76 | 'UTTypeDescription':'LilyPond file', |
---|
77 | 'UTTypeIdentifier': ['org.lilypond.lilypond'], |
---|
78 | 'UTTypeConformsTo': ['public.text', 'public.plain-text', 'public-source-code'] |
---|
79 | }, |
---|
80 | { |
---|
81 | 'UTTypeTagSpecification': { 'public.filename-extension': ['tex', 'lytex', 'latex'] }, |
---|
82 | 'UTTypeDescription':'LaTeX file', |
---|
83 | 'UTTypeIdentifier': ['org.tug.tex'], |
---|
84 | 'UTTypeConformsTo': ['public.text', 'public.plain-text', 'public-source-code'] |
---|
85 | }, |
---|
86 | { |
---|
87 | 'UTTypeTagSpecification': { 'public.filename-extension': ['docbook', 'lyxml'] }, |
---|
88 | 'UTTypeDescription':'DocBook file', |
---|
89 | 'UTTypeIdentifier': ['org.docbook.docbook'], |
---|
90 | 'UTTypeConformsTo': ['public.text', 'public.plain-text', 'public-source-code'] |
---|
91 | }, |
---|
92 | { |
---|
93 | 'UTTypeTagSpecification': { 'public.filename-extension': ['itely', 'tely', 'texi', 'texinfo'] }, |
---|
94 | 'UTTypeDescription':'Texinfo file', |
---|
95 | 'UTTypeIdentifier': ['org.gnu.texinfo'], |
---|
96 | 'UTTypeConformsTo': ['public.text', 'public.plain-text', 'public-source-code'] |
---|
97 | }, |
---|
98 | { |
---|
99 | 'UTTypeTagSpecification': { 'public.filename-extension': ['scm'] }, |
---|
100 | 'UTTypeDescription':'Scheme file', |
---|
101 | 'UTTypeIdentifier': ['org.scheme.scheme'], |
---|
102 | 'UTTypeConformsTo': ['public.text', 'public.plain-text', 'public-source-code'] |
---|
103 | } |
---|
104 | ] |
---|
105 | ) |
---|
106 | |
---|
107 | OPTIONS = { |
---|
108 | 'argv_emulation': True, |
---|
109 | 'semi_standalone': True, |
---|
110 | 'alias': True, |
---|
111 | 'plist': plist, |
---|
112 | } |
---|
113 | |
---|
114 | setup( |
---|
115 | app=APP, |
---|
116 | name=NAME, |
---|
117 | options={'py2app': OPTIONS}, |
---|
118 | setup_requires=['py2app'], |
---|
119 | ) |
---|