[xiph-commits] r2952 - liboggplay/trunk/plugin/mac

tahn at svn.annodex.net tahn at svn.annodex.net
Sat Jun 16 01:52:39 PDT 2007


Author: tahn
Date: 2007-06-16 01:52:37 -0700 (Sat, 16 Jun 2007)
New Revision: 2952

Added:
   liboggplay/trunk/plugin/mac/mac-annodex-dev-install
Log:
This is a handy script for installing the Mac Annodex development environment.
Note that it is *not* intended to be executed from its checkin directory.


Added: liboggplay/trunk/plugin/mac/mac-annodex-dev-install
===================================================================
--- liboggplay/trunk/plugin/mac/mac-annodex-dev-install	                        (rev 0)
+++ liboggplay/trunk/plugin/mac/mac-annodex-dev-install	2007-06-16 08:52:37 UTC (rev 2952)
@@ -0,0 +1,154 @@
+#!/bin/bash
+cat <<EOF
+
+This is the Mac Annodex plugin developer environment installation script.
+
+It will install, as required:
+ - Fink
+ - Subversion (as a Fink package)
+ - Various Fink packages for the autotools build process
+ - Mozilla's gecko-sdk
+ - Firefox
+
+Working from the current directory, it will:
+ - create a directory called src;
+ - check out and build the ogg, theora, vorbis, speex, fishsound, oggz
+   and oggplay libraries; then
+ - build and install the Mac plugin.
+
+This requires Mac OS X version 10.4.6 and Xcode version 2.2.1 (or at least,
+it hasn't been tested with, and probably won't work on, earlier versions).
+
+EOF
+
+if [ ! -e /Developer ] || ! xcodebuild -version >/dev/null 2>/dev/null; then
+  echo "*** It looks Xcode is not installed; aborting ***"
+  exit
+fi
+
+# This is really just a "do you want to continue?" prompt, but we need to run
+# various commands with sudo later, so we might as well get the password now.
+echo "Enter your sudo password to continue, or just press enter to quit.."
+sudo -k
+sudo -p "> " -v || exit
+
+if [ ! -e /Applications/Firefox.app ]; then
+  echo -e "\nYou don't appear to have Firefox installed."
+  echo -n "Do you want me to install it (y/n)? "
+  read ans
+  if [ "${ans:0:1}" = "y" -o "${ans:0:1}" = "Y" ]; then
+    FFVER=2.0.0.4
+    echo -e "\n---- Installing Firefox v$FFVER ----"
+    curl -f -O http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$FFVER/mac/en-US/Firefox%20$FFVER.dmg
+    hdiutil mount Firefox%20$FFVER.dmg
+    echo -e "\nYou'll need to complete the installation by dragging Firefox to /Applications."
+    echo "Press enter when you're done..."
+    read
+    hdiutil unmount /Volumes/Firefox
+    rm Firefox%20$FFVER.dmg
+  fi
+fi
+
+if [ ! -e /sw/bin/init.sh ]; then
+  echo -e "\n---- Installing Fink ----"
+  curl -f -O http://superb-east.dl.sourceforge.net/sourceforge/fink/Fink-0.8.1-PowerPC-Installer.dmg
+  hdiutil mount Fink-0.8.1-PowerPC-Installer.dmg
+  open /Volumes/Fink-0.8.1-PowerPC-Installer/Fink\ 0.8.1-PowerPC\ Installer.pkg
+  echo -e "\nYou'll need to interact with the installer gui to complete the installation."
+  echo "Press enter when you're done..."
+  read
+  hdiutil unmount /Volumes/Fink-0.8.1-PowerPC-Installer
+  rm Fink-0.8.1-PowerPC-Installer.dmg
+  if [ ! -e /sw/bin/init.sh ]; then
+    echo -e "\n*** Installation failed... try a manual install? ***"
+    open http://www.finkproject.org/download
+    exit
+  fi
+fi
+. /sw/bin/init.sh
+
+if ! svn --version >/dev/null 2>/dev/null; then
+  echo -e "\n---- Installing Subversion ----"
+  sudo apt-get -y install svn-client
+fi
+
+echo -e "\n---- Installing build tools ----"
+sudo apt-get -y install pkgconfig       # for general build setup
+sudo apt-get -y install orbit           # for gecko-sdk/bin/xpidl
+sudo apt-get -y install automake1.9     # for libspeex
+sudo apt-get -y install libtool14       # for libspeex
+
+export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+if ! cat ~/.profile 2>/dev/null | grep -q "export PKG_CONFIG_PATH"; then
+  echo -e "\nAdding 'export PKG_CONFIG_PATH=$PKG_CONFIG_PATH' to ~/.profile"
+  echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> ~/.profile
+fi
+
+if [ ! -e /Developer/gecko-sdk ]; then
+  echo -e "\n---- Installing gecko-sdk ----"
+  curl -f -O http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.0.4/sdk/gecko-sdk-mac-1.8.0.4.zip
+  unzip gecko-sdk-mac-1.8.0.4.zip -d /Developer
+  rm gecko-sdk-mac-1.8.0.4.zip
+  if [ ! -e /Developer/gecko-sdk ]; then
+    echo -e "\n*** Installation failed ***"
+    exit
+  fi
+fi
+
+echo -e "\n---- Checking out libraries ----"
+chkout ()
+{
+  if [ ! -d $1 ]; then
+    svn co $2 $1
+  else
+    echo "$1 already exists; skipping"
+  fi
+}
+[ -d src ] || mkdir src
+cd src
+chkout libogg       http://svn.xiph.org/trunk/ogg
+chkout libtheora    http://svn.xiph.org/trunk/theora
+chkout libvorbis    http://svn.xiph.org/trunk/vorbis
+chkout libspeex     http://svn.xiph.org/trunk/speex
+chkout libfishsound http://svn.annodex.net/libfishsound/trunk
+chkout liboggz      http://svn.annodex.net/liboggz/trunk
+chkout liboggplay   http://svn.annodex.net/liboggplay/trunk
+
+# speex's build is currently a bit broken on the mac
+svn up -r {2007-06-06} libspeex/doc/Makefile.am
+
+# make hasn't been set up for the mac plugin yet
+sed -e 's/plugin//' -i "" liboggplay/Makefile.am
+if [ $(svn diff liboggplay/Makefile.am | grep "^-" | wc -l) != 2 ]; then
+  echo -e "\n*** Failed to remove liboggplay/plugin from the list of make targets ***"
+  svn diff liboggplay/Makefile.am
+  exit
+fi
+
+echo -e "\n---- Building libraries ----"
+build ()
+{
+  cd $1
+  ./autogen.sh || exit
+  [ "$2" = "c" ] && (./configure || exit)
+  sudo make install || exit
+  cd ..
+}
+build libogg
+build libtheora
+build libvorbis
+build libspeex
+build libfishsound c
+build liboggz c
+build liboggplay c
+
+echo -e "\n---- Building plugin ----"
+cd liboggplay/plugin/mac
+xcodebuild -configuration Deployment || exit
+./install-plugin
+cd ../../..
+
+echo -e "\nOpening Firefox with a test page..."
+/Applications/Firefox.app/Contents/MacOS/firefox http://media.annodex.net/cmmlwiki/OSSForum-Trailer &
+
+echo -e "\nDone."


Property changes on: liboggplay/trunk/plugin/mac/mac-annodex-dev-install
___________________________________________________________________
Name: svn:executable
   + *



More information about the commits mailing list