Skip to content

Commit 265cb76

Browse files
committed
build: add new installer config for OS X
Works with PackageMaker (old tool, discontinued but still available for download from Apple). index.xml is now templated to insert the version number. PR-URL: #435 Reviewed-By: Chris Dickinson <[email protected]>
1 parent 8cf6079 commit 265cb76

9 files changed

+31
-25
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ ipch/
4444
/dist-osx
4545
/npm.wxs
4646
/tools/msvs/npm.wixobj
47+
/tools/osx-pkg.pmdoc/index.xml
4748
/test/addons/doc-*/
4849
email.md
4950
deps/v8-*

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ docclean:
223223

224224
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
225225
VERSION=v$(RAWVER)
226+
FULLVERSION=$(VERSION)
226227
RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py)
227228
PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
229+
NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')
228230
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
229231
DESTCPU ?= x64
230232
else
@@ -239,11 +241,11 @@ else
239241
ARCH=x86
240242
endif
241243
endif
242-
TARNAME=iojs-$(VERSION)
243244
ifdef NIGHTLY
244245
TAG = nightly-$(NIGHTLY)
245-
TARNAME=iojs-$(VERSION)-$(TAG)
246+
FULLVERSION=$(VERSION)-$(TAG)
246247
endif
248+
TARNAME=iojs-$(FULLVERSION)
247249
TARBALL=$(TARNAME).tar
248250
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
249251
BINARYTAR=$(BINARYNAME).tar
@@ -299,6 +301,7 @@ $(PKG): release-only
299301
-create
300302
mv $(PKGDIR)/usr/local/bin/iojs-universal $(PKGDIR)/usr/local/bin/iojs
301303
rm -rf $(PKGDIR)/32
304+
cat tools/osx-pkg.pmdoc/index.xml.tmpl | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > tools/osx-pkg.pmdoc/index.xml
302305
$(packagemaker) \
303306
--id "org.nodejs.Node" \
304307
--doc tools/osx-pkg.pmdoc \
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<pkg-contents spec="1.12"/>
1+
<pkg-contents spec="1.12"/>

tools/osx-pkg.pmdoc/01local.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<pkgref spec="1.12" uuid="053587FE-BDF3-4EF5-815D-281427431048"><config><identifier>org.nodejs.pkg</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true">../out/dist-osx/usr/local/</installFrom><installTo mod="true" relocatable="true">/usr/local</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.isRelativeType</mod><mod>installTo</mod><mod>locationType</mod><mod>relocatable</mod><mod>installFrom.path</mod><mod>installTo.isAbsoluteType</mod><mod>identifier</mod><mod>parent</mod><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod></config></pkgref>
1+
<pkgref spec="1.12" uuid="053587FE-BDF3-4EF5-815D-281427431048"><config><identifier>org.iojs.pkg</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true">../out/dist-osx/usr/local/</installFrom><installTo mod="true" relocatable="true">/usr/local</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.isRelativeType</mod><mod>installTo</mod><mod>locationType</mod><mod>relocatable</mod><mod>installFrom.path</mod><mod>installTo.isAbsoluteType</mod><mod>identifier</mod><mod>parent</mod><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod></config></pkgref>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<pkg-contents spec="1.12"/>
1+
<pkg-contents spec="1.12"/>

tools/osx-pkg.pmdoc/02npm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<pkgref spec="1.12" uuid="DF0233A3-6B5D-4FBF-8048-8FC57F42278F"><config><identifier>org.nodejs.node.npm.pkg</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true">../deps/npm</installFrom><installTo mod="true">/usr/local/lib/node_modules/npm</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod><mod>installTo</mod><mod>scripts.postinstall.isRelativeType</mod><mod>parent</mod><mod>installTo.isAbsoluteType</mod></config><scripts><postinstall relative="true" mod="true">osx-pkg-postinstall.sh</postinstall></scripts></pkgref>
1+
<pkgref spec="1.12" uuid="DF0233A3-6B5D-4FBF-8048-8FC57F42278F"><config><identifier>org.iojs.npm.pkg</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true">../deps/npm</installFrom><installTo mod="true">/usr/local/lib/node_modules/npm</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>installFrom.isRelativeType</mod><mod>installTo</mod><mod>scripts.postinstall.isRelativeType</mod><mod>parent</mod><mod>installTo.isAbsoluteType</mod></config><scripts><postinstall relative="true" mod="true">osx-pkg-postinstall.sh</postinstall></scripts></pkgref>

tools/osx-pkg.pmdoc/index.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

tools/osx-pkg.pmdoc/index.xml.tmpl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<pkmkdoc spec="1.12"><properties><title>io.js</title><build>/Users/iojs/Desktop/iojs.pkg</build><organization>org.iojs</organization><userSees ui="both"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="io.js" id="choice3" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.iojs.pkg"/></choice><choice title="npm" id="choice4" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.iojs.npm.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" mod="true" type="background">../doc/osx_installer_logo.png</resource><resource relative="true" mod="true" type="license">../LICENSE</resource><resource mime-type="text/rtf" kind="embedded" type="welcome"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
2+
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
3+
{\colortbl;\red255\green255\blue255;}
4+
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
5+
6+
\f0\fs26 \cf0 This package will install io.js __iojsversion__ and npm __npmversion__ into /usr/local/. The binary /usr/local/bin/iojs will also be symlinked as /usr/local/bin/node.}]]></resource><resource mime-type="text/rtf" kind="embedded" type="conclusion"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
7+
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
8+
{\colortbl;\red255\green255\blue255;}
9+
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
10+
11+
\f0\fs26 \cf0 io.js was installed at\
12+
\
13+
/usr/local/bin/iojs\
14+
and symlinked at\
15+
/usr/local/bin/node\
16+
\
17+
npm was installed at\
18+
\
19+
/usr/local/bin/npm\
20+
\
21+
Make sure that /usr/local/bin is in your $PATH.}]]></resource></locale></resources><flags/><item type="file">01local.xml</item><item type="file">02npm.xml</item><mod>properties.title</mod><mod>properties.userDomain</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>

0 commit comments

Comments
 (0)