How to organize automatic updates of the game via Electron application?
Good time of day. The question is, shall we say, voluminous.
There is a game (TES4: Oblivion) have assembled on its basis, ie the game itself plus fashion combined with each other. I'm making a launcher for the build, which can manage some settings of the game and the build in General: to run the game, change the graphics settings via ini file of the game and stuff like that.
Yeah, I almost forgot, launcher write on Electron, because well-familiar with web development.
So is the idea to arrange automatic updating of the Assembly. Fashion changes, files change, settings rewritten, bugs fixed and I would like that the players always had a fresh update as soon as possible.
But the problem is that I don't know how to organize, for example, where to store the update files. As I
imagine it: make a list of files where write, what to change, what to remove, what to add. There's also prescription version of the game to compare. Throws on the server where you stored the update. There is a new file and changed. In the launcher make a request to the server at startup read configuration file updates made earlier, check the version and download the files you need. Then we need to check that all download and downloaded correctly and not crooked (checksum?). Well, overwrite and delete files. But how to make a list of the changes, because users will have different versions when upgrading, you need somewhere to download pre files, you'll need somewhere to store it
In General, if someone has experience in this matter, it would be nice if you shared it. And maybe someone knows articles on this subject, but given the tools that I used, I would not have found.
Pull out technology torrent https://www.electronjs.org/apps/electorrent when you click "Play" podgruzhat new magnet link. And then just like "if the hash does not match, then the Play button becomes Update." I think I understood the logic)