mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
How to use Auto updater ? #405
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @giorgosavramopoulos on GitHub (Nov 2, 2019).
I understand that this is not the place to ask questions, but i cannot understand how to configure Electron.NET to properly use the auto updater feature.
How to setup the remote repo where the update will be?
If you cannot answer here, please point to the right direction.. :)
Thanks!
@giorgosavramopoulos commented on GitHub (Nov 4, 2019):
OK, i figured it out so i though posting my answer in case someone else is interested..
So I wanted to see how to configure the updater for updating through a simple http server.
In electron.manifest.json i added this configuration inside build params:
"build": {
...,
"publish": {
"provider": "generic",
"url": "http://localhost:82",
"channel": "latest"
}
}
and i set up a local http server in iis on port 82 to serve files (need to include .yml in the mime types).
Inside the server path i put the files:
Then when using eg. Electron.AutoUpdater.CheckForUpdatesAsync() it finds the files and tries to update.
@simonmurrell commented on GitHub (Nov 9, 2019):
Hello
I tried this inside my build params of the electron.manifest.json file. It keeps looking at a local file in the obj\Host called dev_app_update.yml. It is not looking on the remote server I specified. I opened up Fiddler to see if it was making any http requests to the server. I am running the latest version of Electron.NET.
Regards,
Simon
@giorgosavramopoulos commented on GitHub (Nov 9, 2019):
Hi Simon,
Yes i forgor to mention that it does not work when running for debugging(electronize start..). You need to build for release (electronize build...)
Then under bin/Desktop will be the files you need to put in the http server and to see the updater working you either install the app and run it (i run it through cmd to see the logs) or run the exe under bin\Desktop\win-ia32-unpacked (this should work too i am not sure).
Under the folder bin\Desktop\win-ia32-unpacked\resources you should now see a app-update.yml file that should contain the info you have specified.
@simonmurrell commented on GitHub (Nov 9, 2019):
Do you prompt the user to download it if an update is found or do you automatically download it? Does that method prompt the user
@giorgosavramopoulos commented on GitHub (Nov 9, 2019):
If you use it without any other AutoUpdater configuration it will download the update too and install it
@simonmurrell commented on GitHub (Nov 9, 2019):
I see it is the base Electron.NET update information and not my application. Seems like this feature has not been implemented 100% yet...
@giorgosavramopoulos commented on GitHub (Nov 9, 2019):
where do you see that? i got it working the way i said above..
@simonmurrell commented on GitHub (Nov 9, 2019):
I rebuilt it once again and now I see my info. Thanks. Let me see where this goes ;)
@simonmurrell commented on GitHub (Nov 9, 2019):
Ok I see it is processing now. I added the YML file to the mime types. Do you then prompt the user to download or force it on them.
@giorgosavramopoulos commented on GitHub (Nov 9, 2019):
For that, it depends on what you want to do. I show a message that there is an update available and will be installed once the app quits and use QuitAndInstall method. You can see the available methods if you go inside AutoUpdater Class:
https://github.com/ElectronNET/Electron.NET/blob/master/ElectronNET.API/AutoUpdater.cs
@OmiCron07 commented on GitHub (Dec 13, 2019):
Kudo for that! And it works with an Azure blob storage.
@GregorBiswanger commented on GitHub (May 10, 2020):
Please have a look at electron-builder. You can find the configuration for this under the new
electron.manifest.jsonfile at"build".https://www.electron.build/auto-update
We have an sample in our API Demo App too:
https://github.com/ElectronNET/electron.net-api-demos
@sachinmakhre commented on GitHub (Jul 16, 2021):
hi i am very new to electron and node ,unable to implement auto update please help...
@GregorBiswanger commented on GitHub (Jul 16, 2021):
@sachinmakhre Please refer to the instructions on the Internet for electron builder - Auto Update. This can be used 1:1 with Electron.NET.
@sachinmakhre commented on GitHub (Jul 16, 2021):
thanks Gregor ! replying in very short time
still yet no luck , i am trying .NET 5 server blazer app with electron.net Api
no function is working ,require return undefine, where to write main process function ,
it will be great help if you a short demo on .NET 5 server blazer app this will help me understand where to write render and main process . i wish to bring your notice , we are not using MVC
@MSiffert commented on GitHub (Oct 9, 2021):
@sachinmakhre You could do something like this.
This examples assumes that you have set up the update-server correctly as described above.