User:Boroondas Gupte/

From Second Life Wiki
Jump to: navigation, search

Not Maintained Anymore!

As I don't use this script myself anymore and as there are others available I won't maintain this script here anymore.

About this Script

A Bash script to ease the compilation of the viewer on linux systems. It's based on the Compiling the viewer (Linux) article and most of it is actually just copied from there. As I found it useful anyway, I thought I'd share it, so here it is ...


Choose the right Version

It won't work with the following source versions as they require manual disabling of llmozlib:

  • FL-
  • FL-
  • beta-

How to use the script

For all other versions, usage is rather simple:

  1. make sure you've met those Prequesites that aren't covered by the slviewer-linux-libs package.
  2. create a folder for the sources
    • if you rather use an existing folder be sure to read and understand the script first. It will delete some subfolders!
  3. download to that folder
  4. download the source packages
    • slviewer-artwork-<version number>.zip
    • slviewer-linux-libs-<version number>.tar.gz
    • slviewer-src-<version number>.tar.gz to that folder (for the desired <version number> string)
  5. in that folder run echo "<version number>" > version_to_build with <version number> as above.
  6. place the following script in that folder, too.
    • run it with ./
    • and follow the instructions it prints out


SL_VERSION="$(< ./version_to_build)"

## prepare a directory
rm -rf ${SL_DIR}
rm -rf ${FMOD}
mkdir  ${SL_DIR}

## unpack
tar -xzkf fmodapi375linux.tar.gz
tar -xzkf slviewer-src-${SL_VERSION}.tar.gz 		-C ${SL_DIR}/
tar -xzkf slviewer-linux-libs-${SL_VERSION}.tar.gz 	-C ${SL_DIR}/
unzip -q  slviewer-artwork-${SL_VERSION}.zip		-d ${SL_DIR}/

## copy required libraries into tree
cp ${FMOD}/api/inc/* ${SLSRC}/libraries/i686-linux/include/
cp ${FMOD}/api/ ${SLSRC}/libraries/i686-linux/lib_release_client/

cp -a /usr/include/atk-1.0 ${SLSRC}/libraries/i686-linux/include/
cp -a /usr/include/gtk-2.0 ${SLSRC}/libraries/i686-linux/include/
cp -a /usr/lib/gtk-2.0/include/* ${SLSRC}/libraries/i686-linux/include/gtk-2.0/
cp -a /usr/include/glib-2.0 ${SLSRC}/libraries/i686-linux/include/
cp -a /usr/lib/glib-2.0/include/* ${SLSRC}/libraries/i686-linux/include/glib-2.0/
cp -a /usr/include/pango-1.0 ${SLSRC}/libraries/i686-linux/include/

cp -a /usr/include/cairo/* ${SLSRC}/libraries/i686-linux/include/

echo ""
echo "                       run the following to compile:"
echo ""
echo "(cd ${SL_DIR}/linden/indra &&\\"
echo "nice scons DISTCC=no BTARGET=client BUILD=release &&\\"
echo "cp ../scripts/messages/message_template.msg newview/app_settings/ &&\\"
echo "cp \"../libraries/i686-linux/lib_release_client/\" \\"
echo "\"../indra/newview/\" &&\\"
echo "mkdir \"../indra/lib\" &&\\"
echo "cp \"../libraries/i686-linux/lib_release_client/\" \\"
echo "\"../indra/lib/\")"
echo ""
echo ""
echo "                        then run this to start SL:"
echo ""
echo "( cd ${SL_DIR}/linden/indra/newview && LD_LIBRARY_PATH=../../libraries/i686-linux/lib_release_client:${LD_LIBRARY_PATH}:/usr/local/lib ./secondlife-i686-bin )"
echo ""
echo ""
echo "                        if that doesn't work try the following instead:"
echo "( cd ${SL_DIR}/linden/indra/newview && LD_LIBRARY_PATH=../../libraries/i686-linux/lib_release_client:${LD_LIBRARY_PATH}:/usr/local/lib ./secondlife-i686-bin-globalsyms )"

Bugs, Questions and Improvements

shall be reported, asked or posted to this article's discussion page.