{"id":13712509,"url":"https://github.com/hschneider/neutralino-autoupdate","last_synced_at":"2026-03-03T13:36:33.237Z","repository":{"id":212159141,"uuid":"730842331","full_name":"hschneider/neutralino-autoupdate","owner":"hschneider","description":"An enhanced Auto-Updater for NeutralinoJS. ","archived":false,"fork":false,"pushed_at":"2025-03-28T12:30:13.000Z","size":58503,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T19:04:59.078Z","etag":null,"topics":["autoupdate","autoupdater","cross-platform","crossplatform","neutralino","neutralinojs"],"latest_commit_sha":null,"homepage":"https://marketmix.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hschneider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-12T19:47:20.000Z","updated_at":"2025-04-07T14:45:43.000Z","dependencies_parsed_at":"2025-04-10T18:53:34.026Z","dependency_job_id":null,"html_url":"https://github.com/hschneider/neutralino-autoupdate","commit_stats":null,"previous_names":["hschneider/neutralino-autoupdate"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/hschneider/neutralino-autoupdate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-autoupdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-autoupdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-autoupdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-autoupdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hschneider","download_url":"https://codeload.github.com/hschneider/neutralino-autoupdate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-autoupdate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30046719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T10:53:31.691Z","status":"ssl_error","status_checked_at":"2026-03-03T10:53:22.041Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoupdate","autoupdater","cross-platform","crossplatform","neutralino","neutralinojs"],"created_at":"2024-08-02T23:01:19.277Z","updated_at":"2026-03-03T13:36:33.220Z","avatar_url":"https://github.com/hschneider.png","language":"JavaScript","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://marketmix.com/git-assets/neutralino-autoupdate/neutralino-autoupdate.svg\" width=\"400\" height=\"400\"\u003e\n\u003c/p\u003e\n\n# neutralino-autoupdate\n\n**An extended Auto-Updater for Neutralino**\n\nThis cross-platform auto-updater comes with the following features:\n- Updates the complete app with all extra files, not only its resources.\n- Downloads are secured with SHA256 checksums.\n- Launches DMG-Files on macOS and executable installers on Windows and Linux.\n- Displays a nice install dialog with app icon, version infos and release notes.\n- Uses a single manifest for all platforms and CPU-architectures.\n- The manifest is secured with an app token.\n- Written in pure JS, no Neutralino Extensions or other dependencies required.\n- The GUI can be translated to any language.\n  \n\n\u003cimg src=\"https://marketmix.com/git-assets/neutralino-autoupdate/neutralino-autoupdate.gif\"\u003e\n\n\u003cimg src=\"https://marketmix.com/git-assets/neutralino-autoupdate/neutralino-autoupdate-dialog.jpg\"\u003e\n\n## The update process\n\nThe update procedure in detail:\n\n- When the app launches, the **manifest.json** file is fetched from the update server. \n- The manifest's app version is checked against the running app's version.\n- If an update exists, the update dialog pops up.\n- The user can read the release notes and decides to skip or install the update.\n- If selected \"Install\", the update is fetched from the server and saved in the user's download folder.\n- Next the app ID and the file's checksum are verified.\n- The update is unpacked and the original ZIP-file is deleted.\n- The starter file is executed and the Neutralino app is closed.\n\n### Update package format\n\nThe following formats are recommended:\n\n#### Windows\n\nUse a **zipped executable installer** like e.g. **[Innosetup](https://jrsoftware.org/isinfo.php)**. The installer is executed automatically.\n\n#### macOS\n\nAn App bundle should be delivered as a **zipped DMG**. After the zip-file has been unpacked the user is prompted for the login password to mount the DMG. Next the user drags the new app to the Applications folder.\n\n#### Linux\n\nUse a **zipped folder** with e.g. an install.sh file, which does all setup tasks. The install.sh file is executed automatically.\n\n## The manifest.json\n\nThe manifest contains all information required by the update process:\n\n```json\n{\n  \"enabled\": true,\n  \"appId\": \"com.marketmix.neutralinoAutoupdate\",\n  \"appName\": \"Neutralino AutoUpdater Demo\",\n  \"appVersion\": \"1.0.1\",\n  \"appIcon\": \"icon.png\",\n  \"updateWindowsX64\":\n    {\n      \"file\": \"AutoupdateDemo_win-x64.zip\",\n      \"checksum\": \"123\",\n      \"start\": \"setup.exe\",\n      \"notes\": \"release-notes.html\"\n    },\n  \"updateDarwinX64\":\n    {\n      \"file\": \"AutoupdateDemo_macos-x64.zip\",\n      \"start\": \"start.dmg\",\n      \"checksum\": \"fc37472674da4e978ebec2eaf66abb5d1d9c1e033f3d11f1b1d2eec03e0eb612\",\n      \"notes\": \"release-notes.html\"\n    },\n  \"updateDarwinARM64\":\n  {\n    \"file\": \"\",\n    \"checksum\": \"\",\n    \"start\": \"\",\n    \"notes\": \"\"\n  },\n  \"updateDarwinUNIVERSAL\":\n  {\n    \"file\": \"\",\n    \"checksum\": \"\",\n    \"start\": \"\",\n    \"notes\": \"\"\n  },\n  \"updateLinuxX64\":\n    {\n      \"file\": \"AutoupdateDemo_linux-x64.zip\",\n      \"checksum\": \"fc37472674da4e978ebec2eaf66abb5d1d9c1e033f3d11f1b1d2eec03e0eb612\",\n      \"start\": \"AutoupdateDemo_linux-x64/install.sh\",\n      \"notes\": \"release-notes.html\"\n    },\n  \"updateLinuxARM64\":\n  {\n    \"file\": \"\",\n    \"checksum\": \"\",\n    \"start\": \"\",\n    \"notes\": \"\"\n  },\n  \"updateLinuxARMHF\":\n  {\n    \"file\": \"\",\n    \"checksum\": \"\",\n    \"start\": \"\",\n    \"notes\": \"\"\n  }\n}\n\n```\n\nThe fields in detail:\n\n| Key        | Description                                                  |\n| ---------- | ------------------------------------------------------------ |\n| enabled    | Set this to false, to **lock client-side processing** while you upload new versions or change the manifest itself. Set it back to true, when you completed all changes. |\n| appId      | The app ID, equal to the **applicationId** in the neutralino.config.json |\n| appName    | The app-name, as displayed in the update dialog.             |\n| appVersion | The current app-version. This is compared against the running app's version. |\n| appIcon    | The icon as displayed in the update dialog. Allowed formats are **JPG, PNG or SVG**. The dimensions have to be square. |\n\nNext we have a look on the **update keys** for the different platforms and CPU architectures. They are build up as folllows:\n\n`update + Platform + ARCHITECTURE in uppercase`\n\nSo we find the update for macOS (Darwin) on ARM under this key:\n\n`updateDarwinARM64`\n\nThe update keys point to the following fields:\n\n| Key      | Description                                                 |\n| -------- | ----------------------------------------------------------- |\n| file     | The zip-file which contains the update.                     |\n| start    | The file which is executed after the zip has been unpacked. |\n| checksum | The zip-file's SHA256 checksum.                             |\n| notes    | A HTML-file with the release notes.                         |\n\n## Update-Server Setup\n\nCopy all content from the **_server/demo** folder to your update server.  The update zip-files are placed in the same folder as the manifest.\n\nIf you are already live with autoupdate-enabled apps in the wild, disable the manifest by setting\n\n```json\n\"enabled\": false,\n```\n\nThen first save the file. Now all clients downloading the manifest cannot process the file. This assures that they only get consitent updates.\n\nAdapt the manifest's content and generate the **checksums** for each update-file:\n\n```bash\n# On macOS and Linux:\nshasum -a 256 FILE.zip\n# On Windows:\ncertutil -hashfile FILE.zip SHA256\n```\n\nNext create a **secret security token** with some password generator of your choice and enter it in **manifest.php**:\n\n```php\n// update.php 1.0.0\n//\n// Adds a security layer to the update mechanism:\n// This script checks the incoming request for the secret app token\n// in the X-Auth-App header.\n// Only when this token is valid, the manifest.json will be delivered.\n//\n// (c)2023 Harald Schneider - marketmix.com\n//\n\n// Enter the individual app token here:\n//\n$appToken = 'hB9rV7cS3tD3bU1wA8vY3pQ5fO4qO6sP';\n...\n```\n\nFeel free to adapt the PHP script to your needs. So you could e.g. rename manifest.json to manifest.data which makes it accessible only through manifest.php.\n\nAfter the setup of your update-repository is complete, enable your manifest with:\n\n```json\n\"enabled\": true,\n```\n\nNow all clients can process the manifest.\n\n## Neutralino App Setup\n\n### Setup on all Platforms\n\nCopy the contents of **_install/PLATFORM/bin** folder to your app's **/extensions/autoupdate/bin** folder. E.g.\n\n`_install/macos-x64/bin --\u003e extensions/autoupdate/bin`\n\nIf you are on **macOS** or **Linux**, make sure the binaries are executable:\n\n```bash\nchmod -R +x extensions/autoupdate/bin\n```\n\nNext copy the **js/neutralino-autoupdate folder** to your project. \n\nAdd this line to your **index.html**, right before the main.js script:\n\n```html\n \u003cscript src=\"js/neutralino-autoupdate/autoupdate.js\"\u003e\u003c/script\u003e\n```\n\nAdd these lines to your **main.js** and adapt the manifest's URL to your own server:\n\n```js\nlet opt = {\n    lang: 'en',\n    debug: true,\n    arch: 'x64',\n    token: 'hB9rV7cS3tD3bU1wA8vY3pQ5fO4qO6sP'\n}\n\nlet AUTOUPDATE = new NeutralinoAutoupdate(\"https://autoupdate.test/demo/manifest.php\", opt);\n(async () =\u003e {\n    await AUTOUPDATE.check();\n})();\n```\n\nIf you don't want the nice update dialog, you can **use .checkSilent() instead** and handle the following update process yourself:\n\n```js\nlet opt = {\n    lang: 'en',\n    debug: true,\n    arch: 'x64',\n    token: 'hB9rV7cS3tD3bU1wA8vY3pQ5fO4qO6sP'\n}\n\nlet AUTOUPDATE = new NeutralinoAutoupdate(\"https://autoupdate.test/demo/manifest.php\", opt);\nAUTOUPDATE.checkSilent().then(updateAvailable =\u003e {\n    if(updateAvailable) {\n        //\n        // YOUR CUSTOM CODE HERE:\n        // Communicate the available update to the user\n        // and launch the update-process:\n        //\n        AUTOUPDATE.update();\n    }\n});\n```\n\nThat's it. If something goes wrong, you can track all actions in your app's dev-console, as long as the debug parameter is true.\n\n## Deployment\n\n### On Windows and Linux\n\nThe `extensions` folder needs to be placed beside your `resources..neu` folder:\n\n```\napp.exe\nresources.neu\nextensions\n```\n\n### On macOS\n\nThe `extensions` folder goes into your app bundle's `Resources` folder. This can be automated with **[Neutralino Build Scripts.](https://github.com/hschneider/neutralino-build-scripts)**\n\n## Run the Demo\n\nTo run this demo cd to its folder and enter:\n```bash\nneu update\nneu run\n```\n\n## Translate the GUI\n\nTo translate the GUI to **any language**, just submit the translated strings with the **customLang** parameter. So for e.g. a french translation the whole procedure looks like this:\n\n```js\nlet opt = {\n    arch: 'x64',\n    customLang: {\n      'txtNewVersion': 'Une nouvelle version de {appName} est disponible.',\n      'txtAskUpdate': 'Vous disposez de la version {versionCurrent}. Voulez-vous installer la version {versionUpdate}?',\n      'btnCancel': 'Pas maintenant',\n      'btnOK': 'À installer',\n      'errorChecksum': \"Ooops - Erreur de mise à jour: le téléchargement semble être interrompu.\u003cbr\u003eVous pouvez fermer cette boîte de dialogue et réessayer plus tard.\",\n      'errorUnpack': 'Ooops - Erreur de mise à jour: le téléchargement ne peut pas être décompressé.\u003cbr\u003eVous pouvez fermer cette boîte de dialogue et réessayer plus tard.'\n    }\n}\nlet AUTOUPDATE = new NeutralinoAutoupdate(\"https://autoupdate.test/demo/manifest.php\", opt);\n(async () =\u003e {\n    await AUTOUPDATE.check();\n})();\n```\n\n## NeutralinoAutoupdate Class Overview\n\n```JS\nNeutralinoAutoupdate(url, {lang: 'de', debug: false, arch='arm64'})\n```\n\nThe class itself takes the **manifest's URL** and a dictionary of options as parameters. \n\nThe **URL** can either point to **manifest.json** or the more secure PHP wrapper **manifest.php**. If you use the wrapper, you need to submit a token with the options.\n\n### Options\n\n| Key        | Description                                                  |\n| ---------- | ------------------------------------------------------------ |\n| arch       | The app's CPU architecture. By default **'x64'**             |\n| debug      | Log all actions to the dev-console. This is **true** by default. |\n| lang       | The GUI language. **'en'** for english by default. You can set it to 'de' for german. |\n| token      | The secret app token, used by **manifest.php**.              |\n| customLang | A dictionary with translated strings for your GUI custom language. For details see **'Translate the GUI'.** |\n\n### Methods\n\n| Method              | Description                                                  |\n| ------------------- | ------------------------------------------------------------ |\n| async check()       | Check the update manifest's version against the app's version. If an update exists, the update-dialog pops up. |\n| async checkSilent() | Does the same as .check() but without dialog. If an update exists, it returns true. |\n| async update()      | Starts the update process. Returns false in case of an error or quits the app if the update was successful. This is either called from the update-dialog's install-button or directly after .checkSilent(). |\n| log(msg)            | The internal log function. msg can be a string or an object. This logs msg to the app's console. |\n\n## More about Neutralino\n\n- [NeutralinoJS Home](https://neutralino.js.org) \n- [Neutralino related blog posts at marketmix.com](https://marketmix.com/de/tag/neutralinojs/)\n\n\n\n\u003cimg src=\"https://marketmix.com/git-assets/star-me-2.svg\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhschneider%2Fneutralino-autoupdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhschneider%2Fneutralino-autoupdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhschneider%2Fneutralino-autoupdate/lists"}