emanzione / PATCH

The PATCH repository for issues tracking, wiki and shared material.
https://assetstore.unity.com/packages/tools/utilities/p-a-t-c-h-ultimate-patching-system-41417
MIT License
47 stars 7 forks source link

Launcher Update need some help #65

Open anacinone opened 1 year ago

anacinone commented 1 year ago

When a launcher downloads an update, the new executable file overrides the old one. If the update process is interrupted or fails, the launcher can be left with a corrupted executable, making it impossible to run. We need a more reliable way to update itself like -a file swap after the download. -patch download and overrides everything.

babanini95 commented 1 year ago

In my case, I make my own PatcherUpdater. I make it download all the new Launcher files in a temporary folder and cut it to my Launcher folder once the download is completed.

kygodev commented 1 year ago

Can confirm this bug. It was not present in older versions.

emanzione commented 1 year ago

I am thinking about the possible implications of a possible fix for this. The fix would be to download everything in a temporary folder, then replace all the files when we are sure that all the downloads have been completed successfully.

However, this requires more free disk space, precisely it requires twice the Launcher's size.

Not sure if this is a real problem, but I am thinking about implementing this behavior behind an opt-in flag in the LauncherUpdater.

What do you think?

kygodev commented 1 year ago

Would be nice i think. Because i dont know if its a game related problem or the patcher is corupting the files.