Fix icons when running from srcdir

This commit is contained in:
Cole Robinson 2013-04-03 20:28:49 -04:00
parent 94763163cc
commit 3f7b46884e
2 changed files with 3 additions and 6 deletions

1
data/hicolor Symbolic link
View File

@ -0,0 +1 @@
icons

View File

@ -32,7 +32,6 @@ cfgpath = os.path.join(os.path.dirname(_filepath), "cli.cfg")
if os.path.exists(cfgpath):
cfg.read(cfgpath)
def _split_list(commastr):
return [d for d in commastr.split(",") if d]
@ -46,15 +45,12 @@ __version__ = "0.9.4"
# We should map this into the config somehow but I question if anyone cares
prefix = "/usr"
gettext_dir = os.path.join(prefix, "share", "locale")
if os.getcwd() == _srcdir:
asset_dir = _srcdir
# XXX: This gettext bit likely doesn't work either, maybe nothing we can do
gettext_dir = os.path.join(_srcdir, "po")
# XXX: This wants data/icons/hicolor...
icon_dir = os.path.join(_srcdir, "data", "icons")
icon_dir = os.path.join(_srcdir, "data")
else:
asset_dir = os.path.join(prefix, "share", "virt-manager")
gettext_dir = os.path.join(prefix, "share", "locale")
icon_dir = os.path.join(asset_dir, "icons")
with_tui = bool(int(get_param("with_tui", "1")))