-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Refactor Mac installer generation #776
Conversation
This refactors the Mac .pkg generation to use Packages. This moves io.js away from using the deprecated Package Maker, and allows for easy localization of the installer.
Amazing, this is a great contribution @remixz, I'll try and make time to test this out and give feedback. Initial quesitons:
|
I think an uninstall is important. |
I'm not sure if that makes sense on OS X. A symlink opt-out may give the false impression that joyent/node and io.js can coexist peacefully when they can't. The installer installs to /usr/local. If a joyent/node install already exists there, io.js will happily stamp on it. The symlink is just the top of the ice berg. The only scenario that I can think of where an opt-out would help is when joyent/node and io.js are installed to separate locations that are both on the PATH. The exact meaning of the "Create a symlink" checkbox would need to be called out in the installer if we don't want angry bug reports. :-) |
@bnoordhuis A description can be added to the symlink installer entry, so when someone clicks on it to uncheck it, it can say something like "joyent/node and io.js don't coexist nicely, keeping this symlink is recommended". |
@remixz Sounds good. |
Could we reuse the translations for other distributions? |
@@ -252,16 +253,26 @@ release-only: | |||
exit 1 ; \ | |||
fi | |||
|
|||
pre-pkg: |
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.
Should this be added to .PHONY
?
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.
@tellnes Good catch. Fixed, thanks!
I prepared the German translation for the installer using Packages: https://github.com/fhemberger/io.js/commit/65ba54ec0eb112ce040415ac2b3b321b8e38b5d1 |
@tellnes It's likely, but there'd have to be some changes so that it doesn't specifically reference Mac locations. @fhemberger Awesome!! 👍 🎉 It might need to be rebased by the time this is merged, since the file will probably change a bit when the uninstaller is finalized, but this is great. |
@@ -194,6 +195,8 @@ def run(args): | |||
conf = load_config() | |||
variables = conf['variables'] | |||
target_defaults = conf['target_defaults'] | |||
# argv[4] is a variable representing whether a symlink should be made | |||
no_symlink = True if len(args) > 4 and args[4] == 'true' else False |
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.
no_symlink = len(args) > 4 and args[4] == 'true'
?
@bnoordhuis Implemented all of your changes. Thanks! |
LGTM but I'm not an expert when it comes to OS X installers. @iojs/collaborators Can I have one more LGTM? |
@bnoordhuis Ah, I need to finish the uninstaller portion before this can ship. (unless you want to move that to another PR?) |
Cool. I've added the uninstaller, which means once reviewed, this should be good to go. |
From running local tests, it looks like |
@evanlucas I changed For the success screen, I'm pretty sure it can't change based on what's installed, which definitely leaves a sucky experience for people doing an uninstall. |
i18n changes pending resolution of #819 |
Is the updated installer ready to land? As #819 seems to be resolved according to the TC meeting, I'd love to add the translation for the installer and make it a proper PR. |
I don't know if it's possible to implement this but what tools/install.py does is unlink the directory iff it's empty after removing all installed files. |
@bnoordhuis Yup, that can be done! Added with 2526e1d. @fhemberger If the translation issue is all resolved, then I think this is ready to land. |
Thanks, I'll create a proper translation PR for further discussion as soon as this has landed. |
@remixz We should add a paragraph to |
Any news on the status of the new Mac installer? cc @nodejs/core |
@nodejs/collaborators Anyone familiar with the existing OSX installer that can review this? |
On my list but not a high priority compared to other things like node-gyp, so help from others would be greatly appreciated. @remixz if you have time would you mind rebasing on the current |
I think we should definitely try to get this merged before the converged release. Anything I can do to help? |
The changes in this PR need to be merged against the current master for the 4.0.0 release, including the renaming from 'iojs' to 'node'. It would be great if we could get this running, so we can ship localized installers in the next major version. |
I did a rebase against master in #2571, can you all please have a look? |
Closing this in favor of #2571 |
This refactors the Mac installer generation to use Packages. This moves io.js away from using the deprecated Package Maker, and allows for easy localization of the Mac installer.
I've included a README with localization instructions, which should make it easy for localization teams to localize the installer. The only thing I couldn't test with this was the package signing, so that should be tested before merging. This might also help pave the way to fixing other Mac installer-related issues, since now it's using something a bit modern for generation.