17
17
# You should have received a copy of the GNU Lesser General Public
18
18
# License along with this program; if not, write to the
19
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
# Boston, MA 02111-1307, USA.
19
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20
# Boston, MA 02110-1301, USA.
22
22
Utilities for getting the location of various directories.
23
23
Enables identical use for installed and uninstalled versions.
28
28
LIBDIR = '@LIBDIR@'
29
29
PKGDATADIR = '@DATADIR@/@PACKAGE@'
30
PIXMAPDIR = '@DATADIR@/pixmaps'
31
30
pitivi_version = '@VERSION@'
32
31
APPNAME = '@PACKAGE_NAME@'
33
32
APPURL = 'http://www.pitivi.org/'
45
44
rd = _get_root_dir()
46
return (os.path.exists(os.path.join(rd, '.svn')) or
47
os.path.exists(os.path.join(rd, 'CVS')) or
48
os.path.exists(os.path.join(rd, '.git')))
45
return os.path.exists(os.path.join(rd, '.git'))
49
datadir = os.path.join(_get_root_dir(), "data")
50
elif os.getenv("PITIVI_TOP_LEVEL_DIR"):
51
top_level = os.getenv("PITIVI_TOP_LEVEL_DIR")
52
datadir = os.path.join(top_level, "data")
55
return os.path.abspath(datadir)
50
57
def get_pixmap_dir():
51
58
""" Returns the directory for program-only pixmaps """
52
_dir = os.path.dirname(os.path.abspath(__file__))
55
elif os.getenv("PITIVI_TOP_LEVEL_DIR"):
56
top_level = os.getenv("PITIVI_TOP_LEVEL_DIR")
57
root = os.path.abspath(os.path.join(top_level, "pitivi"))
60
return os.path.join(root, 'pixmaps')
59
return os.path.join(get_data_dir(), 'pixmaps')
62
def get_global_pixmap_dir():
63
""" Returns the directory for global pixmaps (ex : application icon) """
65
root = _get_root_dir()
62
""" Returns the directory for GtkBuilder/Glade files """
63
return os.path.join(get_data_dir(), 'ui')