You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If you maintain a package registry release, ensure CI publishes prebuilt artifacts for all target Node.js versions and architectures you intend to support.
57
57
58
58
Build notes & troubleshooting
59
+
59
60
- Windows: Visual Studio Build Tools (MSVC) + Python are required to compile the native addon. Follow the Node.js native build tooling docs for setting up `node-gyp` on Windows.
60
61
- Linux: `libcups2-dev` (or the distribution equivalent) is required to build the POSIX/CUPS native sources. On Debian/Ubuntu: `sudo apt-get install libcups2-dev build-essential python3`.
61
62
- If `prebuild-install` cannot find a compatible prebuilt binary during `npm install`, the package will fall back to a source build and you will need the platform build toolchain installed.
62
63
63
-
Notes on driver option parsing (CUPS)
64
-
- The POSIX implementation retrieves driver/option information from libcups. Historically the project used deprecated PPD helper APIs; the codebase has been migrated to use non-deprecated libcups APIs and, where available, `cupsCopyDestInfo`-style calls to gather richer printer driver metadata. Builds against older libcups that lack newer APIs will fall back to a conservative mapping of the destination options (name → value).
64
+
Notes on CUPS API requirement and driver option parsing
65
+
66
+
- Minimum libcups requirement: This project requires the destination-based CUPS APIs introduced in CUPS 1.6. Practically, that means the build environment must provide the modern destination APIs (for example, `cupsCopyDestInfo`) via the development headers (`libcups2-dev` or equivalent). In short: libcups >= 1.6 is required.
67
+
68
+
- Rationale: The PPD helper family (e.g., `cupsGetPPD`, `ppdOpenFile`, `ppdMarkDefaults`, `cupsMarkOptions`, `ppdClose`) were deprecated in CUPS 1.6 in favor of destination-based APIs. Requiring the modern APIs avoids deprecated behavior, gives richer and more consistent printer metadata, and simplifies the native implementation.
69
+
70
+
- Verification commands (run on Linux/WSL to confirm headers and version):
grep -nR "cupsCopyDestInfo" /usr/include 2>/dev/null ||echo'cupsCopyDestInfo not found in /usr/include'
78
+
79
+
# Search for deprecated PPD helper symbols (optional)
80
+
grep -nR "cupsGetPPD\|ppdOpenFile\|ppdMarkDefaults\|cupsMarkOptions\|ppdClose" /usr/include 2>/dev/null ||echo'ppd helper symbols not found in /usr/include'
81
+
```
82
+
83
+
- CI note: Update your CI runners to install the CUPS development package (for example `libcups2-dev` on Debian/Ubuntu) before building and running integration tests. The repository's integration tests that exercise POSIX bindings require those headers/libraries.
84
+
85
+
- Compatibility guidance: By design, this repository requires destination-based CUPS APIs (libcups >= 1.6). If you need to support very old systems that lack these APIs, consider one of the following:
86
+
- Provide a compatibility branch or patch that implements a fallback using older PPD helpers (note: those APIs are deprecated and brittle).
87
+
- Ship prebuilt binaries for the older target environments you need to support.
88
+
- Encourage users on older systems to upgrade libcups or use a newer distribution image.
0 commit comments