Linux: Move to Ayatana's AppIndicator
The reference AppIndicator implementation has been deprecated/abandoned in newer distros. Co-Authored-By: Guilherme Silva <626206+guihkx@users.noreply.github.com>
This commit is contained in:
1 parent
c2aa283c68
commit
82654680f6
3 files changed
+9
-6
No files matched your search
@@ -130,7 +130,7 @@ jobs:
|
|||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install gir1.2-appindicator3-0.1 libgirepository1.0-dev python3-tk
|
sudo apt install libgirepository1.0-dev gir1.2-ayatanaappindicator3-0.1 libayatana-appindicator3-1 python3-tk
|
||||||
|
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -198,7 +198,7 @@ jobs:
|
|||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libgirepository1.0-dev python3-testresources
|
sudo apt install libgirepository1.0-dev gir1.2-ayatanaappindicator3-0.1 libayatana-appindicator3-1 python3-testresources
|
||||||
|
|
||||||
- name: Download AppImage Builder
|
- name: Download AppImage Builder
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ AppDir:
|
|||||||
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
|
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- gir1.2-appindicator3-0.1
|
- gir1.2-ayatanaappindicator3-0.1
|
||||||
- python3-tk
|
- python3-tk
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
|
|||||||
+6
-3
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, TYPE_CHECKING
|
from typing import Any, TYPE_CHECKING
|
||||||
|
import platform
|
||||||
|
|
||||||
SELF_PATH = str(Path(".").resolve())
|
SELF_PATH = str(Path(".").resolve())
|
||||||
if SELF_PATH not in sys.path:
|
if SELF_PATH not in sys.path:
|
||||||
@@ -31,7 +32,7 @@ for lang_filepath in WORKING_DIR.joinpath("lang").glob("*.json"):
|
|||||||
if lang_filepath.stem != DEFAULT_LANG:
|
if lang_filepath.stem != DEFAULT_LANG:
|
||||||
to_add.append((lang_filepath, "lang", True))
|
to_add.append((lang_filepath, "lang", True))
|
||||||
|
|
||||||
# ensure the required to-be-added data exists
|
# Ensure the required to-be-added data exists
|
||||||
datas: list[tuple[Path, str]] = []
|
datas: list[tuple[Path, str]] = []
|
||||||
for source_path, dest_path, required in to_add:
|
for source_path, dest_path, required in to_add:
|
||||||
if source_path.exists():
|
if source_path.exists():
|
||||||
@@ -51,8 +52,10 @@ hiddenimports: list[str] = [
|
|||||||
|
|
||||||
if sys.platform == "linux":
|
if sys.platform == "linux":
|
||||||
# Needed files for better system tray support on Linux via pystray (AppIndicator backend).
|
# Needed files for better system tray support on Linux via pystray (AppIndicator backend).
|
||||||
datas.append((Path("/usr/lib/girepository-1.0/AppIndicator3-0.1.typelib"), "gi_typelibs"))
|
arch = platform.machine()
|
||||||
binaries.append((Path("/lib/x86_64-linux-gnu/libappindicator3.so.1"), "."))
|
datas.append((Path(f"/usr/lib/{arch}-linux-gnu/girepository-1.0/AyatanaAppIndicator3-0.1.typelib"), "gi_typelibs"))
|
||||||
|
binaries.append((Path(f"/usr/lib/{arch}-linux-gnu/libayatana-appindicator3.so.1"), "."))
|
||||||
|
|
||||||
hiddenimports.extend([
|
hiddenimports.extend([
|
||||||
"gi.repository.Gtk",
|
"gi.repository.Gtk",
|
||||||
"gi.repository.GObject",
|
"gi.repository.GObject",
|
||||||
|
|||||||
Reference in new issue
Block a user