From 0e4aaa0c47ed0a90831fc071ced6de890128c29c Mon Sep 17 00:00:00 2001 From: EmixamPP Date: Sat, 30 Oct 2021 13:57:16 +0200 Subject: [PATCH] many lib dir --- howdy-gtk/src/onboarding.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/howdy-gtk/src/onboarding.py b/howdy-gtk/src/onboarding.py index affa4fa..124a663 100644 --- a/howdy-gtk/src/onboarding.py +++ b/howdy-gtk/src/onboarding.py @@ -68,12 +68,22 @@ class OnboardingWindow(gtk.Window): eventbox = self.builder.get_object("downloadeventbox") eventbox.modify_bg(gtk.StateType.NORMAL, gdk.Color(red=0, green=0, blue=0)) - if os.path.exists("/lib/security/howdy/dlib-data/shape_predictor_5_face_landmarks.dat"): + for lib_site in ("/lib", "/usr/lib", "/lib64", "/usr/lib64"): + if os.path.exists(lib_site + "/security/howdy/"): + break + else: + lib_site = None + + if lib_site is None: + self.downloadoutputlabel.set_text(_("Unable to find Howdy's installation location")) + return + + if os.path.exists(lib_site + "/security/howdy/dlib-data/shape_predictor_5_face_landmarks.dat"): self.downloadoutputlabel.set_text(_("Datafiles have already been downloaded!\nClick Next to continue")) self.enable_next() return - self.proc = subprocess.Popen("./install.sh", stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, cwd="/lib/security/howdy/dlib-data") + self.proc = subprocess.Popen("./install.sh", stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, cwd=lib_site + "/security/howdy/dlib-data") self.download_lines = [] self.read_download_line()