From 395cd15054254454f9572c55dfa020a44ea6c7de Mon Sep 17 00:00:00 2001 From: biast12 <53872542+biast12@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:24:59 +0100 Subject: [PATCH] simplified arch os handling --- build.sh | 3 +-- build.spec | 10 ++-------- setup_env.sh | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/build.sh b/build.sh index f4ab743c..0da230b1 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash -clear dirpath=$(dirname "$(readlink -f "$0")") # Check if the virtual environment exists diff --git a/build.spec b/build.spec index ae69f4c7..daa539f1 100644 --- a/build.spec +++ b/build.spec @@ -52,14 +52,8 @@ hiddenimports: list[str] = [ if sys.platform == "linux": arch = platform.machine() - if arch == "x86_64": - datas.append((Path("/usr/lib/x86_64-linux-gnu/girepository-1.0/AyatanaAppIndicator3-0.1.typelib"), "gi_typelibs")) - binaries.append((Path("/usr/lib/x86_64-linux-gnu/libayatana-appindicator3.so.1"), ".")) - elif arch == "aarch64": - datas.append((Path("/usr/lib/aarch64-linux-gnu/girepository-1.0/AyatanaAppIndicator3-0.1.typelib"), "gi_typelibs")) - binaries.append((Path("/usr/lib/aarch64-linux-gnu/libayatana-appindicator3.so.1"), ".")) - else: - raise ValueError(f"Unsupported architecture: {arch}") + 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", diff --git a/setup_env.sh b/setup_env.sh index bfa036cc..5b0f7f3b 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -1,6 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash -clear dirpath=$(dirname "$(readlink -f "$0")") # Check if git is installed