CG8516 / PvZA11y

An accessibility mod for Plants VS Zombies
MIT License
31 stars 11 forks source link

added script mod updater #41

Closed azurejoga closed 8 months ago

azurejoga commented 8 months ago

a script to update the PVZ mod to the latest version ps: I will also upload another script to the repository where it calls the mod-updater.ps1 script in the script, mod-update.ps1, whenever you make a new release, modify the script to always have the updated URL, and also, include the new .exe that I will be creating called update.exe where you will have to include it with the new zip whenever there is a new release, today I will make a request.

CG8516 commented 8 months ago

Hey, I appreciate the effort, but I have a couple of questions.
Why is this a seperate powershell script, and not included as part of the application?
Where is the source for the exe file?
From what I gather, the exe grabs the latest ps1 file from this repo, and launches that?

It would probably be better if the updater grabbed the latest release automatically, rather than using a hardcoded release tag.

You could grab the contents of "https://api.github.com/repos/CG8516/PvZA11y/releases" Get the first assets_url, which at the moment is: "https://api.github.com/repos/CG8516/PvZA11y/releases/135767102/assets"

Then download the first 'browser_download_url', which is currently: "https://github.com/CG8516/PvZA11y/releases/download/beta.1.15.4/PvZA11y_Beta1.15.4.zip"

That way you wouldn't need to hardcode any values, and it wouldn't need to be manually updated between releases.