build: rename binary from node to iojs
* rename the build targets * update the test runner to use `out/{Debug,Release}/iojs` * update the installer to install the iojs binary * update one test that explicitly checks for the binary name PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder <bertbelder@gmail.com>
This commit is contained in:
parent
3e7a25dd95
commit
f17f473af5
4
.gitignore
vendored
4
.gitignore
vendored
@ -10,8 +10,8 @@ tags
|
|||||||
doc/api.xml
|
doc/api.xml
|
||||||
tmp/
|
tmp/
|
||||||
test/tmp*/
|
test/tmp*/
|
||||||
node
|
iojs
|
||||||
node_g
|
iojs_g
|
||||||
*.swp
|
*.swp
|
||||||
.benchmark_reports
|
.benchmark_reports
|
||||||
/.project
|
/.project
|
||||||
|
22
Makefile
22
Makefile
@ -11,9 +11,9 @@ PREFIX ?= /usr/local
|
|||||||
EXEEXT := $(shell $(PYTHON) -c \
|
EXEEXT := $(shell $(PYTHON) -c \
|
||||||
"import sys; print('.exe' if sys.platform == 'win32' else '')")
|
"import sys; print('.exe' if sys.platform == 'win32' else '')")
|
||||||
|
|
||||||
NODE ?= ./node$(EXEEXT)
|
NODE ?= ./iojs$(EXEEXT)
|
||||||
NODE_EXE = node$(EXEEXT)
|
NODE_EXE = iojs$(EXEEXT)
|
||||||
NODE_G_EXE = node_g$(EXEEXT)
|
NODE_G_EXE = iojs_g$(EXEEXT)
|
||||||
|
|
||||||
# Default to verbose builds.
|
# Default to verbose builds.
|
||||||
# To do quiet/pretty builds, run `make V=` to set V to an empty string,
|
# To do quiet/pretty builds, run `make V=` to set V to an empty string,
|
||||||
@ -240,10 +240,10 @@ else
|
|||||||
ARCH=x86
|
ARCH=x86
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
TARNAME=node-$(VERSION)
|
TARNAME=iojs-$(VERSION)
|
||||||
ifdef NIGHTLY
|
ifdef NIGHTLY
|
||||||
TAG = nightly-$(NIGHTLY)
|
TAG = nightly-$(NIGHTLY)
|
||||||
TARNAME=node-$(VERSION)-$(TAG)
|
TARNAME=iojs-$(VERSION)-$(TAG)
|
||||||
endif
|
endif
|
||||||
TARBALL=$(TARNAME).tar.gz
|
TARBALL=$(TARNAME).tar.gz
|
||||||
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
|
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
|
||||||
@ -251,9 +251,9 @@ BINARYTAR=$(BINARYNAME).tar.gz
|
|||||||
PKG=out/$(TARNAME).pkg
|
PKG=out/$(TARNAME).pkg
|
||||||
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
||||||
|
|
||||||
PKGSRC=nodejs-$(DESTCPU)-$(RAWVER).tgz
|
PKGSRC=iojs-$(DESTCPU)-$(RAWVER).tgz
|
||||||
ifdef NIGHTLY
|
ifdef NIGHTLY
|
||||||
PKGSRC=nodejs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz
|
PKGSRC=iojs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dist: doc $(TARBALL) $(PKG)
|
dist: doc $(TARBALL) $(PKG)
|
||||||
@ -293,11 +293,11 @@ $(PKG): release-only
|
|||||||
$(PYTHON) ./configure --without-snapshot --dest-cpu=x64 --tag=$(TAG)
|
$(PYTHON) ./configure --without-snapshot --dest-cpu=x64 --tag=$(TAG)
|
||||||
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
|
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
|
||||||
SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
|
SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
|
||||||
lipo $(PKGDIR)/32/usr/local/bin/node \
|
lipo $(PKGDIR)/32/usr/local/bin/iojs \
|
||||||
$(PKGDIR)/usr/local/bin/node \
|
$(PKGDIR)/usr/local/bin/iojs \
|
||||||
-output $(PKGDIR)/usr/local/bin/node-universal \
|
-output $(PKGDIR)/usr/local/bin/iojs-universal \
|
||||||
-create
|
-create
|
||||||
mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
|
mv $(PKGDIR)/usr/local/bin/iojs-universal $(PKGDIR)/usr/local/bin/iojs
|
||||||
rm -rf $(PKGDIR)/32
|
rm -rf $(PKGDIR)/32
|
||||||
$(packagemaker) \
|
$(packagemaker) \
|
||||||
--id "org.nodejs.Node" \
|
--id "org.nodejs.Node" \
|
||||||
|
2
node.gyp
2
node.gyp
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'node',
|
'target_name': 'iojs',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
|
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
|
@ -28,7 +28,7 @@ console.error('argv=%j', process.argv);
|
|||||||
console.error('exec=%j', process.execPath);
|
console.error('exec=%j', process.execPath);
|
||||||
|
|
||||||
if (process.argv[2] !== "child") {
|
if (process.argv[2] !== "child") {
|
||||||
var child = spawn('./node', [__filename, "child"], {
|
var child = spawn('./iojs', [__filename, "child"], {
|
||||||
cwd: path.dirname(process.execPath)
|
cwd: path.dirname(process.execPath)
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ if (process.argv[2] !== "child") {
|
|||||||
console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: '));
|
console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: '));
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
// On Windows argv[0] is not expanded into full path
|
// On Windows argv[0] is not expanded into full path
|
||||||
assert.equal(childArgv0, './node');
|
assert.equal(childArgv0, './iojs');
|
||||||
} else {
|
} else {
|
||||||
assert.equal(childArgv0, process.execPath);
|
assert.equal(childArgv0, process.execPath);
|
||||||
}
|
}
|
||||||
|
@ -108,12 +108,12 @@ def npm_files(action):
|
|||||||
if os.environ.get('PORTABLE'):
|
if os.environ.get('PORTABLE'):
|
||||||
# This crazy hack is necessary to make the shebang execute the copy
|
# This crazy hack is necessary to make the shebang execute the copy
|
||||||
# of node relative to the same directory as the npm script. The precompiled
|
# of node relative to the same directory as the npm script. The precompiled
|
||||||
# binary tarballs use a prefix of "/" which gets translated to "/bin/node"
|
# binary tarballs use a prefix of "/" which gets translated to "/bin/iojs"
|
||||||
# in the regular shebang modifying logic, which is incorrect since the
|
# in the regular shebang modifying logic, which is incorrect since the
|
||||||
# precompiled bundle should be able to be extracted anywhere and "just work"
|
# precompiled bundle should be able to be extracted anywhere and "just work"
|
||||||
shebang = '/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/node" "$0" "$@"'
|
shebang = '/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/iojs" "$0" "$@"'
|
||||||
else:
|
else:
|
||||||
shebang = os.path.join(node_prefix or '/', 'bin/node')
|
shebang = os.path.join(node_prefix or '/', 'bin/iojs')
|
||||||
update_shebang(link_path, shebang)
|
update_shebang(link_path, shebang)
|
||||||
else:
|
else:
|
||||||
assert(0) # unhandled action type
|
assert(0) # unhandled action type
|
||||||
@ -128,7 +128,7 @@ def subdir_files(path, dest, action):
|
|||||||
|
|
||||||
def files(action):
|
def files(action):
|
||||||
exeext = '.exe' if sys.platform == 'win32' else ''
|
exeext = '.exe' if sys.platform == 'win32' else ''
|
||||||
action(['out/Release/node' + exeext], 'bin/node' + exeext)
|
action(['out/Release/iojs' + exeext], 'bin/iojs' + exeext)
|
||||||
|
|
||||||
if 'true' == variables.get('node_use_dtrace'):
|
if 'true' == variables.get('node_use_dtrace'):
|
||||||
action(['out/Release/node.d'], 'lib/dtrace/node.d')
|
action(['out/Release/node.d'], 'lib/dtrace/node.d')
|
||||||
|
@ -742,20 +742,20 @@ class Context(object):
|
|||||||
|
|
||||||
def GetVm(self, arch, mode):
|
def GetVm(self, arch, mode):
|
||||||
if arch == 'none':
|
if arch == 'none':
|
||||||
name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node'
|
name = 'out/Debug/iojs' if mode == 'debug' else 'out/Release/iojs'
|
||||||
else:
|
else:
|
||||||
name = 'out/%s.%s/node' % (arch, mode)
|
name = 'out/%s.%s/iojs' % (arch, mode)
|
||||||
|
|
||||||
# Currently GYP does not support output_dir for MSVS.
|
# Currently GYP does not support output_dir for MSVS.
|
||||||
# http://code.google.com/p/gyp/issues/detail?id=40
|
# http://code.google.com/p/gyp/issues/detail?id=40
|
||||||
# It will put the builds into Release/node.exe or Debug/node.exe
|
# It will put the builds into Release/iojs.exe or Debug/iojs.exe
|
||||||
if utils.IsWindows():
|
if utils.IsWindows():
|
||||||
out_dir = os.path.join(dirname(__file__), "..", "out")
|
out_dir = os.path.join(dirname(__file__), "..", "out")
|
||||||
if not exists(out_dir):
|
if not exists(out_dir):
|
||||||
if mode == 'debug':
|
if mode == 'debug':
|
||||||
name = os.path.abspath('Debug/node.exe')
|
name = os.path.abspath('Debug/iojs.exe')
|
||||||
else:
|
else:
|
||||||
name = os.path.abspath('Release/node.exe')
|
name = os.path.abspath('Release/iojs.exe')
|
||||||
else:
|
else:
|
||||||
name = os.path.abspath(name + '.exe')
|
name = os.path.abspath(name + '.exe')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user