Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electron-delta/electron-sample-app
Example of how to integrate @electron-delta/builder
https://github.com/electron-delta/electron-sample-app
autoupdater delta-updates electron-builder electron-delta-updater electron-quick-start
Last synced: about 2 hours ago
JSON representation
Example of how to integrate @electron-delta/builder
- Host: GitHub
- URL: https://github.com/electron-delta/electron-sample-app
- Owner: electron-delta
- License: cc0-1.0
- Created: 2022-03-24T19:18:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-23T14:08:29.000Z (over 1 year ago)
- Last Synced: 2024-08-04T07:01:08.796Z (3 months ago)
- Topics: autoupdater, delta-updates, electron-builder, electron-delta-updater, electron-quick-start
- Language: JavaScript
- Homepage: https://electrondelta.com/
- Size: 2.81 MB
- Stars: 13
- Watchers: 1
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Electron sample app
A complete example of an auto-updating app demonstrating the delta updates. The app is built using [electron-builder](https://github.com/electron-userland/electron-builder) and
[@electron-delta/builder](https://github.com/electron-delta/electron-delta)Delta auto updates are handled by [@electron-delta/updater](https://github.com/electron-delta/electron-delta-updater)
![Delta updates](https://electrondelta.com/assets/delta-downloading.png)
## Installation
```bash
git clone [email protected]:electron-delta/electron-sample-app.git
cd electron-sample-app
npm install```
## Testing delta releases
Let's create the first version of the app.
1. Open the `src/main.js` and set the hostURL to `http://localhost:5000/`
2. Open .electron-delta.js and use the following `getPreviousReleases` method```js
const getPreviousReleases = async () => {
return [];
};
```
3. Change the `version` to `1.0.0` and create the distribution files.
```bash
npm version 1.0.0
npm run dist```
4. Now serve the dist files over port 5000.
```bash
npx serve -s dist -p 5000
```5. Open .electron-delta.js and use the following `getPreviousReleases` method
```js
const getPreviousReleases = async () => {
return [
{
version: '1.0.0',
url: 'http://localhost:5000/electron-sample-app-1.0.0.exe',
}
];
};
```6. Change the `version` to `1.0.1` and create the distribution files.
```bash
npm version 1.0.1
npm run dist
```7. Notice that a new folder is created under `/dist/1.0.1-delta-installers`. Move all those files to `/dist/`. Make this url `http://localhost:5000/delta.json` is working.
8. Now install the `electron-sample-app-1.0.0.exe` app. Your app should be auto updated to 1.0.1 using delta updates.