π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
chore: move the windows vm loop out of the repository
Luis Ortiz5f4e348a18b1
diff --git a/AGENTS.md b/AGENTS.mdindex a384321..40b46e3 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -393,35 +393,6 @@ opt-in rule holds in three positions, a 400 ms delay measurably slows the grab,synthetic frame encodes to a different size once a cursor is drawn into it. It restores whateversettings were on disk when it finishes.-## Testing on Windows--`pnpm vm:windows` runs the desktop app inside a local Windows virtual machine, because the app cannot-be built for Windows from a Linux machine at all. `get-windows` and `uiohook-napi` are native, no-win32 binary matches the Electron ABI during a cross-build, and `node-gyp` refuses to cross-compile,-so `electron-builder --win` fails before it packages anything. Windows has to build its own copy.--The script creates the machine on first run through `quickemu`, fetches the VirtIO drivers, stages the-working tree, uncommitted and untracked files included, serves it on loopback and boots. Staging the-working tree rather than a commit is what makes the documented loop true, since otherwise the guest-silently runs the last commit and a fix appears not to work. QEMU user-mode networking always-maps the host to `10.0.2.2`, so the guest pulls the source over plain HTTP and needs no shared folder,-no samba and no SPICE webdav. Inside Windows one line installs Node and pnpm through `winget`,-unpacks the source to `C:\mimik`, installs and launches. Iterating is: change code, re-run the-script, re-run the same line in the guest.--Four steps cannot be scripted and the script says so rather than failing quietly:--- Microsoft blocks automated ISO downloads by IP, so the Windows image is fetched once by hand-- PowerShell refuses unsigned scripts, so the bootstrap runs through `-ExecutionPolicy Bypass`-- Windows remembers its own display mode, so `--width` and `--height` do not stick and the resolution- is set once inside the guest-- `quickget` leaves a truncated VirtIO download that curl cannot resume, so the script refetches it- whenever the file is implausibly small--Whether `uiohook-napi` ships a prebuilt binary for this Electron version on Windows is still unknown.-The first machine had the Visual Studio Build Tools installed before `pnpm install` ran, so it may-have compiled rather than downloaded. A fresh machine without them settles it.-## Export Formats| Format | Generator | Details |diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 28764f3..f651721 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -12,8 +12,7 @@"check:capture": "electron-vite build && electron out/main/check-capture.js","check:storage": "electron-vite build && electron out/main/check-storage.js","check:overlay": "electron-vite build && node scripts/run-check.mjs out/main/check-overlay.js",- "check:pipeline": "electron-vite build && electron out/main/check-pipeline.js",- "vm:windows": "bash scripts/windows-vm.sh"+ "check:pipeline": "electron-vite build && electron out/main/check-pipeline.js"},"dependencies": {"@mimik/core": "workspace:*",diff --git a/apps/desktop/scripts/windows-vm-setup.ps1 b/apps/desktop/scripts/windows-vm-setup.ps1deleted file mode 100644index 7c6a372..0000000--- a/apps/desktop/scripts/windows-vm-setup.ps1+++ /dev/null@@ -1,36 +0,0 @@-$ErrorActionPreference = 'Stop'-$HostUrl = 'http://10.0.2.2:__PORT__'-$Root = 'C:\mimik'--function Refresh-Path {- $env:Path = [Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' +- [Environment]::GetEnvironmentVariable('Path', 'User')-}--if (-not (Get-Command node -ErrorAction SilentlyContinue)) {- Write-Host '==> installing Node'- winget install --id OpenJS.NodeJS.LTS --accept-source-agreements --accept-package-agreements --silent- Refresh-Path-}--if (-not (Get-Command pnpm -ErrorAction SilentlyContinue)) {- Write-Host '==> enabling pnpm'- corepack enable- corepack prepare pnpm@latest --activate- Refresh-Path-}--Write-Host '==> fetching source'-New-Item -ItemType Directory -Force -Path $Root | Out-Null-Invoke-WebRequest "$HostUrl/mimik-src.tar.gz" -OutFile "$env:TEMP\mimik-src.tar.gz"-Get-ChildItem $Root -Force |- Where-Object { $_.Name -ne 'node_modules' } |- Remove-Item -Recurse -Force -ErrorAction SilentlyContinue-tar -xzf "$env:TEMP\mimik-src.tar.gz" -C $Root--Set-Location $Root-Write-Host '==> installing dependencies'-pnpm install--Write-Host '==> launching Mimik Desktop'-pnpm dev:desktopdiff --git a/apps/desktop/scripts/windows-vm.sh b/apps/desktop/scripts/windows-vm.shdeleted file mode 100755index a70566c..0000000--- a/apps/desktop/scripts/windows-vm.sh+++ /dev/null@@ -1,64 +0,0 @@-#!/usr/bin/env bash-set -euo pipefail--HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"-REPO="$(git -C "$HERE" rev-parse --show-toplevel)"-VM_HOME="${MIMIK_VM_HOME:-$HOME/.local/share/mimik-vm}"-PORT="${MIMIK_VM_PORT:-8099}"-STAGE="$VM_HOME/serve"-ISO="$VM_HOME/windows-11/windows-11.iso"--for tool in quickget quickemu python3; do- command -v "$tool" >/dev/null || { echo "missing $tool. install with: yay -S quickemu"; exit 1; }-done--mkdir -p "$STAGE"-cd "$VM_HOME"--if [ ! -f windows-11.conf ]; then- quickget windows 11 || true-fi--if [ ! -s windows-11/virtio-win.iso ] || [ "$(stat -c %s windows-11/virtio-win.iso)" -lt 100000000 ]; then- echo "==> fetching VirtIO drivers"- rm -f windows-11/virtio-win.iso- curl -fL --retry 3 --progress-bar -o windows-11/virtio-win.iso \- https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso-fi--if [ ! -f "$ISO" ]; then- cat <<EOF--Microsoft blocks scripted ISO downloads by IP, so fetch it once by hand:-- 1. https://www.microsoft.com/en-us/software-download/windows11- 2. "Download Windows 11 Disk Image (ISO) for x64 devices", multi-edition- 3. mv ~/Downloads/Win11_*.iso "$ISO"--Then run this again.--EOF- exit 1-fi--echo "==> staging the working tree at $(git -C "$REPO" rev-parse --short HEAD)"-git -C "$REPO" ls-files -z --cached --others --exclude-standard |- (cd "$REPO" && while IFS= read -r -d '' f; do [ -f "$f" ] && printf '%s\0' "$f"; done) |- tar -czf "$STAGE/mimik-src.tar.gz" -C "$REPO" --null -T --sed "s|__PORT__|$PORT|g" "$HERE/windows-vm-setup.ps1" > "$STAGE/setup.ps1"--python3 -m http.server "$PORT" --bind 127.0.0.1 --directory "$STAGE" >/dev/null 2>&1 &-trap 'kill %1 2>/dev/null || true' EXIT--cat <<EOF--In the guest, open PowerShell and run:-- iwr http://10.0.2.2:$PORT/setup.ps1 -OutFile \$env:TEMP\setup.ps1; powershell -ExecutionPolicy Bypass -File \$env:TEMP\setup.ps1--Change code here, re-run this script, re-run that line in Windows.-Set the guest resolution once in Windows: Display settings, Display resolution.--EOF--quickemu --vm windows-11.conf --display spicediff --git a/package.json b/package.jsonindex fcbe2a0..4e17995 100644--- a/package.json+++ b/package.json@@ -23,8 +23,7 @@"postinstall": "wxt prepare","dev:desktop": "pnpm --filter @mimik/desktop dev","build:desktop": "pnpm --filter @mimik/desktop build",- "pack:desktop": "pnpm --filter @mimik/desktop pack",- "vm:windows": "pnpm --filter @mimik/desktop vm:windows"+ "pack:desktop": "pnpm --filter @mimik/desktop pack"},"keywords": [],"author": "",