From d214329625846e6957ab446f1827fcd324f8a489 Mon Sep 17 00:00:00 2001
From: gfdgd_xi <3025613752@qq.com>
Date: Thu, 2 May 2024 20:49:30 +0800
Subject: [PATCH] =?UTF-8?q?=E5=86=85=E7=BD=AElib=E4=BB=A5=E8=A7=A3?=
 =?UTF-8?q?=E5=86=B320=E5=92=8C23=E4=BD=BF=E7=94=A8=E5=90=8C=E4=B8=80?=
 =?UTF-8?q?=E5=8C=85=E5=AF=BC=E8=87=B4=E7=9A=84=E5=85=BC=E5=AE=B9=E6=80=A7?=
 =?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 gxde-kernel-manager-runner.sh |  8 ++++++++
 gxde-kernel-manager.desktop   |  2 +-
 gxde-kernel-manager.pro       | 32 ++++++++++++++++++++------------
 3 files changed, 29 insertions(+), 13 deletions(-)
 create mode 100755 gxde-kernel-manager-runner.sh

diff --git a/gxde-kernel-manager-runner.sh b/gxde-kernel-manager-runner.sh
new file mode 100755
index 0000000..2f2b303
--- /dev/null
+++ b/gxde-kernel-manager-runner.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+programPath=$(cd $(dirname $0); pwd)
+arch=$(dpkg --print-architecture)
+if [[ -d "$programPath/lib/$arch" ]]; then
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$programPath/lib/$arch
+fi
+$programPath/gxde-kernel-manager
\ No newline at end of file
diff --git a/gxde-kernel-manager.desktop b/gxde-kernel-manager.desktop
index 121a775..bf42175 100644
--- a/gxde-kernel-manager.desktop
+++ b/gxde-kernel-manager.desktop
@@ -5,6 +5,6 @@ Name[zh_CN]=内核管理器
 Comment=Kernel Manager
 Comment[zh_CN]=内核管理器
 Type=Application
-Exec=/opt/apps/gxde-kernel-manager/gxde-kernel-manager
+Exec=bash /opt/apps/gxde-kernel-manager/gxde-kernel-manager-runner.sh
 Icon=/opt/apps/gxde-kernel-manager/icon.svg
 Categories=System
diff --git a/gxde-kernel-manager.pro b/gxde-kernel-manager.pro
index 0f6948f..898a093 100644
--- a/gxde-kernel-manager.pro
+++ b/gxde-kernel-manager.pro
@@ -35,24 +35,32 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
 !isEmpty(target.path): INSTALLS += target
 unix:!macx: LIBS += -lqtermwidget5
 
-aptsource.path=/etc/apt/sources.list.d/
-aptsource.files=$$PWD/AptSources/gxde-kernel-manager.list
+aptsource.path = /etc/apt/sources.list.d/
+aptsource.files = $$PWD/AptSources/gxde-kernel-manager.list
 
-aptsourcegpg.path=/etc/apt/trusted.gpg.d/
-aptsourcegpg.files=$$PWD/AptSources/gxde-kernel-manager.gpg
+aptsourcegpg.path = /etc/apt/trusted.gpg.d/
+aptsourcegpg.files = $$PWD/AptSources/gxde-kernel-manager.gpg
 
-debiandesktop.path=/usr/share/applications/
-debiandesktop.files=$$PWD/gxde-kernel-manager.desktop
+debiandesktop.path = /usr/share/applications/
+debiandesktop.files = $$PWD/gxde-kernel-manager.desktop
 
-uosdesktop.path=/opt/apps/gxde-kernel-manager/entries/applications
-uosdesktop.files=$$PWD/gxde-kernel-manager.desktop
+uosdesktop.path = /opt/apps/gxde-kernel-manager/entries/applications
+uosdesktop.files = $$PWD/gxde-kernel-manager.desktop
 
-icon.path=/opt/apps/gxde-kernel-manager/
-icon.files=$$PWD/icon/icon.svg
+icon.path = /opt/apps/gxde-kernel-manager/
+icon.files = $$PWD/icon/icon.svg
 
-target.path=/opt/apps/gxde-kernel-manager/
+targetrunner.path = /opt/apps/gxde-kernel-manager/
+targetrunner.files = $$PWD/gxde-kernel-manager-runner.sh
 
-INSTALLS+= aptsourcegpg aptsource target debiandesktop uosdesktop icon
+libinclude.path = /opt/apps/gxde-kernel-manager/
+libinclude.files = $$PWD/lib
+
+target.path = /opt/apps/gxde-kernel-manager/
+
+
+
+INSTALLS += aptsourcegpg aptsource target debiandesktop uosdesktop icon targetrunner libinclude
 
 TRANSLATIONS += translation/gxde-kernel-manager_zh_CN.ts