AutoUpdater | Generic autoupdate component used by HubTurbo
kandi X-RAY | AutoUpdater Summary
kandi X-RAY | AutoUpdater Summary
Generic autoupdate component used by HubTurbo. It automatically downloads the required jars specified in the configuration file. The path of the configuration file is set in APP_INFO_FILEPATH in AppLauncher.java.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Download a file .
- Read the updater data from the file .
- Updates the given component .
- Serialize this component to XML .
- Returns true if this version is equal to the given object .
- Run the updater .
- Start download update update .
- Set the progress value
- Dialog window .
- Get the percent download bytes .
AutoUpdater Key Features
AutoUpdater Examples and Code Snippets
Community Discussions
Trending Discussions on AutoUpdater
QUESTION
I have a repository that utilizes electron-updater
for auto update. The weird thing is, it has no any code whatsoever pointing where the release updates are stored (I store it in GitHub releases), but somehow the autoUpdater.checkForUpdatesAndNotify()
still works. There is github remote origin
but I doubt it's being used by electron-updater
to find the repository. I don't use any GitHub token either.
The way I release update:
- Increase the
version
inpackage.json
- Run
electron-builder
, producing.AppImage
- Create new release draft in my repository's GitHub releases
- Upload the
.AppImage
file to the draft's assets and modify the draft's tag - Download the previous release, and then open it
- Voila! The update works. But how?
It's worth mentioning that if latest-linux.yml
is missing from the latest release's asset, it will throw 404
error and refuse to update despite knowing the latest version's tag.
Here's the repository I'm talking about: https://github.com/SnekNOTSnake/fresh-update/releases
Also, is this how normal people release their electron app? I tried the electron-builder --publish
way, but it's troublesome compared to the manual steps above.
ANSWER
Answered 2022-Mar-23 at 08:19Thanks to Caramiriel in the comment section above for the enlightenment.
How electron-updater
knows where to find the repository is from resources/app-update.yml
inside the produced .AppImage
file.
The app-update.yml
file is produced by electron-builder
using the information from git remote get-url origin
(if available).
I proved it by changing the origin
's url to https://github.com/SnekNOTSnake/tofu-tracker.git
and build the AppImage, and (surprisingly enough) the repo
's value became tofu-tracker
.
QUESTION
The ElectronNET AutoUpdater seems to be posting notifications to Windows that I haven't asked for. Along with the ones I did ask for, I now have duplicates (from the perspective of my QA people).
To make matters worse the default messages use the internal AppId rather than the display name of the App which just looks unprofessional.
Forgive the redactions, but notice the following:
- Outlook displays a Group Title and icon; I can't seem to replicate this with ElectronNET always displaying some sort of internally calculated name, not one that I have specified anywhere in any configs. MS Teams and Slack both display nicely so it must be possible in Electron.
- The first message at 9.40 AM is my one, raise during the event
ElectronNET.API.Electron.AutoUpdater.OnUpdateDownloaded
; the second one "A new update is ready to install" seems to be coming from ElectronNET itself and the subtext includes the AppID rather than the display name for the App.
Does anyone know how to overcome these limitations? I'm happy to fork the ElectronNET cli and override some of the build process if that's what's needed but these seem like fairly obvious needs for the platform as a whole.
Maybe I just missed something in the docs?
...ANSWER
Answered 2022-Feb-15 at 22:27Answering my own question because I've pulled the ElectronNET code and worked it out.
There are two APIs for checking for updates:
Electron.AutoUpdater.CheckForUpdatesAsync()
and
Electron.AutoUpdater.CheckForUpdatesAndNotifyAsync()
In the latter there is a NotificationOptions
object that can be sent to the pure-Electron end to set the content of the notification. In the ElectronNET bridge the API does not accept the options argument, hence the default message from Electron is displayed.
The workaround here is to call the CheckForUpdatesAsync()
method instead and craft your own notification that you can attach to the OnUpdateDownloaded
event. An example below:
QUESTION
I'm writing a software and trying to implement an automatic updater into it as a separate application. I have both the software itself and the updater under the same solution.
When an update is available from a server, my program prompts the user to update, this part works.
I fail to call the updater app and then exit only the first program.
This is what I have not:
...ANSWER
Answered 2022-Jan-11 at 20:58Add the code to shut down the main app in to the updater. You know the process name so it should be fairly easy. This way you can also check that the updater actually starts running before the main app is shut down.
Code below is borrowed from this answer: https://stackoverflow.com/a/49245781/3279876 and I haven't tested it my self.
QUESTION
I am standing up a fresh install on Ubuntu 20 LTS. Following the standard install doc. Looks like it isn't working as expected.
Server.log
...ANSWER
Answered 2021-Nov-20 at 22:04Turns out is was MariaDB, use MySQL instead. The wiki says either works but I imgaine a change in Ubuntu 20 LTS mariadb is incompatable with AzerothCore.
QUESTION
I'm using AutoUpdater.NET for updating my applications. It's a great library. My program collects data for inventory system-data, sent it to database and than close the application.
...ANSWER
Answered 2021-Aug-22 at 02:58The solution (in my case) was to replace Environment.CurrentDirectory with Application.StartupPath
QUESTION
When I update an Electron app using the electron-builder autoUpdater, all the file storage I defined is overwritten. What settings do I need to make these files persist?
Here is an MCVE example (for the main process):
...ANSWER
Answered 2021-Aug-21 at 14:55I managed to do this after looking at Cameron Nokes' excellent blog:
cameronnokes.com/blog/how-to-store-user-data-in-electron:
Storing user data in the operating system’s designated location for user’s app data is the idiomatic way for native app’s to persist user data because:
when we auto-update the app, our source files may get moved or delete
changing or adding to an app’s internal files will invalidate the code signature
To do this I used const userDataPath = app.getPath('userData');
to get a path to the OS' app storage location. and then changed the references to 'persistentFile'
to String(userDataPath)+'/persistentFile'
:
QUESTION
I have a problem with Autoupdater.Net for C#. My program starts from C:\Systeminventory and finds an update. The program is downloading it and closes the application. All fine. But when installing the update the updater hangs by extracting. Nothing happens.
If I move the application files to C:\Systeminventory\folder
and start it, the updater download the update and extract it to C:\Systeminventory
. That's not what I want. I want to start the app from C:\Systeminventory
and want the updated files into C:\Systeminventory
. It seems that the updater can't override the old files, but why?
The app is closed and not running. I checked this in the Task Manager. I tested it on my private pc and I'm admin. What did I do wrong?
Using
- Windows 10 21H1
- Visual Studio 2019 Community Edition
- Autoupdater.NET.Official 1.7.0
- .NET Framework 4.8
This is the XML-File
...ANSWER
Answered 2021-Jul-26 at 17:12I found the solution.
I packed the files they are stored in the Debug / Release-Folder to a zip-file If you do this, you have to remove the "Parent". So the correkt Code is:
QUESTION
I am getting this error whilst using the latest version of Electron. I have nodeIntegration set to true in my main javascript file. I have copy and pasted this code from a working Electron application but it doesn't seem to work with my new app.
Electron Version: ^12.0.0
My main JS
...ANSWER
Answered 2021-Mar-10 at 09:49I have had the same issue. It comes with the update from electron 11.x to 12.x See here: https://www.electronjs.org/releases/stable#release-notes-for-v1200
You have to disable contextisolation, which changed from beeing true by default in the new electron version.
QUESTION
ANSWER
Answered 2021-Jan-29 at 10:08My solution:
I set the FeedUrl for autoUpdater autoUpdater.setFeedURL('https://[BUCKET].s3.[REGION].amazonaws.com');
QUESTION
I'am working on a desktop app using electron everything is working well, except for the autoUpdater.setFeedURL() method, it returns always this exception : "Update check failed. The server sent an invalid response. Try again later."
...ANSWER
Answered 2020-Oct-30 at 09:01Yeah! after 2 days of headache, I found that simply I was using a deprecated version of autoUpdater, I should be using this :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AutoUpdater
You can use AutoUpdater like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the AutoUpdater component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page