Skip to content

Commit

Permalink
Change electron arch to x64 (fixing ShellExecuteEx bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heejin committed Apr 13, 2016
1 parent 39f6060 commit d771846
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

Binary file modified app/platform-util/addon.node
Binary file not shown.
2 changes: 1 addition & 1 deletion app/platform-util/rebuild.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo on
node-gyp rebuild --python=C:\Python27 --target=0.36.5 --arch=ia32 --dist-url=https://atom.io/download/atom-shell ^& copy .\build\Release\addon.node .\addon.node
node-gyp rebuild --python=C:\Python27 --target=0.37.2 --arch=x64 --dist-url=https://atom.io/download/atom-shell ^& copy .\build\Release\addon.node .\addon.node
13 changes: 8 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const fs = require('fs');
const del = require('del');
const appPkg = require('./app/package.json');

// Configuration
const ARCH = 'x64';

gulp.task('deps', () => {
return gulp.src('./app/package.json')
.pipe(install({ production: true }));
Expand All @@ -34,7 +37,7 @@ gulp.task('renderer', ['deps', 'clean:renderer'], () => {

gulp.task('build', ['renderer', 'deps'], (done) => {
packager({
arch: 'ia32',
arch: ARCH,
dir: path.join(__dirname, 'app'),
platform: 'win32',
asar: true,
Expand All @@ -56,16 +59,16 @@ gulp.task('build', ['renderer', 'deps'], (done) => {
});

gulp.task('build-zip', ['build'], () => {
const filename = `Hain-ia32-v${appPkg.version}.zip`;
return gulp.src('./out/Hain-win32-ia32/**/*')
const filename = `Hain-${ARCH}-v${appPkg.version}.zip`;
return gulp.src(`./out/Hain-win32-${ARCH}/**/*`)
.pipe(zip(filename))
.pipe(gulp.dest('./out/'));
});

gulp.task('build-installer', ['build'], (done) => {
const filename = `HainSetup-ia32-v${appPkg.version}.exe`;
const filename = `HainSetup-${ARCH}-v${appPkg.version}.exe`;
electronInstaller.createWindowsInstaller({
appDirectory: './out/Hain-win32-ia32',
appDirectory: `./out/Hain-win32-${ARCH}`,
outputDirectory: './out',
authors: 'Heejin Lee',
title: 'Hain',
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"name": "hain",
"main": "app/main-es6/main.js",
"scripts": {
"start": "electron .",
"dev": "gulp && electron .",
"build": "gulp build-all",
"test": "cd app && node ../node_modules/jest-cli/bin/jest"
"test": "cd app && node ../node_modules/jest-cli/bin/jest",
"postinstall": "npm install -g [email protected]"
},
"author": "Heejin Lee <[email protected]>",
"license": "MIT",
Expand All @@ -16,7 +18,7 @@
"babel-preset-react": "^6.5.0",
"del": "^2.2.0",
"electron-packager": "^5.2.1",
"electron-prebuilt": "^0.37.2",
"electron-prebuilt": "0.37.2",
"electron-winstaller": "^2.0.5",
"eslint": "^2.3.0",
"eslint-config-airbnb": "^6.1.0",
Expand Down

0 comments on commit d771846

Please sign in to comment.