2019-07-10 01:51:41 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import gi
|
|
|
|
import sys
|
|
|
|
import os
|
2019-08-19 03:59:02 +02:00
|
|
|
from pathlib import Path
|
2019-07-10 01:51:41 +02:00
|
|
|
|
2019-08-27 05:40:07 +02:00
|
|
|
try:
|
|
|
|
# 3.30 is the first one with Gtk.Template
|
|
|
|
gi.check_version('3.30') # NOQA
|
|
|
|
except ValueError as e:
|
|
|
|
print(e, file=sys.stderr)
|
|
|
|
sys.exit(1)
|
|
|
|
|
2019-08-13 04:53:26 +02:00
|
|
|
gi.require_version('Gio', '2.0') # NOQA
|
2019-08-29 01:56:34 +02:00
|
|
|
from gi.repository import Gio
|
2019-07-10 01:51:41 +02:00
|
|
|
|
2019-08-13 04:53:26 +02:00
|
|
|
|
|
|
|
@devel@ # NOQA
|
2019-08-19 03:59:02 +02:00
|
|
|
resource = Gio.resource_load(os.fspath(Path('@pkgdatadir@', 'tuhi.gresource')))
|
2019-07-10 01:51:41 +02:00
|
|
|
Gio.Resource._register(resource)
|
|
|
|
|
2019-08-13 04:53:26 +02:00
|
|
|
|
2019-07-10 01:51:41 +02:00
|
|
|
if __name__ == "__main__":
|
|
|
|
import gettext
|
|
|
|
import locale
|
|
|
|
|
2019-07-17 13:10:36 +02:00
|
|
|
locale.bindtextdomain('tuhi', '@localedir@')
|
|
|
|
gettext.bindtextdomain('tuhi', '@localedir@')
|
2019-08-29 01:56:34 +02:00
|
|
|
|
|
|
|
from tuhi.gui.application import main
|
|
|
|
main(sys.argv)
|