From ed7c592e2e5a1acf8275b1ff7535fd8b3053e2e2 Mon Sep 17 00:00:00 2001 From: evshiron Date: Fri, 25 Mar 2016 17:18:55 +0800 Subject: [PATCH 1/7] add support for SDK versions --- lib/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/index.js b/lib/index.js index 784a907d4..d388f3bbd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -227,6 +227,10 @@ NwBuilder.prototype.downloadNodeWebkit = function () { platform.cache = path.resolve(self.options.cacheDir, self._version.version, name); platform.url = url.resolve(self.options.downloadUrl, self._version.platforms[name]); + // Fix platform.url for SDK versions. + var version = self._version.version.split('-sdk').shift(); + platform.url = platform.url.replace(version + '-sdk', version).replace('v' + version + '-sdk', 'sdk-v' + version); + // Ensure that there is a cache folder if(self.options.forceDownload) { fs.removeSync(platform.cache); From 788b7cb873f5e3b651781b0e54e2f5a70148d72e Mon Sep 17 00:00:00 2001 From: evshiron Date: Sat, 26 Mar 2016 15:49:06 +0800 Subject: [PATCH 2/7] add support for NaCl versions --- lib/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index d388f3bbd..7e74e6fa3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -227,9 +227,15 @@ NwBuilder.prototype.downloadNodeWebkit = function () { platform.cache = path.resolve(self.options.cacheDir, self._version.version, name); platform.url = url.resolve(self.options.downloadUrl, self._version.platforms[name]); - // Fix platform.url for SDK versions. - var version = self._version.version.split('-sdk').shift(); - platform.url = platform.url.replace(version + '-sdk', version).replace('v' + version + '-sdk', 'sdk-v' + version); + // Fix platform.url for SDK/NaCl versions. + if(self._version.version.indexOf('-sdk') > 0) { + var version = self._version.version.split('-sdk').shift(); + platform.url = platform.url.replace(version + '-sdk', version).replace('v' + version + '-sdk', 'sdk-v' + version); + } + else if(self._version.version.indexOf('-nacl') > 0) { + var version = self._version.version.split('-nacl').shift(); + platform.url = platform.url.replace(version + '-nacl', version).replace('v' + version + '-nacl', 'nacl-v' + version); + } // Ensure that there is a cache folder if(self.options.forceDownload) { From 4025c9f8b97493d272b1c4d6be080f0f238e2d5b Mon Sep 17 00:00:00 2001 From: evshiron Date: Fri, 1 Apr 2016 23:27:16 +0800 Subject: [PATCH 3/7] Update README with introduction and SDK example --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 65cddb82d..532261279 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,18 @@ > Lets you build your [NW.js](https://github.com/nwjs/nw.js) apps for mac, win and linux via cli. It will download the prebuilt binaries for a newest version, unpacks it, creates a release folder, create the app.nw file for a specified directory and copies the app.nw file where it belongs. +This is a self-maintained repo of `nw-builder` which temporarily fixs support for 0.13.x normal/SDK/NaCl versions. ### Installation ##### Local ```shell -npm install nw-builder --save-dev +npm install evshiron/nw-builder --save-dev ``` ##### Global ```shell -npm install nw-builder -g +npm install evshiron/nw-builder -g ``` ##### Grunt and Gulp Plugins @@ -46,7 +47,7 @@ var NwBuilder = require('nw-builder'); var nw = new NwBuilder({ files: './path/to/nwfiles/**/**', // use the glob format platforms: ['osx32', 'osx64', 'win32', 'win64'], - version: '0.12.3' + version: '0.13.0-rc3-sdk' }); //Log stuff you want From d79f8e2c7e52c0723226835f67c198815b71869c Mon Sep 17 00:00:00 2001 From: evshiron Date: Thu, 21 Apr 2016 12:44:24 +0800 Subject: [PATCH 4/7] fix missing libexif.dll issue on nw.js 0.14.1 --- lib/platforms.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/platforms.js b/lib/platforms.js index d34c319f8..fb271b956 100644 --- a/lib/platforms.js +++ b/lib/platforms.js @@ -8,7 +8,8 @@ module.exports = { '<=0.9.2': ['nw.exe', 'ffmpegsumo.dll', 'icudt.dll', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak'], '>0.9.2 <0.12.0': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales'], '>=0.12.0 <0.13.0-beta.1': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales', 'd3dcompiler_47.dll', 'pdf.dll'], - '>=0.13.0-beta.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] + '>=0.13.0-beta.1 <0.14.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'], + '>=0.14.1': ['nw.exe', 'icudtl.dat', 'libexif.dll', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] }, versionNameTemplate: 'v${ version }/${ name }-v${ version }-win-ia32.zip' }, @@ -19,7 +20,8 @@ module.exports = { '<=0.9.2': ['nw.exe', 'ffmpegsumo.dll', 'icudt.dll', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales'], '>0.9.2 <0.12.0': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales'], '>=0.12.0 <0.13.0-beta.1': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales', 'd3dcompiler_47.dll', 'pdf.dll'], - '>=0.13.0-beta.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'ffmpeg.dll', 'libGLESv2.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] + '>=0.13.0-beta.1 <0.14.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'ffmpeg.dll', 'libGLESv2.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'], + '>=0.14.1': ['nw.exe', 'icudtl.dat', 'libexif.dll', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] }, versionNameTemplate: 'v${ version }/${ name }-v${ version }-win-x64.zip' }, From 0901d834dcad7086c8da859ecc8bc8746479d1af Mon Sep 17 00:00:00 2001 From: evshiron Date: Fri, 22 Apr 2016 23:33:58 +0800 Subject: [PATCH 5/7] fix SDK/NaCl support for nw.js 0.14.1 --- lib/platforms.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/platforms.js b/lib/platforms.js index fb271b956..b59c784b9 100644 --- a/lib/platforms.js +++ b/lib/platforms.js @@ -8,8 +8,8 @@ module.exports = { '<=0.9.2': ['nw.exe', 'ffmpegsumo.dll', 'icudt.dll', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak'], '>0.9.2 <0.12.0': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales'], '>=0.12.0 <0.13.0-beta.1': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales', 'd3dcompiler_47.dll', 'pdf.dll'], - '>=0.13.0-beta.1 <0.14.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'], - '>=0.14.1': ['nw.exe', 'icudtl.dat', 'libexif.dll', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] + '>=0.13.0-beta.1 <0.14.1-beta.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'], + '>=0.14.1-beta.1': ['nw.exe', 'icudtl.dat', 'libexif.dll', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] }, versionNameTemplate: 'v${ version }/${ name }-v${ version }-win-ia32.zip' }, @@ -20,8 +20,8 @@ module.exports = { '<=0.9.2': ['nw.exe', 'ffmpegsumo.dll', 'icudt.dll', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales'], '>0.9.2 <0.12.0': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales'], '>=0.12.0 <0.13.0-beta.1': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales', 'd3dcompiler_47.dll', 'pdf.dll'], - '>=0.13.0-beta.1 <0.14.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'ffmpeg.dll', 'libGLESv2.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'], - '>=0.14.1': ['nw.exe', 'icudtl.dat', 'libexif.dll', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] + '>=0.13.0-beta.1 <0.14.1-beta.1': ['nw.exe', 'icudtl.dat', 'libEGL.dll', 'ffmpeg.dll', 'libGLESv2.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'], + '>=0.14.1-beta.1': ['nw.exe', 'icudtl.dat', 'libexif.dll', 'libEGL.dll', 'libGLESv2.dll', 'ffmpeg.dll', 'locales', 'd3dcompiler_47.dll', 'dbghelp.dll','natives_blob.bin','node.dll','nw.dll','nw_100_percent.pak','nw_200_percent.pak','nw_elf.dll','resources.pak','snapshot_blob.bin'] }, versionNameTemplate: 'v${ version }/${ name }-v${ version }-win-x64.zip' }, From 6f174548b9d0d9cc26aaaefa7deac29edfcfa622 Mon Sep 17 00:00:00 2001 From: evshiron Date: Sat, 23 Apr 2016 00:02:06 +0800 Subject: [PATCH 6/7] add platform detail when fails to download nw.js --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 7e74e6fa3..369b90ace 100644 --- a/lib/index.js +++ b/lib/index.js @@ -250,7 +250,7 @@ NwBuilder.prototype.downloadNodeWebkit = function () { Downloader.downloadAndUnpack(platform.cache, platform.url) .catch(function(err){ if(err.statusCode === 404){ - self.emit('log', 'ERROR: The version '+self._version.version+' does not have a corresponding build posted at ' + self.options.downloadUrl + '. Please choose a version from that list.'); + self.emit('log', 'ERROR: The version '+self._version.version+' for platform '+name+' does not have a corresponding build posted at ' + self.options.downloadUrl + '. Please choose a version from that list.'); } else { self.emit('log', err.msg); } From 13856059834272b7f8c97a4f90161982a9aa901a Mon Sep 17 00:00:00 2001 From: evshiron Date: Fri, 13 May 2016 13:22:10 +0800 Subject: [PATCH 7/7] update README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 532261279..fa4dba80c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ This is a self-maintained repo of `nw-builder` which temporarily fixs support for 0.13.x normal/SDK/NaCl versions. +This repo is deprecated now as I reimplement a [evshiron/nwjs-builder](https://github.com/evshiron/nwjs-builder), which should be a successor to `evshiron/nw-builder`. If you are a new user please move forward to `nwjs-builder`. This repo should still work with nw.js 0.13.x/0.14.x and node.js pre 6.x, but will not have any updates. + ### Installation ##### Local