From 4a7ea3ec4319d8bc8295b426d1306d1495bd51f2 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Wed, 16 Apr 2025 04:30:01 -0700 Subject: [PATCH] appimage --- scripts/appimage/create-appimage-old.sh | 109 ++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 scripts/appimage/create-appimage-old.sh diff --git a/scripts/appimage/create-appimage-old.sh b/scripts/appimage/create-appimage-old.sh new file mode 100644 index 00000000..175e7151 --- /dev/null +++ b/scripts/appimage/create-appimage-old.sh @@ -0,0 +1,109 @@ +#!/bin/bash +set -e # Exit on error +set -x # Print commands as they are executed + +# Configuration +APP_NAME="void" +APP_VERSION="1.0.0" +ARCH="x86_64" + +export ARCH + +# Check if void binary exists in current directory +if [ ! -f "./void" ]; then + echo "Error: void binary not found in current directory" + exit 1 +fi + +# Check if icon exists +if [ ! -f "./void.png" ]; then + echo "Error: void.png icon not found in current directory" + exit 1 +fi + +# Create temporary directory +TEMP_DIR="$(mktemp -d)" +echo "Created temporary directory: $TEMP_DIR" +APP_DIR="$TEMP_DIR/$APP_NAME.AppDir" + +# Create basic AppDir structure +mkdir -pv "$APP_DIR/usr/bin" +mkdir -pv "$APP_DIR/usr/lib" +mkdir -pv "$APP_DIR/usr/share/applications" +mkdir -pv "$APP_DIR/usr/share/icons/hicolor/256x256/apps" + +# Exclude create-appimage.sh and appimagetool-x86_64.AppImage from being copied +echo "Copying files excluding create-appimage.sh and appimagetool-x86_64.AppImage..." + +cp -v ./void "$APP_DIR/usr/bin/" + +# Copy the icon to required locations +cp -v ./void.png "$APP_DIR/void.png" +cp -v ./void.png "$APP_DIR/usr/share/icons/hicolor/256x256/apps/void.png" + +# Copy dependencies with error checking +echo "Copying dependencies..." +for lib in $(ldd ./void | grep "=> /" | awk '{print $3}'); do + if [ -f "$lib" ]; then + cp -v "$lib" "$APP_DIR/usr/lib/" || echo "Failed to copy $lib" + else + echo "Warning: Library $lib not found" + fi +done + +# Create desktop file with error checking +echo "Creating desktop file..." +if ! cat > "$APP_DIR/$APP_NAME.desktop" < "$APP_DIR/AppRun" <