Skip to content

Commit

Permalink
build: add new installer config for OS X
Browse files Browse the repository at this point in the history
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 <christopher.s.dickinson@gmail.com>
  • Loading branch information
rvagg committed Jan 16, 2015
1 parent 8cf6079 commit 265cb76
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -44,6 +44,7 @@ ipch/
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
/tools/osx-pkg.pmdoc/index.xml
/test/addons/doc-*/
email.md
deps/v8-*
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -223,8 +223,10 @@ docclean:

RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
VERSION=v$(RAWVER)
FULLVERSION=$(VERSION)
RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py)
PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
DESTCPU ?= x64
else
Expand All @@ -239,11 +241,11 @@ else
ARCH=x86
endif
endif
TARNAME=iojs-$(VERSION)
ifdef NIGHTLY
TAG = nightly-$(NIGHTLY)
TARNAME=iojs-$(VERSION)-$(TAG)
FULLVERSION=$(VERSION)-$(TAG)
endif
TARNAME=iojs-$(FULLVERSION)
TARBALL=$(TARNAME).tar
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
BINARYTAR=$(BINARYNAME).tar
Expand Down Expand Up @@ -299,6 +301,7 @@ $(PKG): release-only
-create
mv $(PKGDIR)/usr/local/bin/iojs-universal $(PKGDIR)/usr/local/bin/iojs
rm -rf $(PKGDIR)/32
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
$(packagemaker) \
--id "org.nodejs.Node" \
--doc tools/osx-pkg.pmdoc \
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion tools/osx-pkg.pmdoc/01local-contents.xml
@@ -1 +1 @@
<pkg-contents spec="1.12"/>
<pkg-contents spec="1.12"/>
2 changes: 1 addition & 1 deletion tools/osx-pkg.pmdoc/01local.xml
@@ -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>
<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>
2 changes: 1 addition & 1 deletion tools/osx-pkg.pmdoc/02npm-contents.xml
@@ -1 +1 @@
<pkg-contents spec="1.12"/>
<pkg-contents spec="1.12"/>
2 changes: 1 addition & 1 deletion tools/osx-pkg.pmdoc/02npm.xml
@@ -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>
<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>
19 changes: 0 additions & 19 deletions tools/osx-pkg.pmdoc/index.xml

This file was deleted.

21 changes: 21 additions & 0 deletions tools/osx-pkg.pmdoc/index.xml.tmpl
@@ -0,0 +1,21 @@
<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
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\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
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs26 \cf0 io.js was installed at\
\
/usr/local/bin/iojs\
and symlinked at\
/usr/local/bin/node\
\
npm was installed at\
\
/usr/local/bin/npm\
\
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 comments on commit 265cb76

Please sign in to comment.