Git Product home page Git Product logo

grunt-build-atom-shell's Introduction

grunt-build-atom-shell

Build atom-shell from Git, and rebuild native modules. This is a mostly drop-in replacement for grunt-download-atom-shell, in that, you can replace your use of it with this package at the same point in the Atom build process and everything should Just Work.

Why even would I do this?

The main reason to do this is because of atom/atom-shell#713 - trying to rename Atom after-the-fact isn't possible on Windows without some serious rigging. This package fixes that issue, as well as allows you to use arbitrary builds of Atom Shell (i.e. no more waiting for a new release for a bugfix).

Installation

Install npm package, next to your project's Gruntfile.js file:

npm install --save-dev grunt-build-atom-shell

Add this line to your project's Gruntfile.js:

grunt.loadNpmTasks('grunt-build-atom-shell');

Options

  • buildDir - Required Where to put the downloaded atom-shell
  • tag - Required A tag, branch, or commit of Atom Shell to build
  • projectName - Required A short name for your project (originally 'atom')
  • productName - Required The name of the final binary generated (originally 'Atom')
  • targetDir - Where to put the resulting atom-shell, defaults to ./atom-shell
  • config - Either 'Debug' or 'Release', defaults to 'Release'
  • remoteUrl - The Git remote url to download from, defaults to official Atom Shell
  • nodeVersion - The version of Node.js to use; see the section below for how to configure this

Example

Gruntfile.js

module.exports = function(grunt) {
  grunt.initConfig({
    'build-atom-shell': {
      tag: 'v0.19.5',
      nodeVersion: '0.18.0',
      buildDir: (process.env.TMPDIR || process.env.TEMP || '/tmp') + '/atom-shell',
      projectName: 'mycoolapp',
      productName: 'MyCoolApp'
    }
  });
};

Correctly setting nodeVersion

Different versions of Atom Shell expect to be linked against different versions of node.js. Since grunt-build-atom-shell allows you to use arbitrary commits of Atom Shell, there is no way for it to know which version is correct to use, so it must be explicitly provided. If you don't explicitly provide a version, we will guess the latest version, which may or may not be correct.

  • 0.19.x series - 0.18.0
  • 0.20.x series - 0.20.0
  • 0.21.x series - 0.21.0
  • 0.22.x series - 0.22.0

These numbers don't match the official node.js versions, because they also reflect patches that Atom puts into node.js to make it compatible with Chromium.

grunt-build-atom-shell's People

Contributors

anaisbetts avatar maxkorp avatar muan avatar salbahra avatar ttilley avatar yshrsmz avatar ziahamza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-build-atom-shell's Issues

*.asar

tell me how to package an application using * .asar

Error with subprocess.CalledProcessError: Command

Any ideas on why this is happening?

Here is the input:

    'build-atom-shell': {
      tag: 'v0.19.5',
      nodeVersion: '0.18.0',
      config: 'Debug',
      buildDir: './temp',
      projectName: 'predixgo',
      productName: 'PredixGo'
    },

Here is the output:

Running "build-atom-shell" task
Verifying properties build-atom-shell.buildDir, build-atom-shell.tag, build-atom-shell.projectName, build-atom-shell.productName exist in config...OK
>> Running: git remote set-url origin https://github.com/atom/atom-shell
>> Running: git fetch origin
>> Running: git reset --hard HEAD
>> Running: git checkout v0.19.5
>> Rigging atom.gyp to have correct name
Reading temp/atom-shell/atom.gyp...OK
Writing temp/atom-shell/atom.gyp...OK
>> Running: python script/bootstrap.py -v
>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 119, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 25, in main
>>     update_atom_modules('spec')
>>   File "script/bootstrap.py", line 73, in update_atom_modules
>>     execute([apm, 'install'])
>>   File "/Users/predixgo/GithubEnterprise/pg-atomshell-container/temp/atom-shell/script/lib/util.py", line 142, in execute
>>     raise e
>> subprocess.CalledProcessError: Command '['/Users/predixgo/GithubEnterprise/pg-atomshell-container/temp/atom-shell/node_modules/.bin/apm', 'install']' returned non-zero exit status 133
>> Rigging atom.gyp to have correct name
Reading temp/atom-shell/atom.gyp...OK
Writing temp/atom-shell/atom.gyp...OK
>> Running: python script/bootstrap.py -v
>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 119, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 25, in main
>>     update_atom_modules('spec')
>>   File "script/bootstrap.py", line 73, in update_atom_modules
>>     execute([apm, 'install'])
>>   File "/Users/predixgo/GithubEnterprise/pg-atomshell-container/temp/atom-shell/script/lib/util.py", line 142, in execute
>>     raise e
>> subprocess.CalledProcessError: Command '['/Users/predixgo/GithubEnterprise/pg-atomshell-container/temp/atom-shell/node_modules/.bin/apm', 'install']' returned non-zero exit status 133
Warning: null Use --force to continue.

Aborted due to warnings.

Fatal error: ENOENT Frameworks

Getting this error :(

downloading atom shell
Running "build-atom-shell-app" task

Downloading releases...
>> Found cached download of atom-shell-v0.21.0-darwin-x64.zip

Extracting releases...
>> Extracting darwin

Adding app to releases.
Fatal error: ENOENT, no such file or directory '/Users/thomas/Desktop/wallpaper/wallpaper-app/build/darwin/atom-shell/Atom.app/Contents/Frameworks/Atom Framework.framework/Versions/Current/Frameworks'

Question: is this repo still the 'official' way to rename electron?

Not that I don't love this repo - (thanks @paulcbetts ) Its been really useful over the last couple of months, but given the stated need for this repo is to be able to rename the electron .exe on Windows,
does electron 0.23.0 fix the original issue (atom/atom-shell#713), given the Windows release notes for 0.23.0 state:

"__Renaming atom.exe no longer breaks native modules."

Is it possible to simply do:

npm i electron-prebuilt

and then:

  • rename the .app, helper apps etc
  • replace the .incs icon
  • update the plist

If you no longer need to build from src, then could this repo move forward with additional tasks that could:

  • do the plist changes
  • replace the icon
  • get your app ready for release (npm prune --production etc)
  • asar your app
  • codesign you app
  • zip using ditto so autoupdater can be used on the resultant .zip.

Maybe these tasks belong in electron starter instead? Happy to help contribute grunt tasks if this is the correct assumption and direction.

Fail on Windows

I get the following output if i run the task on Windows (10 x64 technical preview):

Running: python script/bootstrap.py
Traceback (most recent call last):
File "script/bootstrap.py", line 127, in
sys.exit(main())
File "script/bootstrap.py", line 34, in main
update_atom_shell()
File "script/bootstrap.py", line 123, in update_atom_shell
execute_stdout([sys.executable, update])
File "D:\dropclient\build\win32\atom_shell_build\atom-shell\script\lib\util.py", line 150, in execute_stdout
execute(argv)
File "D:\dropclient\build\win32\atom_shell_build\atom-shell\script\lib\util.py", line 138, in execute
raise e
subprocess.CalledProcessError: Command '['D:\Python\python.exe', 'D:\dropclient\build\win32\atom_shell_build\atom-shell\script\update.py']' returned non-zero exit status 1

Python version is 2.7.9.
The node version, I run it with, is 0.10.35 32bit. I change the version with nvm in a previous grunt task.
However, the node version, I start grunt with, is 0.12.0.
If I just run python script\bootstrap.py it works without any issues.

Someone any suggestions?

-Trixt0r

default value for `nodeVersion` doesn't work

... and, unless I've missed something, makes little sense.

The default value for the nodeVersion parameter is 0.20.0 which doesn't actually match any version of node.js.

I initially overlooked this and tried to use the task as-is on Mac (10.10.1) I ran into build issues that, after investigation, were linked to a download issue in node-gyp as it was trying to get version 0.20.0 of node.

I've now changed the value of the parameter to 0.10.33 (with a atom shell version of 0.20.0) and everything works fine. I'm still puzzled by this default value and also by the readme content.

Am I misunderstanding something ?

Failing to build v0.21.0

When trying to build against v0.21.0, boostrap.py fails when it comes to installing apm modules.
This issue has already been reported in:

atom/apm#281
atom/node-nslog#4
electron/electron#1070

APM versions:

C:\app>"C:\app\build\atom-shell\node_modules\atom-package-
manager\bin\apm.cmd" --version
apm  0.126.0
npm  2.1.18
node 0.10.35
python 2.7.8
git 1.9.5.msysgit.0
visual studio 2013

Command output:

C:\app\build\atom-shell\node_modules\atom-package-manager\bin\apm.cmd
 install
Installing modules failed
> [email protected] install C:\app\build\atom-shell\spec\node_modules\runas

> node-gyp rebuild


C:\app\build\atom-shell\spec\node_modules\runas>node "C:\app\
build\atom-shell\node_modules\atom-package-manager\node_modules\npm\bin\node-
gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
G?n?ration des projets individuellement dans cette solution. Pour activer la g?n
?ration en parall?le, ajoutez le commutateur "/m".
  main.cc
  runas_win.cc
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(623): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v8::Str
ing' (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modules\runa
s\build\runas.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(623): error C2065: 'ExternalAsciiStringResource' : undeclared identifier (..\s
rc\main.cc) [C:\app\build\atom-shell\spec\node_modules\runas\build\ru
nas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(623): error C2065: 'resource' : undeclared identifier (..\src\main.cc) [C:\app
\build\atom-shell\spec\node_modules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(623): error C2448: 'NanNew' : function-style initializer appears to be a funct
ion definition (..\src\main.cc) [C:\app\build\atom-shell\spec\node_mo
dules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(672): warning C4244: 'return' : conversion from 'int64_t' to 'int', possible l
oss of data (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modul
es\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1993): error C2039: 'IsExternalAscii' : is not a member of 'v8::String' (..\sr
c\main.cc) [C:\app\build\atom-shell\spec\node_modules\runas\build\run
as.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1994): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v8::St
ring' (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modules\run
as\build\runas.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1994): error C4430: missing type specifier - int assumed. Note: C++ does not s
upport default-int (..\src\main.cc) [C:\app\build\atom-shell\spec\nod
e_modules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1994): error C2143: syntax error : missing ';' before '*' (..\src\main.cc) [C:
\app\build\atom-shell\spec\node_modules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1994): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\app
\build\atom-shell\spec\node_modules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1995): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\app
\build\atom-shell\spec\node_modules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1995): error C2039: 'GetExternalAsciiStringResource' : is not a member of 'v8:
:String' (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modules\
runas\build\runas.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1996): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\app\
build\atom-shell\spec\node_modules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1996): error C2227: left of '->data' must point to class/struct/union/generic
type (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modules\runa
s\build\runas.vcxproj]
          type is 'unknown-type'
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1997): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\app
\build\atom-shell\spec\node_modules\runas\build\runas.vcxproj]
C:\app\build\atom-shell\spec\node_modules\runas\node_modules\nan\nan.
h(1997): error C2227: left of '->length' must point to class/struct/union/generi
c type (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modules\ru
nas\build\runas.vcxproj]
          type is 'unknown-type'

> [email protected] install C:\app\build\atom-shell\spec\node_modules
\pathwatcher
> node-gyp rebuild


C:\app\build\atom-shell\spec\node_modules\pathwatcher>node "C:\app
\build\atom-shell\node_modules\atom-package-manager\node_modules\npm\bin
\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
G?n?ration des projets individuellement dans cette solution. Pour activer la g?n
?ration en parall?le, ajoutez le commutateur "/m".
  main.cc
  common.cc
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v
8::String' (..\src\main.cc) [C:\app\build\atom-shell\spec\node_module
s\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'ExternalAsciiStringResource' : undeclared identifier
 (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatc
her\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'resource' : undeclared identifier (..\src\main.cc) [
C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatch
er.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2448: 'NanNew' : function-style initializer appears to be a
 function definition (..\src\main.cc) [C:\app\build\atom-shell\spec\n
ode_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v
8::String' (..\src\common.cc) [C:\app\build\atom-shell\spec\node_modu
les\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'ExternalAsciiStringResource' : undeclared identifier
 (..\src\common.cc) [C:\app\build\atom-shell\spec\node_modules\pathwa
tcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'resource' : undeclared identifier (..\src\common.cc)
 [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwat
cher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1993): error C2039: 'IsExternalAscii' : is not a member of 'v8::String'
(..\src\main.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatch
er\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2448: 'NanNew' : function-style initializer appears to be a
 function definition (..\src\common.cc) [C:\app\build\atom-shell\spec
\node_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2039: 'ExternalAsciiStringResource' : is not a member of '
v8::String' (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modul
es\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C4430: missing type specifier - int assumed. Note: C++ does
 not support default-int (..\src\main.cc) [C:\app\build\atom-shell\sp
ec\node_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2143: syntax error : missing ';' before '*' (..\src\main.c
c) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathw
atcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\
app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher.v
cxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\
app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher.v
cxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2039: 'GetExternalAsciiStringResource' : is not a member o
f 'v8::String' (..\src\main.cc) [C:\app\build\atom-shell\spec\node_mo
dules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\
app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher.v
cxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2227: left of '->data' must point to class/struct/union/ge
neric type (..\src\main.cc) [C:\app\build\atom-shell\spec\node_module
s\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2065: 'ext' : undeclared identifier (..\src\main.cc) [C:\
app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher.v
cxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2227: left of '->length' must point to class/struct/union/
generic type (..\src\main.cc) [C:\app\build\atom-shell\spec\node_modu
les\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1993): error C2039: 'IsExternalAscii' : is not a member of 'v8::String'
(..\src\common.cc) [C:\app\build\atom-shell\spec\node_modules\pathwat
cher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2039: 'ExternalAsciiStringResource' : is not a member of '
v8::String' (..\src\common.cc) [C:\app\build\atom-shell\spec\node_mod
ules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C4430: missing type specifier - int assumed. Note: C++ does
 not support default-int (..\src\common.cc) [C:\app\build\atom-shell\
spec\node_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2143: syntax error : missing ';' before '*' (..\src\common
.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pat
hwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2065: 'ext' : undeclared identifier (..\src\common.cc) [C:
\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher
.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2065: 'ext' : undeclared identifier (..\src\common.cc) [C:
\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher
.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2039: 'GetExternalAsciiStringResource' : is not a member o
f 'v8::String' (..\src\common.cc) [C:\app\build\atom-shell\spec\node_
modules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2065: 'ext' : undeclared identifier (..\src\common.cc) [C:
\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher
.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2227: left of '->data' must point to class/struct/union/ge
neric type (..\src\common.cc) [C:\app\build\atom-shell\spec\node_modu
les\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2065: 'ext' : undeclared identifier (..\src\common.cc) [C:
\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwatcher
.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2227: left of '->length' must point to class/struct/union/
generic type (..\src\common.cc) [C:\app\build\atom-shell\spec\node_mo
dules\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'
  handle_map.cc
  pathwatcher_win.cc
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v
8::String' (..\src\handle_map.cc) [C:\app\build\atom-shell\spec\node_
modules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'ExternalAsciiStringResource' : undeclared identifier
 (..\src\handle_map.cc) [C:\app\build\atom-shell\spec\node_modules\pa
thwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'resource' : undeclared identifier (..\src\handle_map
.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pat
hwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2448: 'NanNew' : function-style initializer appears to be a
 function definition (..\src\handle_map.cc) [C:\app\build\atom-shell\
spec\node_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1993): error C2039: 'IsExternalAscii' : is not a member of 'v8::String'
(..\src\handle_map.cc) [C:\app\build\atom-shell\spec\node_modules\pat
hwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2039: 'ExternalAsciiStringResource' : is not a member of '
v8::String' (..\src\handle_map.cc) [C:\app\build\atom-shell\spec\node
_modules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C4430: missing type specifier - int assumed. Note: C++ does
 not support default-int (..\src\handle_map.cc) [C:\app\build\atom-sh
ell\spec\node_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2143: syntax error : missing ';' before '*' (..\src\handle
_map.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build
\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2065: 'ext' : undeclared identifier (..\src\handle_map.cc)
 [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwat
cher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2065: 'ext' : undeclared identifier (..\src\handle_map.cc)
 [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwat
cher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2039: 'GetExternalAsciiStringResource' : is not a member o
f 'v8::String' (..\src\handle_map.cc) [C:\app\build\atom-shell\spec\n
ode_modules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2065: 'ext' : undeclared identifier (..\src\handle_map.cc)
 [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwat
cher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2227: left of '->data' must point to class/struct/union/ge
neric type (..\src\handle_map.cc) [C:\app\build\atom-shell\spec\node_
modules\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2065: 'ext' : undeclared identifier (..\src\handle_map.cc)
 [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pathwat
cher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2227: left of '->length' must point to class/struct/union/
generic type (..\src\handle_map.cc) [C:\app\build\atom-shell\spec\nod
e_modules\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v
8::String' (..\src\pathwatcher_win.cc) [C:\app\build\atom-shell\spec\
node_modules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'ExternalAsciiStringResource' : undeclared identifier
 (..\src\pathwatcher_win.cc) [C:\app\build\atom-shell\spec\node_modul
es\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2065: 'resource' : undeclared identifier (..\src\pathwatche
r_win.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\buil
d\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(623): error C2448: 'NanNew' : function-style initializer appears to be a
 function definition (..\src\pathwatcher_win.cc) [C:\app\build\atom-s
hell\spec\node_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1993): error C2039: 'IsExternalAscii' : is not a member of 'v8::String'
(..\src\pathwatcher_win.cc) [C:\app\build\atom-shell\spec\node_module
s\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2039: 'ExternalAsciiStringResource' : is not a member of '
v8::String' (..\src\pathwatcher_win.cc) [C:\app\build\atom-shell\spec
\node_modules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C4430: missing type specifier - int assumed. Note: C++ does
 not support default-int (..\src\pathwatcher_win.cc) [C:\app\build\at
om-shell\spec\node_modules\pathwatcher\build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2143: syntax error : missing ';' before '*' (..\src\pathwa
tcher_win.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\
build\pathwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1994): error C2065: 'ext' : undeclared identifier (..\src\pathwatcher_wi
n.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pa
thwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2065: 'ext' : undeclared identifier (..\src\pathwatcher_wi
n.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pa
thwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1995): error C2039: 'GetExternalAsciiStringResource' : is not a member o
f 'v8::String' (..\src\pathwatcher_win.cc) [C:\app\build\atom-shell\s
pec\node_modules\pathwatcher\build\pathwatcher.vcxproj]
          D:\Utilisateurs\Matteo\.atom\.node-gyp\.node-gyp\0.21.0\deps\v8\includ
e\v8.h(1809) : see declaration of 'v8::String'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2065: 'ext' : undeclared identifier (..\src\pathwatcher_wi
n.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pa
thwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1996): error C2227: left of '->data' must point to class/struct/union/ge
neric type (..\src\pathwatcher_win.cc) [C:\app\build\atom-shell\spec\
node_modules\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2065: 'ext' : undeclared identifier (..\src\pathwatcher_wi
n.cc) [C:\app\build\atom-shell\spec\node_modules\pathwatcher\build\pa
thwatcher.vcxproj]
C:\app\build\atom-shell\spec\node_modules\pathwatcher\node_modules\na
n\nan.h(1997): error C2227: left of '->length' must point to class/struct/union/
generic type (..\src\pathwatcher_win.cc) [C:\app\build\atom-shell\spe
c\node_modules\pathwatcher\build\pathwatcher.vcxproj]
          type is 'unknown-type'

npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
gypgypnpm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\app\\build\\atom-shell\\node_modules\\atom-packa
ge-manager\\bin\\\\node.exe" "C:\app\\build\\atom-shell\\node_modu
les\\atom-package-manager\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig"
"C:\app\\build\\atom-shell\\node_modules\\atom-package-manager\\.a
pmrc" "--userconfig" "D:\\Utilisateurs\\Matteo\\.atom\\.apmrc" "install" "--targ
et=0.21.0" "--arch=ia32" "--msvs_version=2013"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.18
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.
None
Traceback (most recent call last):
  File "script/bootstrap.py", line 127, in <module>
    sys.exit(main())
  File "script/bootstrap.py", line 35, in main
    update_atom_modules('spec')
  File "script/bootstrap.py", line 77, in update_atom_modules
    execute_stdout([apm, 'install'])
  File "C:\app\build\atom-shell\script\lib\util.py", line 148, in exe
cute_stdout
    raise e
subprocess.CalledProcessError: Command '['C:\app\\build\\atom-shel
l\\node_modules\\atom-package-manager\\bin\\apm.cmd', 'install']' returned non-z
ero exit status 1

Build fails on v0.21.x

Hey there,

I was able to successfully build atom-shell using v0.20.x and v1.1.5 of this script but trying to build atom-shell v0.21.1 fails.

Config:

'build-atom-shell': {
      tag: 'v0.21.1',
      nodeVersion: '0.20.0',
      buildDir: 'tmp',
      projectName: 'myapp',
      productName: 'MyApp'
    },

Result:

>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 127, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 26, in main
>>     update_submodules()
>>   File "script/bootstrap.py", line 54, in update_submodules
>>     execute_stdout(['git', 'submodule', 'update', '--init', '--recursive'])
>>   File "/Users/bostondv/Dev/pamfax-desktop/build/tmp/atom-shell/script/lib/util.py", line 150, in execute_stdout
>>     execute(argv)
>>   File "/Users/bostondv/Dev/pamfax-desktop/build/tmp/atom-shell/script/lib/util.py", line 138, in execute
>>     raise e
>> subprocess.CalledProcessError: Command '['git', 'submodule', 'update', '--init', '--recursive']' returned non-zero exit status 1
>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 127, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 26, in main
>>     update_submodules()
>>   File "script/bootstrap.py", line 54, in update_submodules
>>     execute_stdout(['git', 'submodule', 'update', '--init', '--recursive'])
>>   File "/Users/bostondv/Dev/pamfax-desktop/build/tmp/atom-shell/script/lib/util.py", line 150, in execute_stdout
>>     execute(argv)
>>   File "/Users/bostondv/Dev/pamfax-desktop/build/tmp/atom-shell/script/lib/util.py", line 138, in execute
>>     raise e
>> subprocess.CalledProcessError: Command '['git', 'submodule', 'update', '--init', '--recursive']' returned non-zero exit status 1
Warning: null Use --force to continue.

Thanks

rebuild-native-modules workflow

Can you document / explain what rebuild-native-modules exactly does?
Which modules (where) does it rebuild? Can i define the directory where the packages lie that need to be rebuilt? (if they are not in the default directory).
Does it rebuild them matching the previously generated custom distribution?

In line of that question, is this feedback when running it expected?:

 Found existing node.js installation, skipping install to save time!
Warning: Arguments to path.resolve must be strings Use --force to continue.

Python scripts not spawnable under Windows

Your grunt task always fails under Win:

Running: python script/bootstrap.py
Warning: spawn ENOENT Use --force to continue.

Possible cause, you try to spawn directly the .py file ?!

Error: subprocess.CalledProcessError: Command npm.cmd install returned non-zero

I execute grunt the build directory gets created then nothing happens, after a few minutes I get the output at the bottom. Is this setup correct? The targetDir isn't created.
@paulcbetts I would appreciate some help.

Gruntfile.js

module.exports = function(grunt) {
  grunt.initConfig({
    'build-atom-shell': {
      tag: 'v0.20.3',
      nodeVersion: '0.20.0',
      buildDir: 'C:/Users/unknown/Downloads/build',
      targetDir: 'C:/Users/unknown/Downloads/target',
      projectName: 'cito',
      productName: 'Cito'
    }
  });

  grunt.loadNpmTasks('grunt-build-atom-shell');
  grunt.registerTask('default', ['build-atom-shell']);

};

package.json

{
  "name": "cito",
  "version": "0.1.0",
  "main": "main.js",
  "dependencies": {
    "node-sass": "^2.0.0-beta"
  },
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-build-atom-shell": "^1.1.4"
  }
}

Output:

C:\Users\unknown\Desktop\omeg>grunt
Running "build-atom-shell" task
>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 127, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 27, in main
>>     update_node_modules('.')
>>   File "script/bootstrap.py", line 68, in update_node_modules
>>     execute_stdout([NPM, 'install'])
>>   File "C:\Users\unknown\Downloads\build\atom-shell\script\lib\util.py", line 150, in execute_stdout
>>     execute(argv)
>>   File "C:\Users\unknown\Downloads\build\atom-shell\script\lib\util.py", line 138, in execute
>>     raise e
>> subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 1
>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 127, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 27, in main
>>     update_node_modules('.')
>>   File "script/bootstrap.py", line 68, in update_node_modules
>>     execute_stdout([NPM, 'install'])
>>   File "C:\Users\unknown\Downloads\build\atom-shell\script\lib\util.py", line 150, in execute_stdout
>>     execute(argv)
>>   File "C:\Users\unknown\Downloads\build\atom-shell\script\lib\util.py", line 138, in execute
>>     raise e
>> subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 1
Warning: null Use --force to continue.

Aborted due to warnings.

C:\Users\unknown\Desktop\omeg>

2.0.3 not on NPM

2.0.3 isnt on NPM (although a 2.0.4 would be welcome, after #30, since I'm already being a hassling beggar). Trying to bump up to electron 0.24.0, and need that fix in 2.0.3. Running it off github atm, but just thought I'd point it out.

bootstrap.py error: error: unrecognized arguments: -y

System is as below:

node v0.12.2
electron v0.31.0

Running "build-atom-shell" task
>> usage: bootstrap.py [-h] [-u URL] [-v]
>> bootstrap.py: error: unrecognized arguments: -y
>> usage: bootstrap.py [-h] [-u URL] [-v]
>> bootstrap.py: error: unrecognized arguments: -y

Gruntfile.js as below:

module.exports = function(grunt){
  grunt.initConfig({
    'build-atom-shell':{
      tag: 'v0.19.5',
      nodeVersion: 'v.22.0',
      buildDir: (process.env.TMPDIR || process.env.TEMP || '/tmp') + '/atom-shell',
      projectName: 'codebasic',
      productName: 'CodeBasic',
      targetDir: './electron'
    }
  });

  grunt.loadNpmTasks('grunt-build-atom-shell');

  grunt.registerTask('default', ['build-atom-shell']);
};

rebuild-native-modules Warning: Arguments to path.resolve must be strings

As stated in #22, running grunt rebuild-native-modules (after a successfull grunt build-atom-shell) results in

>> Found existing node.js installation, skipping install to save time!
Warning: Arguments to path.resolve must be strings Use --force to continue.

for me

Running grunt -v --stack rebuild-native-modules gives:

>> Found existing node.js installation, skipping install to save time!
Warning: Arguments to path.resolve must be strings Use --force to continue.
TypeError: Arguments to path.resolve must be strings
    at Object.exports.resolve (path.js:116:15)
    at F:\PROJ\node_modules\grunt-build-atom-shell\tasks\build-atom-shell-task.coffee:164:23
    at tryCatcher (F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:568:29)
    at setDisposable (F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:4830:36)
    at AnonymousObservable.s [as _subscribe] (F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:4847:11)
    at AnonymousObservable.Rx.Observable.observableProto.subscribe.observableProto.forEach (F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:2138:19)
    at F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:1633:38
    at F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:1086:9
    at recursiveAction (F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:1030:9)
    at F:\PROJ\node_modules\grunt-build-atom-shell\node_modules\rx\dist\rx.js:1038:13

_(I substituted the full project path with _PROJ* for readibility)*

Last known working version combination

I've tried a couple of combinations and they all failed. OS X and all tools are up to date. The errors I get vary. They weren't really helpful, but I can paste them anyway if it helps.

What tag and nodeVersion combination is the latest that you've compiled successfully?

Get error when running build

My Gruntfile.js looks like:

module.exports = function(grunt) {

    grunt.initConfig({
        'pkg': grunt.file.readJSON('package.json'),
        'build-atom-shell': {
            'tag': 'v0.19.5',
            'nodeVersion': '0.18.0',
            'buildDir': '/Users/cameron/atom-shell',
            'projectName': 'mycoolapp',
            'productName': 'MyCoolApp'
        }
    });

    grunt.loadNpmTasks('grunt-build-atom-shell');

    grunt.registerTask('default', ["build-atom-shell"]);

};

The following then happens:

Cameron:hello-world cameron$ grunt
Running "build-atom-shell" task
>> Traceback (most recent call last):
>>   File "script/bootstrap.py", line 119, in <module>
>>     sys.exit(main())
>>   File "script/bootstrap.py", line 24, in main
>>     update_node_modules('.')
>>   File "script/bootstrap.py", line 64, in update_node_modules
>>     execute([NPM, 'install'])
>>   File "/Users/cameron/atom-shell/atom-shell/script/lib/util.py", line 142, in execute
>>     raise e
>> subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1
Warning: null Use --force to continue.

Aborted due to warnings.

What's wrong?

Can I get an overview of this task's whole process

Having issues with the plugin (cross platform, some of the same issues, some different). Trying to figure out exactly whats going on. I think I have an understanding of how things happen, but I'm not sure. Trying to go through these steps manually yields some odd issues. I could use a bit of explaination to how things are working. Read up on rx.js a bit, but I'm still missing something I think. Assuming productname is product and projectname is project, config is Release

  1. clone atom-shell

  2. modify atom.gyp

  3. BOOTSTRAP:

    GYP_DEFINES={stuff} ./script/bootstrap.py -v
  4. BUILD

    ./script/build.py -c Release -t project
  5. INSTALL CUSTOM NODE

    GYP_DEFINES={stuff} nodegyp install --target={node-version} --arch={arch} --dist-url={ghcontractor.blablabla}
  6. NODELIB

    ./script/build.py -c Release -t generate_node_lib

    then copy ./out/Release/node.lib back to `~/.project/.node-gyp/{version}/node.lib
    note, this fails for me:

    ninja: Entering directory `out/Release'
    ninja: error: unknown target 'generate_node_lib'
  7. REBUILD NATIVE MODULES

    HOME=npm rebuild --target={node-version} --arch={arch}

am I missing something? I'm perhaps most confused by the issue generating node lib. Cant find reference to that anywhere in the atom-shell code or atom/node code, except for one place. Did that command change? Note I am building 0.22.3, on OSX yosemite.

I know I've seen it referenced in the issue that spawned this task, but when I go to the line thats referenced in atom-gyp, it doesnt line up anymore.

build failed on Windows

I am trying to build with settings from the sample with node v0.10.36, "grunt-build-atom-shell": "1.1.5" on Windows 7 vs 2012 using grunt cli tool.

However I get very nondescript error:

C:\Users\user1\Documents\build>grunt -v
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK

Registering "grunt-build-atom-shell" local Npm module tasks.
Reading C:\Users\user1\Documents\build\node_modules\grunt-build-atom-shell\pac
kage.json...OK
Parsing C:\Users\user1\Documents\build\node_modules\grunt-build-atom-shell\pac
kage.json...OK
Loading "build-atom-shell-task.coffee" tasks...OK
+ build-atom-shell, rebuild-atom-shell, rebuild-native-modules
Loading "task-helpers.coffee" tasks...OK
>> No tasks were registered or unregistered.
Loading "Gruntfile.js" tasks...OK
+ default

No tasks specified, running default tasks.
Running tasks: default

Running "default" task

Running "build-atom-shell" task
Verifying properties build-atom-shell.buildDir, build-atom-shell.tag, build-atom
-shell.projectName, build-atom-shell.productName exist in config...OK
>> Cloning to C:/tmp
>> Running: git clone https://github.com/atom/atom-shell
>> Running: git fetch origin
>> Running: git reset --hard HEAD
>> Running: git checkout v0.19.5
>> Rigging atom.gyp to have correct name
Reading C:\tmp\atom-shell\atom.gyp...OK
Writing C:\tmp\atom-shell\atom.gyp...OK
>> Running: python script/bootstrap.py
>> Running: python script/build.py -c Release -t test
>>
>> Rigging atom.gyp to have correct name
Reading C:\tmp\atom-shell\atom.gyp...OK
Writing C:\tmp\atom-shell\atom.gyp...OK
>> Running: python script/bootstrap.py
>> Running: python script/build.py -c Release -t test
>>
Warning: null Use --force to continue.

Aborted due to warnings.

I have also tried on Win8.1 vs2013 with similar results. Is there any way to make it more verbose?

breaking change in atom-shell 0.20.3 build

The 'atom.gyp' rigging needs to be fixed for atom-shell 0.20.3 and beyond. The upstream build process has changed in order to make this customization simpler. Now the suggested method of renaming is:

export GYP_DEFINES="product_name=MyApp project_name=myapp"
./script/update.py
./script/build.py -C Release -t myapp

In grunt-build-atom-shell 1.1.4, attempting to compile atom-shell 0.20.3 will throw the following error:

>> Running: python script/bootstrap.py
>> Running: python script/build.py -c Release -t triple-triad-atom
>> ninja: error: unknown target 'triple-triad-atom'

The 'atom.gyp' file ends up containing:

    'project_name%': 'atom',
    'product_name%': 'Atom',

Dealing with quoting and interpolation for multiple options in a single string feels weird for me, so it might just be simpler to add another two replace statements for the new form. I haven't looked at the changes in depth to see what else might have changed (or if those defines are used in other places).

If I get un-lazy I'll patch and submit a pull quest, but considering i'm both lazy and hung over you'll probably get to it first. ๐Ÿ˜†

Grunt Aborts with no Warnings

~/ grunt
Running "build-atom-shell" task
>> 
Warning: null Use --force to continue.

Aborted due to warnings.

I try and run the app after building and I get a message "You can't open the application because it may be damaged or incomplete"

Determining node version

How do I determine the node version? E.G. I'm using atom-shell 0.22.1, but the readme only specifies up to v0.20.x, and looking through atom-shell and atom/node I'm not seeing versions specified anywhere.

Release master?

Looks like #13 hasn't been released yet, could you publish a new release with it? Thanks ๐Ÿšข ๐Ÿ’š

Executable built with script can't load addons

build-atom-shell script generates an executable that can't load C++ addons.

To reproduce the issue, I have built a hello world addon following these steps:
https://nodejs.org/api/addons.html#addons_hello_world
rebuilt it for atom-shell
node-gyp rebuild --target=0.21.2 --arch=ia32 --dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist

Downloaded atom-shell 0.21.2 loads the addon as expected:

E:\Projects\native-app>"E:\atom\atom.exe" hello.js

E:\Projects\native-app>[6948:0331/170749:INFO:CONSOLE(0)] world

atom-shell built with the following grunt task:

'build-atom-shell': {
      tag: 'v0.21.2',
      nodeVersion: '0.21.0',
      buildDir: 'C:/build',
      projectName: 'test',
      productName: 'TestBuild'
    }

throws an error:

E:\Projects\native-app>"E:\Release\Release\test.exe" hello.js

E:\Projects\native-app>[3964:0331/170825:INFO:CONSOLE(0)] App throwed an error w
hen running [Error: The specified module could not be found.
E:\Projects\native-app\build\Release\addon.node]

capture

test.exe is built on Windows 7, node v0.10.36

Is it a known issue? Is there a version that will work or a workaround?

Patches on product name and greater visibility

First of all, thanks for the project!

I wanted to run a few ideas by you. I've implemented some patches to your tasks to suit our needs and I am wondering if there is any interest in merging any of them:

  1. An ability to see stdout/stderr as it happens, often helps with situations like borked download (happens when you're in some parts of South East Asia and forgot to turn the VPN on) or other issues, early on: trustatom-oss@5e4dc68
  2. Proper handling of product_name with spaces (Mac apps tend to have that, and ours does): trustatom-oss@9050836

Please feel free to cherry-pick or if you want me to do PRs on either of the above, just let me know.

Looking forward to hearing from you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.