diff --git a/.gitignore b/.gitignore index 68b5843eeb..2b27112ac8 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ ipch/ /options.gypi *-nodegyp* /gyp-mac-tool +/dist-osx diff --git a/Makefile b/Makefile index 2ac3cd7439..1d207cd025 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,7 @@ clean: distclean: docclean -find tools -name "*.pyc" | xargs rm -f + -rm -rf dist-osx -rm -rf out/ node node_g check: diff --git a/doc/mac_osx_nodejs_installer_logo.png b/doc/mac_osx_nodejs_installer_logo.png new file mode 100644 index 0000000000..8570d914fd Binary files /dev/null and b/doc/mac_osx_nodejs_installer_logo.png differ diff --git a/tools/msvs/msi/getnodeversion.py b/tools/msvs/msi/getnodeversion.py index a9a5274fb2..551d95d0e0 100644 --- a/tools/msvs/msi/getnodeversion.py +++ b/tools/msvs/msi/getnodeversion.py @@ -6,4 +6,4 @@ for line in sys.stdin: minor = line.split()[2] if re.match('#define NODE_PATCH_VERSION', line): patch = line.split()[2] -print '{0:s}.{1:s}.{2:s}.0'.format(major, minor, patch) +print '{0:s}.{1:s}.{2:s}'.format(major, minor, patch) diff --git a/tools/osx-dist.sh b/tools/osx-dist.sh index d139bf4ac6..98fb23203e 100755 --- a/tools/osx-dist.sh +++ b/tools/osx-dist.sh @@ -3,21 +3,26 @@ TOOLS=`dirname $0` ROOT=$TOOLS/.. -VERSION=`git describe` -CONTENTS=dist-osx/nodejs-$VERSION +VERSION=`python $TOOLS/msvs/msi/getnodeversion.py < $ROOT/src/node_version.h` +CONTENTS=$ROOT/dist-osx +PMDOC=$TOOLS/osx-pkg.pmdoc +VENDOR='org.nodejs' +NAME=NodeJS # go build it in the root of the git repository pushd $ROOT -./configure --prefix=/usr/local/nodejs +./configure --prefix=/usr/local make make install DESTDIR="$CONTENTS" -mkdir -p "$CONTENTS/usr/local/bin" -pushd "$CONTENTS/usr/local/bin" -ln -s ../nodejs/bin/* . -popd # $CONTENTS/usr/local/bin - popd # $ROOT -"$TOOLS/osx-pkg-dmg-create.sh" "$ROOT/$CONTENTS" NodeJS $VERSION 'org.nodejs' +PKGID="$VENDOR.$NAME-$VERSION" + +packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker + +$packagemaker \ + --id "$PKGID" \ + --doc $PMDOC \ + --out $CONTENTS/node-$VERSION.pkg diff --git a/tools/osx-pkg-dmg-create.sh b/tools/osx-pkg-dmg-create.sh deleted file mode 100755 index e288d8f190..0000000000 --- a/tools/osx-pkg-dmg-create.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# Create a complete OS .dmg file (it needs the Apple Developers Tools installed) -# usage: -# pkg-create.sh -# - -CONTENTS=$1 -shift -NAME=$1 -shift -VERSION=$1 -shift -VENDOR=$1 - -PKGID="$VENDOR.$NAME-$VERSION" - -# unused pkg-info entries so far -# -# CFBundleExecutable -# $NAME -# CFBundleSignature -# ???? - -# -# Need the .plist file in order for the packagemaker to create a package which the -# pkgutil --packages later on would return an entry about. pkgutil can then --unlink -# and --forget about the package nicely. -# -cat > "$CONTENTS.plist" < - - - - CFBundleDevelopmentRegion - en - CFBundleIdentifier - $PKGID - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $NAME - CFBundlePackageType - APPL - CFBundleShortVersionString - $VERSION - CFBundleVersion - $VERSION - - -PINFO - -packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker - -$packagemaker \ - --id "$PKGID" \ - --info "$CONTENTS.plist" \ - --root "$CONTENTS" \ - --target 10.5 \ - --out "$CONTENTS".pkg - -hdiutil create "$CONTENTS.dmg" \ - -format UDZO -ov \ - -volname "$NAME $VERSION" \ - -srcfolder $CONTENTS.pkg - diff --git a/tools/osx-pkg.pmdoc/01local.xml b/tools/osx-pkg.pmdoc/01local.xml new file mode 100644 index 0000000000..91e2156a04 --- /dev/null +++ b/tools/osx-pkg.pmdoc/01local.xml @@ -0,0 +1 @@ +org.nodejs.pkg1.0../dist-osx/usr/local//usr/localinstallTo.isRelativeTypeinstallTolocationTyperelocatableinstallFrom.pathinstallTo.isAbsoluteTypeidentifierparentinstallTo.pathinstallFrom.isRelativeType01local-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/tools/osx-pkg.pmdoc/index.xml b/tools/osx-pkg.pmdoc/index.xml new file mode 100644 index 0000000000..56b96bd2e4 --- /dev/null +++ b/tools/osx-pkg.pmdoc/index.xml @@ -0,0 +1,15 @@ +Node/Users/ryan/Desktop/Node.pkgorg.nodejs../doc/mac_osx_nodejs_installer_logo.png01local.xmlproperties.titleproperties.userDomainproperties.anywhereDomainproperties.systemDomain \ No newline at end of file