{"id":13981081,"url":"https://github.com/nwutils/nwjs-shell-builder","last_synced_at":"2025-04-09T19:51:41.069Z","repository":{"id":24290459,"uuid":"27685466","full_name":"nwutils/nwjs-shell-builder","owner":"nwutils","description":"NW.js (node-webkit) shell script builder and packager scripts","archived":false,"fork":false,"pushed_at":"2023-08-13T12:12:48.000Z","size":89,"stargazers_count":82,"open_issues_count":0,"forks_count":22,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-28T21:04:55.432Z","etag":null,"topics":["builder-script","nwjs","shell"],"latest_commit_sha":null,"homepage":"","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/nwutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-12-07T21:29:47.000Z","updated_at":"2024-08-27T16:15:52.000Z","dependencies_parsed_at":"2024-01-13T10:42:45.197Z","dependency_job_id":"d68b1631-4e63-45c7-acbd-640403e58a64","html_url":"https://github.com/nwutils/nwjs-shell-builder","commit_stats":null,"previous_names":["nwutils/nwjs-shell-builder","gisto/nwjs-shell-builder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnwjs-shell-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnwjs-shell-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnwjs-shell-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnwjs-shell-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwutils","download_url":"https://codeload.github.com/nwutils/nwjs-shell-builder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103899,"owners_count":21048244,"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":["builder-script","nwjs","shell"],"created_at":"2024-08-09T04:01:59.064Z","updated_at":"2025-04-09T19:51:41.046Z","avatar_url":"https://github.com/nwutils.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e This repository is in maintainance mode. Bug fixes will be provided on a best effort basis. If you use this project, please consider contributing back.\n\n# nwjs application shell builder and packager\n\nWhat's in here:\n\n- [Builder script](#nwjs-shell-builder-script)\n\t- [How it works](#how-it-works)\n\t- [How we use it](#how-we-use-it)\n\t- [Usage](#usage)\n\t- [Options](#options)\n\t- [Examples](#examples)\n\t\t- [The bare minimum to build](#the-bare-minimum-to-build)\n\t\t- [Clean working dir](#clean-working-dir)\n\t\t- [Build for all targets](#build-for-all-targets)\n\t\t- [Build only for windows 64 and 32 bit targets](#build-only-for-windows-64-and-32-bit-targets)\n\t\t- [build only for OSX 32 bit target](#build-only-for-osx-32-bit-target)\n\t\t- [Build for all 64 bit](#build-only-for-all-64-bit)\n- [Packaging script](#nwjs-packaging-script-currently-in-beta) _(currently in **BETA**)_\n\t- [Hooks](#hooks)\n\t- [Usage](#usage-1)\n- [License](#license)\n- [Thanks](#thanks)\n\n## nwjs shell builder script\nnwjs shell script builder for nwjs (node-webkit) applications.\n\nThis script can be easily integrated into your build process.\n\n### How it works\nIt will download nwjs 32/64bit for Linux, Windows and OSX and build for all 3 platforms from given source directory\n\n### How we use it\nThis script was made to help us automate nightly builds of [Gisto](http://www.gistoapp.com)\n\nYou can see example usage in the CI script in Gisto repository: [drone.io script](https://github.com/Gisto/Gisto/blob/master/droneIO.sh)\n\n### Usage:\n\u003e If you want/have to build on Windows machine, use: [Babun](http://babun.github.io/) as your shell. Tested on Windows 8 but should work on Windows 7 too. If you're missing an package (like ZIP), just install it via Babun with `pact` - a Babun provided package manager.\n\n`$ /path/to/nwjs-build.sh --help`\n\n#### Options:\n\nOption                                 | Description\n:------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n`-h, --help`                           | Show help and usage\n`--version=PACKAGE_VERSION`            | Set package version (defaults to 1.0.0)\n`--name=NAME`                          | Set package name (if not set - default will be used)\n`--src=/PATH/TO/DIR`                   | Set path to source dir\n`--target=\"2 3\"`                       | Build for particular OS or all (default is to build for all targets) \u003cbr\u003eAvailable targets: \u003cbr\u003e- 0 - linux-ia32 \u003cbr\u003e- 1 - linux-x64 \u003cbr\u003e- 2 - win-ia32 \u003cbr\u003e- 3 - win-x64 \u003cbr\u003e- 4 - osx-ia32 \u003cbr\u003e-  5 - osx-x64\n`--nw=VERSION`                         | Set nwjs version to use (if not set - default will be used)\n`--output-dir=/PATH/TO/DIR`            | Change output directory (if not set - default will be used)\n`--win-icon=/PATH/TO/FILE`             | (For Windows target only) Path to .ico file (if not set - default will be used)\n`--osx-icon=/PATH/TO/FILE`             | (For OSX target only) Path to .icns file (if not set - default will be used)\n`--CFBundleIdentifier=com.bundle.name` | (For OSX target only) Name of the [bundle’s Identifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) (if not set - default will be used)\n`--libudev`                            | (For Linux target only) Use if you want the script to handle the lack of _libudev.so.0_ (linux targets) as mentioned [here](https://github.com/nwjs/nw.js/wiki/The-solution-of-lacking-libudev.so.0)\n`--build`                              | Start the build process (**IMPORTANT!** Must be the last parameter of the command)\n`--clean`                              | Clean and remove TMP directory\n\n#### Examples\n========================\n\n##### The bare minimum to build:\n\n```\n$ ./path/to/nwjs-build.sh \\\n    --src=/home/projects/PACKAGE_NAME/src \\\n    --build\n```\n\n##### Clean working dir:\n\n```\n$ ./path/to/nwjs-build.sh \\\n    --clean\n```\n\n##### Build for all targets:\n\n```\n$ ./path/to/nwjs-build.sh \\\n    --src=/home/projects/PACKAGE_NAME/src \\\n    --output-dir=/path/to/output/the/builds \\\n    --name=PACKAGE_NAME \\\n    --win-icon=/home/projects/resorses/icon.ico \\\n    --osx-icon=/home/projects/resorses/icon.icns \\\n    --CFBundleIdentifier=com.bundle.name \\\n    --target=\"0 1 2 3 4 5\" \\\n    --version=\"1.0.0\" \\\n    --libudev \\\n    --nw=0.11.6 \\\n    --build\n```\n\n##### Build only for windows 64 and 32 bit targets:\n\n```\n$ ./path/to/nwjs-build.sh \\\n    --src=/home/projects/PACKAGE_NAME/src \\\n    --output-dir=/path/to/output/the/builds \\\n    --name=PACKAGE_NAME \\\n    --win-icon=/home/projects/resorses/icon.ico \\\n    --target=\"2 3\" \\\n    --version=\"1.0.0\" \\\n    --build\n```\n\n##### Build only for osx 32 bit target:\n\n```\n$ ./path/to/nwjs-build.sh \\\n    --src=/home/projects/PACKAGE_NAME/src \\\n    --output-dir=/path/to/output/the/builds \\\n    --name=PACKAGE_NAME \\\n    --osx-icon=/home/projects/resorses/icon.icns \\\n    --CFBundleIdentifier=com.bundle.name \\\n    --target=\"4\" \\\n    --version=\"1.0.0\" \\\n    --build\n```\n\n##### Build for all 64 bit:\n\n```\n$ ./path/to/nwjs-build.sh \\\n    --src=/home/projects/PACKAGE_NAME/src \\\n    --output-dir=/path/to/output/the/builds \\\n    --name=PACKAGE_NAME \\\n    --osx-icon=/home/projects/resorses/icon.icns \\\n    --win-icon=/home/projects/resorses/icon.ico \\\n    --CFBundleIdentifier=com.bundle.name \\\n    --target=\"1 3 5 \" \\\n    --version=\"1.0.0\" \\\n    --libudev \\\n    --build\n```\n\n## NWJS packaging script _(currently in **BETA**)_\n\n\u003e :exclamation: Please note that this is currently in BETA and it is not affecting the `build` script. You may off course use it but beta warning applies with all consequenses, so don't expect it to work out-of-the-box.\n\n- install if not present zip, unzip, tar, git, NSIS, libxml2\n- rename `config.json.sample` to `config.json` and adjust correct paths or generate with `./pack.sh init` or specify location of the `config.json` by adding `--config=/path/to/config.json`\n\n### Usage:\n\n`./pack.sh init` - generate `config.json` with interactive CMD\n\n`./pack.sh --windows` - to build Windows installers\n\n`./pack.sh --linux` - to build Linux installers\n\n`./pack.sh --osx` - to build OSX installers\n\n`./pack.sh --all` - to build installers for all systems\n\n`./pack.sh --all --config=/path/to/config.json` - to build installers for all systems but using `config.json` located in any other path than in root directory\n \n`./pack.sh --clean` - removes the `./TMP` working directory\n\n`./pack.sh --clean all` - removes the `./TMP` working directory and `releases` directory (with all the content) \n\n### Hooks:\n\nPlace hooks in `./hooks/` directory\n\n- file name `before.sh` will be executed before each build start\n- file name `after.sh` will be executed after packaging script is finished\n- file name `after_build.sh` will be executed after each platform build is finished\n\n#### License\n[MIT](https://github.com/Gisto/nwjs-shell-builder/blob/master/LICENSE)\n\n# Thanks\nHuge thanks to @SchizoDuckie for assisting with OSX build\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnwjs-shell-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwutils%2Fnwjs-shell-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnwjs-shell-builder/lists"}