nw-builder icon indicating copy to clipboard operation
nw-builder copied to clipboard

Make dynamic option platform

Open zdev-online opened this issue 5 months ago • 1 comments

Issue Type

  • [ ] Bug Report
  • [x] Feature Request
  • [ ] Other

Please make folder dynamic here: https://github.com/nwutils/nw-builder/blob/7ca5a28f40078ab179aab72cf0f3260ef5f118f2/src/bld.js#L138C1-L150C6

From:

for (let file of files) {
    await fs.promises.cp(
      file,
      path.resolve(
        outDir,
        platform !== 'osx'
          ? 'package.nw'
          : 'nwjs.app/Contents/Resources/app.nw',
        file,
      ),
      { recursive: true, verbatimSymlinks: true },
    );
  }

To:

  // filesFolder - is option for build type options
  for (let file of files) {
     await fs.promises.cp(
       file,
       path.resolve(
         outDir,
         filesFolder,
         file,
       ),
       { recursive: true, verbatimSymlinks: true },
     );
   }

zdev-online avatar Sep 11 '24 02:09 zdev-online