mkbackup-btrfs/files/usr/bin/mkbackup-gui

60 lines
2.1 KiB
Text
Raw Permalink Normal View History

2019-03-05 13:20:31 +01:00
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (C) 2013 Thomas Bechtold <thomasbechtold@jpberlin.de>
# This file is part of mkbackup-gui.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#import os
#gi_typelib_path = ["/usr/lib/x86_64-linux-gnu/mkbackup-gui/girepository-1.0",]
#if 'GI_TYPELIB_PATH' in os.environ:
# gi_typelib_path.append(os.environ['GI_TYPELIB_PATH'])
#os.environ['GI_TYPELIB_PATH'] = ":".join(gi_typelib_path)
#ld_library_path = ["/usr/lib/x86_64-linux-gnu/mkbackup-gui",]
#if 'LD_LIBRARY_PATH' in os.environ:
# ld_library_path.append(os.environ['LD_LIBRARY_PATH'])
#os.environ['LD_LIBRARY_PATH'] = ":".join(ld_library_path)
import os
import sys
sys.path.insert(1, '/usr/lib/python3.6/site-packages')
import gettext, locale
from gettext import gettext as _
gettext.textdomain("mkbackup-gui")
locale.textdomain("mkbackup-gui")
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject
from dfeet.application import DFeetApp
if __name__ == "__main__":
data_dir = "/usr/share/mkbackup-gui"
#use local paths when debugging
if os.getenv("DFEET_DEBUG") is not None:
data_dir = os.path.join(os.path.dirname(__file__), "..", "data")
Gtk.IconTheme.get_default().prepend_search_path(
os.path.join(os.path.dirname(__file__), "..", "data", "icons"))
#start the application
print(data_dir)
app = MkBackup(package="mkbackup-gui", version="0.1.0", data_dir=data_dir)
sys.exit(app.run(sys.argv))