Don't build Desktop file on Win32

This commit is contained in:
Christian Dywan 2009-07-09 19:08:37 +01:00
parent 1f0f411657
commit 78805e5cd4

65
wscript
View file

@ -400,39 +400,40 @@ def build (bld):
bld.add_subdirs ('docs/api') bld.add_subdirs ('docs/api')
bld.install_files ('${DOCDIR}/midori/api/', blddir + '/docs/api/*') bld.install_files ('${DOCDIR}/midori/api/', blddir + '/docs/api/*')
if bld.env['HAVE_HILDON']: if not is_mingw (bld.env) and Options.platform != 'win32':
appdir = '${MDATADIR}/applications/hildon' if bld.env['HAVE_HILDON']:
bld.install_files ('${MDATADIR}/dbus-1/services', appdir = '${MDATADIR}/applications/hildon'
'data/com.nokia.' + APPNAME + '.service') bld.install_files ('${MDATADIR}/dbus-1/services',
else: 'data/com.nokia.' + APPNAME + '.service')
appdir = '${MDATADIR}/applications' else:
if bld.env['INTLTOOL']: appdir = '${MDATADIR}/applications'
obj = bld.new_task_gen ('intltool_in') if bld.env['INTLTOOL']:
obj.source = 'data/' + APPNAME + '.desktop.in' obj = bld.new_task_gen ('intltool_in')
obj.install_path = appdir obj.source = 'data/' + APPNAME + '.desktop.in'
obj.flags = ['-d', '-c'] obj.install_path = appdir
bld.install_files (appdir, 'data/' + APPNAME + '.desktop') obj.flags = ['-d', '-c']
else: bld.install_files (appdir, 'data/' + APPNAME + '.desktop')
folder = os.path.abspath (blddir + '/default/data') else:
Utils.check_dir (folder) folder = os.path.abspath (blddir + '/default/data')
desktop = APPNAME + '.desktop' Utils.check_dir (folder)
pre = open ('data/' + desktop + '.in') desktop = APPNAME + '.desktop'
after = open (folder + '/' + desktop, 'w') pre = open ('data/' + desktop + '.in')
try: after = open (folder + '/' + desktop, 'w')
try: try:
for line in pre: try:
if line != '': for line in pre:
if line[0] == '_': if line != '':
after.write (line[1:]) if line[0] == '_':
else: after.write (line[1:])
after.write (line) else:
after.close () after.write (line)
Utils.pprint ('BLUE', desktop + '.in -> ' + desktop) after.close ()
bld.install_files (appdir, folder + '/' + desktop) Utils.pprint ('BLUE', desktop + '.in -> ' + desktop)
except: bld.install_files (appdir, folder + '/' + desktop)
Utils.pprint ('BLUE', 'File ' + desktop + ' not generated') except:
finally: Utils.pprint ('BLUE', 'File ' + desktop + ' not generated')
pre.close () finally:
pre.close ()
if bld.env['RSVG_CONVERT']: if bld.env['RSVG_CONVERT']:
Utils.check_dir (blddir + '/data') Utils.check_dir (blddir + '/data')