nw-builder 4.13.13 → 4.13.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/package.json +13 -13
- package/src/bld.js +6 -3
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/util.js +1 -1
package/README.md
CHANGED
|
@@ -9,9 +9,8 @@ Build [NW.js](https://github.com/nwjs/nw.js) applications for Mac, Windows and L
|
|
|
9
9
|
|
|
10
10
|
- Get, run or build applications.
|
|
11
11
|
- Integrate [FFmpeg community builds](https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt)
|
|
12
|
-
- Configure executable fields and
|
|
12
|
+
- Configure executable fields, icons and rename Helper apps
|
|
13
13
|
- Downloading from mirrors
|
|
14
|
-
- Node Native Addon support (partial)
|
|
15
14
|
|
|
16
15
|
## Table of Contents
|
|
17
16
|
|
|
@@ -31,7 +30,7 @@ Build [NW.js](https://github.com/nwjs/nw.js) applications for Mac, Windows and L
|
|
|
31
30
|
npm i -D nw-builder
|
|
32
31
|
```
|
|
33
32
|
|
|
34
|
-
Every NW.js release includes a modified Node.js binary at a specific version. It is recommended to [install](https://nodejs.org/en/download/package-manager) exactly that version on the host system. Not doing so may download ABI incompatible Node modules. Consult the NW.js [versions manifest](https://nwjs.io/versions) for what Node.js version to install. It is recommended to use a Node version manager (such as [volta](https://volta.sh), n, nvm, or nvm-windows) to be able to easily install and switch between Node versions.
|
|
33
|
+
Every NW.js release includes a modified Node.js binary at a specific version. It is recommended to [install](https://nodejs.org/en/download/package-manager) exactly that version on the host system. Not doing so may download ABI incompatible Node modules. Consult the NW.js [versions manifest](https://nwjs.io/versions.json) for what Node.js version to install. It is recommended to use a Node version manager (such as [volta](https://volta.sh), n, nvm, or nvm-windows) to be able to easily install and switch between Node versions.
|
|
35
34
|
|
|
36
35
|
## Usage
|
|
37
36
|
|
|
@@ -185,7 +184,9 @@ nwbuild({
|
|
|
185
184
|
|
|
186
185
|
#### Rebuild Node addons
|
|
187
186
|
|
|
188
|
-
Currently this feature is
|
|
187
|
+
> Currently this feature is disabled and it may be removed in the future.
|
|
188
|
+
|
|
189
|
+
It only builds node addons which have a `binding.gyp` file in the `srcDir`. There are plans to support nan, cmake, ffi and gn and auto rebuild native addons which are installed as node modules.
|
|
189
190
|
|
|
190
191
|
```javascript
|
|
191
192
|
nwbuild({
|
|
@@ -214,7 +215,7 @@ Options
|
|
|
214
215
|
| platform | `"linux" \| "osx" \| "win"` | | Host platform |
|
|
215
216
|
| arch | `"ia32" \| "x64" \| "arm64"` | | Host architecture |
|
|
216
217
|
| downloadUrl | `"https://dl.nwjs.io" \| "https://npm.taobao.org/mirrors/nwjs" \| https://npmmirror.com/mirrors/nwjs \| "https://github.com/corwin-of-amber/nw.js/releases/"` | `"https://dl.nwjs.io"` | Download server. Supports file systems too (for example `file:///home/localghost/nwjs_mirror`) |
|
|
217
|
-
| manifestUrl | `"https://nwjs.io/versions" \| "https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json"` | `"https://nwjs.io/versions"` | Versions manifest |
|
|
218
|
+
| manifestUrl | `"https://nwjs.io/versions.json" \| "https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json"` | `"https://nwjs.io/versions.json"` | Versions manifest |
|
|
218
219
|
| cacheDir | `string` | `"./cache"` | Directory to cache NW binaries |
|
|
219
220
|
| cache | `boolean` | `true`| If true the existing cache is used. Otherwise it removes and redownloads it. |
|
|
220
221
|
| ffmpeg | `boolean` | `false`| If true the chromium ffmpeg is replaced by community version with proprietary codecs. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nw-builder",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.15",
|
|
4
4
|
"description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NW.js",
|
|
@@ -55,30 +55,30 @@
|
|
|
55
55
|
"demo:cli": "nwbuild --mode=get --flavor=sdk --glob=false --cacheDir=./node_modules/nw --logLevel=debug './tests/fixtures/app'"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@eslint/js": "^9.
|
|
59
|
-
"@vitest/coverage-v8": "^3.
|
|
58
|
+
"@eslint/js": "^9.30.1",
|
|
59
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
60
60
|
"base-volta-off-of-nwjs": "^1.0.5",
|
|
61
|
-
"eslint": "^9.
|
|
62
|
-
"eslint-plugin-jsdoc": "^
|
|
63
|
-
"globals": "^16.
|
|
64
|
-
"nw": "^0.
|
|
65
|
-
"selenium-webdriver": "^4.
|
|
61
|
+
"eslint": "^9.30.1",
|
|
62
|
+
"eslint-plugin-jsdoc": "^51.3.4",
|
|
63
|
+
"globals": "^16.3.0",
|
|
64
|
+
"nw": "^0.101.2",
|
|
65
|
+
"selenium-webdriver": "^4.34.0",
|
|
66
66
|
"vitest": "^3.0.7"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"archiver": "^7.0.1",
|
|
70
|
-
"axios": "^1.
|
|
71
|
-
"commander": "^
|
|
72
|
-
"glob": "^11.0.
|
|
70
|
+
"axios": "^1.10.0",
|
|
71
|
+
"commander": "^14.0.0",
|
|
72
|
+
"glob": "^11.0.3",
|
|
73
73
|
"node-gyp": "^11.2.0",
|
|
74
74
|
"plist": "^3.1.0",
|
|
75
75
|
"resedit": "^2.0.3",
|
|
76
|
-
"semver": "^7.7.
|
|
76
|
+
"semver": "^7.7.2",
|
|
77
77
|
"tar": "^7.4.3",
|
|
78
78
|
"yauzl-promise": "^4.0.0"
|
|
79
79
|
},
|
|
80
80
|
"volta": {
|
|
81
|
-
"node": "
|
|
81
|
+
"node": "24.3.0",
|
|
82
82
|
"npm": "11.2.0"
|
|
83
83
|
}
|
|
84
84
|
}
|
package/src/bld.js
CHANGED
|
@@ -89,7 +89,7 @@ import setOsxConfig from './bld/osx.js';
|
|
|
89
89
|
* @property {"normal" | "sdk"} [flavor = "normal"] Build flavor
|
|
90
90
|
* @property {"linux" | "osx" | "win"} [platform] Target platform
|
|
91
91
|
* @property {"ia32" | "x64" | "arm64"} [arch] Target arch
|
|
92
|
-
* @property {string} [manifestUrl = "https://nwjs.io/versions"] Manifest URL
|
|
92
|
+
* @property {string} [manifestUrl = "https://nwjs.io/versions.json"] Manifest URL
|
|
93
93
|
* @property {string} [srcDir = "./src"] Source directory
|
|
94
94
|
* @property {string} [cacheDir = "./cache"] Cache directory
|
|
95
95
|
* @property {string} [outDir = "./out"] Out directory
|
|
@@ -172,7 +172,7 @@ async function bld({
|
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
const nodeVersion = releaseInfo.components.node;
|
|
175
|
+
// const nodeVersion = releaseInfo.components.node;
|
|
176
176
|
|
|
177
177
|
if (
|
|
178
178
|
managedManifest === true ||
|
|
@@ -191,7 +191,8 @@ async function bld({
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
if (nativeAddon === 'gyp') {
|
|
194
|
-
|
|
194
|
+
throw new Error('Rebuilding Node addons functionality is broken and has been disabled. This functionality may be removed in the future.');
|
|
195
|
+
// buildNativeAddon({ cacheDir, version, platform, arch, outDir, nodeVersion });
|
|
195
196
|
}
|
|
196
197
|
|
|
197
198
|
if (zip !== false) {
|
|
@@ -353,6 +354,7 @@ const setWinConfig = async ({ app, outDir }) => {
|
|
|
353
354
|
await fs.promises.writeFile(outDirAppExe, outBuffer);
|
|
354
355
|
};
|
|
355
356
|
|
|
357
|
+
/*
|
|
356
358
|
const buildNativeAddon = ({ cacheDir, version, platform, arch, outDir, nodeVersion }) => {
|
|
357
359
|
let nodePath = path.resolve(cacheDir, `node-v${version}-${platform}-${arch}`);
|
|
358
360
|
const cwd = path.resolve(
|
|
@@ -364,6 +366,7 @@ const buildNativeAddon = ({ cacheDir, version, platform, arch, outDir, nodeVersi
|
|
|
364
366
|
|
|
365
367
|
child_process.execFileSync('node-gyp', ['rebuild', `--target=${nodeVersion}`, `--nodedir=${nodePath}`], { cwd });
|
|
366
368
|
};
|
|
369
|
+
*/
|
|
367
370
|
|
|
368
371
|
const compress = async ({
|
|
369
372
|
zip,
|
package/src/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Options<P extends SupportedPlatform = SupportedPlatform> {
|
|
|
24
24
|
/** URI to download NW binaries from */
|
|
25
25
|
downloadUrl?: "https://dl.nwjs.io" | string,
|
|
26
26
|
/** URI to download manifest */
|
|
27
|
-
manifestUrl?: "https://nwjs.io/versions" | string,
|
|
27
|
+
manifestUrl?: "https://nwjs.io/versions.json" | string,
|
|
28
28
|
/** Refer to Linux/Windows/Osx specific options */
|
|
29
29
|
app: AppOptions<P>,
|
|
30
30
|
/** If true the existing cache is used. Otherwise it removes and redownloads it. */
|
package/src/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import util from './util.js';
|
|
|
16
16
|
* @property {"linux" | "osx" | "win"} platform Host platform
|
|
17
17
|
* @property {"ia32" | "x64" | "arm64"} arch Host architecture
|
|
18
18
|
* @property {"https://dl.nwjs.io" | string} [downloadUrl="https://dl.nwjs.io"] Download server
|
|
19
|
-
* @property {"https://nwjs.io/versions" | string} [manifestUrl="https://nwjs.io/versions"] Versions manifest
|
|
19
|
+
* @property {"https://nwjs.io/versions.json" | string} [manifestUrl="https://nwjs.io/versions.json"] Versions manifest
|
|
20
20
|
* @property {"./cache" | string} [cacheDir="./cache"] Directory to cache NW binaries
|
|
21
21
|
* @property {"./" | string} [srcDir="./"] File paths to application code
|
|
22
22
|
* @property {"./out" | string} [outDir="./out"] Directory to store build artifacts
|
package/src/util.js
CHANGED
|
@@ -206,7 +206,7 @@ export const parse = async (options, pkg) => {
|
|
|
206
206
|
options.platform = options.platform ?? PLATFORM_KV[process.platform];
|
|
207
207
|
options.arch = options.arch ?? ARCH_KV[process.arch];
|
|
208
208
|
options.downloadUrl = options.downloadUrl ?? 'https://dl.nwjs.io';
|
|
209
|
-
options.manifestUrl = options.manifestUrl ?? 'https://nwjs.io/versions';
|
|
209
|
+
options.manifestUrl = options.manifestUrl ?? 'https://nwjs.io/versions.json';
|
|
210
210
|
options.cacheDir = options.cacheDir ?? './cache';
|
|
211
211
|
options.cache = str2Bool(options.cache ?? true);
|
|
212
212
|
options.ffmpeg = str2Bool(options.ffmpeg ?? false);
|