add headless mode for linux

This commit is contained in:
ghostersk
2025-07-16 16:21:18 +01:00
parent cb13605d85
commit c9a33f8b3d
3 changed files with 174 additions and 7 deletions
+44
View File
@@ -1,4 +1,48 @@
#!/bin/bash
echo "Checking system dependencies..."
# Check if we're on Linux and need systray dependencies
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "Linux detected - checking systray dependencies..."
# Check for pkg-config
if ! command -v pkg-config >/dev/null 2>&1; then
echo "Error: pkg-config not found."
echo "Installing required dependencies for systray..."
# Detect package manager and install dependencies
if command -v apt-get >/dev/null 2>&1; then
echo "Using apt-get to install dependencies..."
sudo apt-get update
sudo apt-get install -y pkg-config libgtk-3-dev libayatana-appindicator3-dev
elif command -v yum >/dev/null 2>&1; then
echo "Using yum to install dependencies..."
sudo yum install -y pkgconfig gtk3-devel libayatana-appindicator-gtk3-devel
elif command -v dnf >/dev/null 2>&1; then
echo "Using dnf to install dependencies..."
sudo dnf install -y pkgconfig gtk3-devel libayatana-appindicator-gtk3-devel
elif command -v pacman >/dev/null 2>&1; then
echo "Using pacman to install dependencies..."
sudo pacman -S --noconfirm pkg-config gtk3 libayatana-appindicator
else
echo "Could not detect package manager. Please install manually:"
echo " - pkg-config"
echo " - GTK 3 development libraries"
echo " - libayatana-appindicator development libraries"
exit 1
fi
fi
# Verify GTK libraries are available
if ! pkg-config --exists gtk+-3.0; then
echo "Error: GTK 3 development libraries not found."
echo "Please install GTK 3 development packages for your distribution."
exit 1
fi
echo "All Linux systray dependencies are satisfied."
fi
echo "Compiling Windows resource file..."
# Check if x86_64-w64-mingw32-windres is available (for cross-compilation)