-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools, build: macOS installer improvements #15179
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script needs to return an exit code 0 to work (see docosx). Otherwise it will abort (showing "The installation failed" if there isn't a
/usr/local/lib/node_modules/npm
). Can you addto the end of this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't
rm -f
return 0 even when there was no file to remove? And when it failed to remove npm then we have an unexpected failure anyway.