ets2-dashboard-skin icon indicating copy to clipboard operation
ets2-dashboard-skin copied to clipboard

Self update OTA

Open JAGFx opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe. Self update the final *.exe if a new version is available

Describe the solution you'd like I don't know

JAGFx avatar Apr 20 '20 12:04 JAGFx

I haven’t worked with Vue that much, but I think a simple GitHub API request can return the latest version. The app could compare that with the current version and if it’s different, could prompt the user with the update. We don’t necessarily need to download in the app, just open a browser tab.

TheGamer1002 avatar Jan 18 '22 00:01 TheGamer1002

After researching a little further, Vue comes with fetch() bundled, so it's only a few lines of code. I'll be able to do it pretty quickly.

TheGamer1002 avatar Jan 18 '22 00:01 TheGamer1002

@TheGamer1002 Thanks for your research.

If it still works, I made an API call to Github to find out if the latest release is the same as the current version of the app. If is not the same, a badge appear and indicate a new version message . This badge is clickable and redirect to the latest release.

My goal with the automatic OTA update, is to update the app silently. As you mentioned, it should be possible to get the new version from Front, but the application also needs a server.

If I update only the front and not the server, I can create divergences.

That's why I prefer to update the whole package (exe file, and configuration files).

JAGFx avatar Jan 18 '22 06:01 JAGFx

Hmm, perhaps a tiny standalone exe file that does the downloading? This would allow for the main exe to be updated, because since it would be running otherwise, it wouldn't cause any errors.

TheGamer1002 avatar Jan 18 '22 12:01 TheGamer1002

That's what I have in mind, yes.

JAGFx avatar Jan 18 '22 12:01 JAGFx