Difference between revisions of "User:Opensource Obscure/Compiling"

From Second Life Wiki
Jump to navigation Jump to search
m (page explanation)
m (disclaimer)
Line 1: Line 1:
{{User:Opensource_Obscure/Backlink}}
{{User:Opensource_Obscure/Quicklinks}}
This an incomplete, out-of-date, still possibly useful repository of instructions to build a Linux viewer from sources.. ''You're welcome to read this page, and you may even find it useful, but it's mostly a personal scrapbook page.''


Incomplete, out-of-date, still possibly useful page about building a Linux viewer from sources.


== Overview ==
== Overview ==

Revision as of 04:41, 27 April 2011

User page - JIRA - Interests - Groups - LSL - Places - Stores - Translations - other pages



This an incomplete, out-of-date, still possibly useful repository of instructions to build a Linux viewer from sources.. You're welcome to read this page, and you may even find it useful, but it's mostly a personal scrapbook page.


Overview

Dipendenze

Ho disinstallato ccache e gcc-4.1.

sudo apt-get install cmake flex bison build-essential python libx11-dev zlib1g-dev libssl-dev mesa-common-dev libglu1-mesa-dev libc6-dev libstdc++6 libxrender-dev
sudo apt-get install libogg-dev libpng12-dev libdbus-glib-1-dev libgtk2.0-dev
sudo apt-get install mercurial python-pip
sudo pip install autobuild

Compilare i sorgenti

hg clone https://bitbucket.org/merov_linden/viewer-autobuild2010
cd viewer-autobuild2010
autobuild build -c RelWithDebInfo

gcc / Ubuntu

Il gcc che c'è di default nelle versioni recenti di Ubuntu non va bene, si deve usare invece la versione 4.1. Ecco come mantenere entrambe le versioni di gcc installate nel sistema, scegliendo con update-alternatives --config gcc quale versione usare effettivamente quando viene chiamato gcc:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.1 41 --slave /usr/bin/g++ g++ /usr/bin/g++-4.1 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.1
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 44 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.4
sudo update-alternatives --config gcc

a questo punto, selezionare gcc-4.1:

------------------------------------------------------------
* 0            /usr/bin/gcc-4.4   44        modalità automatica
  1            /usr/bin/gcc-4.1   41        modalità manuale
  2            /usr/bin/gcc-4.4   44        modalità manuale
Premere Invio per mantenere il valore predefinito[*] o digitare il numero della selezione:1
update-alternatives: viene usato /usr/bin/gcc-4.1 per fornire /usr/bin/gcc (gcc) in modalità manuale.

D'ora in poi il sistema userà la versione 4.1 di gcc. Ripetere l'ultimo passo se c'è bisogno di usare la versione più recente di gcc.

Applicare una patch

Esempio:

user@box:~/snowglobe/linden$ patch -p0 < SNOW-247_translation_breaks_chat_bubbles.diff 

Cambio di Shortcut per poter nascondere la GUI

Modificare indra/newview/llviewermenu.cpp

SpaceNavigator

Nota: Non funziona più con i kernel recenti. Con Kirstens funziona.

Va inizialmente creato (una tantum) il file /etc/udev/rules.d/41-spacenavigator.rules con questo contenuto (forse basta la terza riga):

KERNEL=="event[0-9]*", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c603", SYMLINK+="input/spacemouse", GROUP="plugdev"
KERNEL=="event[0-9]*", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c623", SYMLINK+="input/spacetraveler", GROUP="plugdev"
KERNEL=="event[0-9]*", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c626", SYMLINK+="input/spacenavigator", GROUP="plugdev"


Old stuff

FMOD

  • necessario a meno di disabilitarlo esplicitamente
  • da fare dopo il primo ./develop.py configure
  • le istruzioni seguenti presuppongono che la directory di fmod sia posta nella stessa directory che contiene linden/indra/, e che ci si trovi in quest'ultima
cd ../../fmodapi375linux/ && cp api/inc/* ../linden/libraries/i686-linux/include/ && cp api/libfmod-3.75.so ../linden/libraries/i686-linux/lib_release_client/ && cp api/libfmod-3.75.so ../linden/libraries/i686-linux/lib_release/ && cp api/libfmod-3.75.so ../linden/libraries/i686-linux/lib_debug/ && cd ../linden/indra

oppure

cd ../../fmodapi375linux/ \
cp api/inc/* ../linden/libraries/i686-linux/include/ \
cp api/libfmod-3.75.so ../linden/libraries/i686-linux/lib_release_client/ \
cp api/libfmod-3.75.so ../linden/libraries/i686-linux/lib_release/ \
cp api/libfmod-3.75.so ../linden/libraries/i686-linux/lib_debug/ \
cd ../linden/indra/

altro

(Non sicuro) - viewer-linux-i686-relwithdebinfo/CMakeCache.txt --> per sostituire "(Developer)" nel floater About Second Life

Build Types

  • Usare directory separate per build types diversi
  • RelWithDebInfo e' il default
  • Sembra che non valga la pena di compilare versioni Debug

Debug:

./develop.py -t Debug configure
./develop.py -t Debug build

Release:

./develop.py -t Release configure
./develop.py -t Release build

Ombre / Shadows

(vedi qui) - Open up the debug settings, and search for

RenderShadowClipPlanes(?)

Put in values like

50 150 300 

and you will find the distance at which shadows show to be increased, be aware tho that they might be a little more rough up close. The other settings I tinkered with, but in the end left at the default...tho you can also increase the amount of blur passes (beware FPS hits), and the strength of the blur and gaussian.

Come trovare le dipendenze richieste

(vedi qui) - ESEMPIO con omvviewer:

omvviewer/indra/build/newview>ldd ./omvviewer