User:Boroondas Gupte/unpack.sh

From Second Life Wiki
< User:Boroondas Gupte
Revision as of 03:58, 29 June 2007 by Boroondas Gupte (talk | contribs) (Not maintained anymore!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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 ...

Usage

Choose the right Version

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

  • FL-1.13.3.58185
  • FL-1.13.3.58390
  • beta-1.13.4.3

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 http://www.fmod.org/files/fmodapi375linux.tar.gz 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 ./unpack.sh
    • and follow the instructions it prints out

unpack.sh

#!/bin/bash

SL_VERSION="$(< ./version_to_build)"
SL_DIR="SL-$SL_VERSION"
FMOD="fmodapi375linux"
SLSRC="${SL_DIR}/linden"

## 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/libfmod-3.75.so ${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/libllkdu.so\" \\"
echo "\"../indra/newview/libllkdu.so\" &&\\"
echo "mkdir \"../indra/lib\" &&\\"
echo "cp \"../libraries/i686-linux/lib_release_client/libkdu_v42R.so\" \\"
echo "\"../indra/lib/libkdu_v42R.so\")"
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.