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