diff --git a/package-lock.json b/package-lock.json index 6064f8a8..b83fb86d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -174,7 +174,7 @@ "source-map": "0.6.1", "source-map-support": "^0.3.2", "style-loader": "^3.3.2", - "tailwindcss": "^4.0.9", + "tailwindcss": "^3.4.17", "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tsec": "0.2.7", @@ -193,6 +193,19 @@ "windows-foreground-love": "0.5.0" } }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -6289,6 +6302,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -6370,16 +6393,11 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -6392,6 +6410,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -7721,6 +7742,13 @@ "dev": true, "optional": true }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/diff": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", @@ -7742,6 +7770,13 @@ "node": ">=8" } }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -13303,6 +13338,16 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/joycon": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", @@ -13891,9 +13936,9 @@ } }, "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "dev": true, "license": "MIT", "engines": { @@ -15707,6 +15752,16 @@ "node": ">=0.10.0" } }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -16894,6 +16949,44 @@ "postcss": "^8.4.31" } }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, "node_modules/postcss-load-config": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", @@ -17854,6 +17947,26 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "license": "MIT" }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/read-cache/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -18252,18 +18365,22 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, + "license": "MIT", "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -20449,12 +20566,125 @@ "license": "MIT" }, "node_modules/tailwindcss": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.9.tgz", - "integrity": "sha512-12laZu+fv1ONDRoNR9ipTOpUD7RN9essRVkX36sjxuRUInpN7hIiHN4lBd/SIFjbISvnXzp8h/hXzmU8SQQYhw==", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.6", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tailwindcss/node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", "dev": true, "license": "MIT" }, + "node_modules/tailwindcss/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/tailwindcss/node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/tailwindcss/node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, "node_modules/tapable": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", @@ -22730,6 +22960,19 @@ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", "dev": true }, + "node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index dc951d09..91cf98d0 100644 --- a/package.json +++ b/package.json @@ -235,7 +235,7 @@ "source-map": "0.6.1", "source-map-support": "^0.3.2", "style-loader": "^3.3.2", - "tailwindcss": "^4.0.9", + "tailwindcss": "^3.4.17", "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tsec": "0.2.7", diff --git a/scripts/appimage/create_appimage.sh b/scripts/appimage/create_appimage.sh new file mode 100755 index 00000000..64c9acf2 --- /dev/null +++ b/scripts/appimage/create_appimage.sh @@ -0,0 +1,135 @@ +#!/bin/bash + +# Exit on error +set -e + +# Check platform +platform=$(uname) + +if [[ "$platform" == "Darwin" ]]; then + echo "Running on macOS. Note that the AppImage created will only work on Linux systems." + if ! command -v docker &> /dev/null; then + echo "Docker Desktop for Mac is not installed. Please install it from https://www.docker.com/products/docker-desktop" + exit 1 + fi +elif [[ "$platform" == "Linux" ]]; then + echo "Running on Linux. Proceeding with AppImage creation..." +else + echo "This script is intended to run on macOS or Linux. Current platform: $platform" + exit 1 +fi + +# Enable BuildKit +export DOCKER_BUILDKIT=1 + +BUILD_IMAGE_NAME="void-appimage-builder" + +# Check if Docker is running +if ! docker info >/dev/null 2>&1; then + echo "Docker is not running. Please start Docker first." + exit 1 +fi + +# Check and install Buildx if needed +if ! docker buildx version >/dev/null 2>&1; then + echo "Installing Docker Buildx..." + mkdir -p ~/.docker/cli-plugins/ + curl -SL https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx + chmod +x ~/.docker/cli-plugins/docker-buildx +fi + +# Download appimagetool if not present +if [ ! -f "appimagetool" ]; then + echo "Downloading appimagetool..." + wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" + chmod +x appimagetool +fi + +# Delete any existing AppImage to avoid bloating the build +rm -f Void-x86_64.AppImage + +# Create build Dockerfile +echo "Creating build Dockerfile..." +cat > Dockerfile.build << 'EOF' +# syntax=docker/dockerfile:1 +FROM ubuntu:20.04 + +# Install required dependencies +RUN apt-get update && apt-get install -y \ + libfuse2 \ + libglib2.0-0 \ + libgtk-3-0 \ + libx11-xcb1 \ + libxss1 \ + libxtst6 \ + libnss3 \ + libasound2 \ + libdrm2 \ + libgbm1 \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app +EOF + +# Create .dockerignore file +echo "Creating .dockerignore file..." +cat > .dockerignore << EOF +Dockerfile.build +.dockerignore +.git +.gitignore +.DS_Store +*~ +*.swp +*.swo +*.tmp +*.bak +*.log +*.err +node_modules/ +venv/ +*.egg-info/ +*.tox/ +dist/ +EOF + +# Build Docker image without cache +echo "Building Docker image (no cache)..." +docker build --no-cache -t "$BUILD_IMAGE_NAME" -f Dockerfile.build . + +# Create AppImage using local appimagetool +echo "Creating AppImage..." +docker run --rm --privileged -v "$(pwd):/app" "$BUILD_IMAGE_NAME" bash -c ' +cd /app && \ +rm -rf VoidApp.AppDir && \ +mkdir -p VoidApp.AppDir/usr/bin VoidApp.AppDir/usr/lib VoidApp.AppDir/usr/share/applications && \ +find . -maxdepth 1 ! -name VoidApp.AppDir ! -name "." ! -name ".." -exec cp -r {} VoidApp.AppDir/usr/bin/ \; && \ +cp void.png VoidApp.AppDir/ && \ +echo "[Desktop Entry]" > VoidApp.AppDir/void.desktop && \ +echo "Name=Void" >> VoidApp.AppDir/void.desktop && \ +echo "Exec=void" >> VoidApp.AppDir/void.desktop && \ +echo "Icon=void" >> VoidApp.AppDir/void.desktop && \ +echo "Type=Application" >> VoidApp.AppDir/void.desktop && \ +echo "Categories=Utility;" >> VoidApp.AppDir/void.desktop && \ +echo "Comment=Void Linux Application" >> VoidApp.AppDir/void.desktop && \ +chmod +x VoidApp.AppDir/void.desktop && \ +cp VoidApp.AppDir/void.desktop VoidApp.AppDir/usr/share/applications/ && \ +echo "#!/bin/bash" > VoidApp.AppDir/AppRun && \ +echo "HERE=\$(dirname \"\$(readlink -f \"\${0}\")\")" >> VoidApp.AppDir/AppRun && \ +echo "export PATH=\${HERE}/usr/bin:\${PATH}" >> VoidApp.AppDir/AppRun && \ +echo "export LD_LIBRARY_PATH=\${HERE}/usr/lib:\${LD_LIBRARY_PATH}" >> VoidApp.AppDir/AppRun && \ +echo "exec \${HERE}/usr/bin/void --no-sandbox \"\$@\"" >> VoidApp.AppDir/AppRun && \ +chmod +x VoidApp.AppDir/AppRun && \ +chmod -R 755 VoidApp.AppDir && \ + +# Strip unneeded symbols from the binary to reduce size +strip --strip-unneeded VoidApp.AppDir/usr/bin/void + +ls -la VoidApp.AppDir/ && \ +ARCH=x86_64 ./appimagetool -n VoidApp.AppDir Void-x86_64.AppImage +' + +# Clean up +rm -rf VoidApp.AppDir .dockerignore appimagetool + +echo "AppImage creation complete! Your AppImage is: Void-x86_64.AppImage" diff --git a/scripts/appimage/readme.md b/scripts/appimage/readme.md new file mode 100644 index 00000000..fcb0260c --- /dev/null +++ b/scripts/appimage/readme.md @@ -0,0 +1,114 @@ +# Void AppImage Creation Script + +This script automates the process of creating an AppImage for the Void Editor using Docker. It works on macOS and Linux platforms. +## Requirements + +* **Docker:** The script relies on Docker to build the AppImage inside a container. +* **macOS or Linux:** The script is designed for these platforms. On macOS, it generates a Linux-compatible AppImage. +* **Internet Connection:** Required for downloading necessary tools (like `docker-buildx` and `appimagetool` inside the Docker container). + +## Prerequisites + +1. **Install Docker:** + + * **macOS:** Download and install Docker Desktop from [docker.com](docker.com). + * **Ubuntu:** + ```bash + sudo apt install docker.io + ``` + * **Arch Linux:** + ```bash + sudo pacman -S docker + ``` + * **Fedora:** + ```bash + sudo dnf install docker + ``` + +2. **Set Docker User Group:** + + Docker requires users to be part of the `docker` group to run Docker commands without `sudo`. + + ```bash + sudo usermod -aG docker $USER + ``` + + After running this command, log out and log back in for the group changes to take effect. + +3. **Enable and Start Docker:** + + ```bash + sudo systemctl enable docker + sudo systemctl start docker + ``` + +## Ubuntu Dependencies (Installed via Docker) + +These dependencies are installed within the Docker container (Ubuntu 20.04 base). You generally don't need to install them manually: + +* `libfuse2` +* `libglib2.0-0` +* `libgtk-3-0` +* `libx11-xcb1` +* `libxss1` +* `libxtst6` +* `libnss3` +* `libasound2` +* `libdrm2` +* `libgbm1` + +## Usage Instructions + +1. **Clone or Download the Script:** + + Save the script to your system as `create_appimage.sh`. + +2. **Make the Script Executable:** + + ```bash + chmod +x create_appimage.sh + ``` + +3. **Copy Required Files:** + + Copy the following files to the directory where the app binary is being bundled (created during the build process): + + * `create_appimage.sh` + * `void.desktop` + * `void.png` + +4. **Run the Script:** + + ```bash + ./create_appimage.sh + ``` + +5. **Result:** + + After the script completes, it will generate an AppImage named `Void-x86_64.AppImage` (or similar, depending on your architecture) in the current directory. + +## Script Overview + +* **Platform Check:** Checks for macOS or Linux. Exits if unsupported. +* **Docker Checks:** Ensures Docker is installed and running. +* **Buildx Installation:** Installs `docker buildx` if missing. +* **`appimagetool` Download:** Downloads `appimagetool` inside the Docker container. +* **Dockerfile Creation:** Creates a temporary `Dockerfile.build` for the Ubuntu-based environment. +* **Docker Image Build:** Builds a Docker image and runs the build process. +* **AppImage Creation:** + * Creates the `VoidApp.AppDir` structure. + * Copies binaries, resources, and the `.desktop` entry. + * Copies `void.desktop` and `void.png`. + * Strips unnecessary symbols from the binary. + * Runs `appimagetool` to generate the AppImage. +* **Cleanup:** Removes the temporary `Dockerfile.build`. + +## Troubleshooting + +* **Docker Not Running:** Ensure Docker is installed and running. +* **Permission Issues:** Try running the script with `sudo` or check Docker permissions. +* **Outdated Dependencies:** Ensure you have the minimum required versions. + +## License + +This script is provided "as is". It is free to use, modify, and distribute, but comes with no warranty. diff --git a/scripts/appimage/void.desktop b/scripts/appimage/void.desktop new file mode 100755 index 00000000..8649b00a --- /dev/null +++ b/scripts/appimage/void.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=void +Exec=void +Icon=void +Type=Application +Categories=Utility; +Comment=Void Linux Application diff --git a/scripts/appimage/void.png b/scripts/appimage/void.png new file mode 100644 index 00000000..225179f8 Binary files /dev/null and b/scripts/appimage/void.png differ diff --git a/src/vs/workbench/contrib/void/common/chatThreadService.ts b/src/vs/workbench/contrib/void/common/chatThreadService.ts index adfd3f29..d95e2666 100644 --- a/src/vs/workbench/contrib/void/common/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/common/chatThreadService.ts @@ -12,7 +12,7 @@ import { URI } from '../../../../base/common/uri.js'; import { Emitter, Event } from '../../../../base/common/event.js'; import { IRange } from '../../../../editor/common/core/range.js'; import { ILLMMessageService } from './llmMessageService.js'; -import { chat_userMessageContent, chat_systemMessage, chat_userMessageContentWithAllFilesToo as chat_userMessageContentWithAllFiles, chat_selectionsString } from '../browser/prompt/prompts.js'; +import { chat_userMessageContent, chat_systemMessage, chat_userMessageContentWithAllFilesToo, chat_selectionsString } from '../browser/prompt/prompts.js'; import { InternalToolInfo, IToolsService, ToolCallReturnType, ToolFns, ToolName, voidTools } from './toolsService.js'; import { toLLMChatMessage } from './llmMessageTypes.js'; import { IWorkspaceContextService } from '../../../../platform/workspace/common/workspace.js'; @@ -331,7 +331,7 @@ class ChatThreadService extends Disposable implements IChatThreadService { const instructions = userMessage const userMessageContent = await chat_userMessageContent(instructions, currSelns) const selectionsStr = await chat_selectionsString(prevSelns, currSelns, this._voidFileService) - const userMessageFullContent = chat_userMessageContentWithAllFiles(userMessageContent, selectionsStr) + const userMessageFullContent = chat_userMessageContentWithAllFilesToo(userMessageContent, selectionsStr) const userHistoryElt: ChatMessage = { role: 'user', content: userMessageContent, displayContent: instructions, selections: currSelns, state: defaultMessageState } this._addMessageToThread(threadId, userHistoryElt) diff --git a/src/vs/workbench/contrib/void/common/toolsService.ts b/src/vs/workbench/contrib/void/common/toolsService.ts index 09385e25..95dcb045 100644 --- a/src/vs/workbench/contrib/void/common/toolsService.ts +++ b/src/vs/workbench/contrib/void/common/toolsService.ts @@ -68,6 +68,26 @@ export const voidTools = { required: ['query'], }, + + // create_file: { + // name: 'create_file', + // description: `Creates a file at the given path. Fails gracefully if the file already exists by doing nothing.`, + // params: { + // uri: { type: 'string', description: undefined }, + // }, + // required: ['uri'], + // }, + + // create_folder: { + // name: 'create_folder', + // description: `Creates a folder at the given path. Fails gracefully if the folder already exists by doing nothing.`, + // params: { + // uri: { type: 'string', description: undefined }, + // }, + // required: ['uri'], + // }, + + // go_to_definition: { // },