Skip to content

Commit dc39ab3

Browse files
committed
Improve OSX installer
1 parent ec90ede commit dc39ab3

File tree

8 files changed

+33
-75
lines changed

8 files changed

+33
-75
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ ipch/
3333
/options.gypi
3434
*-nodegyp*
3535
/gyp-mac-tool
36+
/dist-osx

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ clean:
120120

121121
distclean: docclean
122122
-find tools -name "*.pyc" | xargs rm -f
123+
-rm -rf dist-osx
123124
-rm -rf out/ node node_g
124125

125126
check:
22.8 KB
Loading

tools/msvs/msi/getnodeversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
minor = line.split()[2]
77
if re.match('#define NODE_PATCH_VERSION', line):
88
patch = line.split()[2]
9-
print '{0:s}.{1:s}.{2:s}.0'.format(major, minor, patch)
9+
print '{0:s}.{1:s}.{2:s}'.format(major, minor, patch)

tools/osx-dist.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,26 @@
33
TOOLS=`dirname $0`
44
ROOT=$TOOLS/..
55

6-
VERSION=`git describe`
7-
CONTENTS=dist-osx/nodejs-$VERSION
6+
VERSION=`python $TOOLS/msvs/msi/getnodeversion.py < $ROOT/src/node_version.h`
7+
CONTENTS=$ROOT/dist-osx
8+
PMDOC=$TOOLS/osx-pkg.pmdoc
9+
VENDOR='org.nodejs'
10+
NAME=NodeJS
811

912
# go build it in the root of the git repository
1013
pushd $ROOT
1114

12-
./configure --prefix=/usr/local/nodejs
15+
./configure --prefix=/usr/local
1316
make
1417
make install DESTDIR="$CONTENTS"
1518

16-
mkdir -p "$CONTENTS/usr/local/bin"
17-
pushd "$CONTENTS/usr/local/bin"
18-
ln -s ../nodejs/bin/* .
19-
popd # $CONTENTS/usr/local/bin
20-
2119
popd # $ROOT
2220

23-
"$TOOLS/osx-pkg-dmg-create.sh" "$ROOT/$CONTENTS" NodeJS $VERSION 'org.nodejs'
21+
PKGID="$VENDOR.$NAME-$VERSION"
22+
23+
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
24+
25+
$packagemaker \
26+
--id "$PKGID" \
27+
--doc $PMDOC \
28+
--out $CONTENTS/node-$VERSION.pkg

tools/osx-pkg-dmg-create.sh

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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">../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><contents><file-list>01local-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>

tools/osx-pkg.pmdoc/index.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<pkmkdoc spec="1.12"><properties><title>Node</title><build>/Users/ryan/Desktop/Node.pkg</build><organization>org.nodejs</organization><userSees ui="easy"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="node" id="choice3" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.nodejs.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" mod="true" type="background">../doc/mac_osx_nodejs_installer_logo.png</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 node and node-waf into /usr/local/bin}]]></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 Node was installed at\
12+
\
13+
/usr/local/bin/node\
14+
\
15+
Make sure that /usr/local/bin is in your path.}]]></resource></locale></resources><flags/><item type="file">01local.xml</item><mod>properties.title</mod><mod>properties.userDomain</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>

0 commit comments

Comments
 (0)