{"id":13712602,"url":"https://github.com/hschneider/neutralino-build-scripts","last_synced_at":"2025-06-18T15:38:42.742Z","repository":{"id":209364975,"uuid":"723804693","full_name":"hschneider/neutralino-build-scripts","owner":"hschneider","description":"Neutralino Build-Automation for macOS, Windows and Linux. Creates macOS AppBundles which can be signed and notarized. Icons can be applied to Windows builds with just 1 double-click. Adds icon resources to Linux builds as well.","archived":false,"fork":false,"pushed_at":"2024-03-10T11:25:42.000Z","size":50900,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-03T23:24:32.052Z","etag":null,"topics":["build-automation","build-tool","cross-platform","crossplatform","neutralino","neutralinojs"],"latest_commit_sha":null,"homepage":"https://marketmix.com","language":"Shell","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}},"created_at":"2023-11-26T20:06:05.000Z","updated_at":"2024-07-17T07:18:14.000Z","dependencies_parsed_at":"2023-11-27T00:22:26.475Z","dependency_job_id":"111d530f-777d-4308-b0ec-b2616da7027e","html_url":"https://github.com/hschneider/neutralino-build-scripts","commit_stats":null,"previous_names":["hschneider/neutralino-build-scripts"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-build-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-build-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-build-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hschneider%2Fneutralino-build-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hschneider","download_url":"https://codeload.github.com/hschneider/neutralino-build-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223424982,"owners_count":17142862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["build-automation","build-tool","cross-platform","crossplatform","neutralino","neutralinojs"],"created_at":"2024-08-02T23:01:20.233Z","updated_at":"2024-11-06T22:19:18.885Z","avatar_url":"https://github.com/hschneider.png","language":"Shell","funding_links":[],"categories":["Tools"],"sub_categories":["For Neutralino"],"readme":"![](https://marketmix.com/git-assets/neutralino-build-scripts/neutralino-macos-appbundles.jpg)\n\n# neutralino-build-scripts\n\n**Neutralino Build-Automation for macOS, Linux and Windows App-Bundles**.\n\nThis set of scripts replace the `neu build` command for macOS-, Linux and Windows-builds. Instead of plain binaries, it outputs ready-to-use app-bundles.\n\n\u003e The macOS build-script solves the problem, that Neutralino only produces plain macOS binaries and not macOS AppBundles. These files cannot be signed and notarized.\n\u003e **build-mac.sh** generates valid AppBundles which pass Apple's notarization process successfully :-\n\n## Setup\n\nCopy all, **except neutralino.config.json** (which is just an example) to your project's root folder. The scripts are tested under macOS and should also run on Linux or Windows/WSL.\n\nInstall **jq**, which is required for parsing JSON files:\n\n```bash\n# On macOS:\nbrew install jq\n# On Linux or Windows/WSL:\nsudo apt-get install jq\n```\n\nIf your are a Mac-user and never heard of Homebrew, visit https://brew.sh\n\nAdd this to your neutralino.config.json:\n\n```json\n  \"buildScript\": {\n    \"mac\": {\n      \"architecture\": [\"x64\", \"arm64\", \"universal\"],\n      \"minimumOS\": \"10.13.0\",\n      \"appName\": \"ExtBunDemo\",\n      \"appBundleName\": \"ExtBunDemo\",\n      \"appIdentifier\": \"com.marketmix.ext.bun.demo\",\n      \"appIcon\":  \"icon.icns\"\n    },\n    \"win\": {\n      \"architecture\": [\"x64\"],\n      \"appName\": \"ExtBunDemo\",\n      \"appIcon\": \"icon.ico\"\n    },\n    \"linux\": {\n      \"architecture\": [\"x64\", \"arm64\", \"armhf\"],\n      \"appName\": \"ExtBunDemo\",\n      \"appIcon\": \"icon.png\",\n      \"appPath\":  \"/usr/share/ExtBunDemo\",\n      \"appIconLocation\": \"/usr/share/ExtBunDemo/icon.png\"\n    }\n  }\n```\n\nIf you are unsure where to add, examine **the example neutralino.config.json**, included in this repo.\n\n## Build for macOS\n\n```bash\n./build-mac.sh\n```\n\nThis starts the following procedure:\n\n- Erase the target folder ./dist/APPNAME  \n- Run `neu build`\n- Execute `preproc-mac.sh`\n- Clone the app-bundle scaffold from `_app_scaffolds/mac` and adapt it to your app.\n- Copy all resources and extensions to the app-bundle.\n- Execute `postproc-mac.sh`\n\nAll build targets are created in the ./dist folder.\n\nBecause the macOS-platform consists of 3 binary architectures, you might want to add different resources after the app has been built. That's what `postproc-mac.sh` is for. Just add your custom code there and you are good to go.\n\nIf you need to prepare platform-specific resource before bundling starts, you can add your custom code to `preproc-mac.sh`.\n\nKeep in mind that alle additional resources have to be copied to `${APP_RESOURCES}/`, which resolves to `MyApp.app/Contents/Resources`. If you place them elsewhere, your signature or notarization might break.\n\nThe `buildScript/mac` JSON segment in the config-file contains the following fields:\n\n| Key           | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| architecture  | This is an array of the architectures, you want to build. In our example we build all 3 architectures. |\n| minimumOS     | The minimum macOS version.                                   |\n| appName       | The app-name as displayed in the Finder.                     |\n| appBundleName | The macOS app-bundle name.                                   |\n| appIdentifier | The macOS app-identifier.                                    |\n| appIcon       | Path to the app-icon in **.icns-format**. If only the filename is submitted, the file is expected in the project's root. |\n\nIf you want to streamline your deployment process under macOS, you might also be interested in **[Sign and Notarize Automation](https://github.com/hschneider/macos-sign-notarize)** from commandline.\n\n## Build for Windows\n\n```bash\n./build-win.sh\n```\n\nThis starts the following procedure:\n\n- Erase the target folder ./dist/APPNAME  \n- Run `neu build`\n- Execute `preproc-win.sh`\n- Copy all resources and extensions to the app-bundle.\n- Execute `postproc-win.sh`\n- Create the `install-icon.cmd` helper script from its template in `_app_scaffolds/win/`, if an app icon file exists.\n\nThe build is created in the ./dist folder.\n\nIn contrast to macOS, the whole process is straight-forward. The app-bundle is just a plain folder with the binary, resources.neu, the extensions-folder and WebView2Loader.dll.  The DLL can be deleted, if you deploy on WIndows 11 or newer.\n\nIf you need to prepare platform-specific resource before bundling starts, you can add your custom code to `preproc-win.sh`.\n\nYou can also put custom code into `postproc-win.sh` to perform any action after the bundle has been built.\n\nThe `buildScript/win` JSON segment in the config-file contains the following fields:\n\n| Key          | Description                                                  |\n| ------------ | ------------------------------------------------------------ |\n| architecture | This is an array of the architectures, you want to build. Because Neutralino currently only support 'x64', you should leave this untouched. |\n| appName      | The app-name as displayed in the File Explorer, with or without .exe-suffix. |\n| appIcon      | Path to the app-icon in **.ico-format**. If only the filename is submitted, the file is expected in the project's root. The icon is copied from this path into the app-bundle. To apply the icon to the executable file, you'll have to run **[Resource Hacker](https://www.angusj.com/resourcehacker/)** from a Windows machine. To do so, just double-click **install-icon.cmd** in the app-bundle. |\n\nThe icon installer in action:\n\n![](https://marketmix.com//git-assets/neutralino-build-scripts/neutralino-icon-installer.gif)\n\n## Build for Linux\n\n```bash\n./build-linux.sh\n```\n\nThis starts the following procedure:\n\n- Erase the target folder ./dist/APPNAME  \n- Run `neu build`\n- Execute `preproc-linux.sh`\n- Copy all resources and extensions to the app-bundle.\n- Clones  the  .desktop-file from `_app_scaffolds/linux` to the app-bundle and adapts its content.\n- Execute `postproc-linux.sh`\n\nAll build targets are created in the ./dist folder.\n\nBecause the Linux-platform consists of 3 binary architectures, you might want to add different resources after the app has been built. That's what `postproc-linux.sh` is for. Just add your custom code there and you are good to go.\n\nIf you need to prepare platform-specific resource before bundling starts, you can add your custom code to `preproc-linux.sh`.\n\n\u003e The **APP_NAME.desktop**-file and the **app icon** have to be copied to their proper places, when you deploy your app. \n\nThe following paths are proposed:\n\n| Resource           | Path                                     |\n| ------------------ | ---------------------------------------- |\n| Application Folder | /usr/share/APP_NAME                      |\n| Application Icon   | /usr/share/APP_NAME/icon.png             |\n| Desktop File       | /usr/share/applications/APP_NAME.desktop |\n\nThe `buildScript/win` JSON segment in the config-file contains the following fields:\n\n| Key          | Description                                                  |\n| ------------ | ------------------------------------------------------------ |\n| architecture | This is an array of the architectures, you want to build. In our example we build all 3 architectures. |\n| appName      | The app-name as displayed in the File Explorer.              |\n| appPath      | The application path without the executable name and without ending slash. |\n| appIcon      | Path to the app-icon in .**png- or svg-format**. If only the filename is submitted, the file is expected in the project's root. The icon is copied from this path into the app-bundle. |\n| appIconPath  | This is the icon's path **after** the has been installed on a Linux system. That path is written to the .desktop-file. |\n\nCalling `sudo ./install.sh` from your build folder automatically installs the app to the locations you defined.\n\n## More about Neutralino\n\n- [NeutralinoJS Home](https://neutralino.js.org) \n\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhschneider%2Fneutralino-build-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhschneider%2Fneutralino-build-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhschneider%2Fneutralino-build-scripts/lists"}