auto-updater | Node.js auto-update plugin | Runtime Evironment library
kandi X-RAY | auto-updater Summary
kandi X-RAY | auto-updater Summary
Node.js auto-update plugin
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of auto-updater
auto-updater Key Features
auto-updater Examples and Code Snippets
Community Discussions
Trending Discussions on auto-updater
QUESTION
I'm trying to make launcher for my game. I want it to display update log. How I want it to work:
Replace log.txt file on Google Drive and new log will be displayed in launcher.
I have no idea how to make this. Also I have to make auto-updater.
It will work similiar to update log - upload .jar file and res folder on drive. When game launched it will check for updates and if new update available it will download it.
Like I said, I have no idea how to do this.
...ANSWER
Answered 2021-Jan-02 at 11:36Google drive is a file explorer only. It will allow you to upload and download files, it does not have the power to display or edit them. Unless you want to display them in the Google drive web application in which case there should be a webContentLink available in the response data for the file.get method, however the file will need to be either public or the user must have access to it in order to be able to see it.
To display the file you will need to download it and display it locally. To edit it you will need to download the file and edit it then upload it again.
Tbh i think what you are asking is out of scope for this api.
QUESTION
I wanna create an auto-updater for my project which downloads and installs a file from the internet. I have done how I can download the file to my desired location with a desired name. The place where I am stuck is how I can install the file.
The code so far I have written:
...ANSWER
Answered 2020-Oct-26 at 11:48You will need to use the subprocess
module to execute the .exe
files.
QUESTION
What I want to accomplish:
I want to understand how to configure Electron-Builder/Webpack to package non-code files (configuration files, XML files, meta-data files, JSON files) such that when the installer installs the application these files will get saved in the users home directory on the local machine. I get the importance of storing these files outside of the installed binary files, so when the user updates their version they do not loose any customizations they may have setup. But the initial version of these files must exist some place to begin with, like a template version of these files.
I've found a few tutorials that explain how to include these non-code files as part of the package: Electron - How to add external files?
How to manage configuration for Webpack/Electron app?
But what I do not see or understand from these posts is how to configure the installer so that when it runs, these files will get copied to the users home directory (appData folder). In particular if those files are already installed to avoid over-writing them or ask the user if they want to over-write them? How does one set that up?
Also there must be some configuration setting to allow these files to remain part of the Github repo and enable developers to use the dev-path to these non-code files, while not breaking the production path to these files on the users installed version. How does one setup that kind of a configuration?
This is the folder structure on my project:
...ANSWER
Answered 2020-Aug-21 at 23:02Let say you have a user.config file in the src directory and you want to place it in the APPDATA directory.
First of all you need to package this file. It can be done as follows:
QUESTION
I'm developing an auto-updater tool. The architecture is the following: I have a GUI application and a service that communicate between them; the gui application is installed to be run at each os startup and the same is done for the service.
When the GUI application finds that a new update is available it downloads the update and ask to the service to run it in silent mode(I used a service for this task because the installer needs to be run with admin privileges without user interaction). At this point the installer runs (keep in mind that is a child of the service, so it inherits the service run context) in silent mode (as installer system I'm using nsis) and performs a uninstall of the current application (it removes the GUI app and its binaries, stops the service/kills the service and so basically it kills its father, uninstall the service from the system and remove its binaries) and installs the new software package which includes the new gui app and the new service. I'm wondering if during this uninstall/install process is possible to avoid the system to shut down (since a shutdown during this process could corrupt the application files and the application state).
I've read about WM_QUERYENDSESSION and ShutdownBlockReasonCreate but since my installer runs as child of the service it runs in session 0 so as stated here https://devblogs.microsoft.com/oldnewthing/20151002-00/?p=91461 I can't use them. I also can't use SERVICE_ACCEPT_PRESHUTDOWN flag because the installer updates the service (so the flag will have no effect after the service removal).
Could you suggest a solution to the problem above? I'm also open to revisit my software architecture if there are no options with the current architecture.
Thanks
...ANSWER
Answered 2020-May-08 at 10:54I can think of 3 different possible solutions:
Use a signed MSI installer and UAC patching. The initial install needs to be elevated but signed patches can be installed by non-admins.
Use versioned services; install it in a subfolder named based on the version. The old service would have to run the new service as a normal process and the normal process stops the old service, updates the service binary path and then starts the service as the first steps of the update process. This should allow you to use
SERVICE_ACCEPT_PRESHUTDOWN
.Use the service to start a helper process on the interactive desktop session with
WTSQueryUserToken
+CreateProcessAsUser
. This process should be able to block shutdown.
QUESTION
I have an electron app which uses electron-builder
for building, packing & publishing the app.
I have the following auto-update code:
...ANSWER
Answered 2020-Jan-12 at 15:06Quick question: have you used this answer to make your App closed and minimizable to tray?
if you did you should application.isQuiting = true
before calling autoUpdater.quitAndInstall();
otherwise the application.close()
function is pretty much blocked form anywhere other then the contextMenu
.
QUESTION
There are numerous questions that look similar to this , but none of them seem to be exactly the same and all their solutions have not worked for me, so here it goes...
I have a Java program that tries to auto-update itself. It works like this:
- on startup, a bash script checks for the presence of a zip file in a certain location.
- if it exists, instead of running the "real" main class, it runs the updater Java class.
- this class will unpack the zip in a temp location, then start itself again in a separate process, from that temp location.
- once the new process starts, the old one exits.
- the new process tries to unpack the zip again, into the previous location (which now has nothing running so can be replaced).
- on success, it deletes the zip file and runs the original bash script again.
If everything worked, the bash script now would just start the Java main class.
Everything in this list actually works, except for the very last step when I try to execute the bash script at the end.
The bash file permissions look like this (both before and after I run the auto-updater):
...ANSWER
Answered 2020-Apr-19 at 14:48I have finally found out the root cause of the problem: it was due to file permissions, but not with the file the error message mentions!
The way I was unpacking the new application update was via writing a simple "unzipper" in Java with the following, basic implementation:
QUESTION
I am building an electron app and trying to implement the auto-update feature where it looks in an amazon s3 bucket for the latest version. However, I am getting the following error when I run the app.
...ANSWER
Answered 2020-Mar-30 at 03:17Found the reason was that I wasn't including my .env file which had the secret keys in my build.
QUESTION
I need to support a special release per user (or group), and I want each user will auto-update to a new available release only if it's suitable for him (by some kind of logic in the backend).
I've tried to do so by using electron-builder's electron-updater module, and also by using Electron's autoUpdater built in module, but it seems that both always fetch the latest version when calling autoUpdater.checkForUpdates
.
I've seen that when deploying my own update server, some of them (such as nuts) support a download url for a specific version. as described using nuts
Specific version for detected platform: http://download.myapp.com/download/1.1.0
but there seem to be no support to request a specific version in the app itself using autoUpdater.
summarizing all this up: How can I achieve auto-update to a specific release other than latest?
...ANSWER
Answered 2019-Dec-05 at 07:17The solution for me was channels.
appUpdater.channel
(getter and setter)Define the channel which the Auto-Updater will follow (see the auto-update with channels tutorial) using
appUpdater.channel = 'beta'
or get the current channel withcurrentChannel = appUpdater.channel
.
Note that channels are not supported when using GitHub as a provider (for now), as described in electron-builder autoUpdate documentation:
channel
String - Get the update channel. Not applicable for GitHub. Doesn’t return channel from the update configuration, only if was previously set.
You can set the channel name to anything, and can even dynamically (if needed) direct your users to pull updates from that channel.
You can also edit the {your-channel-name}.latest
file manually and add parameters that will help you determine whether the current "asking for update" user should consume the certain version (in the update-available
event from the updateInfo
parameter for example).
QUESTION
I have created an auto-updater for my java program. but at the end of the download it downloads the file to desktop. I can to get where is the program file and update it?
this is my code:
...ANSWER
Answered 2019-Aug-03 at 11:37If your external updater is in the same directory as your mail application you can use:
System.getProperty("user.dir");
This will give you the current folder. You can find more details here: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
If this is not the case i see the following options:
- ask the user before updating for the installation folder
- store the installation folder in property file inOS user data // update jar folder.
regards, WiPu
QUESTION
I am developing Desktop App(windows/mac) using Electronjs. I was trying to implement auto-update feature using electron-updater since I am using electron-builder for the building.
I am able to generate .exe file for my app but when trying to install, it's throwing an error: "Can not find module 'debug'". Please find attached screenshot.
Without electron-updater implementation, my app is running fine. When I am importing autoUpdator in my index.js, started getting that error. I am using autoUpdator as below:
...ANSWER
Answered 2019-Mar-30 at 10:15The line "!**/src"
in your exclude list is the culprit.
- Many node modules will have
"src"
folders which have to be packaged/bundled along with your application source code. - If you observe
"debug"
module folder under"node_modules"
it has a"src"
folder which has been excluded by above rule.
Suggestion: If you have your apps source folder as "src"
, rename it to something else like "source"
(which is in your control), but ensure you don't exclude "src"
folders of node_modules
(renaming these is not in your control as it could break the module's integrity and they get overwritten on fresh npm install
also)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install auto-updater
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