nw-builder 4.13.1 → 4.13.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nw-builder",
3
- "version": "4.13.1",
3
+ "version": "4.13.2",
4
4
  "description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
5
5
  "keywords": [
6
6
  "NW.js",
package/src/bld.js CHANGED
@@ -143,7 +143,11 @@ async function bld({
143
143
 
144
144
  if (glob) {
145
145
  for (let file of files) {
146
- await fs.promises.cp(
146
+ const stats = await fs.promises.stat(file);
147
+ if (stats.isDirectory()) {
148
+ continue;
149
+ }
150
+ await fs.promises.copyFile(
147
151
  file,
148
152
  path.resolve(
149
153
  outDir,
@@ -256,7 +260,7 @@ const setLinuxConfig = async ({ app, outDir }) => {
256
260
  GenericName: app.genericName,
257
261
  NoDisplay: app.noDisplay,
258
262
  Comment: app.comment,
259
- Icon: path.resolve(outDir, 'package.nw', path.basename(app.icon)),
263
+ Icon: app.icon ? path.resolve(outDir, 'package.nw', app.icon) : '',
260
264
  Hidden: app.hidden,
261
265
  OnlyShowIn: app.onlyShowIn,
262
266
  NotShowIn: app.notShowIn,
package/src/util.js CHANGED
@@ -239,7 +239,7 @@ export const parse = async (options, pkg) => {
239
239
  options.app.name = options.app.name.replace(/[<>:"/\\|?*\u0000-\u001F]/g, '');
240
240
  }
241
241
  /* Path to where the icon currently is in the filesystem */
242
- options.app.icon = options.app.icon ?? undefined;
242
+ options.app.icon = options.app.icon ?? pkg.window?.icon ?? undefined;
243
243
  if (options.app.icon) {
244
244
  options.app.icon = path.resolve(options.app.icon);
245
245
  }