From 97e79f504b1eb6509be5c492dc7fb1a7f7e6c867 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Mon, 9 Feb 2015 19:27:52 -0800 Subject: [PATCH 01/10] Refactor Mac .pkg generation 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. --- .gitignore | 6 +- Makefile | 18 +- tools/osx-pkg.pmdoc/01local-contents.xml | 1 - tools/osx-pkg.pmdoc/01local.xml | 1 - tools/osx-pkg.pmdoc/02npm-contents.xml | 1 - tools/osx-pkg.pmdoc/02npm.xml | 1 - tools/osx-pkg.pmdoc/index.xml.tmpl | 21 - tools/osx-pkg/README.md | 31 + tools/osx-pkg/osx-pkg.pkgproj | 1550 +++++++++++++++++ .../postinstall.sh} | 0 tools/osx-pkg/strings/en/introduction.rtf | 6 + tools/osx-pkg/strings/en/summary.rtf | 16 + 12 files changed, 1619 insertions(+), 33 deletions(-) delete mode 100644 tools/osx-pkg.pmdoc/01local-contents.xml delete mode 100644 tools/osx-pkg.pmdoc/01local.xml delete mode 100644 tools/osx-pkg.pmdoc/02npm-contents.xml delete mode 100644 tools/osx-pkg.pmdoc/02npm.xml delete mode 100644 tools/osx-pkg.pmdoc/index.xml.tmpl create mode 100644 tools/osx-pkg/README.md create mode 100755 tools/osx-pkg/osx-pkg.pkgproj rename tools/{osx-pkg-postinstall.sh => osx-pkg/postinstall.sh} (100%) create mode 100644 tools/osx-pkg/strings/en/introduction.rtf create mode 100644 tools/osx-pkg/strings/en/summary.rtf diff --git a/.gitignore b/.gitignore index 12d973ec7004b0..251b2092348f11 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,6 @@ ipch/ /dist-osx /npm.wxs /tools/msvs/npm.wixobj -/tools/osx-pkg.pmdoc/index.xml /test/addons/doc-*/ email.md deps/v8-* @@ -76,3 +75,8 @@ deps/zlib/zlib.target.mk # test artifacts tools/faketime icu_config.gypi + +# mac installer files +/tools/osx-pkg/osx-pkg-out.pkgproj +/tools/osx-pkg/strings/LICENSE.txt +/tools/osx-pkg/strings/**/*.out.rtf diff --git a/Makefile b/Makefile index 39741096f1d3ad..f0e87d198f3900 100644 --- a/Makefile +++ b/Makefile @@ -219,7 +219,7 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) BINARYTAR=$(BINARYNAME).tar XZ=$(shell which xz > /dev/null 2>&1; echo $$?) PKG=out/$(TARNAME).pkg -packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker +packagesbuild=/usr/local/bin/packagesbuild PKGSRC=iojs-$(DESTCPU)-$(RAWVER).tgz ifdef NIGHTLY @@ -252,9 +252,17 @@ release-only: exit 1 ; \ fi +pre-pkg: + cp LICENSE tools/osx-pkg/strings/LICENSE.txt + cat tools/osx-pkg/osx-pkg.pkgproj | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|introduction.rtf|introduction.out.rtf|g' > tools/osx-pkg/osx-pkg-out.pkgproj + $(foreach dir, \ + $(shell echo tools/osx-pkg/strings/*/), \ + cat $(dir)introduction.rtf | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > $(dir)introduction.out.rtf; \ + ) + pkg: $(PKG) -$(PKG): release-only +$(PKG): release-only pre-pkg rm -rf $(PKGDIR) rm -rf out/deps out/Release $(PYTHON) ./configure --dest-cpu=ia32 --tag=$(TAG) @@ -269,11 +277,7 @@ $(PKG): release-only -create mv $(PKGDIR)/usr/local/bin/iojs-universal $(PKGDIR)/usr/local/bin/iojs rm -rf $(PKGDIR)/32 - cat tools/osx-pkg.pmdoc/index.xml.tmpl | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > tools/osx-pkg.pmdoc/index.xml - $(packagemaker) \ - --id "org.nodejs.Node" \ - --doc tools/osx-pkg.pmdoc \ - --out $(PKG) + $(packagesbuild) tools/osx-pkg/osx-pkg-out.pkgproj SIGN="$(INT_SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh $(TARBALL): release-only $(NODE_EXE) doc diff --git a/tools/osx-pkg.pmdoc/01local-contents.xml b/tools/osx-pkg.pmdoc/01local-contents.xml deleted file mode 100644 index ccbb4189961b0a..00000000000000 --- a/tools/osx-pkg.pmdoc/01local-contents.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tools/osx-pkg.pmdoc/01local.xml b/tools/osx-pkg.pmdoc/01local.xml deleted file mode 100644 index 1d99404e492982..00000000000000 --- a/tools/osx-pkg.pmdoc/01local.xml +++ /dev/null @@ -1 +0,0 @@ -org.iojs.pkg1.0../out/dist-osx/usr/local//usr/localinstallTo.isRelativeTypeinstallTolocationTyperelocatableinstallFrom.pathinstallTo.isAbsoluteTypeidentifierparentinstallTo.pathinstallFrom.isRelativeType diff --git a/tools/osx-pkg.pmdoc/02npm-contents.xml b/tools/osx-pkg.pmdoc/02npm-contents.xml deleted file mode 100644 index ccbb4189961b0a..00000000000000 --- a/tools/osx-pkg.pmdoc/02npm-contents.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tools/osx-pkg.pmdoc/02npm.xml b/tools/osx-pkg.pmdoc/02npm.xml deleted file mode 100644 index 06360b5df9550f..00000000000000 --- a/tools/osx-pkg.pmdoc/02npm.xml +++ /dev/null @@ -1 +0,0 @@ -org.iojs.npm.pkg1.0../deps/npm/usr/local/lib/node_modules/npminstallTo.pathinstallFrom.isRelativeTypeinstallToscripts.postinstall.isRelativeTypeparentinstallTo.isAbsoluteTypeosx-pkg-postinstall.sh diff --git a/tools/osx-pkg.pmdoc/index.xml.tmpl b/tools/osx-pkg.pmdoc/index.xml.tmpl deleted file mode 100644 index 7376a9d376d5a4..00000000000000 --- a/tools/osx-pkg.pmdoc/index.xml.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -io.js/Users/iojs/Desktop/iojs.pkgorg.iojs../doc/osx_installer_logo.png../LICENSE01local.xml02npm.xmlproperties.titleproperties.userDomainproperties.anywhereDomainproperties.systemDomain diff --git a/tools/osx-pkg/README.md b/tools/osx-pkg/README.md new file mode 100644 index 00000000000000..2232e57133345c --- /dev/null +++ b/tools/osx-pkg/README.md @@ -0,0 +1,31 @@ +## osx-pkg + +### Build + +Prerequisites: + +* Packages: http://s.sudre.free.fr/Software/Packages/about.html + +In the root io.js folder: + +```bash +make pkg +``` + +### Localization + +There are two files that can be localized in the OS X installer: the introduction, and the summary. + +1. Make sure you've installed Packages: http://s.sudre.free.fr/Software/Packages/about.html +2. Duplicate the `strings/en` folder for reference, and rename the folder to the language you are localizing (ex. `fr`, `ru`, etc.) +3. Translate `introduction.rtf` and `summary.rtf`. Do not modify the words `__iojsversion__` or `__npmversion__`, as these are automatically replaced by the build step with the io.js and npm versions, respectively. +4. In the root `io.js` folder, run `make pre-pkg`. This will generate the files needed for Packages. +5. Open `tools/osx-pkg/osx-pkg.pkgproj` in Packages. (Not `osx-pkg-out.pkgproj`, as this is a generated file) +6. In Packages, go to the Presentation tab, and if not already selected, choose "Introduction" from the dropdown on the right-hand side. +![packages preview](https://s3.amazonaws.com/f.cl.ly/items/3q160p2r1X1B3i2N1W42/Screen%20Shot%202015-02-09%20at%207.26.09%20PM.png) +7. Press the "+" at the bottom right. This will add a new language entry. Click on the flag, and choose which language you are localizing. +8. Click on the column next to the flag, and ensure "Relative to Project" is selected. It's a rectangle with the letter "R" inside of it. +9. Click on the last column, which will currently have a dash in it, and press "Choose...". +10. Locate the `introduction.rtf` file you translated, and choose it. Don't worry about the `introduction.out.rtf` file, as this is an autogenerated file, and is dealt with when compiling. +11. In the dropdown that says "Introduction" at the top, choose "Conclusion" and repeat this process for the `conclusion.rtf` file. +12. Save the project, and commit your changes. The generated files are automatically ignored by Git, so you don't have to worry about accidentally committing them in. diff --git a/tools/osx-pkg/osx-pkg.pkgproj b/tools/osx-pkg/osx-pkg.pkgproj new file mode 100755 index 00000000000000..ae2a55844d9d3f --- /dev/null +++ b/tools/osx-pkg/osx-pkg.pkgproj @@ -0,0 +1,1550 @@ + + + + + PACKAGES + + + PACKAGE_FILES + + DEFAULT_INSTALL_LOCATION + / + HIERARCHY + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Utilities + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Applications + PATH_TYPE + 0 + PERMISSIONS + 509 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Application Support + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Automator + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Documentation + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Filesystems + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Frameworks + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Input Methods + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Internet Plug-Ins + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchAgents + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchDaemons + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PreferencePanes + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Preferences + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 80 + PATH + Printers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PrivilegedHelperTools + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickLook + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickTime + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Screen Savers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Scripts + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Services + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Widgets + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Extensions + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + System + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Shared + PATH_TYPE + 0 + PERMISSIONS + 1023 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Users + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + ../../out/dist-osx/usr/local + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + GID + 0 + PATH + usr + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + + GID + 0 + PATH + / + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + PAYLOAD_TYPE + 0 + VERSION + 3 + + PACKAGE_SCRIPTS + + RESOURCES + + + PACKAGE_SETTINGS + + AUTHENTICATION + 1 + CONCLUSION_ACTION + 0 + IDENTIFIER + org.iojs.pkg + NAME + io.js + OVERWRITE_PERMISSIONS + + VERSION + __iojsversion__ + + UUID + F15133E4-7140-467A-90C3-BB6B53A9C79E + + + PACKAGE_FILES + + DEFAULT_INSTALL_LOCATION + / + HIERARCHY + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Utilities + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Applications + PATH_TYPE + 0 + PERMISSIONS + 509 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Application Support + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Automator + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Documentation + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Filesystems + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Frameworks + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Input Methods + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Internet Plug-Ins + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchAgents + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchDaemons + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PreferencePanes + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Preferences + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 80 + PATH + Printers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PrivilegedHelperTools + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickLook + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickTime + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Screen Savers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Scripts + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Services + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Widgets + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Extensions + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + System + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Shared + PATH_TYPE + 0 + PERMISSIONS + 1023 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Users + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + ../../deps/npm + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + GID + 0 + PATH + node_modules + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + + GID + 0 + PATH + lib + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + + GID + 0 + PATH + local + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + + GID + 0 + PATH + usr + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + + GID + 0 + PATH + / + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + PAYLOAD_TYPE + 0 + VERSION + 3 + + PACKAGE_SCRIPTS + + POSTINSTALL_PATH + + PATH + postinstall.sh + PATH_TYPE + 1 + + RESOURCES + + + PACKAGE_SETTINGS + + AUTHENTICATION + 1 + CONCLUSION_ACTION + 0 + IDENTIFIER + org.iojs.npm.pkg + LOCATION + 0 + NAME + npm + OVERWRITE_PERMISSIONS + + VERSION + __npmversion__ + + TYPE + 0 + UUID + 2D16FD51-8800-422D-9E9B-EC59D2157FE8 + + + PROJECT + + PROJECT_COMMENTS + + NOTES + + PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1M + IDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQv + c3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1l + cXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7 + IGNoYXJzZXQ9VVRGLTgiPgo8bWV0YSBodHRwLWVxdWl2PSJDb250 + ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp + dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u + dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD + b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjEzNDQuNzIiPgo8c3R5bGUg + dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5 + Pgo8L2JvZHk+CjwvaHRtbD4K + + + PROJECT_PRESENTATION + + BACKGROUND + + ALIGNMENT + 4 + BACKGROUND_PATH + + PATH + ../../doc/osx_installer_logo.png + PATH_TYPE + 1 + + CUSTOM + 1 + SCALING + 2 + + INSTALLATION TYPE + + HIERARCHIES + + INSTALLER + + LIST + + + DESCRIPTION + + OPTIONS + + HIDDEN + + STATE + 0 + + PACKAGE_UUID + F15133E4-7140-467A-90C3-BB6B53A9C79E + REQUIREMENTS + + TITLE + + TOOLTIP + + TYPE + 0 + UUID + 95681E96-6FC4-494B-8901-D85A1178E7D4 + + + DESCRIPTION + + OPTIONS + + HIDDEN + + STATE + 1 + + PACKAGE_UUID + 2D16FD51-8800-422D-9E9B-EC59D2157FE8 + REQUIREMENTS + + TITLE + + TOOLTIP + + TYPE + 0 + UUID + E6975970-F10F-41C5-8FD8-8D816D281D47 + + + REMOVED + + + + INSTALLATION TYPE + 0 + MODE + 0 + + INSTALLATION_STEPS + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewIntroductionController + INSTALLER_PLUGIN + Introduction + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewReadMeController + INSTALLER_PLUGIN + ReadMe + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewLicenseController + INSTALLER_PLUGIN + License + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewDestinationSelectController + INSTALLER_PLUGIN + TargetSelect + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewInstallationTypeController + INSTALLER_PLUGIN + PackageSelection + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewInstallationController + INSTALLER_PLUGIN + Install + LIST_TITLE_KEY + InstallerSectionTitle + + + ICPRESENTATION_CHAPTER_VIEW_CONTROLLER_CLASS + ICPresentationViewSummaryController + INSTALLER_PLUGIN + Summary + LIST_TITLE_KEY + InstallerSectionTitle + + + INTRODUCTION + + LOCALIZATIONS + + + LANGUAGE + English + VALUE + + PATH + strings/en/introduction.rtf + PATH_TYPE + 1 + + + + + LICENSE + + KEYWORDS + + LOCALIZATIONS + + + LANGUAGE + English + VALUE + + PATH + strings/LICENSE.txt + PATH_TYPE + 1 + + + + MODE + 0 + TEMPLATE + BSD License + + README + + LOCALIZATIONS + + + SUMMARY + + LOCALIZATIONS + + + LANGUAGE + English + VALUE + + PATH + strings/en/summary.rtf + PATH_TYPE + 1 + + + + + TITLE + + LOCALIZATIONS + + + LANGUAGE + English + VALUE + io.js + + + + + PROJECT_REQUIREMENTS + + LIST + + POSTINSTALL_PATH + + PREINSTALL_PATH + + RESOURCES + + ROOT_VOLUME_ONLY + + + PROJECT_SETTINGS + + ADVANCED_OPTIONS + + BUILD_FORMAT + 0 + BUILD_PATH + + PATH + ../../out + PATH_TYPE + 1 + + EXCLUDED_FILES + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + .DS_Store + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Remove .DS_Store files + PROXY_TOOLTIP + Remove ".DS_Store" files created by the Finder. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + .pbdevelopment + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Remove .pbdevelopment files + PROXY_TOOLTIP + Remove ".pbdevelopment" files created by ProjectBuilder or Xcode. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + CVS + TYPE + 1 + + + REGULAR_EXPRESSION + + STRING + .cvsignore + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + .cvspass + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + .svn + TYPE + 1 + + + REGULAR_EXPRESSION + + STRING + .git + TYPE + 1 + + + REGULAR_EXPRESSION + + STRING + .gitignore + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Remove SCM metadata + PROXY_TOOLTIP + Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + classes.nib + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + designable.db + TYPE + 0 + + + REGULAR_EXPRESSION + + STRING + info.nib + TYPE + 0 + + + PROTECTED + + PROXY_NAME + Optimize nib files + PROXY_TOOLTIP + Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles. + STATE + + + + PATTERNS_ARRAY + + + REGULAR_EXPRESSION + + STRING + Resources Disabled + TYPE + 1 + + + PROTECTED + + PROXY_NAME + Remove Resources Disabled folders + PROXY_TOOLTIP + Remove "Resources Disabled" folders. + STATE + + + + SEPARATOR + + + + NAME + iojs-__iojsversion__ + + + TYPE + 0 + VERSION + 2 + + diff --git a/tools/osx-pkg-postinstall.sh b/tools/osx-pkg/postinstall.sh similarity index 100% rename from tools/osx-pkg-postinstall.sh rename to tools/osx-pkg/postinstall.sh diff --git a/tools/osx-pkg/strings/en/introduction.rtf b/tools/osx-pkg/strings/en/introduction.rtf new file mode 100644 index 00000000000000..f3a88ea586a904 --- /dev/null +++ b/tools/osx-pkg/strings/en/introduction.rtf @@ -0,0 +1,6 @@ +{\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 io.js __iojsversion__ and npm __npmversion__ into /usr/local/. The binary /usr/local/bin/iojs will also be symlinked as /usr/local/bin/node.} diff --git a/tools/osx-pkg/strings/en/summary.rtf b/tools/osx-pkg/strings/en/summary.rtf new file mode 100644 index 00000000000000..7096282ac3f262 --- /dev/null +++ b/tools/osx-pkg/strings/en/summary.rtf @@ -0,0 +1,16 @@ +{\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 io.js was installed at\ +\ + /usr/local/bin/iojs\ +and symlinked at\ + /usr/local/bin/node\ +\ +npm was installed at\ +\ + /usr/local/bin/npm\ +\ +Make sure that /usr/local/bin is in your $PATH.} From f186d1c11bdb502499a478f2dea7bcaaeb1cfa32 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Wed, 11 Feb 2015 17:50:01 -0800 Subject: [PATCH 02/10] Add symlink step to Mac installer --- Makefile | 5 +- tools/install.py | 7 +- tools/osx-pkg/osx-pkg.pkgproj | 713 +++++++++++++++++- .../osx-pkg/scripts/iojs-create-node-symlink | 0 .../npm_postinstall.sh} | 0 tools/osx-pkg/scripts/symlink_postinstall.sh | 7 + tools/osx-pkg/scripts/uninstall.sh | 2 + tools/osx-pkg/strings/en/introduction.rtf | 2 +- tools/osx-pkg/strings/en/summary.rtf | 2 - 9 files changed, 726 insertions(+), 12 deletions(-) create mode 100644 tools/osx-pkg/scripts/iojs-create-node-symlink rename tools/osx-pkg/{postinstall.sh => scripts/npm_postinstall.sh} (100%) create mode 100644 tools/osx-pkg/scripts/symlink_postinstall.sh create mode 100644 tools/osx-pkg/scripts/uninstall.sh diff --git a/Makefile b/Makefile index f0e87d198f3900..666de6425ab55b 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ PYTHON ?= python DESTDIR ?= SIGN ?= PREFIX ?= /usr/local +NO_SYMLINK ?= false # Determine EXEEXT EXEEXT := $(shell $(PYTHON) -c \ @@ -50,7 +51,7 @@ config.gypi: configure fi install: all - $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' + $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' '$(NO_SYMLINK)' uninstall: $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' @@ -269,7 +270,7 @@ $(PKG): release-only pre-pkg $(MAKE) install V=$(V) DESTDIR=$(PKGDIR)/32 rm -rf out/deps out/Release $(PYTHON) ./configure --dest-cpu=x64 --tag=$(TAG) - $(MAKE) install V=$(V) DESTDIR=$(PKGDIR) + $(MAKE) install V=$(V) DESTDIR=$(PKGDIR) NO_SYMLINK=true SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh lipo $(PKGDIR)/32/usr/local/bin/iojs \ $(PKGDIR)/usr/local/bin/iojs \ diff --git a/tools/install.py b/tools/install.py index 5cf78b52814683..f35345c34ec516 100755 --- a/tools/install.py +++ b/tools/install.py @@ -17,6 +17,7 @@ install_path = None # base target directory (DESTDIR + PREFIX from Makefile) target_defaults = None variables = None +no_symlink = False def abspath(*args): path = os.path.join(*args) @@ -132,7 +133,7 @@ def files(action): exeext = '.exe' if is_windows else '' action(['out/Release/iojs' + exeext], 'bin/iojs' + exeext) - if not is_windows: + if not is_windows and not no_symlink: # Install iojs -> node compatibility symlink. link_target = 'bin/node' link_path = abspath(install_path, link_target) @@ -186,7 +187,7 @@ def files(action): ], 'include/node/') def run(args): - global node_prefix, install_path, target_defaults, variables + global node_prefix, install_path, target_defaults, variables, no_symlink # chdir to the project's top-level directory os.chdir(abspath(os.path.dirname(__file__), '..')) @@ -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 # argv[2] is a custom install prefix for packagers (think DESTDIR) # argv[3] is a custom install prefix (think PREFIX) diff --git a/tools/osx-pkg/osx-pkg.pkgproj b/tools/osx-pkg/osx-pkg.pkgproj index ae2a55844d9d3f..b7c3d6f6bb01dd 100755 --- a/tools/osx-pkg/osx-pkg.pkgproj +++ b/tools/osx-pkg/osx-pkg.pkgproj @@ -514,7 +514,7 @@ CONCLUSION_ACTION 0 IDENTIFIER - org.iojs.pkg + org.iojs.iojs.pkg NAME io.js OVERWRITE_PERMISSIONS @@ -1079,7 +1079,7 @@ POSTINSTALL_PATH PATH - postinstall.sh + scripts/npm_postinstall.sh PATH_TYPE 1 @@ -1108,6 +1108,573 @@ UUID 2D16FD51-8800-422D-9E9B-EC59D2157FE8 + + PACKAGE_FILES + + DEFAULT_INSTALL_LOCATION + / + HIERARCHY + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Utilities + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Applications + PATH_TYPE + 0 + PERMISSIONS + 509 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Application Support + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Automator + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Documentation + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Filesystems + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Frameworks + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Input Methods + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Internet Plug-Ins + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchAgents + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchDaemons + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PreferencePanes + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Preferences + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 80 + PATH + Printers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PrivilegedHelperTools + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickLook + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickTime + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Screen Savers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Scripts + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Services + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Widgets + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Extensions + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + System + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + scripts/iojs-create-node-symlink + PATH_TYPE + 1 + PERMISSIONS + 436 + TYPE + 3 + UID + 0 + + + GID + 0 + PATH + tmp + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Shared + PATH_TYPE + 0 + PERMISSIONS + 1023 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Users + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + / + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + PAYLOAD_TYPE + 0 + VERSION + 3 + + PACKAGE_SCRIPTS + + POSTINSTALL_PATH + + PATH + scripts/symlink_postinstall.sh + PATH_TYPE + 1 + + RESOURCES + + + PACKAGE_SETTINGS + + AUTHENTICATION + 1 + CONCLUSION_ACTION + 0 + IDENTIFIER + org.iojs.symlink.pkg + LOCATION + 0 + NAME + symlink + OVERWRITE_PERMISSIONS + + VERSION + __iojsversion__ + + TYPE + 0 + UUID + 134AB657-817C-4E65-AB53-BD59A5E272EB + + + PACKAGE_SCRIPTS + + POSTINSTALL_PATH + + PATH + scripts/uninstall.sh + PATH_TYPE + 1 + + RESOURCES + + + PACKAGE_SETTINGS + + AUTHENTICATION + 1 + CONCLUSION_ACTION + 0 + IDENTIFIER + org.iojs.uninstall.pkg + LOCATION + 0 + NAME + uninstall + OVERWRITE_PERMISSIONS + + VERSION + __iojs_version__ + + TYPE + 0 + UUID + DC223951-DCCA-426C-8A88-B8F4A53FE9C6 + PROJECT @@ -1159,10 +1726,33 @@ OPTIONS + DEPENDENCY + + ENABLED_DEPENDENCY + + COMPARATOR + 1 + OBJECT + 1 + UUID + 41286F31-6755-4025-A7D1-04F7055B2AC8 + + ENABLED_MODE + 2 + SELECTED_DEPENDENCY + + COMPARATOR + 1 + OBJECT + 1 + UUID + 41286F31-6755-4025-A7D1-04F7055B2AC8 + + HIDDEN STATE - 0 + 3 PACKAGE_UUID F15133E4-7140-467A-90C3-BB6B53A9C79E @@ -1177,15 +1767,91 @@ UUID 95681E96-6FC4-494B-8901-D85A1178E7D4 + + DESCRIPTION + + + LANGUAGE + English + VALUE + Symlinks /usr/local/bin/iojs to /usr/local/bin/node. This symlink is recommended, as many scripts reference node. As well, joyent/node and io.js do not co-exist peacefully. + + + OPTIONS + + DEPENDENCY + + ENABLED_DEPENDENCY + + COMPARATOR + 1 + OBJECT + 1 + UUID + 41286F31-6755-4025-A7D1-04F7055B2AC8 + + ENABLED_MODE + 2 + SELECTED_DEPENDENCY + + COMPARATOR + 1 + OBJECT + 1 + UUID + 41286F31-6755-4025-A7D1-04F7055B2AC8 + + + HIDDEN + + STATE + 3 + + PACKAGE_UUID + 134AB657-817C-4E65-AB53-BD59A5E272EB + REQUIREMENTS + + TITLE + + TOOLTIP + + TYPE + 0 + UUID + DA5CC0A2-F653-45B7-B5D6-BD0394BDCA8C + DESCRIPTION OPTIONS + DEPENDENCY + + ENABLED_DEPENDENCY + + COMPARATOR + 1 + OBJECT + 1 + UUID + 41286F31-6755-4025-A7D1-04F7055B2AC8 + + ENABLED_MODE + 2 + SELECTED_DEPENDENCY + + COMPARATOR + 1 + OBJECT + 1 + UUID + 41286F31-6755-4025-A7D1-04F7055B2AC8 + + HIDDEN STATE - 1 + 3 PACKAGE_UUID 2D16FD51-8800-422D-9E9B-EC59D2157FE8 @@ -1200,6 +1866,43 @@ UUID E6975970-F10F-41C5-8FD8-8D816D281D47 + + DESCRIPTION + + + LANGUAGE + English + VALUE + + + + OPTIONS + + HIDDEN + + STATE + 2 + + PACKAGE_UUID + DC223951-DCCA-426C-8A88-B8F4A53FE9C6 + REQUIREMENTS + + TITLE + + + LANGUAGE + English + VALUE + uninstall io.js + + + TOOLTIP + + TYPE + 0 + UUID + 41286F31-6755-4025-A7D1-04F7055B2AC8 + REMOVED @@ -1208,7 +1911,7 @@ INSTALLATION TYPE 0 MODE - 0 + 2 INSTALLATION_STEPS diff --git a/tools/osx-pkg/scripts/iojs-create-node-symlink b/tools/osx-pkg/scripts/iojs-create-node-symlink new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tools/osx-pkg/postinstall.sh b/tools/osx-pkg/scripts/npm_postinstall.sh similarity index 100% rename from tools/osx-pkg/postinstall.sh rename to tools/osx-pkg/scripts/npm_postinstall.sh diff --git a/tools/osx-pkg/scripts/symlink_postinstall.sh b/tools/osx-pkg/scripts/symlink_postinstall.sh new file mode 100644 index 00000000000000..bd02f895c86d43 --- /dev/null +++ b/tools/osx-pkg/scripts/symlink_postinstall.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# postinstall scripts run no matter what, so we check for the existence of a +# file placed only if the symlink install step was checked +if [ -f /tmp/iojs-create-node-symlink ]; then + ln -sf /usr/local/bin/iojs /usr/local/bin/node + rm /tmp/iojs-create-node-symlink +fi diff --git a/tools/osx-pkg/scripts/uninstall.sh b/tools/osx-pkg/scripts/uninstall.sh new file mode 100644 index 00000000000000..febf9251f607ef --- /dev/null +++ b/tools/osx-pkg/scripts/uninstall.sh @@ -0,0 +1,2 @@ +#!/bin/sh +# TODO diff --git a/tools/osx-pkg/strings/en/introduction.rtf b/tools/osx-pkg/strings/en/introduction.rtf index f3a88ea586a904..04df3fc4efd661 100644 --- a/tools/osx-pkg/strings/en/introduction.rtf +++ b/tools/osx-pkg/strings/en/introduction.rtf @@ -3,4 +3,4 @@ {\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 io.js __iojsversion__ and npm __npmversion__ into /usr/local/. The binary /usr/local/bin/iojs will also be symlinked as /usr/local/bin/node.} +\f0\fs26 \cf0 This package will install io.js __iojsversion__ and npm __npmversion__ into /usr/local/. The binary /usr/local/bin/iojs can also be symlinked as /usr/local/bin/node.} diff --git a/tools/osx-pkg/strings/en/summary.rtf b/tools/osx-pkg/strings/en/summary.rtf index 7096282ac3f262..64af03ec3b4f6f 100644 --- a/tools/osx-pkg/strings/en/summary.rtf +++ b/tools/osx-pkg/strings/en/summary.rtf @@ -6,8 +6,6 @@ \f0\fs26 \cf0 io.js was installed at\ \ /usr/local/bin/iojs\ -and symlinked at\ - /usr/local/bin/node\ \ npm was installed at\ \ From e08d2dfdd029b5fba2e24de218ac5a9f6526632b Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Wed, 11 Feb 2015 18:35:28 -0800 Subject: [PATCH 03/10] Create empty files on pre-pkg, set up uninstall --- .gitignore | 2 + Makefile | 2 + tools/osx-pkg/osx-pkg.pkgproj | 497 ++++++++++++++++++ .../osx-pkg/scripts/iojs-create-node-symlink | 0 tools/osx-pkg/scripts/uninstall.sh | 5 +- 5 files changed, 505 insertions(+), 1 deletion(-) delete mode 100644 tools/osx-pkg/scripts/iojs-create-node-symlink diff --git a/.gitignore b/.gitignore index 251b2092348f11..1ca880b065f8de 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,5 @@ icu_config.gypi /tools/osx-pkg/osx-pkg-out.pkgproj /tools/osx-pkg/strings/LICENSE.txt /tools/osx-pkg/strings/**/*.out.rtf +/tools/osx-pkg/scripts/iojs-create-node-symlink +/tools/osx-pkg/scripts/iojs-run-uninstall diff --git a/Makefile b/Makefile index 666de6425ab55b..f8b37906780a53 100644 --- a/Makefile +++ b/Makefile @@ -254,6 +254,8 @@ release-only: fi pre-pkg: + touch tools/osx-pkg/scripts/iojs-create-node-symlink # empty file for symlink step + touch tools/osx-pkg/scripts/iojs-run-uninstall # empty file for uninstall step cp LICENSE tools/osx-pkg/strings/LICENSE.txt cat tools/osx-pkg/osx-pkg.pkgproj | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|introduction.rtf|introduction.out.rtf|g' > tools/osx-pkg/osx-pkg-out.pkgproj $(foreach dir, \ diff --git a/tools/osx-pkg/osx-pkg.pkgproj b/tools/osx-pkg/osx-pkg.pkgproj index b7c3d6f6bb01dd..67dcdc54fffee7 100755 --- a/tools/osx-pkg/osx-pkg.pkgproj +++ b/tools/osx-pkg/osx-pkg.pkgproj @@ -1641,6 +1641,503 @@ 134AB657-817C-4E65-AB53-BD59A5E272EB + PACKAGE_FILES + + DEFAULT_INSTALL_LOCATION + / + HIERARCHY + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Utilities + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Applications + PATH_TYPE + 0 + PERMISSIONS + 509 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + Application Support + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Automator + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Documentation + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Filesystems + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Frameworks + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Input Methods + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Internet Plug-Ins + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchAgents + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + LaunchDaemons + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PreferencePanes + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Preferences + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 80 + PATH + Printers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + PrivilegedHelperTools + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickLook + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + QuickTime + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Screen Savers + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Scripts + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Services + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + Widgets + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Extensions + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + Library + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + System + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + scripts/iojs-run-uninstall + PATH_TYPE + 1 + PERMISSIONS + 420 + TYPE + 3 + UID + 0 + + + GID + 0 + PATH + tmp + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 0 + PATH + Shared + PATH_TYPE + 0 + PERMISSIONS + 1023 + TYPE + 1 + UID + 0 + + + GID + 80 + PATH + Users + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + + GID + 0 + PATH + / + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 1 + UID + 0 + + PAYLOAD_TYPE + 0 + VERSION + 3 + PACKAGE_SCRIPTS POSTINSTALL_PATH diff --git a/tools/osx-pkg/scripts/iojs-create-node-symlink b/tools/osx-pkg/scripts/iojs-create-node-symlink deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/tools/osx-pkg/scripts/uninstall.sh b/tools/osx-pkg/scripts/uninstall.sh index febf9251f607ef..7c80d909b50438 100644 --- a/tools/osx-pkg/scripts/uninstall.sh +++ b/tools/osx-pkg/scripts/uninstall.sh @@ -1,2 +1,5 @@ #!/bin/sh -# TODO +if [ -f /tmp/iojs-run-uninstall ]; then + # TODO + rm /tmp/iojs-run-uninstall +fi From 2fb6c21ad18bb984a176514a59f56b24ed694394 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Thu, 12 Feb 2015 16:28:02 -0800 Subject: [PATCH 04/10] Add pre-pkg to .PHONY in makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f8b37906780a53..02fe5395ec1412 100644 --- a/Makefile +++ b/Makefile @@ -407,4 +407,4 @@ cpplint: lint: jslint cpplint -.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all test-addons build-addons website-upload pkg blog blogclean tar binary release-only bench-http-simple bench-idle bench-all bench bench-misc bench-array bench-buffer bench-net bench-http bench-fs bench-tls +.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all test-addons build-addons website-upload pre-pkg pkg blog blogclean tar binary release-only bench-http-simple bench-idle bench-all bench bench-misc bench-array bench-buffer bench-net bench-http bench-fs bench-tls From 558002279fa0167180d0e9b5b7c5ef66494ddf85 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Fri, 13 Feb 2015 15:47:54 -0800 Subject: [PATCH 05/10] Wrap Makefile lines at 80 characters --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 02fe5395ec1412..695de7a4914f14 100644 --- a/Makefile +++ b/Makefile @@ -257,10 +257,16 @@ pre-pkg: touch tools/osx-pkg/scripts/iojs-create-node-symlink # empty file for symlink step touch tools/osx-pkg/scripts/iojs-run-uninstall # empty file for uninstall step cp LICENSE tools/osx-pkg/strings/LICENSE.txt - cat tools/osx-pkg/osx-pkg.pkgproj | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|introduction.rtf|introduction.out.rtf|g' > tools/osx-pkg/osx-pkg-out.pkgproj + cat tools/osx-pkg/osx-pkg.pkgproj | \ + sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | \ + sed -e 's|introduction.rtf|introduction.out.rtf|g' > \ + tools/osx-pkg/osx-pkg-out.pkgproj $(foreach dir, \ $(shell echo tools/osx-pkg/strings/*/), \ - cat $(dir)introduction.rtf | sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > $(dir)introduction.out.rtf; \ + cat $(dir)introduction.rtf | \ + sed -e 's|__iojsversion__|'$(FULLVERSION)'|g' | \ + sed -e 's|__npmversion__|'$(NPMVERSION)'|g' > \ + $(dir)introduction.out.rtf; \ ) pkg: $(PKG) From d1c2ac7f6cdac4539b43fd3e21f67c0a5320f239 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Fri, 13 Feb 2015 15:48:35 -0800 Subject: [PATCH 06/10] Wrap osx-pkg README at 80 characters --- tools/osx-pkg/README.md | 43 +++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/tools/osx-pkg/README.md b/tools/osx-pkg/README.md index 2232e57133345c..62cfc9f3cefda3 100644 --- a/tools/osx-pkg/README.md +++ b/tools/osx-pkg/README.md @@ -14,18 +14,33 @@ make pkg ### Localization -There are two files that can be localized in the OS X installer: the introduction, and the summary. - -1. Make sure you've installed Packages: http://s.sudre.free.fr/Software/Packages/about.html -2. Duplicate the `strings/en` folder for reference, and rename the folder to the language you are localizing (ex. `fr`, `ru`, etc.) -3. Translate `introduction.rtf` and `summary.rtf`. Do not modify the words `__iojsversion__` or `__npmversion__`, as these are automatically replaced by the build step with the io.js and npm versions, respectively. -4. In the root `io.js` folder, run `make pre-pkg`. This will generate the files needed for Packages. -5. Open `tools/osx-pkg/osx-pkg.pkgproj` in Packages. (Not `osx-pkg-out.pkgproj`, as this is a generated file) -6. In Packages, go to the Presentation tab, and if not already selected, choose "Introduction" from the dropdown on the right-hand side. +There are two files that can be localized in the OS X installer: the +introduction, and the summary. + +1. Make sure you've installed Packages: +http://s.sudre.free.fr/Software/Packages/about.html +2. Duplicate the `strings/en` folder for reference, and rename the folder to +the language you are localizing (ex. `fr`, `ru`, etc.) +3. Translate `introduction.rtf` and `summary.rtf`. Do not modify the words +`__iojsversion__` or `__npmversion__`, as these are automatically replaced +by the build step with the io.js and npm versions, respectively. +4. In the root `io.js` folder, run `make pre-pkg`. This will generate the +files needed for Packages. +5. Open `tools/osx-pkg/osx-pkg.pkgproj` in Packages. (Not +`osx-pkg-out.pkgproj`, as this is a generated file) +6. In Packages, go to the Presentation tab, and if not already selected, +choose "Introduction" from the dropdown on the right-hand side. ![packages preview](https://s3.amazonaws.com/f.cl.ly/items/3q160p2r1X1B3i2N1W42/Screen%20Shot%202015-02-09%20at%207.26.09%20PM.png) -7. Press the "+" at the bottom right. This will add a new language entry. Click on the flag, and choose which language you are localizing. -8. Click on the column next to the flag, and ensure "Relative to Project" is selected. It's a rectangle with the letter "R" inside of it. -9. Click on the last column, which will currently have a dash in it, and press "Choose...". -10. Locate the `introduction.rtf` file you translated, and choose it. Don't worry about the `introduction.out.rtf` file, as this is an autogenerated file, and is dealt with when compiling. -11. In the dropdown that says "Introduction" at the top, choose "Conclusion" and repeat this process for the `conclusion.rtf` file. -12. Save the project, and commit your changes. The generated files are automatically ignored by Git, so you don't have to worry about accidentally committing them in. +7. Press the "+" at the bottom right. This will add a new language entry. Click +on the flag, and choose which language you are localizing. +8. Click on the column next to the flag, and ensure "Relative to Project" is +selected. It's a rectangle with the letter "R" inside of it. +9. Click on the last column, which will currently have a dash in it, and +press "Choose...". +10. Locate the `introduction.rtf` file you translated, and choose it. +Don't worry about the `introduction.out.rtf` file, as this is an autogenerated +file, and is dealt with when compiling. +11. In the dropdown that says "Introduction" at the top, choose "Conclusion" +and repeat this process for the `conclusion.rtf` file. +12. Save the project, and commit your changes. The generated files are +automatically ignored by Git, so you don't have to worry about accidentally committing them in. From 1755cc8d4d8e7dddd4ed82416ffc222eb0aea503 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Fri, 13 Feb 2015 15:48:45 -0800 Subject: [PATCH 07/10] Simplify `no_symlink` check in tools/install.py --- tools/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.py b/tools/install.py index f35345c34ec516..31f81118266436 100755 --- a/tools/install.py +++ b/tools/install.py @@ -196,7 +196,7 @@ def run(args): 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 + no_symlink = len(args) > 4 and args[4] == 'true' # argv[2] is a custom install prefix for packagers (think DESTDIR) # argv[3] is a custom install prefix (think PREFIX) From 1434328e719a2155d476f08f2dec243181bf6fba Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Fri, 13 Feb 2015 16:46:20 -0800 Subject: [PATCH 08/10] Add uninstaller --- tools/osx-pkg/osx-pkg.pkgproj | 9 +-------- tools/osx-pkg/scripts/symlink_postinstall.sh | 2 +- tools/osx-pkg/scripts/uninstall.sh | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tools/osx-pkg/osx-pkg.pkgproj b/tools/osx-pkg/osx-pkg.pkgproj index 67dcdc54fffee7..b164af757a7a13 100755 --- a/tools/osx-pkg/osx-pkg.pkgproj +++ b/tools/osx-pkg/osx-pkg.pkgproj @@ -2365,14 +2365,7 @@ DESCRIPTION - - - LANGUAGE - English - VALUE - - - + OPTIONS HIDDEN diff --git a/tools/osx-pkg/scripts/symlink_postinstall.sh b/tools/osx-pkg/scripts/symlink_postinstall.sh index bd02f895c86d43..ca1a38d37ae962 100644 --- a/tools/osx-pkg/scripts/symlink_postinstall.sh +++ b/tools/osx-pkg/scripts/symlink_postinstall.sh @@ -3,5 +3,5 @@ # file placed only if the symlink install step was checked if [ -f /tmp/iojs-create-node-symlink ]; then ln -sf /usr/local/bin/iojs /usr/local/bin/node - rm /tmp/iojs-create-node-symlink + rm -f /tmp/iojs-create-node-symlink fi diff --git a/tools/osx-pkg/scripts/uninstall.sh b/tools/osx-pkg/scripts/uninstall.sh index 7c80d909b50438..edfe5ad0df5df8 100644 --- a/tools/osx-pkg/scripts/uninstall.sh +++ b/tools/osx-pkg/scripts/uninstall.sh @@ -1,5 +1,15 @@ #!/bin/sh +DIR_PREFIX=/usr/local if [ -f /tmp/iojs-run-uninstall ]; then - # TODO - rm /tmp/iojs-run-uninstall + rm -f $DIR_PREFIX/bin/iojs + rm -f $DIR_PREFIX/bin/npm + if [ -L $DIR_PREFIX/bin/node ]; then + rm -f $DIR_PREFIX/bin/node + fi + rm -rf $DIR_PREFIX/include/node + rm -f $DIR_PREFIX/lib/dtrace/node.d + rm -f $DIR_PREFIX/share/man/man1/iojs.1 + rm -f $DIR_PREFIX/share/systemtap/tapset/node.stp + + rm -f /tmp/iojs-run-uninstall fi From 5e2c01c6d0a0b102e9f7c2267ee4c4c5c2d3b0d9 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Fri, 13 Feb 2015 21:09:26 -0800 Subject: [PATCH 09/10] Change codesign to sign iojs, not node --- tools/osx-codesign.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/osx-codesign.sh b/tools/osx-codesign.sh index 65a8d48b8ab2a5..7343e07f6ada49 100644 --- a/tools/osx-codesign.sh +++ b/tools/osx-codesign.sh @@ -8,5 +8,5 @@ if ! [ -n "$SIGN" ] && [ $STEP -eq 1 ]; then exit 0 fi -codesign -s "$SIGN" "$PKGDIR"/usr/local/bin/node -codesign -s "$SIGN" "$PKGDIR"/32/usr/local/bin/node +codesign -s "$SIGN" "$PKGDIR"/usr/local/bin/iojs +codesign -s "$SIGN" "$PKGDIR"/32/usr/local/bin/iojs From 2526e1d34e2f34d54a7c250efea5061b4a3f3842 Mon Sep 17 00:00:00 2001 From: Zach Bruggeman Date: Wed, 4 Mar 2015 16:13:39 -0800 Subject: [PATCH 10/10] Remove node_modules if folder is empty --- tools/osx-pkg/scripts/uninstall.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/osx-pkg/scripts/uninstall.sh b/tools/osx-pkg/scripts/uninstall.sh index edfe5ad0df5df8..a0fb9f9aa1b7bd 100644 --- a/tools/osx-pkg/scripts/uninstall.sh +++ b/tools/osx-pkg/scripts/uninstall.sh @@ -11,5 +11,9 @@ if [ -f /tmp/iojs-run-uninstall ]; then rm -f $DIR_PREFIX/share/man/man1/iojs.1 rm -f $DIR_PREFIX/share/systemtap/tapset/node.stp + if [ ! "$(ls -A $DIR_PREFIX/lib/node_modules)" ]; then + rm -rf $DIR_PREFIX/lib/node_modules + fi + rm -f /tmp/iojs-run-uninstall fi