{"id":24926197,"url":"https://github.com/idleberg/node-makensis","last_synced_at":"2025-04-13T05:32:37.909Z","repository":{"id":37270433,"uuid":"100063948","full_name":"idleberg/node-makensis","owner":"idleberg","description":"A Node wrapper for makensis, the NSIS compiler","archived":false,"fork":false,"pushed_at":"2025-01-01T11:45:11.000Z","size":2683,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T22:11:43.276Z","etag":null,"topics":["javascript","makensis","nodejs","nsis"],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/makensis","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/idleberg.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}},"created_at":"2017-08-11T19:25:06.000Z","updated_at":"2025-02-23T04:02:47.000Z","dependencies_parsed_at":"2024-03-28T00:28:30.123Z","dependency_job_id":"d854179e-ccbb-4d41-b942-fb165fab5622","html_url":"https://github.com/idleberg/node-makensis","commit_stats":{"total_commits":910,"total_committers":6,"mean_commits":"151.66666666666666","dds":"0.46923076923076923","last_synced_commit":"2f7f8fc5c8f39abfe47ad1f4ce0349bbb56f635f"},"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fnode-makensis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fnode-makensis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fnode-makensis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fnode-makensis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idleberg","download_url":"https://codeload.github.com/idleberg/node-makensis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670467,"owners_count":21142896,"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":["javascript","makensis","nodejs","nsis"],"created_at":"2025-02-02T12:26:16.482Z","updated_at":"2025-04-13T05:32:37.889Z","avatar_url":"https://github.com/idleberg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# makensis\n\n[![License](https://img.shields.io/github/license/idleberg/node-makensis?style=for-the-badge)](LICENSE)\n[![Version](https://img.shields.io/github/v/release/idleberg/node-makensis?style=for-the-badge)](https://github.com/idleberg/node-makensis/releases)\n![NodeJS version](https://img.shields.io/node/v/makensis?style=for-the-badge)\n[![CI](https://img.shields.io/github/actions/workflow/status/idleberg/node-makensis/default.yml?style=for-the-badge)](https://github.com/idleberg/node-makensis/actions)\n\nA Node wrapper for `makensis`, the compiler for NSIS installers. Supports both, native and [Wine][wine].\n\n## Prerequisites\n\nMake sure that NSIS is properly installed. If `makensis` isn't exposed to your PATH [environment variable][envvars], you need to set [`pathToMakensis`](#pathtomakensis).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWindows\u003c/strong\u003e\u003c/summary\u003e\n\nInstall NSIS using the [Windows Package Manager][winget] or [Scoop][scoop]:\n\n```powershell\n# Windows Package Manager\n$ winget install NSIS.NSIS\n\n# Scoop\n$ scoop install nsis/nsis\n```\n\nAlternatively, you can download the NSIS installer from [SourceForge][sourceforge].\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eLinux\u003c/strong\u003e\u003c/summary\u003e\n\nInstall NSIS from your distribution's default package manager, for example:\n\n```sh\n# Debian\n$ sudo apt-get install nsis\n\n# Red Hat\n$ sudo dnf install nsis\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003emacOS\u003c/strong\u003e\u003c/summary\u003e\n\nInstall NSIS using [Homebrew][homebrew] or [MacPorts][macports]:\n\n```sh\n# Homebrew\n$ brew install nsis\n\n# MacPorts\n$ port install nsis\n```\n\n\u003c/details\u003e\n\n## Installation\n\n`npm install makensis`\n\n## Usage\n\nExample usage in script:\n\n```js\nimport * as NSIS from 'makensis';\n\nconst options = {\n\tverbose: 2,\n\tdefine: {\n\t\tSPECIAL_BUILD: true\n\t}\n};\n\ntry {\n\tlet output = await NSIS.compile('path/to/installer.nsi', options);\n\tconsole.log('Compiler output:', output);\n} catch (error) {\n\tconsole.error(error);\n}\n```\n\n### API\n\n#### commandHelp\n\nUsage: `commandHelp(command?, options?, spawnOptions?)`\n\nReturns usage information for a specific command, or a list of all commands. Equivalent of the `-CMDHELP` switch.\n\n#### compile\n\nUsage: `compile(script, options?, spawnOptions?)`\n\nCompiles specified script with MakeNSIS. The script can be omitted in favor of the [`preExecute`](#preExecute) / [`postExecute`](#postExecute) options.\n\n#### headerInfo\n\nUsage: `headerInfo(options?, spawnOptions?)`\n\nReturns information about which options were used to compile MakeNSIS. Equivalent of the `-HDRINFO` switch.\n\n#### license\n\nUsage: `license(options?, spawnOptions?)`\n\nReturns MakeNSIS software license. Equivalent of the `-LICENSE` switch.\n\n#### nsisDir\n\nUsage: `nsisDir(options?, spawnOptions?)`\n\nReturns the path of `${NSISDIR}`.\n\n#### version\n\nUsage: `version(options?, spawnOptions?)`\n\nReturns version of MakeNSIS. Equivalent of the `-VERSION` switch.\n\n### Options\n\n:warning: Some of these options are limited to NSIS v3 (see the [changelog][changelog] for details)\n\n#### define\n\nType: `Object`\n\nDefines symbols for the script [to value]. Equivalent of the `-D` switch.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample\u003c/strong\u003e\u003c/summary\u003e\n\n```js\ndefine: {\n\tSPECIAL_BUILD: true,\n\tLANGUAGE: \"English\"\n}\n```\n\n\u003c/details\u003e\n\n#### env\n\nType: `boolean | string`\n\nEnables support for special environment variables, that will be passed on to the script as definitions. Can be a path containing `.env` files or a specific file.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample\u003c/strong\u003e\u003c/summary\u003e\n\n```env\n# .env\nNSIS_APP_ENVIRONMENT=development\n```\n\n```nsis\n# installer.nsi\n!if ${NSIS_APP_ENVIRONMENT} == \"development\"\n\tDetailPrint \"Valuable Debug Information\"\n!endif\n```\n\n\u003c/details\u003e\n\n#### events\n\nType: `boolean`\n\nAllows dispatching the log events `stdout`, `stderr` and `exit`.\n\n#### inputCharset\n\nType: `string`\n\nSpecifies the codepage for files without a BOM (`ACP|OEM|CP#|UTF8|UTF16\u003cLE|BE\u003e`). Equivalent of the `-INPUTCHARSET` switch.\n\n#### outputCharset\n\nType: `string`\n\nSpecifies the codepage used by stdout when the output is redirected (`ACP|OEM|CP#|UTF8[SIG]|UTF16\u003cLE|BE\u003e[BOM]`). Equivalent of the `-OUTPUTCHARSET` switch.\n\n:warning: This option is only available on Windows\n\n#### json\n\nType: `boolean`\n\nReturns output from `makensis` as an object\n\n#### noCD\n\nType: `boolean`\n\nDisables the current directory change to that of the .nsi file. Equivalent of the `-NOCD` switch.\n\n#### noConfig\n\nType: `boolean`\n\nDisables inclusion of `\u003cpath to makensis.exe\u003e/nsisconf.nsh`. Equivalent of the `-NOCONFIG` switch.\n\n#### pathToMakensis\n\nType: `string`\n\nSpecifies a custom path to `makensis`\n\n#### pause\n\nType: `boolean`\n\nPauses after execution. Equivalent of the `-PAUSE` switch.\n\n#### priority\n\nType: `integer`\n\nSets the compiler process priority, where the value `5=realtime`, `4=high`, `3=above normal`, `2=normal`, `1=below normal`, `0=idle`. Equivalent of the `-P` switch.\n\n:warning: This option is only available on Windows\n\n#### strict\n\nType: `boolean`\n\nTreat warnings as errors. Equivalent of the `-WX` switch.\n\n#### ppo / safePPO\n\nType: `boolean`\n\nWill only run the preprocessor and print the result to stdout. The safe version will not execute instructions like [`!appendfile`][!appendfile] or [`!system`][!system]. [`!packhdr`][!packhdr] and [`!finalize`][!finalize] are never executed. Equivalent of the `-PPO / SAFEPPO` switches.\n\n#### preExecute\n\nType: `string | string[]`\n\nPrepends script-commands to the script, can be passed as array or multiline-string. Equivalent of the `-X` switch when used _before_ passing a script.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample\u003c/strong\u003e\u003c/summary\u003e\n\n```js\npreExecute: [\n\t'SetCompressor lzma',\n\t'SetCompressorDictSize 16'\n];\n```\n\n\u003c/details\u003e\n\n#### postExecute\n\nType: `string | string[]`\n\nAppends commands to the script, can be passed as array or multiline-script. Equivalent of the `-X` switch when used _after_ passing a script.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample\u003c/strong\u003e\u003c/summary\u003e\n\n```js\npostExecute: [`!echo \"That's all Folks!\"`];\n```\n\n\u003c/details\u003e\n\n#### rawArguments\n\nType: `string[]`\n\nSpecifies raw arguments for `makensis`.\n\n:warning: These will be added to the compiler arguments last and will hence overwrite any of the NSIS options above!\n\n#### verbose\n\nType: `integer`\n\nVerbosity where the value `4=all`, `3=no script`,`2=no info`, `1=no warnings`, `0=none`. Equivalent of the `-V` switch.\n\n#### Wine Options\n\nEnvironmental variables allow for Wine to be configured by the user. These can be specified using the `spawnOptions.env` property. See the [documentation][wine-env] for details.\n\nOn top of that, the following options for Wine are available.\n\n##### wine\n\nType: `boolean`\n\nRuns `makensis` on [Wine][wine]\n\n##### pathToWine\n\nType: `string`\n\nSpecifies a custom path to `wine`, useful when working with `wine32` or [`wine32on64`][wine32on64].\n\n### Events\n\nThis module emits three types of events you can hook into using the `on()` and `once()` methods:\n\n#### stdout\n\nGives access to an object containing the current line, and whether it contains a warning of the path of the outfile.\n\n#### stderr\n\nGives access to an object containing the current line.\n\n#### exit\n\nGives access to an object containing the exit code, the full `stdout` and `stderr`, and the number of warnings.\n\n## Related\n\n- [atom-language-nsis][atom-language-nsis] - NSIS package for Atom\n- [vscode-nsis][vscode-nsis] - NSIS package for Visual Studio Code\n\n## License\n\nThis work is licensed under [The MIT License][the mit license].\n\n[wine]: http://winehq.org/\n[envvars]: http://superuser.com/a/284351/195953\n[sourceforge]: https://sourceforge.net/p/nsis\n[winget]: https://github.com/microsoft/winget-cli\n[scoop]: https://github.com/NSIS-Dev/scoop-nsis\n[homebrew]: http://brew.sh/\n[macports]: https://www.macports.org/\n[changelog]: http://nsis.sourceforge.net/Docs\n[!appendfile]: https://github.com/NSIS-Dev/Documentation/blob/master/Reference/!appendfile.md\n[!finalize]: https://github.com/NSIS-Dev/Documentation/blob/master/Reference/!finalize.md\n[!system]: https://github.com/NSIS-Dev/Documentation/blob/master/Reference/!system.md\n[!packhdr]: https://github.com/NSIS-Dev/Documentation/blob/master/Reference/!packhdr.md\n[!finalize]: https://github.com/NSIS-Dev/Documentation/blob/master/Reference/!finalize.md\n[wine32on64]: https://github.com/Gcenx/homebrew-wine\n[wine-env]: https://wiki.winehq.org/Wine_User%27s_Guide#Environment_variables\n[atom-language-nsis]: https://atom.io/packages/language-nsis\n[vscode-nsis]: https://marketplace.visualstudio.com/items?itemName=idleberg.nsis\n[the mit license]: https://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidleberg%2Fnode-makensis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidleberg%2Fnode-makensis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidleberg%2Fnode-makensis/lists"}