From c973ebc84ae3c697532bf9677030566ec6684f6c Mon Sep 17 00:00:00 2001 From: James Kyburz Date: Thu, 23 Apr 2015 21:37:46 +0200 Subject: [PATCH 1/2] update electron version fixing windows issues --- npm/install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/install.js b/npm/install.js index ad0201f227c4..344e86752d13 100755 --- a/npm/install.js +++ b/npm/install.js @@ -8,7 +8,7 @@ var fs = require('fs') var platform = os.platform() var arch = os.arch() -var version = '0.24.0' +var version = '0.25.1' var filename = 'electron-v' + version + '-' + platform + '-' + arch + '.zip' var url = 'https://github.com/atom/electron/releases/download/v' + version + '/electron-v' + version + '-' + platform + '-' + arch + '.zip' From 0b0472a999f6e1bb6a58ca4220603d5d6903058d Mon Sep 17 00:00:00 2001 From: James Kyburz Date: Thu, 23 Apr 2015 21:37:31 +0200 Subject: [PATCH 2/2] replaced run.bat with cli.js closes #9 --- npm/cli.js | 7 +++++++ npm/install.js | 13 ------------- npm/package.json | 2 +- npm/run.bat | 2 -- 4 files changed, 8 insertions(+), 16 deletions(-) create mode 100755 npm/cli.js delete mode 100755 npm/run.bat diff --git a/npm/cli.js b/npm/cli.js new file mode 100755 index 000000000000..895782f980a1 --- /dev/null +++ b/npm/cli.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node + +var electron = require('./') + +var proc = require('child_process') + +proc.spawn(electron, process.argv.slice(2), {stdio: 'inherit'}); diff --git a/npm/install.js b/npm/install.js index 344e86752d13..3ab5ce3ab8f5 100755 --- a/npm/install.js +++ b/npm/install.js @@ -22,24 +22,11 @@ var paths = { win32: path.join(__dirname, './dist/electron.exe') } -var shebang = { - darwin: '#!/bin/bash\n', - linux: '#!/bin/bash\n', - win32: '' -} - -var argv = { - darwin: '"$@"', - linux: '"$@"', - win32: '%*' // does this work with " " in the args? -} - if (!paths[platform]) throw new Error('Unknown platform: ' + platform) nugget(url, {target: filename, dir: __dirname, resume: true, verbose: true}, function (err) { if (err) return onerror(err) fs.writeFileSync(path.join(__dirname, 'path.txt'), paths[platform]) - fs.writeFileSync(path.join(__dirname, 'run.bat'), shebang[platform] + '"' + paths[platform] + '" ' + argv[platform]) extract(path.join(__dirname, filename), {dir: path.join(__dirname, 'dist')}, function (err) { if (err) return onerror(err) }) diff --git a/npm/package.json b/npm/package.json index e1c82c544bfb..37c3053e69fe 100644 --- a/npm/package.json +++ b/npm/package.json @@ -11,7 +11,7 @@ "test": "tape test/*.js" }, "bin": { - "electron": "run.bat" + "electron": "cli.js" }, "main": "index.js", "dependencies": { diff --git a/npm/run.bat b/npm/run.bat deleted file mode 100755 index 99b1e0874f08..000000000000 --- a/npm/run.bat +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -"/Users/maxogden/src/js/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron" "$@" \ No newline at end of file