Registry / devops / innosetup

innosetup

JSON →
library0.6.9jsnpmunverified

The `innosetup-compiler` package provides a Node.js wrapper for the Inno Setup Compiler (`ISCC.exe`), enabling programmatic or command-line compilation of `.iss` scripts. Currently at version 6.4.1, it primarily facilitates integrating Inno Setup compilation into Node.js-based build workflows, including CLI and Grunt tasks. Its key differentiator is cross-platform compatibility, allowing compilation on Linux and macOS environments provided Wine is installed, translating calls to the Windows-native `ISCC.exe`. This package acts as an orchestrator, executing the official Inno Setup compiler, rather than reimplementing the compiler itself, ensuring compatibility with the latest Inno Setup features. While not on a strict release cadence, it is actively maintained to support current Node.js and Inno Setup versions.

npm install innosetup
INSTALL
IMPORT
SIG · INNOSETUP
I
innosetup
devopsjavascriptv0.6.9
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

compileInnoSetup
const compileInnoSetup = require('innosetup-compiler');
import compileInnoSetup from 'innosetup-compiler';
The package exports a function directly, primarily used with CommonJS `require()`. Direct ESM imports (e.g., `import`) will not work without a transpilation layer or explicit module resolution configuration. The common pattern is `require('innosetup-compiler')('path/to/script.iss', options, callback);`
CLI
innosetup-compiler myscript.iss --gui
Install globally via `npm install -g innosetup-compiler` to use the CLI directly. All Inno Setup compiler options can be passed via command line flags (e.g., `--O=output.exe`).
GruntTask
grunt.loadNpmTasks('innosetup-compiler');
import { innosetup_compiler } from 'innosetup-compiler';
When used with Grunt, the package registers a task named `innosetup_compiler`. It is consumed by calling `loadNpmTasks`, not via direct import statements.

This quickstart demonstrates how to compile an Inno Setup script (`my-installer.iss`) using the Node.js API, including options for verbose output, specifying an output directory, and configuring code signing with a placeholder command. It includes error handling for the compilation process.

const compileInno = require('innosetup-compiler'); const path = require('path'); const scriptPath = path.join(__dirname, 'my-installer.iss'); // Example .iss content for my-installer.iss (save this file next to your script) // [Setup] // AppName=My Awesome App // AppVersion=1.0 // DefaultDirName={autopf}\My Awesome App // FileName=MyAppSetup.exe // OutputBaseFilename=MyAppInstaller // compression=lzma2 // SolidCompression=yes // PrivilegesRequired=admin // SourceDir=.\ // [Files] // Source: "MyApp.exe"; DestDir: "{app}" compileInno(scriptPath, { gui: false, verbose: true, O: path.join(__dirname, 'output'), // Specifies output directory signtoolname: 'signtool', signtoolcommand: '"C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.19041.0\\x64\\signtool.exe" sign /f "C:\\absolute\\path\\to\\mycertificate.pfx" /t http://timestamp.digicert.com /p "MY_PASSWORD" $f' }, function(error) { if (error) { console.error('Inno Setup compilation failed:', error); process.exit(1); } else { console.log('Inno Setup compilation successful!'); console.log(`Installer saved to: ${path.join(__dirname, 'output', 'MyAppInstaller.exe')}`); } });
Debug
Known issues
gotchaRunning `innosetup-compiler` on non-Windows operating systems (Linux, macOS) requires a working installation of Wine to execute the Windows-native `ISCC.exe` compiler.
fix
Ensure Wine is properly installed and configured on your system. For macOS users, `brew install wine --devel` is often recommended to get the latest development version.
affects: >=0.8.0
gotchaWhen the `gui` option is set to `true`, `innosetup-compiler` will launch `Compil32.exe` (the Inno Setup GUI compiler), and all other programmatic options passed to the function will be ignored. The user must manually interact with the GUI.
fix
Set `gui: false` for automated, headless compilation where all options are controlled programmatically. Only use `gui: true` if manual intervention and visual feedback from the Inno Setup compiler GUI are explicitly desired.
affects: >=0.8.0
gotchaWhen defining `signtoolcommand` or other paths in JavaScript strings, especially for Windows paths, backslashes must be escaped with an additional backslash (e.g., `C:\\path\\to\\file.pfx`).
fix
Double escape backslashes in JavaScript string literals: `"C:\\absolute\\path\\to\\mycertificate.pfx"`. Alternatively, use forward slashes if the underlying tool supports them or leverage Node.js `path` module for cross-platform path construction, though `signtoolcommand` typically expects Windows-style paths.
affects: >=0.8.0
deprecatedThe package's `engines.node` specifies `>=0.8.0`. While it may still function on modern Node.js versions, this outdated engine declaration might indicate a lack of testing or specific optimizations for newer Node.js features (e.g., native ESM).
fix
None required for functionality, but be aware that behavior with very recent Node.js features might be untested. Consider contributing to update the `engines` field if compatibility is verified for newer Node.js LTS versions.
affects: >=0.8.0
Errors
Common errors & fixes
err:macdrv:process_attach Failed to start Cocoa app main loop
An outdated or unstable version of Wine on macOS is attempting to run the Inno Setup compiler, leading to an application launch failure.
fix
Update Wine to the latest development version using Homebrew: `brew update && brew install wine --devel`.
Error: Command failed: C:\Program Files (x86)\Inno Setup 6\ISCC.exe "path\to\my\script.iss" [...] /O="output\directory" [...] Error on line X: Unknown parameter 'O'.
Inno Setup compiler options are being passed incorrectly, specifically with a leading slash `/O=` instead of without for this wrapper's API.
fix
Ensure all Inno Setup compiler options passed via the Node.js API or CLI are provided without the leading slash (e.g., `{ O: 'output/directory' }` for Node.js, or `--O=output/directory` for CLI) as the wrapper adds it automatically. Review the official Inno Setup Command Line Compiler Execution documentation for valid parameters.
Upgrade
Version history
0.6.9latest on npm
Audit
Dependencies
winerequiredRequired for running the Inno Setup compiler (ISCC.exe) on Linux and macOS platforms.
Agent activity
4 hits · last 30 days
node
4
Resources
innosetup — npm install innosetup · libregistry