Skip to content

Commit

Permalink
build: rename binary from node to iojs
Browse files Browse the repository at this point in the history
* 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: #262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
  • Loading branch information
bnoordhuis committed Jan 8, 2015
1 parent 3e7a25d commit f17f473
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ tags
doc/api.xml
tmp/
test/tmp*/
node
node_g
iojs
iojs_g
*.swp
.benchmark_reports
/.project
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -240,20 +240,20 @@ 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)
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)
Expand Down Expand Up @@ -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" \
Expand Down
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

'targets': [
{
'target_name': 'node',
'target_name': 'iojs',
'type': 'executable',

'dependencies': [
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-process-argv-0.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});

Expand All @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand Down
10 changes: 5 additions & 5 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,20 +742,20 @@ def __init__(self, workspace, buildspace, verbose, vm, timeout, processor, suppr

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')

Expand Down

0 comments on commit f17f473

Please sign in to comment.