mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 03:26:17 +00:00
Update build_appimage.sh
This commit is contained in:
@@ -279,6 +279,7 @@ pip3 install --target "$APP_DIR/usr/lib/python3/dist-packages" \
|
|||||||
flask-cors \
|
flask-cors \
|
||||||
psutil \
|
psutil \
|
||||||
requests \
|
requests \
|
||||||
|
PyJWT \
|
||||||
googletrans==4.0.0-rc1 \
|
googletrans==4.0.0-rc1 \
|
||||||
httpx==0.13.3 \
|
httpx==0.13.3 \
|
||||||
httpcore==0.9.1 \
|
httpcore==0.9.1 \
|
||||||
@@ -321,10 +322,6 @@ echo "🔧 Installing hardware monitoring tools..."
|
|||||||
mkdir -p "$WORK_DIR/debs"
|
mkdir -p "$WORK_DIR/debs"
|
||||||
cd "$WORK_DIR/debs"
|
cd "$WORK_DIR/debs"
|
||||||
|
|
||||||
|
|
||||||
# ==============================================================
|
|
||||||
|
|
||||||
|
|
||||||
echo "📥 Downloading hardware monitoring tools (dynamic via APT)..."
|
echo "📥 Downloading hardware monitoring tools (dynamic via APT)..."
|
||||||
|
|
||||||
dl_pkg() {
|
dl_pkg() {
|
||||||
@@ -361,21 +358,12 @@ dl_pkg() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p "$WORK_DIR/debs"
|
|
||||||
cd "$WORK_DIR/debs"
|
|
||||||
|
|
||||||
|
|
||||||
dl_pkg "ipmitool.deb" "ipmitool" || true
|
dl_pkg "ipmitool.deb" "ipmitool" || true
|
||||||
dl_pkg "libfreeipmi17.deb" "libfreeipmi17" || true
|
dl_pkg "libfreeipmi17.deb" "libfreeipmi17" || true
|
||||||
dl_pkg "lm-sensors.deb" "lm-sensors" || true
|
dl_pkg "lm-sensors.deb" "lm-sensors" || true
|
||||||
dl_pkg "nut-client.deb" "nut-client" || true
|
dl_pkg "nut-client.deb" "nut-client" || true
|
||||||
dl_pkg "libupsclient.deb" "libupsclient6" "libupsclient5" "libupsclient4" || true
|
dl_pkg "libupsclient.deb" "libupsclient6" "libupsclient5" "libupsclient4" || true
|
||||||
|
|
||||||
|
|
||||||
# dl_pkg "nvidia-smi.deb" "nvidia-smi" "nvidia-utils" "nvidia-utils-535" "nvidia-utils-550" || true
|
|
||||||
# dl_pkg "intel-gpu-tools.deb" "intel-gpu-tools" || true
|
|
||||||
# dl_pkg "radeontop.deb" "radeontop" || true
|
|
||||||
|
|
||||||
echo "📦 Extracting .deb packages into AppDir..."
|
echo "📦 Extracting .deb packages into AppDir..."
|
||||||
extracted_count=0
|
extracted_count=0
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
@@ -395,7 +383,6 @@ else
|
|||||||
echo "✅ Extracted $extracted_count package(s)"
|
echo "✅ Extracted $extracted_count package(s)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -d "$APP_DIR/bin" ]; then
|
if [ -d "$APP_DIR/bin" ]; then
|
||||||
echo "📋 Normalizing /bin -> /usr/bin"
|
echo "📋 Normalizing /bin -> /usr/bin"
|
||||||
mkdir -p "$APP_DIR/usr/bin"
|
mkdir -p "$APP_DIR/usr/bin"
|
||||||
@@ -403,24 +390,20 @@ if [ -d "$APP_DIR/bin" ]; then
|
|||||||
rm -rf "$APP_DIR/bin"
|
rm -rf "$APP_DIR/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "🔍 Sanity check (ldd + presence of libfreeipmi)"
|
echo "🔍 Sanity check (ldd + presence of libfreeipmi)"
|
||||||
export LD_LIBRARY_PATH="$APP_DIR/lib:$APP_DIR/lib/x86_64-linux-gnu:$APP_DIR/usr/lib:$APP_DIR/usr/lib/x86_64-linux-gnu"
|
export LD_LIBRARY_PATH="$APP_DIR/lib:$APP_DIR/lib/x86_64-linux-gnu:$APP_DIR/usr/lib:$APP_DIR/usr/lib/x86_64-linux-gnu"
|
||||||
|
|
||||||
|
|
||||||
if ! find "$APP_DIR/usr/lib" "$APP_DIR/lib" -maxdepth 3 -name 'libfreeipmi.so.17*' | grep -q .; then
|
if ! find "$APP_DIR/usr/lib" "$APP_DIR/lib" -maxdepth 3 -name 'libfreeipmi.so.17*' | grep -q .; then
|
||||||
echo "❌ libfreeipmi.so.17 not found inside AppDir (ipmitool will fail)"
|
echo "❌ libfreeipmi.so.17 not found inside AppDir (ipmitool will fail)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -x "$APP_DIR/usr/bin/ipmitool" ] && ldd "$APP_DIR/usr/bin/ipmitool" | grep -q 'not found'; then
|
if [ -x "$APP_DIR/usr/bin/ipmitool" ] && ldd "$APP_DIR/usr/bin/ipmitool" | grep -q 'not found'; then
|
||||||
echo "❌ ipmitool has unresolved libs:"
|
echo "❌ ipmitool has unresolved libs:"
|
||||||
ldd "$APP_DIR/usr/bin/ipmitool" | grep 'not found' || true
|
ldd "$APP_DIR/usr/bin/ipmitool" | grep 'not found' || true
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -x "$APP_DIR/usr/bin/upsc" ] && ldd "$APP_DIR/usr/bin/upsc" | grep -q 'not found'; then
|
if [ -x "$APP_DIR/usr/bin/upsc" ] && ldd "$APP_DIR/usr/bin/upsc" | grep -q 'not found'; then
|
||||||
echo "⚠️ upsc has unresolved libs, trying to auto-fix..."
|
echo "⚠️ upsc has unresolved libs, trying to auto-fix..."
|
||||||
missing="$(ldd "$APP_DIR/usr/bin/upsc" | awk '/not found/{print $1}' | tr -d ' ')"
|
missing="$(ldd "$APP_DIR/usr/bin/upsc" | awk '/not found/{print $1}' | tr -d ' ')"
|
||||||
@@ -463,12 +446,6 @@ echo "✅ Sanity check OK (ipmitool/upsc ready; libfreeipmi present)"
|
|||||||
[ -x "$APP_DIR/usr/bin/intel_gpu_top" ] && echo " • intel-gpu-tools: OK" || echo " • intel-gpu-tools: missing"
|
[ -x "$APP_DIR/usr/bin/intel_gpu_top" ] && echo " • intel-gpu-tools: OK" || echo " • intel-gpu-tools: missing"
|
||||||
[ -x "$APP_DIR/usr/bin/radeontop" ] && echo " • radeontop: OK" || echo " • radeontop: missing"
|
[ -x "$APP_DIR/usr/bin/radeontop" ] && echo " • radeontop: OK" || echo " • radeontop: missing"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ==============================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Build AppImage
|
# Build AppImage
|
||||||
echo "🔨 Building unified AppImage v${VERSION}..."
|
echo "🔨 Building unified AppImage v${VERSION}..."
|
||||||
cd "$WORK_DIR"
|
cd "$WORK_DIR"
|
||||||
|
|||||||
Reference in New Issue
Block a user