mirror of https://github.com/tuhiproject/tuhi.git
Merge 66ed4400da
into 17f7c3e53f
commit
2f37ca9762
|
@ -176,3 +176,8 @@ endif
|
|||
configure_file(input: 'tools/tuhi-gui-flatpak.py',
|
||||
output: 'tuhi-gui-flatpak.py',
|
||||
copy: true)
|
||||
|
||||
tuhi_devenv = environment()
|
||||
tuhi_devenv.set('TUHI_DEVEL_BUILD_DIR', meson.current_build_dir())
|
||||
tuhi_devenv.set('PYTHONPATH', meson.current_source_dir())
|
||||
meson.add_devenv(tuhi_devenv)
|
||||
|
|
15
tuhi-gui.in
15
tuhi-gui.in
|
@ -17,7 +17,12 @@ from gi.repository import Gio
|
|||
|
||||
|
||||
@devel@ # NOQA
|
||||
resource = Gio.resource_load(os.fspath(Path('@pkgdatadir@', 'tuhi.gresource')))
|
||||
if "TUHI_DEVEL_BUILD_DIR" in os.environ:
|
||||
resource_path = Path(os.environ["TUHI_DEVEL_BUILD_DIR"], 'data', 'tuhi.gresource')
|
||||
else:
|
||||
resource_path = Path('@pkgdatadir@', 'tuhi.gresource')
|
||||
|
||||
resource = Gio.resource_load(os.fspath(resource_path))
|
||||
Gio.Resource._register(resource)
|
||||
|
||||
|
||||
|
@ -25,8 +30,12 @@ if __name__ == "__main__":
|
|||
import gettext
|
||||
import locale
|
||||
|
||||
locale.bindtextdomain('tuhi', '@localedir@')
|
||||
gettext.bindtextdomain('tuhi', '@localedir@')
|
||||
if "TUHI_DEVEL_BUILD_DIR" in os.environ:
|
||||
locale.bindtextdomain('tuhi', Path(os.environ["TUHI_DEVEL_BUILD_DIR"], "po"))
|
||||
gettext.bindtextdomain('tuhi', Path(os.environ["TUHI_DEVEL_BUILD_DIR"], "po"))
|
||||
else:
|
||||
locale.bindtextdomain('tuhi', '@localedir@')
|
||||
gettext.bindtextdomain('tuhi', '@localedir@')
|
||||
|
||||
from tuhi.gui.application import main
|
||||
main(sys.argv)
|
||||
|
|
5
tuhi.in
5
tuhi.in
|
@ -11,13 +11,14 @@
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
import argparse
|
||||
|
||||
tuhi_server = Path('@libexecdir@', 'tuhi-server')
|
||||
tuhi_gui = Path('@libexecdir@', 'tuhi-gui')
|
||||
tuhi_server = Path(os.environ.get("TUHI_DEVEL_BUILD_DIR", "@libexecdir@"), 'tuhi-server')
|
||||
tuhi_gui = Path(os.environ.get("TUHI_DEVEL_BUILD_DIR", "@libexecdir@"), 'tuhi-gui')
|
||||
|
||||
|
||||
@devel@ # NOQA
|
||||
|
|
Loading…
Reference in New Issue