#!/bin/bash # cmake-SL v1.31 (c)2008-2009 Henri Beauchamp. Released under GPL license v2: # http://www.gnu.org/licenses/gpl.txt ############################################################################### ######## THIS IS QUICK'N DIRTY ALPHA SOFTWARE. USE AT YOUR OWN RISKS ! ######## ############################################################################### ############################################################################### # BEWARE: this script is meant to compile a -personal- SL client. It is -NOT- # # suitable to build client versions meant for public release, because # # non-open source code is packaged by this script. # ############################################################################### # This bash script is aimed at easying up the build process of a SL client # with cmake. # You may enable or disable the use of your system's library by editing # the USE_SYSTEM_* variable ("yes" --> use the system library, "no" --> use # LL's provided ones). # The script also takes care of updating properly the viewer_manifest.py script # accordingly, so that you (should) end up with a properly packaged client. # To use this script, simply make it executable (chmod +x cmake-SL) and # put it into /usr/local/bin (or any other directory in your PATH). # Then, download the slviewer-src-*.tar.gz, slviewer-linux-libs-*.tar.gz, # slviewer-artwork-*.zip and fmodapi*.tar.gz archives, and finally, invoke # make-SL as follow: # cmake-SL path_to_archives (example: make-SL ~/downloads) # or simply: # cmake-SL # when invoking from the directory where the archives are. # The sources will be installed into the PATH_TO_SOURCES directory, # and the client will be built into the TEMP_DIR directory. # The packaged build will be moved to your home directory. # # If you want to retry a compilation after fixing something manually and # don't want cmake-SL to start all over again, overwriting everything, # you may invoke it with the --retry option, like this: # cmake-SL --retry # # Finally, if you just want to prepare the sources without starting the # compilation, use: # cmake-SL [path_to_archives] --prep # # This script has been tested by the author, on (very customized) # Mandriva 2007.1 and 2009.0 distros. # Tested with SL v1.21 and v1.22 sources. source config-SL-source ########### functions definitions ########### function compile() { cd $PATH_TO_SOURCES/indra echo "Compiling the client into $TEMP_DIR..." nice -n 19 ionice -c 3 ./develop.py --type=Release build # if (($? == 0)) ; then # mv -f $PATH_TO_SOURCES/indra/viewer-linux-i686*/newview/SecondLife*.tar.bz2 $HOME/ # fi } ########### end of functions ########### if [ "$TEMP_DIR" == "" ] ; then export TEMP_DIR="/usr/tmp/$USER" fi # Check to see if we simply want to retry a compilation: if [ "$1" == "--retry" ] ; then compile exit $? fi # Use the parameter (if any) as the path to the archives: PATH_TO_ARCHIVES=`pwd` if [ "$1" != "" ] && [ "$1" != "--prep" ] ; then if [ -d $1 ] ; then PATH_TO_ARCHIVES=$1 shift fi fi cd $PATH_TO_SOURCES/indra # Do a clean build #./develop.py clean # Force the vectorization use if we chose so. if [ "$FORCE_VECTORIZE" == "yes" ] ; then TUNE_FLAGS="$TUNE_FLAGS -DLL_VECTORIZE=1" fi if [ "$ALLOW_WARNINGS" == "yes" ] ; then FATAL_WARNINGS="-DGCC_DISABLE_FATAL_WARNINGS:BOOL=TRUE" else FATAL_WARNINGS="" fi time compile