This update system is used in @CrazyVinc/Led-Controller
- Get remote version from JSON
- Download the update.
- Extractor with the function to specify what to extract
- Run npm install with the default extractor
- Automatically download the correct extractor.
- Define your own extractor
autoupdater -dest=./ -zip=./temp/update.zip -extractfile=installer.json -npm
{
"extract": {
"files": [
"/index.js",
"/installer.json",
"/package.json"
],
"directories": [
"/src"
]
}
}
- Use a launcher to run your main program.
- Let your program scan for updates in the background.
- If a update is found, install the update and the extractor.
- Let your main program communicate to your launcher that there is a update ready to install.
- Send a JSON object with the path to the update and the path to the extractor
- Send a prepared commandline string.
- Let the launcher stop your program and start the update-extractor (with child process spawn).
- Start your main program as soon the update-extractor is closed.
You can use the @CrazyVinc/Led-Controller Launcher and change it according to your own use