88
88
install_data.run(self)
91
subprocess.check_call('gtk-update-icon-cache -f -t /usr/share/icons/hicolor')
91
subprocess.check_call('gtk-update-icon-cache '
92
'-f -t /usr/share/icons/hicolor')
95
96
def _compile_po_files(self):
98
99
# Don't install language files on Win32
99
100
if sys.platform == 'win32':
100
101
return data_files
103
104
for po in glob.glob(os.path.join(PO_DIR,'*.po')):
104
105
lang = os.path.basename(po[:-3])
105
106
# It's necessary to compile in this directory (not in po_dir)
106
107
# because install_data can't rename file
107
108
mo = os.path.join('build', 'mo', lang, 'olive-gtk.mo')
109
110
directory = os.path.dirname(mo)
110
111
if not os.path.exists(directory):
111
112
info('creating %s' % directory)
112
113
os.makedirs(directory)
114
114
if newer(po, mo):
115
115
# True if mo doesn't exist
116
116
cmd = 'msgfmt -o %s %s' % (mo, po)
117
117
info('compiling %s -> %s' % (po, mo))
118
118
if os.system(cmd) != 0:
119
119
raise SystemExit('Error while running msgfmt')
121
dest = os.path.dirname(os.path.join('share', 'locale', lang, 'LC_MESSAGES', 'olive-gtk.mo'))
120
dest = os.path.dirname(
121
os.path.join('share', 'locale', lang,
122
'LC_MESSAGES', 'olive-gtk.mo'))
122
123
data_files.append((dest, [mo]))
124
124
return data_files
126
126
def _nautilus_plugin(self):
128
128
if sys.platform[:5] == 'linux':
129
cmd = os.popen('pkg-config --variable=pythondir nautilus-python', 'r')
129
cmd = os.popen('pkg-config --variable=pythondir nautilus-python',
130
131
res = cmd.readline().strip()
131
132
ret = cmd.close()
135
135
files.append((dest, ['nautilus-bzr.py']))
140
139
if __name__ == '__main__':
144
maintainer = "Jelmer Vernooij",
145
maintainer_email = "jelmer@samba.org",
146
description = "GTK+ Frontends for various Bazaar commands",
147
license = "GNU GPL v2 or later",
148
scripts = ['olive-gtk', 'bzr-handle-patch', 'bzr-notify'],
149
url = "http://bazaar-vcs.org/BzrGtk",
151
"bzrlib.plugins.gtk": ".",
152
"bzrlib.plugins.gtk.viz": "viz",
153
"bzrlib.plugins.gtk.annotate": "annotate",
154
"bzrlib.plugins.gtk.olive": "olive",
155
"bzrlib.plugins.gtk.tests": "tests",
156
"bzrlib.plugins.gtk.branchview": "branchview",
157
"bzrlib.plugins.gtk.preferences": "preferences",
160
"bzrlib.plugins.gtk",
161
"bzrlib.plugins.gtk.viz",
162
"bzrlib.plugins.gtk.annotate",
163
"bzrlib.plugins.gtk.olive",
164
"bzrlib.plugins.gtk.tests",
165
"bzrlib.plugins.gtk.branchview",
166
"bzrlib.plugins.gtk.preferences",
143
maintainer = "Jelmer Vernooij",
144
maintainer_email = "jelmer@samba.org",
145
description = "GTK+ Frontends for various Bazaar commands",
146
license = "GNU GPL v2 or later",
147
scripts = ['olive-gtk', 'bzr-handle-patch', 'bzr-notify'],
148
url = "http://bazaar-vcs.org/BzrGtk",
150
"bzrlib.plugins.gtk": ".",
151
"bzrlib.plugins.gtk.viz": "viz",
152
"bzrlib.plugins.gtk.annotate": "annotate",
153
"bzrlib.plugins.gtk.olive": "olive",
154
"bzrlib.plugins.gtk.tests": "tests",
155
"bzrlib.plugins.gtk.branchview": "branchview",
156
"bzrlib.plugins.gtk.preferences": "preferences",
159
"bzrlib.plugins.gtk",
160
"bzrlib.plugins.gtk.viz",
161
"bzrlib.plugins.gtk.annotate",
162
"bzrlib.plugins.gtk.olive",
163
"bzrlib.plugins.gtk.tests",
164
"bzrlib.plugins.gtk.branchview",
165
"bzrlib.plugins.gtk.preferences",
168
data_files=[('share/olive', ['cmenu.ui',
170
('share/bzr-gtk', ['credits.pickle']),
171
('share/bzr-gtk/icons', ['icons/commit.png',
172
'icons/commit16.png',
182
'icons/olive-gtk.png',
183
'icons/oliveicon2.png',
184
'icons/sign-bad.png',
187
'icons/sign-unknown.png',
190
'icons/bzr-icon-64.png']),
191
('share/applications', ['olive-gtk.desktop',
192
'bazaar-properties.desktop',
193
'bzr-handle-patch.desktop',
194
'bzr-notify.desktop']),
195
('share/application-registry', ['bzr-gtk.applications']),
196
('share/pixmaps', ['icons/olive-gtk.png',
197
'icons/bzr-icon-64.png']),
198
('share/icons/hicolor/scalable/emblems',
199
['icons/emblem-bzr-added.svg',
200
'icons/emblem-bzr-conflict.svg',
201
'icons/emblem-bzr-controlled.svg',
202
'icons/emblem-bzr-modified.svg',
203
'icons/emblem-bzr-removed.svg',
204
'icons/emblem-bzr-ignored.svg'])
206
cmdclass={'install_data': InstallData,
207
'build_credits': CreateCredits,
167
data_files=[('share/olive', ['cmenu.ui',
169
('share/bzr-gtk', ['credits.pickle']),
170
('share/bzr-gtk/icons', ['icons/commit.png',
171
'icons/commit16.png',
181
'icons/olive-gtk.png',
182
'icons/oliveicon2.png',
183
'icons/sign-bad.png',
186
'icons/sign-unknown.png',
189
'icons/bzr-icon-64.png']),
190
('share/applications', ['olive-gtk.desktop',
191
'bazaar-properties.desktop',
192
'bzr-handle-patch.desktop',
193
'bzr-notify.desktop']),
194
('share/application-registry', ['bzr-gtk.applications']),
195
('share/pixmaps', ['icons/olive-gtk.png',
196
'icons/bzr-icon-64.png']),
197
('share/icons/hicolor/scalable/emblems',
198
['icons/emblem-bzr-added.svg',
199
'icons/emblem-bzr-conflict.svg',
200
'icons/emblem-bzr-controlled.svg',
201
'icons/emblem-bzr-modified.svg',
202
'icons/emblem-bzr-removed.svg',
203
'icons/emblem-bzr-ignored.svg'])
205
cmdclass={'install_data': InstallData,
206
'build_credits': CreateCredits,