Files
cartridges/cartridges/cartridges.in
kramo 69928a8b4f Implement search provider (#201)
* Begin work on search provider

* Initial search provider work, organize meson

* Initial work on icons

* Implement LaunchSearch

* Don't hold arbitrary reference to service

I don't know why Lollypop does this

* Send notification, pad images

* Update translations

* Fix init_search_term typing
2023-10-10 22:47:32 +02:00

59 lines
1.7 KiB
Plaintext
Executable File

#!@PYTHON@
# cartridges.in
#
# Copyright 2022-2023 kramo
#
# 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 <http://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later
import gettext
import locale
import os
import signal
import sys
VERSION = "@VERSION@"
if os.name == "nt":
from ctypes import windll
os.environ["LANGUAGE"] = locale.windows_locale[
windll.kernel32.GetUserDefaultUILanguage()
]
PKGDATADIR = os.path.join(os.path.dirname(__file__), "..", "share", "cartridges")
LOCALEDIR = os.path.join(os.path.dirname(__file__), "..", "share", "locale")
else:
PKGDATADIR = "@pkgdatadir@"
LOCALEDIR = "@localedir@"
sys.path.insert(1, PKGDATADIR)
signal.signal(signal.SIGINT, signal.SIG_DFL)
if os.name != "nt":
locale.bindtextdomain("cartridges", LOCALEDIR)
locale.textdomain("cartridges")
gettext.install("cartridges", LOCALEDIR)
if __name__ == "__main__":
from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(PKGDATADIR, "cartridges.gresource"))
resource._register() # pylint: disable=protected-access
from cartridges import main
sys.exit(main.main(VERSION))