Skip to content

Commit

Permalink
Linux: Move to Ayatana's AppIndicator
Browse files Browse the repository at this point in the history
The reference AppIndicator implementation has been deprecated/abandoned in newer distros.

Co-Authored-By: Guilherme Silva <[email protected]>
  • Loading branch information
biast12 and guihkx committed Nov 15, 2024
1 parent 4f4ae26 commit 4914996
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Install system dependencies
run: |
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
run: |
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
- name: Install system dependencies
run: |
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
run: |
Expand Down
2 changes: 1 addition & 1 deletion appimage/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ AppDir:
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C

include:
- gir1.2-appindicator3-0.1
- gir1.2-ayatanaappindicator3-0.1
- python3-tk

exclude:
Expand Down
9 changes: 6 additions & 3 deletions build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from __future__ import annotations
import sys
from pathlib import Path
from typing import Any, TYPE_CHECKING
import platform

SELF_PATH = str(Path(".").resolve())
if SELF_PATH not in sys.path:
Expand Down Expand Up @@ -31,7 +32,7 @@ for lang_filepath in WORKING_DIR.joinpath("lang").glob("*.json"):
if lang_filepath.stem != DEFAULT_LANG:
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]] = []
for source_path, dest_path, required in to_add:
if source_path.exists():
Expand All @@ -51,8 +52,10 @@ hiddenimports: list[str] = [

if sys.platform == "linux":
# 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"))
binaries.append((Path("/lib/x86_64-linux-gnu/libappindicator3.so.1"), "."))
arch = platform.machine()
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([
"gi.repository.Gtk",
"gi.repository.GObject",
Expand Down

0 comments on commit 4914996

Please sign in to comment.