Skip to content
Snippets Groups Projects
briar-gtk.in 1.41 KiB
Newer Older
Nico's avatar
Nico committed
#!@PYTHON@

# Copyright 2019 Nico Alt
#
# 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 3 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, see <https://www.gnu.org/licenses/>.
#
# Initial version based on GNOME Lollypop
# https://gitlab.gnome.org/World/lollypop/blob/1.0.2/lollypop.in
Nico's avatar
Nico committed

import gettext
import locale
Nico's avatar
Nico committed
import os
import signal
Nico's avatar
Nico committed

pkgdatadir = '@pkgdatadir@'
localedir = '@localedir@'

sys.path.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL)

if __name__ == '__main__':
    locale.bindtextdomain('briar-gtk', localedir)
    locale.textdomain('briar-gtk')
    gettext.bindtextdomain('briar-gtk', localedir)
    gettext.textdomain('briar-gtk')

Nico's avatar
Nico committed
    import gi

    from gi.repository import Gio
    resource = Gio.Resource.load(os.path.join(pkgdatadir, 'briar-gtk.gresource'))
Nico's avatar
Nico committed
    resource._register()

    from briar.gtk.application import Application
    sys.exit(Application("@VERSION@").run(sys.argv))