Ship the custom node binary build with atom-shell.
This is required by the child_process.fork, which is indeed executing the node binary to start a script. The node fork can be found at: https://github.com/atom/cefode-node/tree/chromium-v8
This commit is contained in:
parent
85e22c0709
commit
ebac5f9ed5
5 changed files with 43 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
build/
|
build/
|
||||||
|
node/
|
||||||
node_modules/
|
node_modules/
|
||||||
vendor/
|
vendor/
|
||||||
*.xcodeproj
|
*.xcodeproj
|
||||||
|
|
9
atom.gyp
9
atom.gyp
|
@ -157,7 +157,14 @@
|
||||||
'files': [
|
'files': [
|
||||||
'browser/default_app',
|
'browser/default_app',
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
# Copy node binary for worker process support.
|
||||||
|
'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Resources',
|
||||||
|
'files': [
|
||||||
|
'node/node',
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
'postbuilds': [
|
'postbuilds': [
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,8 @@ set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
./script/update-node v0.10.5
|
||||||
|
|
||||||
gyp --depth . atom.gyp \
|
gyp --depth . atom.gyp \
|
||||||
-Ivendor/brightray/brightray.gypi \
|
-Ivendor/brightray/brightray.gypi \
|
||||||
-Dtarget_arch=ia32 \
|
-Dtarget_arch=ia32 \
|
||||||
|
|
31
script/update-node
Executable file
31
script/update-node
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "$(dirname $0)/.."
|
||||||
|
|
||||||
|
NODE_VERSION=v0.10.5
|
||||||
|
[ -z $1 ] || NODE_VERSION=$1
|
||||||
|
|
||||||
|
# Test whether we need update.
|
||||||
|
if [ -f "node/node" ] && [[ `node/node --version` == $NODE_VERSION ]] ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $OSTYPE in
|
||||||
|
darwin*) NODE_PLATFORM=darwin ;;
|
||||||
|
linux*) NODE_PLATFORM=linux ;;
|
||||||
|
*) echo "Unsupported platform $OSTYPE" && exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
NODE_DIST_NAME="node-$NODE_VERSION-$NODE_PLATFORM-x86"
|
||||||
|
|
||||||
|
# Download node and untar
|
||||||
|
NODE_TARBALL_URL="https://gh-contractor-zcbenz.s3.amazonaws.com/node/dist/$NODE_DIST_NAME.tar.gz"
|
||||||
|
TARGET_DIR='node'
|
||||||
|
[ -d "$TARGET_DIR" ] || mkdir "$TARGET_DIR"
|
||||||
|
cd "$TARGET_DIR"
|
||||||
|
curl -fsSkL $NODE_TARBALL_URL | tar -zx || exit 1
|
||||||
|
|
||||||
|
cp "$NODE_DIST_NAME/bin/node" .
|
||||||
|
rm -rf "$NODE_DIST_NAME"
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 5c651db8ff28c710bedecd0599ce8a1249ae843f
|
Subproject commit bb77a4da8e864bf68672912ab28277e4a5812491
|
Loading…
Reference in a new issue