Ephenia / Pokeclicker-Scripts

Various scripts & enhancements for the game Pokéclicker.
https://github.com/Ephenia/Pokeclicker-Scripts
GNU General Public License v3.0
184 stars 263 forks source link

[Feature Request / Bug] Desktop client versioning issues and update notifications #383

Open umbralOptimatum opened 4 months ago

umbralOptimatum commented 4 months ago

The suggestion: Older desktop versions cause problems with certain scripts, which can be difficult to diagnose. The desktop client doesn't have update checking (yet?) so it would be very handy to have the desktop scripts mod tell the user when there's a version mismatch.

The bug: The desktop client currently checks its version through app.getVersion(), which reports the version listed in package.json... the same package.json file that's part of the app.asar users overwrite* with the modded version. As such, a modded desktop client will always incorrectly think its version is the version the mod expects. Outdated and incompatible client? Future client version from after this project is abandoned? Doesn't matter. The script can't accurately report version issues; it's busy lying to itself.

The only solution I can think of is completely changing the installation method to only replace the actually-modified Javascript files. Other than expecting users to unpack and repack the app.asar file themselves (cruel, unusual, and a recipe for disaster given the occasional folks who can't follow the current simpler directions) I expect this would require writing installation scripts for each operating system. This is well beyond me; hopefully someone more knowledgeable can take a crack at it someday.