1#!/bin/sh -x 2 3export XULRUNNER_IDL=$HOME/xulrunner-sdk/idl 4export XULRUNNER_XPIDL=$HOME/xulrunner-sdk/bin/xpidl 5 6# ----- Clean up 7 8/bin/rm -rf dist 9 10# ----- Build 11 12echo Build swift first by calling scons 13 14# Diego: building the deepest dir we get all of them. 15mkdir -p dist/installdir/bgprocess 16 17# Arno: Move swift binary to installdir 18cp swift dist/installdir/bgprocess 19 20cp LICENSE dist/installdir/LICENSE.txt 21 22# ----- Build XPI of SwarmTransport 23mkdir -p dist/installdir/components 24cp firefox/icon.png dist/installdir 25cp firefox/install.rdf dist/installdir 26cp firefox/chrome.manifest dist/installdir 27cp -r firefox/components dist/installdir 28cp -r firefox/chrome dist/installdir 29cp -r firefox/skin dist/installdir 30rm -rf `find dist/installdir -name .svn` 31 32# ----- Turn .idl into .xpt 33$XULRUNNER_XPIDL -m typelib -w -v -I $XULRUNNER_IDL -e dist/installdir/components/tribeIChannel.xpt firefox/tribeIChannel.idl 34$XULRUNNER_XPIDL -m typelib -w -v -I $XULRUNNER_IDL -e dist/installdir/components/tribeISwarmTransport.xpt firefox/tribeISwarmTransport.idl 35 36cd dist/installdir 37# ----- Turn installdir into .xpi 38zip -9 -r SwarmPlayer.xpi * 39mv SwarmPlayer.xpi .. 40cd ../.. 41 42