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:
Родитель
3e7a25dd95
Коммит
f17f473af5
|
@ -10,8 +10,8 @@ tags
|
|||
doc/api.xml
|
||||
tmp/
|
||||
test/tmp*/
|
||||
node
|
||||
node_g
|
||||
iojs
|
||||
iojs_g
|
||||
*.swp
|
||||
.benchmark_reports
|
||||
/.project
|
||||
|
|
22
Makefile
22
Makefile
|
@ -11,9 +11,9 @@ PREFIX ?= /usr/local
|
|||
EXEEXT := $(shell $(PYTHON) -c \
|
||||
"import sys; print('.exe' if sys.platform == 'win32' else '')")
|
||||
|
||||
NODE ?= ./node$(EXEEXT)
|
||||
NODE_EXE = node$(EXEEXT)
|
||||
NODE_G_EXE = node_g$(EXEEXT)
|
||||
NODE ?= ./iojs$(EXEEXT)
|
||||
NODE_EXE = iojs$(EXEEXT)
|
||||
NODE_G_EXE = iojs_g$(EXEEXT)
|
||||
|
||||
# Default to verbose builds.
|
||||
# To do quiet/pretty builds, run `make V=` to set V to an empty string,
|
||||
|
@ -240,10 +240,10 @@ else
|
|||
ARCH=x86
|
||||
endif
|
||||
endif
|
||||
TARNAME=node-$(VERSION)
|
||||
TARNAME=iojs-$(VERSION)
|
||||
ifdef NIGHTLY
|
||||
TAG = nightly-$(NIGHTLY)
|
||||
TARNAME=node-$(VERSION)-$(TAG)
|
||||
TARNAME=iojs-$(VERSION)-$(TAG)
|
||||
endif
|
||||
TARBALL=$(TARNAME).tar.gz
|
||||
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
|
||||
|
@ -251,9 +251,9 @@ BINARYTAR=$(BINARYNAME).tar.gz
|
|||
PKG=out/$(TARNAME).pkg
|
||||
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
||||
|
||||
PKGSRC=nodejs-$(DESTCPU)-$(RAWVER).tgz
|
||||
PKGSRC=iojs-$(DESTCPU)-$(RAWVER).tgz
|
||||
ifdef NIGHTLY
|
||||
PKGSRC=nodejs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz
|
||||
PKGSRC=iojs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz
|
||||
endif
|
||||
|
||||
dist: doc $(TARBALL) $(PKG)
|
||||
|
@ -293,11 +293,11 @@ $(PKG): release-only
|
|||
$(PYTHON) ./configure --without-snapshot --dest-cpu=x64 --tag=$(TAG)
|
||||
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
|
||||
SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
|
||||
lipo $(PKGDIR)/32/usr/local/bin/node \
|
||||
$(PKGDIR)/usr/local/bin/node \
|
||||
-output $(PKGDIR)/usr/local/bin/node-universal \
|
||||
lipo $(PKGDIR)/32/usr/local/bin/iojs \
|
||||
$(PKGDIR)/usr/local/bin/iojs \
|
||||
-output $(PKGDIR)/usr/local/bin/iojs-universal \
|
||||
-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
|
||||
$(packagemaker) \
|
||||
--id "org.nodejs.Node" \
|
||||
|
|
2
node.gyp
2
node.gyp
|
@ -73,7 +73,7 @@
|
|||
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'node',
|
||||
'target_name': 'iojs',
|
||||
'type': 'executable',
|
||||
|
||||
'dependencies': [
|
||||
|
|
|
@ -28,7 +28,7 @@ console.error('argv=%j', process.argv);
|
|||
console.error('exec=%j', process.execPath);
|
||||
|
||||
if (process.argv[2] !== "child") {
|
||||
var child = spawn('./node', [__filename, "child"], {
|
||||
var child = spawn('./iojs', [__filename, "child"], {
|
||||
cwd: path.dirname(process.execPath)
|
||||
});
|
||||
|
||||
|
@ -44,7 +44,7 @@ if (process.argv[2] !== "child") {
|
|||
console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: '));
|
||||
if (process.platform === 'win32') {
|
||||
// On Windows argv[0] is not expanded into full path
|
||||
assert.equal(childArgv0, './node');
|
||||
assert.equal(childArgv0, './iojs');
|
||||
} else {
|
||||
assert.equal(childArgv0, process.execPath);
|
||||
}
|
||||
|
|
|
@ -108,12 +108,12 @@ def npm_files(action):
|
|||
if os.environ.get('PORTABLE'):
|
||||
# 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
|
||||
# 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
|
||||
# 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:
|
||||
shebang = os.path.join(node_prefix or '/', 'bin/node')
|
||||
shebang = os.path.join(node_prefix or '/', 'bin/iojs')
|
||||
update_shebang(link_path, shebang)
|
||||
else:
|
||||
assert(0) # unhandled action type
|
||||
|
@ -128,7 +128,7 @@ def subdir_files(path, dest, action):
|
|||
|
||||
def files(action):
|
||||
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'):
|
||||
action(['out/Release/node.d'], 'lib/dtrace/node.d')
|
||||
|
|
|
@ -742,20 +742,20 @@ class Context(object):
|
|||
|
||||
def GetVm(self, arch, mode):
|
||||
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:
|
||||
name = 'out/%s.%s/node' % (arch, mode)
|
||||
name = 'out/%s.%s/iojs' % (arch, mode)
|
||||
|
||||
# Currently GYP does not support output_dir for MSVS.
|
||||
# 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():
|
||||
out_dir = os.path.join(dirname(__file__), "..", "out")
|
||||
if not exists(out_dir):
|
||||
if mode == 'debug':
|
||||
name = os.path.abspath('Debug/node.exe')
|
||||
name = os.path.abspath('Debug/iojs.exe')
|
||||
else:
|
||||
name = os.path.abspath('Release/node.exe')
|
||||
name = os.path.abspath('Release/iojs.exe')
|
||||
else:
|
||||
name = os.path.abspath(name + '.exe')
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче