mirror of https://github.com/lukechilds/node.git
Browse Source
Creates macOS pkg installer by using `pkgbuild` and `productbuild`. Removes previous npm installation before installing npm. Packages carry correct version attributes. Support for intl installer features, defaults to `en`. Fancy formatted license. Renamed `osx` references to `macOS`. Optional installation of npm. PR-URL: https://github.com/nodejs/node/pull/15179 Fixes: https://github.com/nodejs/node/issues/15012 Refs: https://github.com/nodejs/node/pull/5656 Refs: https://github.com/nodejs/node/pull/2571 Refs: https://github.com/nodejs/node/pull/7097 Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>canary-base
JP Wesselink
7 years ago
committed by
Ruben Bridgewater
12 changed files with 119 additions and 122 deletions
@ -0,0 +1,5 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
cd /usr/local/bin || exit 1 |
||||
|
ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm |
||||
|
ln -sf ../lib/node_modules/npm/bin/npx-cli.js npx |
@ -0,0 +1,5 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
[[ -d /usr/local/lib/node_modules/npm ]] \ |
||||
|
&& rm -rf /usr/local/lib/node_modules/npm |
||||
|
exit 0 |
@ -0,0 +1,23 @@ |
|||||
|
<html> |
||||
|
<head> |
||||
|
<style> |
||||
|
body { |
||||
|
font-family: Helvetica; |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
li:last-child { |
||||
|
margin-bottom: 16px; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div> |
||||
|
<p>This package has installed:</p> |
||||
|
<ul> |
||||
|
<li>Node.js {nodeversion} to <code>/usr/local/bin/node</code></li> |
||||
|
<li>npm {npmversion} to <code>/usr/local/bin/npm</code></li> |
||||
|
</ul> |
||||
|
<p>Make sure that <code>/usr/local/bin</code> is in your <code>$PATH</code>.</p> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,19 @@ |
|||||
|
<html> |
||||
|
<head> |
||||
|
<style> |
||||
|
body { |
||||
|
font-family: Helvetica; |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div> |
||||
|
<p>This package will install:</p> |
||||
|
<ul> |
||||
|
<li>Node.js {nodeversion} to <code>/usr/local/bin/node</code></li> |
||||
|
<li>npm {npmversion} to <code>/usr/local/bin/npm</code></li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<installer-gui-script minSpecVersion="1"> |
||||
|
<title>Node.js</title> |
||||
|
<welcome file="welcome.html"/> |
||||
|
<conclusion file="conclusion.html"/> |
||||
|
<background alignment="topleft" file="osx_installer_logo.png"/> |
||||
|
<pkg-ref id="org.nodejs.node.pkg" auth="root"/> |
||||
|
<pkg-ref id="org.nodejs.npm.pkg" auth="root"/> |
||||
|
<options customize="allow" require-scripts="false"/> |
||||
|
<license file="license.rtf"/> |
||||
|
<choices-outline> |
||||
|
<line choice="org.nodejs.node.pkg" /> |
||||
|
<line choice="org.nodejs.npm.pkg"/> |
||||
|
</choices-outline> |
||||
|
<choice id="org.nodejs.node.pkg" visible="true" title="Node.js {nodeversion}"> |
||||
|
<pkg-ref id="org.nodejs.node.pkg"/> |
||||
|
</choice> |
||||
|
<pkg-ref id="org.nodejs.node.pkg" version="{nodeversion}" onConclusion="none">node-{nodeversion}.pkg</pkg-ref> |
||||
|
<choice id="org.nodejs.npm.pkg" visible="true" title="npm {npmversion}"> |
||||
|
<pkg-ref id="org.nodejs.npm.pkg"/> |
||||
|
</choice> |
||||
|
<pkg-ref id="org.nodejs.npm.pkg" version="{npmversion}" onConclusion="none">npm-{npmversion}.pkg</pkg-ref> |
||||
|
</installer-gui-script> |
@ -1 +0,0 @@ |
|||||
<pkg-contents spec="1.12"/> |
|
@ -1,25 +0,0 @@ |
|||||
<pkgref spec="1.12" uuid="053587FE-BDF3-4EF5-815D-281427431048"> |
|
||||
<config> |
|
||||
<identifier>org.nodejs.node.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 +0,0 @@ |
|||||
<pkg-contents spec="1.12"/> |
|
@ -1,24 +0,0 @@ |
|||||
<pkgref spec="1.12" uuid="DF0233A3-6B5D-4FBF-8048-8FC57F42278F"> |
|
||||
<config> |
|
||||
<identifier>org.nodejs.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,55 +0,0 @@ |
|||||
<pkmkdoc spec="1.12"> |
|
||||
<properties> |
|
||||
<title>Node.js</title> |
|
||||
<build>/Users/nodejs/Desktop/node.pkg</build> |
|
||||
<organization>org.nodejs</organization> |
|
||||
<userSees ui="both"/> |
|
||||
<min-target os="3"/> |
|
||||
<domain system="true"/> |
|
||||
</properties> |
|
||||
<distribution> |
|
||||
<versions min-spec="1.000000"/> |
|
||||
<scripts></scripts> |
|
||||
</distribution> |
|
||||
<contents> |
|
||||
<choice title="Node.js" id="choice1" starts_selected="true" starts_enabled="true" starts_hidden="false"> |
|
||||
<pkgref id="org.nodejs.node.pkg"/> |
|
||||
</choice> |
|
||||
<choice title="npm" id="choice2" starts_selected="true" starts_enabled="true" starts_hidden="false"> |
|
||||
<pkgref id="org.nodejs.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 Node.js {nodeversion} and npm {npmversion} into /usr/local/.}]]></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 Node.js was installed 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> |
|
Loading…
Reference in new issue