From 6dde7f5881a47274dd1c954030c1fa30fc06a74c Mon Sep 17 00:00:00 2001 From: JohnsonKC201 Date: Thu, 6 Aug 2026 23:39:51 -0700 Subject: [PATCH] chore: ship a portable silent launcher instead of a local-only one The launcher was gitignored as machine-specific because it hard-coded C:\pixelcat twice. When that folder was renamed the desktop shortcut and the autostart entry both broke, and the only symptom was a Windows Script Host box saying the script file could not be found, or on login nothing starting at all. It resolves the project from its own location now, so moving or renaming the folder cannot leave it pointing at nothing, and a missing electron says the dependencies were never installed rather than failing mute. That removes the reason it was local-only, so it is tracked, and it drops the pixelcat name the rest of the app already left behind. Worth having at all because `npm start` leaves a console window sitting behind the pet, which is not what you want on a shortcut. --- .gitignore | 3 +-- CHANGELOG.md | 1 + README.md | 5 +++++ launch-pixelpets.vbs | 22 ++++++++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 launch-pixelpets.vbs diff --git a/.gitignore b/.gitignore index 1614065..e8bd689 100644 --- a/.gitignore +++ b/.gitignore @@ -22,8 +22,7 @@ previews/ # Local code intelligence (CodeGraph index) .codegraph/ -# Local-only launcher + unrelated coursework kept in this folder -launch-pixelcat.vbs +# Unrelated coursework kept in this folder CODEPATH Proj/ # OS diff --git a/CHANGELOG.md b/CHANGELOG.md index 716e207..52c937b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Notable changes to **pixelpets**. All art and sound are original/procedural (no ### Added - **`--shot --note=""`** pins a speech bubble open in a preview capture, so wrapping and edge clamping can be checked against a real font. +- **`launch-pixelpets.vbs`**, a silent Windows launcher for running from source, is now part of the repo instead of a local-only file. `npm start` leaves a console window sitting behind the pet, which is why a shortcut wants this instead. It resolves the project from its own location rather than a hard-coded path, so moving or renaming the folder cannot leave the shortcut pointing at nothing, and it says what is wrong if dependencies were never installed rather than failing silently. ## [0.3.0] - 2026-08-03 diff --git a/README.md b/README.md index fcafa30..f1678cf 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,11 @@ Either way your pet appears in the corner and registers itself to start at login `npm run autostart:off` turns that off, and the installed version uninstalls like any other program, from Windows Settings > Apps. +> **Windows, running from source:** `npm start` leaves a console window open behind +> the pet. `launch-pixelpets.vbs` starts the same thing silently, so it works as a +> desktop shortcut (point one at `wscript.exe "\launch-pixelpets.vbs"`). It +> locates the project from its own path, so moving the folder does not break it. + > **macOS (beta):** same commands. On first run, grant Accessibility permission > (System Settings > Privacy & Security > Accessibility) so your pet can react to your > typing and cursor. Input is only detected, never logged or sent anywhere. The mac diff --git a/launch-pixelpets.vbs b/launch-pixelpets.vbs new file mode 100644 index 0000000..bfb7a28 --- /dev/null +++ b/launch-pixelpets.vbs @@ -0,0 +1,22 @@ +' Silent launcher for pixelpets (runs the app from source with the latest code, no +' packaging needed). Launched by the desktop shortcut. Window style 0 = hidden. +' +' Paths are derived from THIS script's own location instead of being hard-coded, so +' moving or renaming the project folder cannot silently break the launcher again - +' which is exactly what happened when C:\pixelcat became C:\pixel_pet. +Set fso = CreateObject("Scripting.FileSystemObject") +root = fso.GetParentFolderName(WScript.ScriptFullName) +electron = fso.BuildPath(root, "node_modules\electron\dist\electron.exe") + +' Say what is wrong rather than failing mute: a missing electron means the deps were +' never installed in this copy, which looks identical to "the pet just didn't start". +If Not fso.FileExists(electron) Then + MsgBox "pixelpets could not start: electron is missing at" & vbCrLf & vbCrLf & _ + electron & vbCrLf & vbCrLf & "Run npm install in " & root & vbCrLf, _ + vbExclamation, "pixelpets" + WScript.Quit 1 +End If + +Set sh = CreateObject("WScript.Shell") +sh.CurrentDirectory = root +sh.Run """" & electron & """ """ & root & """", 0, False