diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17f5887..3309413 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,18 @@ -name: Build Avida-ED Onefile +name: Build Avida-ED Native Apps + on: workflow_dispatch: inputs: ed_versions: - description: "Comma-separated versions (v3,v4)" + description: "Comma-separated versions to build, for example v3,v4" default: "v3,v4" required: true + push: + branches: [main] jobs: build: + name: ${{ matrix.ver }} on ${{ matrix.os }} strategy: fail-fast: false matrix: @@ -18,63 +22,97 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Rust - uses: dtolnay/rust-toolchain@stable - - - name: Fetch assets via docker compose (using URL fallback on mac/win if docker unavailable) + - name: Skip unrequested versions + id: version_filter shell: bash run: | - if command -v docker >/dev/null 2>&1; then - docker compose run --rm fetch-${{ matrix.ver }} + requested=",${{ github.event.inputs.ed_versions || 'v3,v4' }}," + requested="${requested// /}" + if [[ "$requested" == *",${{ matrix.ver }},"* ]]; then + echo "enabled=true" >> "$GITHUB_OUTPUT" else - MODE=url URL=https://avida-ed.msu.edu/app4/ OUTDIR=./apps/${{ matrix.ver }} bash tools/fetch_assets.sh + echo "enabled=false" >> "$GITHUB_OUTPUT" fi - - name: Inject webroot - run: | - rm -rf server-ui/webroot - mkdir -p server-ui/webroot - rsync -a apps/${{ matrix.ver }}/Avida-ED-Eco/ server-ui/webroot/Avida-ED-Eco/ + - name: Set up Rust + if: steps.version_filter.outputs.enabled == 'true' + uses: dtolnay/rust-toolchain@stable - - name: Build binary + - name: Install Linux packaging dependencies + if: steps.version_filter.outputs.enabled == 'true' && runner.os == 'Linux' + shell: bash run: | - cd server-ui - cargo build --release + sudo apt-get update + sudo apt-get install -y \ + pkg-config \ + libgtk-3-dev \ + libwebkit2gtk-4.1-dev \ + imagemagick \ + file \ + desktop-file-utils + curl -L -o appimagetool \ + https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage + chmod +x appimagetool + sudo mv appimagetool /usr/local/bin/appimagetool - - name: Package (Linux AppImage) - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt-get update && sudo apt-get install -y imagemagick || true - bash packaging/linux/make_appimage.sh ${{ matrix.ver }} server-ui/target/release/avidaed_onefile - mv Avida-ED-${{ matrix.ver }}-Linux-x86_64.AppImage Avida-ED-${{ matrix.ver }}-Linux-x86_64.AppImage - - - name: Package (Windows EXE) - if: startsWith(matrix.os, 'windows') + - name: Install Windows packaging dependencies + if: steps.version_filter.outputs.enabled == 'true' && runner.os == 'Windows' + shell: powershell + run: | + choco install 7zip -y --no-progress + + - name: Fetch canonical Avida-ED assets + if: steps.version_filter.outputs.enabled == 'true' + shell: bash + run: | + MODE=github ED_VER=${{ matrix.ver }} OUTDIR=apps/${{ matrix.ver }} bash tools/fetch_assets.sh + + - name: Inject webroot + if: steps.version_filter.outputs.enabled == 'true' + shell: bash + run: | + bash tools/inject_webroot.sh ${{ matrix.ver }} + + - name: Build binary + if: steps.version_filter.outputs.enabled == 'true' + shell: bash + run: | + case "${{ matrix.ver }}" in + v3) default_path="/Avida-ED/index.html" ;; + v4) default_path="/Avida-ED-Eco/index.html" ;; + esac + cd server-ui + AVIDA_ED_DEFAULT_PATH="$default_path" cargo build --release + + - name: Package Linux AppImage + if: steps.version_filter.outputs.enabled == 'true' && runner.os == 'Linux' + shell: bash + run: | + bash packaging/linux/make_appimage.sh ${{ matrix.ver }} server-ui/target/release/avidaed_onefile + + - name: Package Windows app + if: steps.version_filter.outputs.enabled == 'true' && runner.os == 'Windows' shell: powershell run: | - $WV2 = "$env:RUNNER_TEMP\WebView2Fixed" # pre-cached in your org, or downloaded here - # TODO: fetch/unzip WebView2 Fixed into $WV2 if not cached powershell -ExecutionPolicy Bypass -File packaging/windows/make_windows_sfx.ps1 ` -Version ${{ matrix.ver }} ` -BinPath server-ui/target/release/avidaed_onefile.exe ` - -WV2Fixed $WV2 - Move-Item packaging\windows\Avida-ED-${{ matrix.ver }}-Windows.exe . + -OutputDir . - - name: Package (macOS .app) - if: startsWith(matrix.os, 'macos') + - name: Package macOS app + if: steps.version_filter.outputs.enabled == 'true' && runner.os == 'macOS' + shell: bash run: | - bash packaging/mac/make_macos_bundle.sh ${{ matrix.ver }} server-ui/target/release/avidaed_onefile - # Optionally make a DMG - # brew install create-dmg - # create-dmg "Avida-ED-${{ matrix.ver }}.app" + bash packaging/mac/make_macos_bundle.sh ${{ matrix.ver }} server-ui/target/release/avidaed_onefile . - name: Upload artifacts + if: steps.version_filter.outputs.enabled == 'true' uses: actions/upload-artifact@v4 with: name: Avida-ED-${{ matrix.ver }}-${{ matrix.os }} path: | - *.AppImage - *.exe - Avida-ED-${{ matrix.ver }}.app - if-no-files-found: ignore - + Avida-ED-${{ matrix.ver }}-Linux-*.AppImage + Avida-ED-${{ matrix.ver }}-Windows-*.zip + Avida-ED-${{ matrix.ver }}-Windows-*.exe + Avida-ED-${{ matrix.ver }}-macOS.zip + if-no-files-found: error diff --git a/.gitignore b/.gitignore index 8f5bccc..717c1a2 100644 --- a/.gitignore +++ b/.gitignore @@ -211,3 +211,15 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +# Avida-ED-App-Builder generated artifacts +/apps/ +/server-ui/webroot/ +/AvidaED-*.AppDir/ +/squashfs-root/ +/Avida-ED-*-Linux-*.AppImage +/Avida-ED-*-Windows-*.zip +/Avida-ED-*-Windows-*.exe +/Avida-ED-*.app/ +/Avida-ED-*-macOS.zip +/packaging/windows/payload_*/ +/packaging/windows/payload_*.7z diff --git a/Makefile b/Makefile index 75e66ed..d2d9872 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,44 @@ -VER ?= v4 # or v3 +VER ?= v4 +APP_DIR_v3 := Avida-ED +APP_DIR_v4 := Avida-ED-Eco +APP_DIR := $(APP_DIR_$(VER)) +DEFAULT_PATH := /$(APP_DIR)/index.html -.PHONY: fetch-$(VER) inject-$(VER) build-linux build-mac build-win appimage winexe macapp all +.PHONY: fetch-v3 fetch-v4 fetch-v3-url fetch-v4-url check-ver check-assets check-linux-deps inject-$(VER) build-linux build-mac build-win appimage winexe macapp all fetch-v3: - docker compose run --rm fetch-v3 + MODE=github ED_VER=v3 OUTDIR=apps/v3 bash tools/fetch_assets.sh fetch-v4: - docker compose run --rm fetch-v4 + MODE=github ED_VER=v4 OUTDIR=apps/v4 bash tools/fetch_assets.sh +fetch-v3-url: + MODE=url ED_VER=v3 URL=https://avida-ed.msu.edu/app/ OUTDIR=apps/v3 bash tools/fetch_assets.sh +fetch-v4-url: + MODE=url ED_VER=v4 URL=https://avida-ed.github.io/Avida-ED-Eco/ OUTDIR=apps/v4 bash tools/fetch_assets.sh -inject-$(VER): - rm -rf server-ui/webroot - mkdir -p server-ui/webroot - rsync -a apps/$(VER)/Avida-ED-Eco/ server-ui/webroot/Avida-ED-Eco/ +check-ver: + @test -n "$(APP_DIR)" || { echo "Unsupported VER=$(VER). Use VER=v3 or VER=v4."; exit 2; } + +check-assets: check-ver + @test -f "apps/$(VER)/$(APP_DIR)/index.html" || { echo "Missing apps/$(VER)/$(APP_DIR)/index.html. Run make fetch-$(VER) first."; exit 2; } + +check-linux-deps: + @command -v cargo >/dev/null || { echo "Missing cargo. Install Rust 1.75+ with rustup."; exit 127; } + @command -v pkg-config >/dev/null || { echo "Missing pkg-config. Install pkg-config plus GTK/WebKitGTK development packages."; exit 127; } + @pkg-config --exists glib-2.0 gtk+-3.0 || { echo "Missing GLib/GTK development packages visible to pkg-config."; exit 127; } + @pkg-config --exists webkit2gtk-4.1 || pkg-config --exists webkit2gtk-4.0 || { echo "Missing WebKitGTK development package visible to pkg-config."; exit 127; } + +inject-$(VER): check-assets + bash tools/inject_webroot.sh $(VER) # Build binaries natively on each OS runner -build-linux: inject-$(VER) - cd server-ui && cargo build --release +build-linux: check-ver check-linux-deps inject-$(VER) + cd server-ui && AVIDA_ED_DEFAULT_PATH="$(DEFAULT_PATH)" cargo build --release build-mac: inject-$(VER) - cd server-ui && cargo build --release + cd server-ui && AVIDA_ED_DEFAULT_PATH="$(DEFAULT_PATH)" cargo build --release build-win: inject-$(VER) - cd server-ui && cargo build --release + cd server-ui && AVIDA_ED_DEFAULT_PATH="$(DEFAULT_PATH)" cargo build --release # Package appimage: build-linux @@ -31,14 +49,14 @@ winexe: build-win powershell -ExecutionPolicy Bypass -File packaging/windows/make_windows_sfx.ps1 \ -Version $(VER) \ -BinPath $(CURDIR)/server-ui/target/release/avidaed_onefile.exe \ - -WV2Fixed "C:\SDKs\WebView2.FixedRuntime" + -WV2Fixed "C:\SDKs\WebView2.FixedRuntime" \ + -OutputDir $(CURDIR) macapp: build-mac - bash packaging/mac/make_macos_bundle.sh $(VER) server-ui/target/release/avidaed_onefile + bash packaging/mac/make_macos_bundle.sh $(VER) server-ui/target/release/avidaed_onefile $(CURDIR) all: @echo "Targets:" @echo " make fetch-v3 | fetch-v4" @echo " make build-linux | build-mac | build-win" @echo " make appimage | winexe | macapp" - diff --git a/README.md b/README.md index f4a796b..bfa7e75 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ avidaed-onefile/ | OS | Additional Requirements | | ----------- | ----------------------------------------------------------------- | -| **Linux** | `libgtk-3-dev`, `libwebkit2gtk-4.0-dev`, `appimagetool` | +| **Linux** | `pkg-config`, `libgtk-3-dev`, `libwebkit2gtk-4.1-dev` or `libwebkit2gtk-4.0-dev`, `appimagetool` for AppImage packaging | | **Windows** | PowerShell 5+, 7-Zip installed in `C:\Program Files\7-Zip\7z.exe` | | **macOS** | Xcode command-line tools, optionally `create-dmg` | @@ -66,24 +66,26 @@ avidaed-onefile/ ## 🧱 Step 1. Fetch the Avida-ED Web Assets -Avida-ED web builds are pulled either: +Avida-ED web assets are pulled from the canonical GitHub repositories: -* from **a known-good Docker image** (`welsberr/aed-docker`), or -* from a **public URL** (fallback). +* v3: `https://github.com/Avida-ED/Avida-ED3` +* v4: `https://github.com/Avida-ED/Avida-ED4` -### Option A β€” Using Docker (preferred) +### Option A β€” Using GitHub (canonical) ```bash # Pull version 3 and version 4 assets -docker compose run --rm fetch-v3 -docker compose run --rm fetch-v4 +make fetch-v3 +make fetch-v4 ``` -This: +This clones the selected canonical source repository and normalizes the app root into: -* spins up the minimal Alpine container in `tools/Dockerfile.fetch`, -* extracts the Avida-ED webroot from the container’s Nginx image, and -* deposits the result under `apps/v3/` and `apps/v4/`. +``` +apps/ +β”œβ”€β”€ v3/Avida-ED/index.html +└── v4/Avida-ED-Eco/index.html +``` You should see: @@ -93,12 +95,12 @@ apps/ └── v4/Avida-ED-Eco/index.html ``` -### Option B β€” Fetch via HTTPS (fallback) +### Option B β€” Fetch via Public Site (fallback) -If Docker is unavailable: +If GitHub is unavailable but the public app site is reachable: ```bash -MODE=url URL=https://avida-ed.msu.edu/app4/ OUTDIR=./apps/v4 bash tools/fetch_assets.sh +make fetch-v4-url ``` --- @@ -127,6 +129,8 @@ The binary (`avidaed_onefile`) runs both the HTTP server and browser window. make VER=v4 build-linux # or build-mac ``` +On Linux, `build-linux` checks for Rust, `pkg-config`, GTK, and WebKitGTK development packages before compiling. Building the binary does not require `appimagetool`; only `make VER=v4 appimage` does. + ### Windows (PowerShell) ```powershell @@ -174,15 +178,15 @@ chmod +x Avida-ED-v4-Linux-x86_64.AppImage ### πŸͺŸ Windows β€” Self-Extracting EXE -**Purpose:** one `.exe` that includes: +**Purpose:** a native Windows package containing: * the app binary, -* the WebView2 Fixed Runtime, +* an optional WebView2 Fixed Runtime, * a batch launcher. Steps: -1. Download the **WebView2 Fixed Version Runtime** (x64) from Microsoft: +1. Optional: download the **WebView2 Fixed Version Runtime** (x64) from Microsoft: [https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section) 2. Extract it somewhere, e.g. `C:\SDKs\WebView2.FixedRuntime`. 3. Run: @@ -203,14 +207,15 @@ Steps: Result: ``` -Avida-ED-v4-Windows.exe +Avida-ED-v4-Windows-x64.zip +Avida-ED-v4-Windows-x64.exe # when 7-Zip's SFX module is available ``` When run: -* Extracts to `%TEMP%\Avida-ED-*`, -* Sets `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER`, -* Launches immediately. +* `run.bat` sets `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` when a fixed runtime is bundled. +* If no fixed runtime is bundled, the system WebView2 Runtime is used. +* The SFX executable self-extracts and launches `run.bat`. --- @@ -238,6 +243,12 @@ brew install create-dmg create-dmg Avida-ED-v4.app ``` +The bundle script also writes: + +``` +Avida-ED-v4-macOS.zip +``` + --- ## πŸ§ͺ Step 5. Test All Artifacts @@ -266,11 +277,22 @@ make all On CI (GitHub Actions), artifacts are built via matrix: -* OS: `ubuntu`, `windows`, `macos` +* OS: `ubuntu-22.04`, `windows-2022`, `macos-13` * Version: `v3`, `v4` Resulting artifacts are automatically uploaded. +The workflow is `.github/workflows/release.yml`. It: + +* fetches canonical assets from `Avida-ED/Avida-ED3` and `Avida-ED/Avida-ED4`, +* injects the correct app root for each version, +* builds the Rust wrapper on the native runner, +* packages Windows as a zip plus optional SFX executable, +* packages macOS as a `.app` bundle inside a zip, +* packages Linux as an AppImage. + +Run it manually from GitHub Actions with the default `v3,v4` input, or enter a single version such as `v4`. + --- ## πŸ” Updating Avida-ED Versions @@ -374,5 +396,3 @@ This repository's content was largely derived from prompting OpenAI's ChatGPT with GPT 5. --- - - diff --git a/TEST_PLAN.md b/TEST_PLAN.md index 8546ed0..6f2a16d 100644 --- a/TEST_PLAN.md +++ b/TEST_PLAN.md @@ -44,3 +44,21 @@ Recommended Linux smoke matrix: `LIBGL_ALWAYS_SOFTWARE=1 WEBKIT_DISABLE_COMPOSITING_MODE=1`. The AppImage smoke test intentionally treats timeout exit as success after the app has loaded, because the app is expected to keep running until the window is closed. + +Recommended Windows smoke matrix: + +- `Avida-ED-v3-Windows-x64.zip` +- `Avida-ED-v4-Windows-x64.zip` +- Verify `run.bat`, `avidaed_onefile.exe`, and `README.txt` are present. +- Launch `run.bat` on a Windows VM with WebView2 Runtime installed. +- Repeat with a bundled WebView2 Fixed Runtime when available. + +Recommended macOS smoke matrix: + +- `Avida-ED-v3-macOS.zip` +- `Avida-ED-v4-macOS.zip` +- Verify the zip contains `Avida-ED-v*.app/Contents/MacOS/Avida-ED`. +- Launch with `open Avida-ED-v*.app` on a clean macOS VM. +- Check Console or stderr for `Avida-ED page-load finished` and no proxied JavaScript errors. + +The native GitHub Actions workflow builds and uploads these artifacts, but it does not replace VM launch testing. Use the uploaded artifacts as the input to manual or future automated OS-level smoke tests. diff --git a/packaging/linux/Apprun b/packaging/linux/AppRun old mode 100644 new mode 100755 similarity index 98% rename from packaging/linux/Apprun rename to packaging/linux/AppRun index e0202d7..3c9e5ec --- a/packaging/linux/Apprun +++ b/packaging/linux/AppRun @@ -1,4 +1,3 @@ #!/usr/bin/env bash HERE="$(dirname "$(readlink -f "$0")")" exec "$HERE/usr/bin/avidaed_onefile" - diff --git a/packaging/linux/make_appimage.sh b/packaging/linux/make_appimage.sh index a24c132..d27d8b5 100644 --- a/packaging/linux/make_appimage.sh +++ b/packaging/linux/make_appimage.sh @@ -1,7 +1,23 @@ #!/usr/bin/env bash set -euo pipefail VER="${1:?version folder, e.g., v4}" -BINPATH="${2:-../..//server-ui/target/release/avidaed_onefile}" +BINPATH="${2:-server-ui/target/release/avidaed_onefile}" +case "$VER" in + v3) APP_ASSET_DIR="apps/v3/Avida-ED" ;; + v4) APP_ASSET_DIR="apps/v4/Avida-ED-Eco" ;; + *) echo "error: unsupported version: $VER" >&2; exit 2 ;; +esac + +if ! command -v appimagetool >/dev/null 2>&1; then + echo "error: appimagetool is required to build the Linux AppImage" >&2 + echo "Install appimagetool or run only 'make VER=${VER} build-linux' to build the Linux binary." >&2 + exit 127 +fi + +if [ ! -x "$BINPATH" ]; then + echo "error: Linux binary not found or not executable: $BINPATH" >&2 + exit 2 +fi APPDIR="AvidaED-${VER}.AppDir" rm -rf "$APPDIR"; mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/share/icons/hicolor/256x256/apps" @@ -10,9 +26,19 @@ cp "$(dirname "$0")/AppRun" "$APPDIR/AppRun" chmod +x "$APPDIR/AppRun" cp "$(dirname "$0")/desktop/avidaed.desktop" "$APPDIR/avidaed.desktop" -# placeholder icon; replace with your PNG -convert -size 256x256 xc:white "$APPDIR/usr/share/icons/hicolor/256x256/apps/avidaed.png" 2>/dev/null || true +if [ -f "$APP_ASSET_DIR/avida-ed-icon.png" ]; then + cp "$APP_ASSET_DIR/avida-ed-icon.png" "$APPDIR/avidaed.png" +else + convert -size 256x256 xc:white "$APPDIR/avidaed.png" 2>/dev/null || true +fi +cp "$APPDIR/avidaed.png" "$APPDIR/usr/share/icons/hicolor/256x256/apps/avidaed.png" -appimagetool "$APPDIR" "Avida-ED-${VER}-Linux-x86_64.AppImage" -echo "Wrote Avida-ED-${VER}-Linux-x86_64.AppImage" +APPIMAGETOOL_ARGS=() +if [ -n "${APPIMAGETOOL_RUNTIME_FILE:-}" ]; then + APPIMAGETOOL_ARGS+=(--runtime-file "$APPIMAGETOOL_RUNTIME_FILE") +fi +OUTFILE="Avida-ED-${VER}-Linux-x86_64.AppImage" +rm -f "$OUTFILE" +appimagetool "${APPIMAGETOOL_ARGS[@]}" "$APPDIR" "$OUTFILE" +echo "Wrote $OUTFILE" diff --git a/packaging/mac/make_macos_bundle.sh b/packaging/mac/make_macos_bundle.sh old mode 100644 new mode 100755 index 0cabe13..cc690e5 --- a/packaging/mac/make_macos_bundle.sh +++ b/packaging/mac/make_macos_bundle.sh @@ -2,14 +2,24 @@ set -euo pipefail VER="${1:?v3|v4}" BINPATH="${2:-../../server-ui/target/release/avidaed_onefile}" +OUTDIR="${3:-.}" APP="Avida-ED-${VER}.app" +ZIP="Avida-ED-${VER}-macOS.zip" rm -rf "$APP" mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources" cp "$BINPATH" "$APP/Contents/MacOS/Avida-ED" chmod +x "$APP/Contents/MacOS/Avida-ED" # Info.plist -sed "s/{{VER}}/${VER}/g" "$(dirname "$0")/Info.plist.tmpl" > "$APP/Contents/Info.plist" +sed "s/{{VER}}/${VER}/g" "$(dirname "$0")/info.plist.tmpl" > "$APP/Contents/Info.plist" # Icon placeholder sips -s format icns /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns --out "$APP/Contents/Resources/AppIcon.icns" >/dev/null 2>&1 || true -echo "Wrote $APP (unsigned)." - +if command -v codesign >/dev/null 2>&1; then + codesign --force --deep --sign - "$APP" >/dev/null 2>&1 || true +fi +mkdir -p "$OUTDIR" +if command -v ditto >/dev/null 2>&1; then + ditto -c -k --keepParent "$APP" "$OUTDIR/$ZIP" +else + zip -qry "$OUTDIR/$ZIP" "$APP" +fi +echo "Wrote $APP and $OUTDIR/$ZIP" diff --git a/packaging/windows/_make_windows_sfx.ps1 b/packaging/windows/_make_windows_sfx.ps1 index 247c1ba..54c9cf1 100644 --- a/packaging/windows/_make_windows_sfx.ps1 +++ b/packaging/windows/_make_windows_sfx.ps1 @@ -1,32 +1,16 @@ param( - [Parameter(Mandatory=$true)][string]$Version, # v3 or v4 - [Parameter(Mandatory=$true)][string]$BinPath, # path to target\release\avidaed_onefile.exe - [Parameter(Mandatory=$true)][string]$WV2Fixed # path to WebView2 Fixed Runtime folder + [Parameter(Mandatory=$true)][string]$Version, + [Parameter(Mandatory=$true)][string]$BinPath, + [string]$WV2Fixed = "", + [string]$SevenZip = "C:\Program Files\7-Zip\7z.exe", + [string]$SfxModule = "C:\Program Files\7-Zip\7z.sfx", + [string]$OutputDir = "." ) -$Work = Join-Path $PSScriptRoot "payload_$Version" -Remove-Item $Work -Recurse -Force -ErrorAction SilentlyContinue -New-Item -ItemType Directory -Force -Path $Work | Out-Null -Copy-Item $BinPath -Destination (Join-Path $Work "avidaed_onefile.exe") -Copy-Item $WV2Fixed -Destination (Join-Path $Work "WebView2Fixed") -Recurse - -# launcher -$runbat = @" -@echo off -setlocal -set WEBVIEW2_BROWSER_EXECUTABLE_FOLDER=%~dp0WebView2Fixed -start "" "%~dp0avidaed_onefile.exe" -"@ -$runbat | Out-File -Encoding ASCII (Join-Path $Work "run.bat") - -# create 7z archive -$SevenZip = "C:\Program Files\7-Zip\7z.exe" -& $SevenZip a -t7z (Join-Path $PSScriptRoot "payload_$Version.7z") "$Work\*" - -# concatenate SFX + config + archive -> one EXE -$Sfx = Join-Path $PSScriptRoot "7z.sfx" -$Cfg = Join-Path $PSScriptRoot "config.txt" -$Out = Join-Path $PSScriptRoot ("Avida-ED-$Version-Windows.exe") -Get-Content $Sfx -Encoding Byte, $Cfg -Encoding Byte, (Join-Path $PSScriptRoot "payload_$Version.7z") -Encoding Byte | - Set-Content $Out -Encoding Byte -Write-Host "Wrote $Out" +& (Join-Path $PSScriptRoot "make_windows_sfx.ps1") ` + -Version $Version ` + -BinPath $BinPath ` + -WV2Fixed $WV2Fixed ` + -SevenZip $SevenZip ` + -SfxModule $SfxModule ` + -OutputDir $OutputDir diff --git a/packaging/windows/make_windows_sfx.ps1 b/packaging/windows/make_windows_sfx.ps1 new file mode 100644 index 0000000..f3ef37f --- /dev/null +++ b/packaging/windows/make_windows_sfx.ps1 @@ -0,0 +1,79 @@ +param( + [Parameter(Mandatory=$true)][string]$Version, + [Parameter(Mandatory=$true)][string]$BinPath, + [string]$WV2Fixed = "", + [string]$SevenZip = "C:\Program Files\7-Zip\7z.exe", + [string]$SfxModule = "C:\Program Files\7-Zip\7z.sfx", + [string]$OutputDir = "." +) + +$ErrorActionPreference = "Stop" + +if ($Version -notin @("v3", "v4")) { + throw "Unsupported Version '$Version'. Use v3 or v4." +} +if (!(Test-Path $BinPath)) { + throw "Missing binary: $BinPath" +} + +$Root = Resolve-Path (Join-Path $PSScriptRoot "..\..") +$OutRoot = Resolve-Path $OutputDir +$Work = Join-Path $PSScriptRoot "payload_$Version" +$Archive = Join-Path $PSScriptRoot "payload_$Version.7z" +$ZipOut = Join-Path $OutRoot "Avida-ED-$Version-Windows-x64.zip" +$ExeOut = Join-Path $OutRoot "Avida-ED-$Version-Windows-x64.exe" + +Remove-Item $Work -Recurse -Force -ErrorAction SilentlyContinue +Remove-Item $Archive -Force -ErrorAction SilentlyContinue +New-Item -ItemType Directory -Force -Path $Work | Out-Null + +Copy-Item $BinPath -Destination (Join-Path $Work "avidaed_onefile.exe") + +$HasFixedRuntime = $false +if ($WV2Fixed -and (Test-Path $WV2Fixed)) { + Copy-Item $WV2Fixed -Destination (Join-Path $Work "WebView2Fixed") -Recurse + $HasFixedRuntime = $true +} + +$runbat = @" +@echo off +setlocal +set HERE=%~dp0 +if exist "%HERE%WebView2Fixed\msedgewebview2.exe" set WEBVIEW2_BROWSER_EXECUTABLE_FOLDER=%HERE%WebView2Fixed +start "" "%HERE%avidaed_onefile.exe" +"@ +$runbat | Out-File -Encoding ASCII (Join-Path $Work "run.bat") + +$readme = @" +Avida-ED $Version for Windows + +Run run.bat to start Avida-ED. + +This package includes a WebView2 Fixed Runtime: $HasFixedRuntime +If no fixed runtime is bundled, Microsoft Edge WebView2 Runtime must already be installed. +"@ +$readme | Out-File -Encoding UTF8 (Join-Path $Work "README.txt") + +if (!(Test-Path $SevenZip)) { + throw "Missing 7-Zip at $SevenZip" +} + +& $SevenZip a -tzip $ZipOut "$Work\*" | Write-Host +Write-Host "Wrote $ZipOut" + +if (Test-Path $SfxModule) { + & $SevenZip a -t7z $Archive "$Work\*" | Write-Host + $Cfg = Join-Path $PSScriptRoot "config.txt" + $OutStream = [System.IO.File]::Create($ExeOut) + try { + foreach ($Path in @($SfxModule, $Cfg, $Archive)) { + $Bytes = [System.IO.File]::ReadAllBytes($Path) + $OutStream.Write($Bytes, 0, $Bytes.Length) + } + } finally { + $OutStream.Close() + } + Write-Host "Wrote $ExeOut" +} else { + Write-Warning "SFX module not found at $SfxModule; skipped EXE creation." +} diff --git a/server-ui/Cargo.lock b/server-ui/Cargo.lock new file mode 100644 index 0000000..0b39b7d --- /dev/null +++ b/server-ui/Cargo.lock @@ -0,0 +1,2697 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "avidaed_onefile" +version = "0.1.0" +dependencies = [ + "anyhow", + "include_dir", + "mime_guess", + "tao", + "tiny_http", + "wry", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.11.1", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "cc" +version = "1.2.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chunked_transfer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" + +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation", + "core-graphics-types", + "libc", + "objc", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cssparser" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa 0.4.8", + "matches", + "phf 0.8.0", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.117", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dlopen2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.11.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "html5ever" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" +dependencies = [ + "log", + "mac", + "markup5ever", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa 1.0.18", +] + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.0", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "kuchikiki" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" +dependencies = [ + "cssparser", + "html5ever", + "indexmap 1.9.3", + "matches", + "selectors", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "markup5ever" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" +dependencies = [ + "log", + "phf 0.10.1", + "phf_codegen 0.10.0", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags 1.3.2", + "jni-sys 0.3.1", + "ndk-sys", + "num_enum", + "raw-window-handle 0.5.2", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.4.1+23.1.7779620" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", + "objc_exception", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +dependencies = [ + "phf_macros", + "phf_shared 0.8.0", + "proc-macro-hack", +] + +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_shared 0.10.0", +] + +[[package]] +name = "phf_codegen" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +dependencies = [ + "phf_generator 0.8.0", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", +] + +[[package]] +name = "phf_generator" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +dependencies = [ + "phf_shared 0.8.0", + "rand 0.7.3", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand 0.8.6", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared 0.11.3", + "rand 0.8.6", +] + +[[package]] +name = "phf_macros" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" +dependencies = [ + "phf_generator 0.8.0", + "phf_shared 0.8.0", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher 1.0.3", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.11.1", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" +dependencies = [ + "bitflags 1.3.2", + "cssparser", + "derive_more", + "fxhash", + "log", + "matches", + "phf 0.8.0", + "phf_codegen 0.8.0", + "precomputed-hash", + "servo_arc", + "smallvec", + "thin-slice", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "servo_arc" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" +dependencies = [ + "nodrop", + "stable_deref_trait", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.11.3", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea538df05fbc2dcbbd740ba0cfe8607688535f4798d213cbbfa13ce494f3451f" +dependencies = [ + "bitflags 2.11.1", + "cocoa", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dispatch", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "instant", + "jni", + "lazy_static", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc", + "once_cell", + "parking_lot", + "raw-window-handle 0.6.2", + "scopeguard", + "tao-macros", + "unicode-segmentation", + "url", + "windows 0.57.0", + "windows-core 0.57.0", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tendril" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +dependencies = [ + "futf", + "mac", + "utf-8", +] + +[[package]] +name = "thin-slice" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tiny_http" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" +dependencies = [ + "ascii", + "chunked_transfer", + "httpdate", + "log", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "webkit2gtk" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webview2-com" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c914dd492a52f0377bef56fd1b6e74a79090f9ee631d625d5b505a00e4538b6" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows 0.56.0", + "windows-core 0.56.0", + "windows-implement 0.56.0", + "windows-interface 0.56.0", +] + +[[package]] +name = "webview2-com-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "webview2-com-sys" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a46bcf03482ec28eeb764ca788f67998cde4213adfbbfa90462622058530f5e" +dependencies = [ + "thiserror", + "windows 0.56.0", + "windows-core 0.56.0", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +dependencies = [ + "windows-core 0.57.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +dependencies = [ + "windows-implement 0.56.0", + "windows-interface 0.56.0", + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +dependencies = [ + "windows-implement 0.57.0", + "windows-interface 0.57.0", + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-implement" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "wry" +version = "0.39.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7172fc76376d55d089c627a31a5b604b4ac372793fb5378d1c7ddf008703008" +dependencies = [ + "base64", + "block", + "cocoa", + "core-graphics", + "crossbeam-channel", + "dpi", + "dunce", + "gdkx11", + "gtk", + "html5ever", + "http", + "javascriptcore-rs", + "jni", + "kuchikiki", + "libc", + "ndk", + "ndk-context", + "ndk-sys", + "objc", + "objc_id", + "once_cell", + "percent-encoding", + "raw-window-handle 0.6.2", + "sha2", + "soup3", + "tao-macros", + "thiserror", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows 0.56.0", + "windows-core 0.56.0", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zerofrom" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] diff --git a/server-ui/Cargo.toml b/server-ui/Cargo.toml index ed47efd..e22640a 100644 --- a/server-ui/Cargo.toml +++ b/server-ui/Cargo.toml @@ -5,14 +5,13 @@ edition = "2021" [dependencies] wry = "0.39" # WebView wrapper: WebView2/WKWebView/WebKitGTK -tiny-http = "0.12" # tiny static server +tao = "0.28" # Window/event loop used by wry +tiny_http = "0.12" # tiny static server include_dir = "0.7" # embed webroot into binary mime_guess = "2.0" -once_cell = "1.19" anyhow = "1.0" [profile.release] lto = true codegen-units = 1 strip = "symbols" - diff --git a/server-ui/build.rs b/server-ui/build.rs index caa586f..f72fc56 100644 --- a/server-ui/build.rs +++ b/server-ui/build.rs @@ -1,3 +1,34 @@ fn main() { + use std::{fs, path::Path}; + + let webroot = Path::new("webroot"); + if !webroot.exists() { + fs::create_dir_all(webroot).expect("create fallback webroot"); + fs::write( + webroot.join("index.html"), + "Avida-ED assets not injected

Run make fetch-v4 build-linux.

\n", + ) + .expect("write fallback webroot index"); + } + println!("cargo:rerun-if-changed=webroot"); + print_rerun_files(webroot); + println!("cargo:rerun-if-env-changed=AVIDA_ED_DEFAULT_PATH"); + let default_path = std::env::var("AVIDA_ED_DEFAULT_PATH") + .unwrap_or_else(|_| "/index.html".to_string()); + println!("cargo:rustc-env=AVIDA_ED_DEFAULT_PATH={default_path}"); +} + +fn print_rerun_files(path: &std::path::Path) { + let Ok(entries) = std::fs::read_dir(path) else { + return; + }; + for entry in entries.flatten() { + let path = entry.path(); + if path.is_dir() { + print_rerun_files(&path); + } else { + println!("cargo:rerun-if-changed={}", path.display()); + } + } } diff --git a/server-ui/src/main.rs b/server-ui/src/main.rs index 1d0dbe5..b1cbe81 100644 --- a/server-ui/src/main.rs +++ b/server-ui/src/main.rs @@ -1,16 +1,16 @@ use include_dir::{include_dir, Dir}; use tiny_http::{Request, Response, Method}; -use wry::{ - application::event::{Event, StartCause, WindowEvent}, - application::event_loop::{ControlFlow, EventLoop}, - application::window::WindowBuilder, - webview::WebViewBuilder +use tao::{ + event::{Event, StartCause, WindowEvent}, + event_loop::{ControlFlow, EventLoop}, + window::WindowBuilder, }; -use std::{net::TcpListener, thread, time::Duration}; +use wry::{PageLoadEvent, WebViewBuilder}; +use std::{net::TcpListener, time::Duration}; use anyhow::Result; static WEBROOT: Dir = include_dir!("$CARGO_MANIFEST_DIR/webroot"); -static DEFAULT_PATH: &str = "/Avida-ED-Eco/index.html"; +static DEFAULT_PATH: &str = env!("AVIDA_ED_DEFAULT_PATH"); fn mime(p: &str)->&'static str{ if p.ends_with(".wasm"){return "application/wasm";} @@ -19,7 +19,7 @@ fn mime(p: &str)->&'static str{ if p.ends_with(".html") || p.ends_with(".htm"){return "text/html; charset=utf-8";} mime_guess::from_path(p).first_raw().unwrap_or("application/octet-stream") } -fn serve(mut req:Request){ +fn serve(req:Request){ if req.method()!=&Method::Get && req.method()!=&Method::Head{ let _=req.respond(Response::from_string("Method Not Allowed").with_status_code(405));return; } @@ -28,17 +28,21 @@ fn serve(mut req:Request){ if path=="/"{path=DEFAULT_PATH.to_string();} let fpath=path.trim_start_matches('/'); if let Some(f)=WEBROOT.get_file(fpath){ + eprintln!("Avida-ED HTTP 200 {path}"); let mut resp=Response::from_data(f.contents().to_vec()); let _=resp.add_header(tiny_http::Header::from_bytes(b"Content-Type", mime(&path)).unwrap()); let _=resp.add_header(tiny_http::Header::from_bytes(b"Cache-Control", b"no-store").unwrap()); let _=req.respond(resp); }else{ + eprintln!("Avida-ED HTTP 404 {path}"); let _=req.respond(Response::from_string("Not Found").with_status_code(404)); } } fn main()->Result<()>{ - let listener=TcpListener::bind(("127.0.0.1",0))?; listener.set_nonblocking(true)?; - let port=listener.local_addr()?.port(); let srv=tiny_http::Server::from_tcp(listener)?; + let listener=TcpListener::bind(("127.0.0.1",0))?; + let port=listener.local_addr()?.port(); + let srv=tiny_http::Server::from_listener(listener, None) + .map_err(|e| anyhow::anyhow!("failed to create HTTP server: {e}"))?; std::thread::spawn(move||{ loop{ match srv.recv_timeout(Duration::from_millis(200)){ @@ -47,17 +51,71 @@ fn main()->Result<()>{ } }); let url=format!("http://127.0.0.1:{port}{DEFAULT_PATH}"); - let event_loop=EventLoop::new()?; + let event_loop=EventLoop::new(); let window=WindowBuilder::new() .with_title("Avida-ED") - .with_inner_size(wry::application::dpi::LogicalSize::new(1280.0,800.0)) + .with_inner_size(tao::dpi::LogicalSize::new(1280.0,800.0)) .build(&event_loop)?; - let _wv=WebViewBuilder::new(&window)?.with_url(&url)?.build()?; - event_loop.run(move|e,_,cf|{ - *cf=wry::application::event_loop::ControlFlow::Wait; - if let Event::WindowEvent{event:WindowEvent::CloseRequested,..}=e{*cf=wry::application::event_loop::ControlFlow::Exit;} - if let Event::NewEvents(StartCause::Init)=e{} - })?; - Ok(()) -} + eprintln!("Avida-ED loading {url}"); + #[cfg(any( + target_os = "windows", + target_os = "macos", + target_os = "ios", + target_os = "android" + ))] + let builder = WebViewBuilder::new(&window); + + #[cfg(not(any( + target_os = "windows", + target_os = "macos", + target_os = "ios", + target_os = "android" + )))] + let builder = { + use tao::platform::unix::WindowExtUnix; + use wry::WebViewBuilderExtUnix; + let vbox = window.default_vbox().ok_or_else(|| anyhow::anyhow!("failed to get GTK window container"))?; + WebViewBuilder::new_gtk(vbox) + }; + + let _wv=builder + .with_initialization_script( + r#" + (() => { + const send = (message) => { + try { + if (window.ipc && window.ipc.postMessage) window.ipc.postMessage(String(message)); + } catch (_) {} + }; + window.addEventListener('error', (event) => { + send(`js-error:${event.message} at ${event.filename}:${event.lineno}:${event.colno}`); + }); + window.addEventListener('unhandledrejection', (event) => { + send(`js-rejection:${event.reason}`); + }); + console.error = new Proxy(console.error, { + apply(target, thisArg, args) { + send(`console-error:${args.map(String).join(' ')}`); + return Reflect.apply(target, thisArg, args); + } + }); + })(); + "#, + ) + .with_ipc_handler(|req| eprintln!("Avida-ED WebView {}", req.body())) + .with_on_page_load_handler(|event, url| { + let event_name = match event { + PageLoadEvent::Started => "started", + PageLoadEvent::Finished => "finished", + }; + eprintln!("Avida-ED page-load {event_name} {url}"); + }) + .with_url(&url) + .build()?; + event_loop.run(move|e,_,cf|{ + *cf=ControlFlow::Wait; + if let Event::WindowEvent{event:WindowEvent::CloseRequested,..}=e{*cf=ControlFlow::Exit;} + if let Event::NewEvents(StartCause::Init)=e{} + }); +} diff --git a/tools/Dockerfile.fetch b/tools/Dockerfile.fetch index 4b505cb..56989a2 100644 --- a/tools/Dockerfile.fetch +++ b/tools/Dockerfile.fetch @@ -2,4 +2,5 @@ FROM alpine:3.20 RUN apk add --no-cache ca-certificates curl bash rsync WORKDIR /work COPY fetch_assets.sh /work/fetch_assets.sh +RUN chmod +x /work/fetch_assets.sh ENTRYPOINT ["/work/fetch_assets.sh"] diff --git a/tools/fetch_assets.sh b/tools/fetch_assets.sh index 89e71fe..fc6f0f2 100644 --- a/tools/fetch_assets.sh +++ b/tools/fetch_assets.sh @@ -1,29 +1,60 @@ #!/usr/bin/env bash set -euo pipefail -MODE="${MODE:-docker}" # docker|url +MODE="${MODE:-github}" # github|docker|url ED_VER="${ED_VER:-v4}" # v3|v4 OUTDIR="${OUTDIR:-/out}" +case "$ED_VER" in + v3) APP_DIR="Avida-ED"; GITHUB_REPO="https://github.com/Avida-ED/Avida-ED3.git" ;; + v4) APP_DIR="Avida-ED-Eco"; GITHUB_REPO="https://github.com/Avida-ED/Avida-ED4.git" ;; + *) echo "Unknown ED_VER=$ED_VER" >&2; exit 2 ;; +esac mkdir -p "$OUTDIR" case "$MODE" in + github) + TMPDIR="$(mktemp -d)" + trap 'rm -rf "$TMPDIR"' EXIT + git clone --depth 1 "$GITHUB_REPO" "$TMPDIR/source" + rm -rf "$OUTDIR/$APP_DIR" + mkdir -p "$OUTDIR/$APP_DIR" + if command -v rsync >/dev/null 2>&1; then + rsync -a --exclude .git "$TMPDIR/source"/ "$OUTDIR/$APP_DIR"/ + else + (cd "$TMPDIR/source" && tar --exclude .git -cf - .) | (cd "$OUTDIR/$APP_DIR" && tar -xf -) + fi + ;; docker) # 1) Start your aed-docker container and copy its served webroot # Expectation: container serves Avida-ED-Eco at /usr/share/nginx/html/Avida-ED-Eco - CID="$(docker create --name aedtmp_$ED_VER welsberr/aed-docker:$ED_VER)" + if ! CID="$(docker create --name aedtmp_$ED_VER welsberr/aed-docker:$ED_VER)"; then + echo "Could not create welsberr/aed-docker:$ED_VER. The canonical source is GitHub; try make fetch-$ED_VER." >&2 + exit 1 + fi trap 'docker rm -f aedtmp_'"$ED_VER"' >/dev/null 2>&1 || true' EXIT docker cp "aedtmp_$ED_VER:/usr/share/nginx/html/." "$OUTDIR/" ;; url) URL="${URL:-https://avida-ed.msu.edu/app4/}" apk add --no-cache wget >/dev/null 2>&1 || true + WGET_STATUS=0 wget --recursive --no-parent --page-requisites --adjust-extension \ --compression=auto --convert-links --timestamping \ --directory-prefix "$OUTDIR" \ - "$URL" - # normalize into $OUTDIR/Avida-ED-Eco as needed - if [ ! -d "$OUTDIR/Avida-ED-Eco" ]; then + "$URL" || WGET_STATUS=$? + # normalize into the directory shape expected by the Rust injection step + if [ ! -d "$OUTDIR/$APP_DIR" ]; then SUB="$(find "$OUTDIR" -type f -name index.html | head -n1)" - [ -n "$SUB" ] && rsync -a "$(dirname "$SUB")"/ "$OUTDIR/Avida-ED-Eco"/ + if [ -n "$SUB" ]; then + if command -v rsync >/dev/null 2>&1; then + rsync -a "$(dirname "$SUB")"/ "$OUTDIR/$APP_DIR"/ + else + cp -R "$(dirname "$SUB")"/. "$OUTDIR/$APP_DIR"/ + fi + fi + fi + if [ ! -f "$OUTDIR/$APP_DIR/index.html" ]; then + echo "URL fetch failed: no normalized $OUTDIR/$APP_DIR/index.html found. wget exit status: $WGET_STATUS" >&2 + exit "${WGET_STATUS:-1}" fi ;; *) echo "Unknown MODE=$MODE" >&2; exit 1;; diff --git a/tools/inject_webroot.sh b/tools/inject_webroot.sh new file mode 100755 index 0000000..b3efcf4 --- /dev/null +++ b/tools/inject_webroot.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +set -euo pipefail + +VER="${1:-${VER:-v4}}" + +case "$VER" in + v3) APP_DIR="Avida-ED" ;; + v4) APP_DIR="Avida-ED-Eco" ;; + *) echo "Unsupported VER=$VER. Use v3 or v4." >&2; exit 2 ;; +esac + +SRC="apps/$VER/$APP_DIR" +DEST="server-ui/webroot/$APP_DIR" + +if [ ! -f "$SRC/index.html" ]; then + echo "Missing $SRC/index.html. Run make fetch-$VER first." >&2 + exit 2 +fi + +rm -rf server-ui/webroot +mkdir -p server-ui/webroot + +if command -v rsync >/dev/null 2>&1; then + rsync -a "$SRC/" "$DEST/" +else + mkdir -p "$DEST" + cp -R "$SRC"/. "$DEST"/ +fi + +echo "Injected $SRC into $DEST"