-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools, build: refactor macOS installer
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: #15179 Fixes: #15012 Refs: #5656 Refs: #2571 Refs: #7097 Reviewed-By: Lance Ball <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
- Loading branch information
1 parent
f53ca10
commit 803d9c1
Showing
12 changed files
with
119 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
[[ -d /usr/local/lib/node_modules/npm ]] \ | ||
&& rm -rf /usr/local/lib/node_modules/npm | ||
exit 0 |
23 changes: 23 additions & 0 deletions
23
tools/macos-installer/productbuild/Resources/en.lproj/conclusion.html.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
19 changes: 19 additions & 0 deletions
19
tools/macos-installer/productbuild/Resources/en.lproj/welcome.html.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.