--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>xulrunner</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Evergreen Staff Client BUILD_ID</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Evergreen Staff Client</string>
+ <key>CFBundleIconFile</key>
+ <string>evergreen-icon-mac.icns</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>BUILD_ID</string>
+ <key>CFBundleVersion</key>
+ <string>BUILD_ID.BUILD_ID</string>
+ <key>NSAppleScriptEnabled</key>
+ <true/>
+</dict>
+</plist>
XULRUNNER_LINUXFILE=xulrunner-$(XULRUNNER_VERSION).en-US.linux-i686.tar.bz2
XULRUNNER_URL=http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/$(XULRUNNER_VERSION)/runtimes/
+# mac stuff
+XULRUNNER_OSXFILE=xulrunner-$(XULRUNNER_VERSION).en-US.mac-i386.sdk.tar.bz2
+XULRUNNER_SDK=http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/$(XULRUNNER_VERSION)/sdk/
+OSX_APP_FILE="Evergreen\ ${STAFF_CLIENT_VERSION}.app"
+
OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript"
CHROME_LOCALES = $$(ls -1 chrome/locale)
SKIN_CSS = $$(ls -1 server/skin/*css | sed -e "s/.css/_custom.css/")
@cd client; tar cjf ../evergreen_staff_client.tar.bz2 *; cd ..
@echo 'Done'
+# For OS X we need to use the SDK since the runtime pkg isn't really useful for our purposes
+osx-xulrunner: client_app
+ @echo 'Preparing OS X xulrunner'
+ @if [ ! -f ${XULRUNNER_OSXFILE} ]; then curl -O ${XULRUNNER_SDK}${XULRUNNER_OSXFILE}; fi;
+ @tar xjf ${XULRUNNER_OSXFILE} --exclude='xulrunner-sdk/idl/' --exclude='xulrunner-sdk/include' --exclude='xulrunner-sdk/host' --exclude='xulrunner-sdk/lib' --exclude='xulrunner-sdk/sdk'
+ @if [ -f client/defaults/preferences/autoupdate.js ]; then echo 'pref("app.update.channel","mac");' >> client/defaults/preferences/autochannel.js; fi;
+
+# this will work on linux, it builds the .app directory/bundle
+osx-client: osx-xulrunner
+ @echo 'Building Evergreen.app directory structure for OS X within client/'
+ @mkdir -p "${OSX_APP_FILE}/Contents/Frameworks/XUL.framework/Versions"
+ @mkdir -p "${OSX_APP_FILE}/Contents/MacOS"
+ @mv client "${OSX_APP_FILE}/Contents/Resources"
+ @cp evergreen-icon-mac.icns "${OSX_APP_FILE}/Contents/Resources/evergreen-icon-mac.icns"
+ @mv xulrunner-sdk/bin "${OSX_APP_FILE}/Contents/Frameworks/XUL.framework/Versions/${XULRUNNER_VERSION}"
+ @rmdir xulrunner-sdk
+ @ln -sf "${XULRUNNER_VERSION}" "${OSX_APP_FILE}/Contents/Frameworks/XUL.framework/Versions/Current"
+ @sed s/BUILD_ID/${STAFF_CLIENT_STAMP_ID}/g Info.plist > "${OSX_APP_FILE}/Contents/Info.plist"
+ @cp "${OSX_APP_FILE}/Contents/Frameworks/XUL.framework/Versions/Current/xulrunner" "${OSX_APP_FILE}/Contents/MacOS/"
+ @cd "${OSX_APP_FILE}/Contents/Frameworks/XUL.framework"; ln -sf Versions/Current/libxpcom.dylib; ln -sf Versions/Current/XUL; ln -sf Versions/Current/xulrunner-bin
+ @mkdir client
+ @mv "${OSX_APP_FILE}" client
+ @echo "Compressing and packaging"
+ @if [ -f /usr/bin/hdiutil ]; then echo "Using hdiutil to create DMG"; cd client; ln -sf "/Applications"; cd - ; fi;
+ @if [ -f /usr/bin/hdiutil ]; then hdiutil create -ov -volname "Evergreen" -format UDZO -imagekey zlib-level=9 -srcfolder client Evergreen.dmg; fi;
+ @if [ ! -f /usr/bin/hdiutil ]; then echo "hdiutil does not exist, falling back on zip"; cd client; zip -y -q -9 -r ../Evergreen-Mac.zip *; fi;
+ @echo 'Done'
+
# For running the updates script with the correct updates directory, optionally building clients as well
updates updates-client win-updates win-updates-client linux-updates linux-updates-client generic-updates generic-updates-client extension-updates: