Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add symlink step to Mac installer
  • Loading branch information
remixz committed Feb 12, 2015
commit f186d1c11bdb502499a478f2dea7bcaaeb1cfa32
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PYTHON ?= python
DESTDIR ?=
SIGN ?=
PREFIX ?= /usr/local
NO_SYMLINK ?= false

# Determine EXEEXT
EXEEXT := $(shell $(PYTHON) -c \
Expand Down Expand Up @@ -50,7 +51,7 @@ config.gypi: configure
fi

install: all
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' '$(NO_SYMLINK)'

uninstall:
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
Expand Down Expand Up @@ -269,7 +270,7 @@ $(PKG): release-only pre-pkg
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)/32
rm -rf out/deps out/Release
$(PYTHON) ./configure --dest-cpu=x64 --tag=$(TAG)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR) NO_SYMLINK=true
SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
lipo $(PKGDIR)/32/usr/local/bin/iojs \
$(PKGDIR)/usr/local/bin/iojs \
Expand Down
7 changes: 5 additions & 2 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
install_path = None # base target directory (DESTDIR + PREFIX from Makefile)
target_defaults = None
variables = None
no_symlink = False

def abspath(*args):
path = os.path.join(*args)
Expand Down Expand Up @@ -132,7 +133,7 @@ def files(action):
exeext = '.exe' if is_windows else ''
action(['out/Release/iojs' + exeext], 'bin/iojs' + exeext)

if not is_windows:
if not is_windows and not no_symlink:
# Install iojs -> node compatibility symlink.
link_target = 'bin/node'
link_path = abspath(install_path, link_target)
Expand Down Expand Up @@ -186,14 +187,16 @@ def files(action):
], 'include/node/')

def run(args):
global node_prefix, install_path, target_defaults, variables
global node_prefix, install_path, target_defaults, variables, no_symlink

# chdir to the project's top-level directory
os.chdir(abspath(os.path.dirname(__file__), '..'))

conf = load_config()
variables = conf['variables']
target_defaults = conf['target_defaults']
# argv[4] is a variable representing whether a symlink should be made
no_symlink = True if len(args) > 4 and args[4] == 'true' else False
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no_symlink = len(args) > 4 and args[4] == 'true'?


# argv[2] is a custom install prefix for packagers (think DESTDIR)
# argv[3] is a custom install prefix (think PREFIX)
Expand Down
Loading