mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-01 23:56:18 +00:00
Update build_appimage.sh
This commit is contained in:
@@ -9,8 +9,9 @@ WORK_DIR="/tmp/proxmenux_build"
|
||||
APP_DIR="$WORK_DIR/ProxMenux.AppDir"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DIST_DIR="$SCRIPT_DIR/../dist"
|
||||
APPIMAGE_ROOT="$SCRIPT_DIR/.."
|
||||
|
||||
VERSION=$(node -p "require('$SCRIPT_DIR/../package.json').version")
|
||||
VERSION=$(node -p "require('$APPIMAGE_ROOT/package.json').version")
|
||||
APPIMAGE_NAME="ProxMenux-${VERSION}.AppImage"
|
||||
|
||||
echo "🚀 Building ProxMenux Monitor AppImage v${VERSION} with translation support..."
|
||||
@@ -164,17 +165,17 @@ chmod +x "$APP_DIR/usr/bin/translate_cli.py"
|
||||
|
||||
# Copy Next.js build
|
||||
echo "📋 Copying web dashboard..."
|
||||
if [ -d "$SCRIPT_DIR/../../.next" ]; then
|
||||
cp -r "$SCRIPT_DIR/../../.next" "$APP_DIR/web/"
|
||||
cp -r "$SCRIPT_DIR/../../web/public" "$APP_DIR/web/"
|
||||
cp "$SCRIPT_DIR/../package.json" "$APP_DIR/web/"
|
||||
if [ -d "$APPIMAGE_ROOT/.next" ]; then
|
||||
cp -r "$APPIMAGE_ROOT/.next" "$APP_DIR/web/"
|
||||
cp -r "$APPIMAGE_ROOT/public" "$APP_DIR/web/"
|
||||
cp "$APPIMAGE_ROOT/package.json" "$APP_DIR/web/"
|
||||
echo "✅ Next.js build copied successfully"
|
||||
else
|
||||
echo "⚠️ Warning: Next.js build not found. Run 'npm run build' first."
|
||||
echo "⚠️ Warning: Next.js build not found in AppImage directory. Run 'npm run build' in AppImage directory first."
|
||||
echo "📋 Creating minimal web structure..."
|
||||
mkdir -p "$APP_DIR/web/public/images"
|
||||
if [ -f "$SCRIPT_DIR/../../web/public/images/proxmenux-logo.png" ]; then
|
||||
cp "$SCRIPT_DIR/../../web/public/images/proxmenux-logo.png" "$APP_DIR/web/public/images/"
|
||||
if [ -f "$APPIMAGE_ROOT/public/images/proxmenux-logo.png" ]; then
|
||||
cp "$APPIMAGE_ROOT/public/images/proxmenux-logo.png" "$APP_DIR/web/public/images/"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -256,8 +257,8 @@ cp "$APP_DIR/proxmenux-monitor.desktop" "$APP_DIR/usr/share/applications/"
|
||||
|
||||
# Download and set icon
|
||||
echo "🎨 Setting up icon..."
|
||||
if [ -f "$SCRIPT_DIR/../../web/public/images/proxmenux-logo.png" ]; then
|
||||
cp "$SCRIPT_DIR/../../web/public/images/proxmenux-logo.png" "$APP_DIR/proxmenux-monitor.png"
|
||||
if [ -f "$APPIMAGE_ROOT/public/images/proxmenux-logo.png" ]; then
|
||||
cp "$APPIMAGE_ROOT/public/images/proxmenux-logo.png" "$APP_DIR/proxmenux-monitor.png"
|
||||
else
|
||||
wget -q "https://raw.githubusercontent.com/MacRimi/ProxMenux/main/images/logo.png" -O "$APP_DIR/proxmenux-monitor.png" || {
|
||||
echo "⚠️ Could not download logo, creating placeholder..."
|
||||
|
Reference in New Issue
Block a user