Use MDATADIR, import os and don't use waf_config_files

This commit is contained in:
Christian Dywan 2009-06-09 02:02:43 +02:00
parent 1873dfe631
commit 4e19617fdc
5 changed files with 10 additions and 4 deletions

View file

@ -3,6 +3,7 @@
# This file is licensed under the terms of the expat license, see the file EXPAT. # This file is licensed under the terms of the expat license, see the file EXPAT.
import pproc as subprocess import pproc as subprocess
import os
for module in ('midori', 'katze'): for module in ('midori', 'katze'):
try: try:

View file

@ -2,6 +2,8 @@
# WAF build script for midori # WAF build script for midori
# This file is licensed under the terms of the expat license, see the file EXPAT. # This file is licensed under the terms of the expat license, see the file EXPAT.
import os
extensions = os.listdir ('extensions') extensions = os.listdir ('extensions')
for extension in extensions: for extension in extensions:
# Tab Panel isn't useful at this point # Tab Panel isn't useful at this point

View file

@ -3,6 +3,7 @@
# This file is licensed under the terms of the expat license, see the file EXPAT. # This file is licensed under the terms of the expat license, see the file EXPAT.
import Utils import Utils
import os
def add_image (bld, category, name): def add_image (bld, category, name):

View file

@ -2,6 +2,8 @@
# WAF build script for midori # WAF build script for midori
# This file is licensed under the terms of the expat license, see the file EXPAT. # This file is licensed under the terms of the expat license, see the file EXPAT.
import os
tests = os.listdir ('tests') tests = os.listdir ('tests')
for test in tests: for test in tests:
folder = 'tests' + os.sep + test folder = 'tests' + os.sep + test

View file

@ -339,8 +339,8 @@ def build (bld):
bld.install_files ('${DOCDIR}/midori/api/', blddir + '/docs/api/*') bld.install_files ('${DOCDIR}/midori/api/', blddir + '/docs/api/*')
if bld.env['HAVE_HILDON']: if bld.env['HAVE_HILDON']:
appdir = '${DATADIR}/applications/hildon' appdir = '${MDATADIR}/applications/hildon'
bld.install_files ('${DATADIR}/dbus-1/services', bld.install_files ('${MDATADIR}/dbus-1/services',
'data/com.nokia.' + APPNAME + '.service') 'data/com.nokia.' + APPNAME + '.service')
else: else:
appdir = '${MDATADIR}/applications' appdir = '${MDATADIR}/applications'
@ -351,7 +351,7 @@ def build (bld):
obj.flags = '-d' obj.flags = '-d'
bld.install_files (appdir, 'data/' + APPNAME + '.desktop') bld.install_files (appdir, 'data/' + APPNAME + '.desktop')
else: else:
folder = os.path.dirname (bld.env['waf_config_files'][0]) + '/data' folder = os.path.abspath (blddir + '/default/data')
Utils.check_dir (folder) Utils.check_dir (folder)
desktop = APPNAME + '.desktop' desktop = APPNAME + '.desktop'
pre = open ('data/' + desktop + '.in') pre = open ('data/' + desktop + '.in')
@ -437,7 +437,7 @@ def shutdown ():
Utils.pprint ('RED', "Make sure intltool is installed.") Utils.pprint ('RED', "Make sure intltool is installed.")
os.chdir ('..') os.chdir ('..')
elif Options.options.run: elif Options.options.run:
folder = os.path.dirname (Build.bld.env['waf_config_files'][0]) folder = os.path.abspath (blddir + '/default')
try: try:
relfolder = folder relfolder = folder
if not is_mingw (Build.bld.env): if not is_mingw (Build.bld.env):