https://wiki.secondlife.com/w/api.php?action=feedcontributions&user=Michelle2+Zenovka&feedformat=atomSecond Life Wiki - User contributions [en]2024-03-29T11:18:09ZUser contributionsMediaWiki 1.36.1https://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189732User:Michelle2 Zenovka/cmake2008-12-31T13:16:55Z<p>Michelle2 Zenovka: /* Install FMOD API */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
<br />
== Get a source zip/tarball release ==<br />
<br />
Sorry using the cygwin prompt again because i find it easier, example with 1.22.4. Creating a folder c:\cl_1_22_4\ to work in<br />
<br />
cd c:<br />
mkdir sl_1_22_4<br />
cd sl_1_22_4<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-src-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-artwork-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-win32-libs-viewer_1-22-4-r106127.zip<br />
unzip slviewer-src*<br />
unzip slviewer-art*<br />
unzip slviewer-win*<br />
<br />
== Get the LATEST source from SVN==<br />
<br />
DONT DO THIS IF YOU FOLLOWED "Get a source zip/tarball release" above<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
NOTE the trunk/ path at the start of all examples below is ONLY valid if you checkedout the source from SVN trunk. If you grabbed a tarball/zip it is most likely linden/ eg linden/libraries/include and NOT trunk/libraries/include. Adapt as necessary.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189722User:Michelle2 Zenovka/cmake2008-12-31T13:11:18Z<p>Michelle2 Zenovka: </p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
<br />
== Get a source zip/tarball release ==<br />
<br />
Sorry using the cygwin prompt again because i find it easier, example with 1.22.4. Creating a folder c:\cl_1_22_4\ to work in<br />
<br />
cd c:<br />
mkdir sl_1_22_4<br />
cd sl_1_22_4<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-src-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-artwork-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-win32-libs-viewer_1-22-4-r106127.zip<br />
unzip slviewer-src*<br />
unzip slviewer-art*<br />
unzip slviewer-win*<br />
<br />
== Get the LATEST source from SVN==<br />
<br />
DONT DO THIS IF YOU FOLLOWED "Get a source zip/tarball release" above<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189712User:Michelle2 Zenovka/cmake2008-12-31T13:10:09Z<p>Michelle2 Zenovka: /* Get a source zip/tarball release */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the LATEST source from SVN==<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
<br />
== Get a source zip/tarball release ==<br />
<br />
Sorry using the cygwin prompt again because i find it easier, example with 1.22.4. Creating a folder c:\cl_1_22_4\ to work in<br />
<br />
cd c:<br />
mkdir sl_1_22_4<br />
cd sl_1_22_4<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-src-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-artwork-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-win32-libs-viewer_1-22-4-r106127.zip<br />
unzip slviewer-src*<br />
unzip slviewer-art*<br />
unzip slviewer-win*<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189702User:Michelle2 Zenovka/cmake2008-12-31T13:09:40Z<p>Michelle2 Zenovka: /* Get a source zip/tarball release */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the LATEST source from SVN==<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
<br />
== Get a source zip/tarball release ==<br />
<br />
Sorry using the cygwin prompt again because i find it easier, example with 1.22.4<br />
<br />
mkdir sl_1_22_4<br />
cd sl_1_22_4<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-src-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-artwork-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-win32-libs-viewer_1-22-4-r106127.zip<br />
unzip slviewer-src*<br />
unzip slviewer-art*<br />
unzip slviewer-win*<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189692User:Michelle2 Zenovka/cmake2008-12-31T13:08:44Z<p>Michelle2 Zenovka: /* Get a source zip/tarball release */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the LATEST source from SVN==<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
<br />
== Get a source zip/tarball release ==<br />
<br />
Sorry using the cygwin prompt again because i find it easier, example with 1.22.4<br />
<br />
mkdir sl_1_22_4<br />
cd sl_1_22_4<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-src-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-artwork-viewer_1-22-4-r106127.zip<br />
wget http://secondlife.com/developers/opensource/downloads/2008/12/slviewer-win32-libs-viewer_1-22-4-r106127.zip<br />
unzip *.zip<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189682User:Michelle2 Zenovka/cmake2008-12-31T13:04:28Z<p>Michelle2 Zenovka: /* Get the LATEST source from SVN */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the LATEST source from SVN==<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
<br />
== Get a source zip/tarball release ==<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189672User:Michelle2 Zenovka/cmake2008-12-31T13:03:25Z<p>Michelle2 Zenovka: /* Get the source */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the LATEST source from SVN==<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=189662User:Michelle2 Zenovka/cmake2008-12-31T13:02:46Z<p>Michelle2 Zenovka: /* Prerequisites for Windows */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
Debian package names:<br />
* libgl1-mesa-dev (Fedora: mesa-libGL-devel ?)<br />
* libzip-dev (Fedora: zlib-devel ?)<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the trunk branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/lib/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=126252User:Michelle2 Zenovka/cmake2008-11-01T19:11:29Z<p>Michelle2 Zenovka: /* Prerequisites for Windows */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft (newer may work too)<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the trunk branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=126232User:Michelle2 Zenovka/cmake2008-11-01T19:10:45Z<p>Michelle2 Zenovka: /* Prerequisites for Windows */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python '''version 2.5''' from [http://www.python.org http://www.python.org]. (For workaround for Python 2.6, see [[User:Jodiah_Jensen]].)<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
Issues are reported with both the version of cmake supplied by cygwin and the version of python supplied by cygwin. You are recommended to install cmake and python as above.<br />
<br />
Get DirectX SDK November 2007 from Microsoft<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the trunk branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375win/api/inc/* trunk/libraries/include/<br />
cp fmodapi375win/api/fmod.dll trunk/indra/newview<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/debug/<br />
cp fmodapi375win/api/lib/fmodvc.lib trunk/libraries/i686-win32/lib/release/<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
* The boost problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541]<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=105743User:Michelle2 Zenovka/cmake2008-10-20T17:57:32Z<p>Michelle2 Zenovka: /* cmake 2.6 */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the trunk branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
ln fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
ln fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(mac)<br />
curl --location --remote-name http://www.fmod.org/index.php/release/version/fmodapi375mac.zip <br />
unzip fmodapi375mac.zip <br />
lipo -create -output fmodapi37mac/api/lib/libfmod-universal.a\<br />
fmodapi37mac/api/lib/libfmod.a\<br />
fmodapi37mac/api/lib/libfmodx86.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_debug/libfmod.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_release/libfmod.a<br />
ln fmodapi375mac/api/libfmod-universal.a trunk/libraries/universal-darwin/lib_release_client/libfmod.a<br />
ln fmodapi375mac/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 (< 2.6.2) ===<br />
cmake version 2.6.0 - 2.6.1 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4 or newer cmake 2.6's<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=94428User:Michelle2 Zenovka/cmake2008-10-04T18:18:48Z<p>Michelle2 Zenovka: /* Boost Hell */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the trunk branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
cp fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
===Boost Hell===<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 ===<br />
cmake 2.6 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=94427User:Michelle2 Zenovka/cmake2008-10-04T18:18:29Z<p>Michelle2 Zenovka: /* Problems */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the trunk branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
cp fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
==Boost Hell==<br />
If you use Visual Studio C++ 2008 (VC90) to build you will get boost hell. This is where the boot library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. The Meerkat viewer project uses a newer version of boost that does not have trouble with VC90.<br />
<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 ===<br />
cmake 2.6 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=94426User:Michelle2 Zenovka/cmake2008-10-04T18:16:38Z<p>Michelle2 Zenovka: /* Auto package download */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft<br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest trunk branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
* Mac OS X 10.4 or 10.5 (required for building, sorry 10.3 users)<br />
* XCode 2.4 or 3.0 (whichever is right for your system)<br />
* cmake<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the trunk branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix.<br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/trunk trunk<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x trunk/doc/asset_urls.txt<br />
. trunk/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* trunk/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn trunk branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_debug/<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release/<br />
cp fmodapi375linux/api/libfmod-3.75.so trunk/libraries/i686-linux/lib_release_client/<br />
cp fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* trunk/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py".<br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd trunk/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
azdel slade - 2008-08-23 9:42pm SLT - I couldn't figure out where to make the edits in the solution you <br />
describe here. Instead, I just downloaded the latest libs from the source download page and copied <br />
llkdu.dll from there into my release build directory and it worked fine. once you extract the libs you <br />
download, it's in linden\libraries\i686-win32\lib_release <br />
just copy it to the same place in your build dir.<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 ===<br />
cmake 2.6 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=94274Open Source Meeting/Agenda2008-10-02T20:33:06Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring large or contentious items up on [[SLDev]] before or concurrently with adding them as agenda items.<br />
<br />
== Agenda ==<br />
<br />
* Have spotted that DBUS has been added to the viewer in trunk, any news on this and plans for IPC? ([[User:Michelle2 Zenovka|Michelle2 Zenovka]])<br />
* Add your item(s) here...<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=91647Open Source Meeting/Agenda2008-09-17T09:20:29Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/SFD08_at_Hippotropolis&diff=91171User:Michelle2 Zenovka/SFD08 at Hippotropolis2008-09-13T20:48:41Z<p>Michelle2 Zenovka: </p>
<hr />
<div>=Software freedom day 2008 at Hippotropolis=<br />
<br />
I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer and the many projects that have fed off from the Secondlife structure. The expo is of cause also open to all other free/open source ideas and any promotion of FLOSS is very welcome.<br />
<br />
Please if you would like to exhibit something IM me Michelle2 Zenovka, for a group invite<br />
<br />
Feel free to continue all discussion on the discussion page of this wiki or email/IM me directly<br />
<br />
Some of the areas i would like to cover include:-<br />
<br />
<br />
<br />
<br />
Please please if you want to help add your name next to something you want to work on or add new topics!<br />
<br />
Grid related projects :-<br />
<br />
* The Secondlife viewer and open source (any lindens have any slides etc for this?)<br />
* Opensim <br />
* LightSim (being done by Gareth)<br />
* libomv (was libsecondlife)<br />
* openmetaverse-viewer (my debian packages)<br />
* Chisel (being done)<br />
* Openmetaverse foundation<br />
<br />
<br />
<br />
In world stuff open source stuff :-<br />
<br />
* Free and open island Ama-gi<br />
Must be more?<br />
<br />
<br />
Other related open source stuff :-<br />
<br />
* GNU GPL (foundations what is it etc...)<br />
(Have video of Stephen Fry's Happy Birthday GNU streaming to inworld TV on parcel media)<br />
* BSD (licence and distros...)<br />
* Other open licences<br />
* Linux<br />
* Debian (Hoping to get stuff from Nina)<br />
* Other distros<br />
* FLOSS on windows</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/SFD08_at_Hippotropolis&diff=91170User:Michelle2 Zenovka/SFD08 at Hippotropolis2008-09-13T20:48:18Z<p>Michelle2 Zenovka: /* Software freedom day 2008 at Hippotropolis */</p>
<hr />
<div>=Software freedom day 2008 at Hippotropolis=<br />
<br />
I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer and the many projects that have fed off from the Secondlife structure. The expo is of cause also open to all other free/open source ideas and any promotion of FLOSS is very welcome.<br />
<br />
Please if you would like to exhibit something IM me Michelle2 Zenovka, for a group invite<br />
<br />
Feel free to continue all discussion on the discussion page of this wiki or email/IM me directly<br />
<br />
Some of the areas i would like to cover include:-<br />
<br />
<br />
<br />
<br />
Please please if you want to help add your name next to something you want to work on or add new topics!<br />
<br />
Grid related projects :-<br />
<br />
* The Secondlife viewer and open source (any lindens have any slides etc for this?)<br />
* Opensim <br />
* LightSim (being done by Gareth)<br />
* libomv (was libsecondlife)<br />
* openmetaverse-viewer (my debian packages)<br />
* Chisel (being done)<br />
* Openmetaverse foundation<br />
<br />
<br />
<br />
In world stuff open source stuff :-<br />
<br />
* Free and open island Ama-gi<br />
Must be more?<br />
<br />
<br />
Other related open source stuff :-<br />
<br />
* GNU GPL (foundations what is it etc...)<br />
(Have video of Stephen Fry's Happy Birthday GNU streaming to inworld TV on parcel media)<br />
* BSD (licence and distros...)<br />
* Other open licences<br />
* Linux<br />
* Debian<br />
* Other distros<br />
* FLOSS on windows</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/SFD08_at_Hippotropolis&diff=91169User:Michelle2 Zenovka/SFD08 at Hippotropolis2008-09-13T20:47:23Z<p>Michelle2 Zenovka: </p>
<hr />
<div>=Software freedom day 2008 at Hippotropolis=<br />
<br />
I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer and the many projects that have fed off from the Secondlife structure. The expo is of cause also open to all other free/open source ideas and any promotion of FLOSS is very welcome.<br />
<br />
Please if you would like to exhibit something IM me Michelle2 Zenovka, for a group invite<br />
<br />
Feel free to continue all discussion on the discussion page of this wiki or email/IM me directly<br />
<br />
Some of the areas i would like to cover include:-<br />
<br />
<br />
<br />
<br />
Please please if you want to help add your name next to something you want to work on or add new topics!<br />
<br />
Grid related projects :-<br />
<br />
* The Secondlife viewer and open source (any lindens have any slides etc for this?)<br />
* Opensim <br />
* LightSim (being done by Gareth)<br />
* libomv (was libsecondlife)<br />
* openmetaverse-viewer (my debian packages)<br />
* Chisel (being done)<br />
* Openmetaverse foundation<br />
<br />
<br />
<br />
In world stuff open source stuff :-<br />
<br />
* Free and open island Ama-gi<br />
Must be more?<br />
<br />
<br />
Other related open source stuff :-<br />
<br />
* GNU GPL (foundations what is it etc...)<br />
* BSD (licence and distros...)<br />
* Other open licences<br />
* Linux<br />
* Debian<br />
* Other distros<br />
* FLOSS on windows</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/SFD08_at_Hippotropolis&diff=91168User:Michelle2 Zenovka/SFD08 at Hippotropolis2008-09-13T20:47:00Z<p>Michelle2 Zenovka: </p>
<hr />
<div>=Software freedom day 2008 at Hippotropolis=<br />
<br />
I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer and the many projects that have fed off from the Secondlife structure. The expo is of cause also open to all other free/open source ideas and any promotion of FLOSS is very welcome.<br />
<br />
Please if you would like to exhibit something IM me Michelle2 Zenovka, for a group invite<br />
<br />
Feel free to continue all discussion on the discussion page of this wiki or email/IM me directly<br />
<br />
Some of the areas i would like to cover include:-<br />
<br />
<br />
<br />
<br />
Please please if you want to help add your name next to something you want to work on or add new topics!<br />
<br />
Grid related projects :-<br />
<br />
* The Secondlife viewer and open source (any lindens have any slides etc for this?)<br />
* Opensim <br />
* LightSim (being done by Gareth)<br />
* libomv (was libsecondlife)<br />
* openmetaverse-viewer (my debian packages)<br />
* Chisel (being done)<br />
* Openmetaverse foundation<br />
<br />
In world stuff open source stuff :-<br />
<br />
* Free and open island Ama-gi<br />
Must be more?<br />
<br />
<br />
Other related open source stuff :-<br />
<br />
* GNU GPL (foundations what is it etc...)<br />
* BSD (licence and distros...)<br />
* Other open licences<br />
* Linux<br />
* Debian<br />
* Other distros<br />
* FLOSS on windows</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/SFD08_at_Hippotropolis&diff=91167User:Michelle2 Zenovka/SFD08 at Hippotropolis2008-09-13T20:46:39Z<p>Michelle2 Zenovka: </p>
<hr />
<div>=Software freedom day 2008 at Hippotropolis=<br />
<br />
I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer and the many projects that have fed off from the Secondlife structure. The expo is of cause also open to all other free/open source ideas and any promotion of FLOSS is very welcome.<br />
<br />
Please if you would like to exhibit something IM me Michelle2 Zenovka, for a group invite<br />
<br />
Feel free to continue all discussion on the discussion page of this wiki or email/IM me directly<br />
<br />
Some of the areas i would like to cover include:-<br />
<br />
<br />
<br />
<br />
Please please if you want to help add your name next to something you want to work on or add new topics!<br />
<br />
Grid related projects :-<br />
<br />
* The Secondlife viewer and open source (any lindens have any slides etc for this?)<br />
* Opensim <br />
* LightSim (being done by Gareth)<br />
* libomv (was libsecondlife)<br />
* openmetaverse-viewer (my debian packages)<br />
* Chisel (being done)<br />
* Openmetaverse foundation<br />
<br />
In world stuff open source stuff :-<br />
<br />
* Free and open island Ama-gi<br />
<br />
Other related open source stuff :-<br />
<br />
* GNU GPL (foundations what is it etc...)<br />
* BSD (licence and distros...)<br />
* Other open licences<br />
* Linux<br />
* Debian<br />
* Other distros<br />
* FLOSS on windows</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/SFD08_at_Hippotropolis&diff=91166User:Michelle2 Zenovka/SFD08 at Hippotropolis2008-09-13T20:46:25Z<p>Michelle2 Zenovka: </p>
<hr />
<div>=Software freedom day 2008 at Hippotropolis=<br />
<br />
I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer and the many projects that have fed off from the Secondlife structure. The expo is of cause also open to all other free/open source ideas and any promotion of FLOSS is very welcome.<br />
<br />
Please if you would like to exhibit something IM me Michelle2 Zenovka, for a group invite<br />
<br />
Feel free to continue all discussion on the discussion page of this wiki or email/IM me directly<br />
<br />
Some of the areas i would like to cover include:-<br />
<br />
Please please if you want to help add your name next to something you want to work on or add new topics!<br />
<br />
Grid related projects :-<br />
<br />
* The Secondlife viewer and open source (any lindens have any slides etc for this?)<br />
* Opensim <br />
* LightSim (being done by Gareth)<br />
* libomv (was libsecondlife)<br />
* openmetaverse-viewer (my debian packages)<br />
* Chisel (being done)<br />
* Openmetaverse foundation<br />
<br />
In world stuff open source stuff :-<br />
<br />
* Free and open island Ama-gi<br />
<br />
Other related open source stuff :-<br />
<br />
* GNU GPL (foundations what is it etc...)<br />
* BSD (licence and distros...)<br />
* Other open licences<br />
* Linux<br />
* Debian<br />
* Other distros<br />
* FLOSS on windows</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/SFD08_at_Hippotropolis&diff=91162User:Michelle2 Zenovka/SFD08 at Hippotropolis2008-09-13T20:27:29Z<p>Michelle2 Zenovka: New page: =Software freedom day 2008 at Hippotropolis= I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer an...</p>
<hr />
<div>=Software freedom day 2008 at Hippotropolis=<br />
<br />
I am trying to hold an expo on 20th Sep (Software Freedom Day) and i hope to celebrate the use of open source with in the Secondlife viewer and the many projects that have fed off from the Secondlife structure. The expo is of cause also open to all other free/open source ideas and any promotion of FLOSS is very welcome.<br />
<br />
Please if you would like to exhibit something IM me Michelle2 Zenovka, for a group invite<br />
<br />
Feel free to continue all discussion on the discussion page of this wiki or email/IM me directly</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=90572Open Source Meeting/Agenda2008-09-10T19:10:42Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
<br />
For 11-Sep-08:<br />
<br />
Please join us for a "meet the experts" chat with Bill Hoffman of Kitware, creators of [http://www.cmake.org/HTML/index.html CMake], and Bryan O'Sullivan (Sardonyx Linden), leader of the CMake build system implementation at Linden Lab. Format will be informal Q&A, so bring your CMake questions. This will be a voice-enabled event, and Bill and Bryan will be using the spatial voice channel. <br />
<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake-flags&diff=90109User:Michelle2 Zenovka/cmake-flags2008-09-07T09:21:13Z<p>Michelle2 Zenovka: /* Variables */</p>
<hr />
<div>back to: [[User:Michelle2_Zenovka/cmake]]<br />
<br />
==Intro==<br />
<br />
Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.<br />
<br />
The typical invocation of cmake will look like the following :-<br />
<br />
cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra<br />
<br />
Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-<br />
<br />
develop.py configure -DMYVARIABLE:BOOL=TRUE<br />
<br />
==Generators==<br />
<br />
The -G option of cmake specifies the generator to be used (the target to build project file for). The Secondlife viewer cmake currently supports the following targets :-<br />
<br />
Windows<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008) <br />
<br />
Linuxoids<br />
* Unix Makefiles (default)<br />
* KDevelop3<br />
<br />
Mac<br />
* Xcode<br />
* Unix Makefiles (default) (WARNING: you '''probably''' don't want makefiles, and need to specify -G Xcode to avoid them!)<br />
<br />
==Variables==<br />
<br />
cmake variables are passed on the command line with the -D option, followed by the variable name, a seperation colon, the type of variable then =value for example :-<br />
<br />
-DSTANDALONE:BOOL=FALSE<br />
<br />
Variable name STANDALONE<br />
<br />
Type BOOL<br />
<br />
value FALSE<br />
<br />
There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more) Most of the others are automaticly generated based on trying to find locations of required libraries. The full list of setable ones can be seen in indra/CMakeCache.txt after running cmake for the first time<br />
<br />
{| border="1" cellpadding="20" cellspacing="0"<br />
|STANDALONE||BOOL||Sets the build to standalone mode, if enabled the build will try to use system provided libraries instead of the ones from the libs tarball.<br />
|-<br />
|UNATTENDED||BOOL||Normally set to false, Internal option for Linden Labs building???<br />
|-<br />
|INSTALL||BOOL||Enable Unix install target<br />
|-<br />
|APP_BINARY_DIR||STRING||(Unix install target) Installation directory for the main secondlife-bin<br />
|-<br />
|APP_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files<br />
|-<br />
|BINARY_NAME||STRING|| Replacement name for secondlife-bin executable<br />
|-<br />
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree<br />
|-<br />
|MOZLIB||BOOL||Enable embedded web browsing and html content in world (if you are building standalone and using a llmozlib2 package this needs enabling as its excluded in a standalone build otherwise)<br />
|-<br />
|OPENAL||BOOL||Enable OpenAL for sound, only works with openAL patch from jira<br />
|-<br />
|}<br />
<br />
== The Debian Way ==<br />
<br />
The debian rules Makefile, invokes cmake as :-<br />
<br />
cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \<br />
-DCMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO -DSERVER:BOOL=FALSE \<br />
-DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \<br />
-DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \<br />
-DAPP_BINARY_DIR:STRING=/usr/games/ \<br />
-DCMAKE_INSTALL_PREFIX:STRING=debian/ \<br />
-DBINARY_NAME:STRING=omvviewer \<br />
-DOPENAL:BOOL=TRUE \</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake-flags&diff=90108User:Michelle2 Zenovka/cmake-flags2008-09-07T09:20:20Z<p>Michelle2 Zenovka: /* Variables */</p>
<hr />
<div>back to: [[User:Michelle2_Zenovka/cmake]]<br />
<br />
==Intro==<br />
<br />
Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.<br />
<br />
The typical invocation of cmake will look like the following :-<br />
<br />
cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra<br />
<br />
Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-<br />
<br />
develop.py configure -DMYVARIABLE:BOOL=TRUE<br />
<br />
==Generators==<br />
<br />
The -G option of cmake specifies the generator to be used (the target to build project file for). The Secondlife viewer cmake currently supports the following targets :-<br />
<br />
Windows<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008) <br />
<br />
Linuxoids<br />
* Unix Makefiles (default)<br />
* KDevelop3<br />
<br />
Mac<br />
* Xcode<br />
* Unix Makefiles (default) (WARNING: you '''probably''' don't want makefiles, and need to specify -G Xcode to avoid them!)<br />
<br />
==Variables==<br />
<br />
cmake variables are passed on the command line with the -D option, followed by the variable name, a seperation colon, the type of variable then =value for example :-<br />
<br />
-DSTANDALONE:BOOL=FALSE<br />
<br />
Variable name STANDALONE<br />
<br />
Type BOOL<br />
<br />
value FALSE<br />
<br />
There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more) Most of the others are automaticly generated based on trying to find locations of required libraries. The full list of setable ones can be seen in indra/CMakeCache.txt after running cmake for the first time<br />
<br />
{| border="1" cellpadding="20" cellspacing="0"<br />
|STANDALONE||BOOL||Sets the build to standalone mode, if enabled the build will try to use system provided libraries instead of the ones from the libs tarball.<br />
|-<br />
|UNATTENDED||BOOL||Normally set to false, Internal option for Linden Labs building???<br />
|-<br />
|INSTALL||BOOL||Enable Unix install target<br />
|-<br />
|APP_BINARY_DIR||STRING||(Unix install target) Installation directory for the main secondlife-bin<br />
|-<br />
|APP_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files<br />
|-<br />
|BINARY_NAME||STRING|| Replacement name for secondlife-bin executable<br />
|-<br />
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree<br />
|-<br />
|MOZLIB||BOOL||Enable embedded web browsing and html content in world<br />
|-<br />
|OPENAL||BOOL||Enable OpenAL for sound, only works with openAL patch from jira<br />
|-<br />
|}<br />
<br />
== The Debian Way ==<br />
<br />
The debian rules Makefile, invokes cmake as :-<br />
<br />
cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \<br />
-DCMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO -DSERVER:BOOL=FALSE \<br />
-DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \<br />
-DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \<br />
-DAPP_BINARY_DIR:STRING=/usr/games/ \<br />
-DCMAKE_INSTALL_PREFIX:STRING=debian/ \<br />
-DBINARY_NAME:STRING=omvviewer \<br />
-DOPENAL:BOOL=TRUE \</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake-flags&diff=90106User:Michelle2 Zenovka/cmake-flags2008-09-07T09:19:21Z<p>Michelle2 Zenovka: /* Variables */</p>
<hr />
<div>back to: [[User:Michelle2_Zenovka/cmake]]<br />
<br />
==Intro==<br />
<br />
Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.<br />
<br />
The typical invocation of cmake will look like the following :-<br />
<br />
cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra<br />
<br />
Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-<br />
<br />
develop.py configure -DMYVARIABLE:BOOL=TRUE<br />
<br />
==Generators==<br />
<br />
The -G option of cmake specifies the generator to be used (the target to build project file for). The Secondlife viewer cmake currently supports the following targets :-<br />
<br />
Windows<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008) <br />
<br />
Linuxoids<br />
* Unix Makefiles (default)<br />
* KDevelop3<br />
<br />
Mac<br />
* Xcode<br />
* Unix Makefiles (default) (WARNING: you '''probably''' don't want makefiles, and need to specify -G Xcode to avoid them!)<br />
<br />
==Variables==<br />
<br />
cmake variables are passed on the command line with the -D option, followed by the variable name, a seperation colon, the type of variable then =value for example :-<br />
<br />
-DSTANDALONE:BOOL=FALSE<br />
<br />
Variable name STANDALONE<br />
<br />
Type BOOL<br />
<br />
value FALSE<br />
<br />
There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more)<br />
<br />
{| border="1" cellpadding="20" cellspacing="0"<br />
|STANDALONE||BOOL||Sets the build to standalone mode, if enabled the build will try to use system provided libraries instead of the ones from the libs tarball.<br />
|-<br />
|UNATTENDED||BOOL||Normally set to false, Internal option for Linden Labs building???<br />
|-<br />
|INSTALL||BOOL||Enable Unix install target<br />
|-<br />
|APP_BINARY_DIR||STRING||(Unix install target) Installation directory for the main secondlife-bin<br />
|-<br />
|APP_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files<br />
|-<br />
|BINARY_NAME||STRING|| Replacement name for secondlife-bin executable<br />
|-<br />
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree<br />
|-<br />
|MOZLIB||BOOL||Enable embedded web browsing and html content in world<br />
|-<br />
|OPENAL||BOOL||Enable OpenAL for sound, only works with openAL patch from jira<br />
|-<br />
|}<br />
<br />
== The Debian Way ==<br />
<br />
The debian rules Makefile, invokes cmake as :-<br />
<br />
cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \<br />
-DCMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO -DSERVER:BOOL=FALSE \<br />
-DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \<br />
-DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \<br />
-DAPP_BINARY_DIR:STRING=/usr/games/ \<br />
-DCMAKE_INSTALL_PREFIX:STRING=debian/ \<br />
-DBINARY_NAME:STRING=omvviewer \<br />
-DOPENAL:BOOL=TRUE \</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake-flags&diff=90105User:Michelle2 Zenovka/cmake-flags2008-09-07T09:17:27Z<p>Michelle2 Zenovka: /* Variables */</p>
<hr />
<div>back to: [[User:Michelle2_Zenovka/cmake]]<br />
<br />
==Intro==<br />
<br />
Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.<br />
<br />
The typical invocation of cmake will look like the following :-<br />
<br />
cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra<br />
<br />
Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-<br />
<br />
develop.py configure -DMYVARIABLE:BOOL=TRUE<br />
<br />
==Generators==<br />
<br />
The -G option of cmake specifies the generator to be used (the target to build project file for). The Secondlife viewer cmake currently supports the following targets :-<br />
<br />
Windows<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008) <br />
<br />
Linuxoids<br />
* Unix Makefiles (default)<br />
* KDevelop3<br />
<br />
Mac<br />
* Xcode<br />
* Unix Makefiles (default) (WARNING: you '''probably''' don't want makefiles, and need to specify -G Xcode to avoid them!)<br />
<br />
==Variables==<br />
<br />
cmake variables are passed on the command line with the -D option, followed by the variable name, a seperation colon, the type of variable then =value for example :-<br />
<br />
-DSTANDALONE:BOOL=FALSE<br />
<br />
Variable name STANDALONE<br />
<br />
Type BOOL<br />
<br />
value FALSE<br />
<br />
There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more)<br />
<br />
{| border="1" cellpadding="20" cellspacing="0"<br />
|STANDALONE||BOOL||Sets the build to standalone mode, if enabled the build will try to use system provided libraries instead of the ones from the libs tarball.<br />
|-<br />
|UNATTENDED||BOOL||Normally set to false, Internal option for Linden Labs building???<br />
|-<br />
|INSTALL||BOOL||Enable Unix install target<br />
|-<br />
|APP_BINARY_DIR||STRING||(Unix install target) Installation directory for the main secondlife-bin<br />
|-<br />
|APP_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files<br />
|-<br />
|BINARY_NAME||STRING|| Replacement name for secondlife-bin executable<br />
|-<br />
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree<br />
|-<br />
|MOZLIB||BOOL||Enable embedded web browsing and html content in world<br />
|-<br />
|}<br />
<br />
== The Debian Way ==<br />
<br />
The debian rules Makefile, invokes cmake as :-<br />
<br />
cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \<br />
-DCMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO -DSERVER:BOOL=FALSE \<br />
-DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \<br />
-DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \<br />
-DAPP_BINARY_DIR:STRING=/usr/games/ \<br />
-DCMAKE_INSTALL_PREFIX:STRING=debian/ \<br />
-DBINARY_NAME:STRING=omvviewer \<br />
-DOPENAL:BOOL=TRUE \</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake-flags&diff=90104User:Michelle2 Zenovka/cmake-flags2008-09-07T09:17:15Z<p>Michelle2 Zenovka: /* Variables */</p>
<hr />
<div>back to: [[User:Michelle2_Zenovka/cmake]]<br />
<br />
==Intro==<br />
<br />
Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.<br />
<br />
The typical invocation of cmake will look like the following :-<br />
<br />
cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra<br />
<br />
Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-<br />
<br />
develop.py configure -DMYVARIABLE:BOOL=TRUE<br />
<br />
==Generators==<br />
<br />
The -G option of cmake specifies the generator to be used (the target to build project file for). The Secondlife viewer cmake currently supports the following targets :-<br />
<br />
Windows<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008) <br />
<br />
Linuxoids<br />
* Unix Makefiles (default)<br />
* KDevelop3<br />
<br />
Mac<br />
* Xcode<br />
* Unix Makefiles (default) (WARNING: you '''probably''' don't want makefiles, and need to specify -G Xcode to avoid them!)<br />
<br />
==Variables==<br />
<br />
cmake variables are passed on the command line with the -D option, followed by the variable name, a seperation colon, the type of variable then =value for example :-<br />
<br />
-DSTANDALONE:BOOL=FALSE<br />
<br />
Variable name STANDALONE<br />
<br />
Type BOOL<br />
<br />
value FALSE<br />
<br />
There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more)<br />
<br />
{| border="1" cellpadding="20" cellspacing="0"<br />
|STANDALONE||BOOL||Sets the build to standalone mode, if enabled the build will try to use system provided libraries instead of the ones from the libs tarball.<br />
|-<br />
|UNATTENDED||BOOL||Normally set to false, Internal option for Linden Labs building???<br />
|-<br />
|INSTALL||BOOL||Enable Unix install target<br />
|-<br />
|DAPP_BINARY_DIR||STRING||(Unix install target) Installation directory for the main secondlife-bin<br />
|-<br />
|APP_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files<br />
|-<br />
|BINARY_NAME||STRING|| Replacement name for secondlife-bin executable<br />
|-<br />
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree<br />
|-<br />
|MOZLIB||BOOL||Enable embedded web browsing and html content in world<br />
|-<br />
|}<br />
<br />
== The Debian Way ==<br />
<br />
The debian rules Makefile, invokes cmake as :-<br />
<br />
cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \<br />
-DCMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO -DSERVER:BOOL=FALSE \<br />
-DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \<br />
-DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \<br />
-DAPP_BINARY_DIR:STRING=/usr/games/ \<br />
-DCMAKE_INSTALL_PREFIX:STRING=debian/ \<br />
-DBINARY_NAME:STRING=omvviewer \<br />
-DOPENAL:BOOL=TRUE \</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake-flags&diff=90103User:Michelle2 Zenovka/cmake-flags2008-09-07T09:14:18Z<p>Michelle2 Zenovka: /* Variables */</p>
<hr />
<div>back to: [[User:Michelle2_Zenovka/cmake]]<br />
<br />
==Intro==<br />
<br />
Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.<br />
<br />
The typical invocation of cmake will look like the following :-<br />
<br />
cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra<br />
<br />
Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-<br />
<br />
develop.py configure -DMYVARIABLE:BOOL=TRUE<br />
<br />
==Generators==<br />
<br />
The -G option of cmake specifies the generator to be used (the target to build project file for). The Secondlife viewer cmake currently supports the following targets :-<br />
<br />
Windows<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008) <br />
<br />
Linuxoids<br />
* Unix Makefiles (default)<br />
* KDevelop3<br />
<br />
Mac<br />
* Xcode<br />
* Unix Makefiles (default) (WARNING: you '''probably''' don't want makefiles, and need to specify -G Xcode to avoid them!)<br />
<br />
==Variables==<br />
<br />
cmake variables are passed on the command line with the -D option, followed by the variable name, a seperation colon, the type of variable then =value for example :-<br />
<br />
-DSTANDALONE:BOOL=FALSE<br />
<br />
Variable name STANDALONE<br />
<br />
Type BOOL<br />
<br />
value FALSE<br />
<br />
There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more)<br />
<br />
{| border="1" cellpadding="20" cellspacing="0"<br />
|STANDALONE||BOOL||Sets the build to standalone mode, if enabled the build will try to use system provided libraries instead of the ones from the libs tarball.<br />
|-<br />
|UNATTENDED||BOOL||Normally set to false, Internal option for Linden Labs building???<br />
|-<br />
|INSTALL||BOOL||Enable Unix install target<br />
|-<br />
|INSTALL_PREFIX||STRING||(Unix install target) Installation directory for read-only shared files<br />
|-<br />
|INSTALL_LIBRARY_DIR||STRING||(Unix install target) Installation directory for binaries<br />
|-<br />
|INSTALL_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files<br />
|-<br />
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree<br />
|-<br />
|}<br />
<br />
<br />
== The Debian Way ==<br />
<br />
The debian rules Makefile, invokes cmake as :-<br />
<br />
cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \<br />
-DCMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO -DSERVER:BOOL=FALSE \<br />
-DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \<br />
-DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \<br />
-DAPP_BINARY_DIR:STRING=/usr/games/ \<br />
-DCMAKE_INSTALL_PREFIX:STRING=debian/ \<br />
-DBINARY_NAME:STRING=omvviewer \<br />
-DOPENAL:BOOL=TRUE \</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka&diff=90102User:Michelle2 Zenovka2008-09-07T09:07:51Z<p>Michelle2 Zenovka: </p>
<hr />
<div>{{Jira Reporter}}<br />
<br />
== CMAKE ==<br />
<br />
My various cmake notes<br />
<br />
[[User:Michelle2_Zenovka/cmake]]<br />
<br />
[[User:Michelle2_Zenovka/cmake-flags]]<br />
<br />
[[User:Michelle2_Zenovka/cmake-notes]]<br />
<br />
<br />
How to cook the voice daemon so it runs on 64 bit debian<br />
<br />
[[User:Michelle2_Zenovka/voice]]<br />
<br />
<br />
== Debian packages of the secondlife viewer ==<br />
<br />
[[http://www.byteme.org.uk/secondlife/apt-get-a-secondlife.html www.byteme.org.uk/secondlife/apt-get-a-secondlife.html]]<br />
<br />
[[http://wiki.debian.org/Games/OpenMetaverseViewer wiki.debian.org/Games/OpenMetaverseViewer]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka&diff=90101User:Michelle2 Zenovka2008-09-07T09:07:40Z<p>Michelle2 Zenovka: </p>
<hr />
<div>{{Jira Reporter}}<br />
<br />
== CMAKE ==<br />
<br />
My various cmake notes<br />
<br />
[[User:Michelle2_Zenovka/cmake]]<br />
<br />
[[User:Michelle2_Zenovka/cmake-flags]]<br />
<br />
[[User:Michelle2_Zenovka/cmake-notes]]<br />
<br />
<br />
How to cook the voice daemon so it runs on 64 bit debian<br />
<br />
[[User:Michelle2_Zenovka/voice}}<br />
<br />
<br />
== Debian packages of the secondlife viewer ==<br />
<br />
[[http://www.byteme.org.uk/secondlife/apt-get-a-secondlife.html www.byteme.org.uk/secondlife/apt-get-a-secondlife.html]]<br />
<br />
[[http://wiki.debian.org/Games/OpenMetaverseViewer wiki.debian.org/Games/OpenMetaverseViewer]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka&diff=90100User:Michelle2 Zenovka2008-09-07T09:07:17Z<p>Michelle2 Zenovka: </p>
<hr />
<div>{{Jira Reporter}}<br />
<br />
== CMAKE ==<br />
<br />
My various cmake notes<br />
<br />
[[User:Michelle2_Zenovka/cmake]]<br />
<br />
[[User:Michelle2_Zenovka/cmake-flags]]<br />
<br />
[[User:Michelle2_Zenovka/cmake-notes]]<br />
<br />
How to cook the voice daemon so it runs on 64 bit debian<br />
<br />
[[https://wiki.secondlife.com/wiki/User:Michelle2_Zenovka/voice}}<br />
<br />
== Debian packages of the secondlife viewer ==<br />
<br />
[[http://www.byteme.org.uk/secondlife/apt-get-a-secondlife.html www.byteme.org.uk/secondlife/apt-get-a-secondlife.html]]<br />
<br />
[[http://wiki.debian.org/Games/OpenMetaverseViewer wiki.debian.org/Games/OpenMetaverseViewer]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/voice&diff=90099User:Michelle2 Zenovka/voice2008-09-07T09:06:41Z<p>Michelle2 Zenovka: </p>
<hr />
<div>How to cook the voice daemon so it runs ok on linux including 64-bit<br />
<br />
ok brief description and details filled in on re-edits.<br />
<br />
My viewer binary lives in /usr/games/ so my voice needs to go along side it in /usr/games<br />
<br />
Create the following folder:-<br />
<br />
/usr/share/slvoice<br />
<br />
copy into this the following libraries from the latest offical linden distribution :-<br />
<br />
* libalut.so<br />
* libopenal.so.1 <br />
* libortp.so <br />
* libuuid.so.1 <br />
* libvivoxsdk.so <br />
<br />
if you are 64 bit you also need to get libidn.so. I got this from http://packages.debian.org/sid/i386/libidn11/download as i need a 32bit version and there is no lib32 package for it. Download it then unpack with <br />
<br />
dpkg --extract libidn11_1.9-1_i386.deb .<br />
<br />
Also on 64bit you will need to install various lib32 packages (but i am unsure of which yet)<br />
<br />
On 32bit you can probably skip some of those libraries above, but this is untested<br />
<br />
create the following script as /usr/games/SLVoice<br />
<br />
#!/bin/sh<br />
export LD_LIBRARY_PATH=/usr/share/slvoice/::/lib32/:/usr/lib32/:/lib:/usr/lib/<br />
/usr/games/SLVoice-bin -p tcp -h -c -ll -1<br />
<br />
copy the voice binary to /usr/games/SLVoice-bin</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/voice&diff=90098User:Michelle2 Zenovka/voice2008-09-07T09:05:39Z<p>Michelle2 Zenovka: </p>
<hr />
<div>How to cook the voice daemon so it runs ok on linux including 64-bit<br />
<br />
ok brief description and details filled in on re-edits.<br />
<br />
My viewer binary lives in /usr/games/ so my voice needs to go along side it in /usr/games<br />
<br />
Create the following folder:-<br />
<br />
/usr/share/slvoice<br />
<br />
copy into this the following libraries from the latest offical linden distribution :-<br />
<br />
* libalut.so<br />
* libopenal.so.1 <br />
* libortp.so <br />
* libuuid.so.1 <br />
* libvivoxsdk.so <br />
<br />
if you are 64 bit you also need to get libidn.so. I got this from http://packages.debian.org/sid/i386/libidn11/download as i need a 32bit version and there is no lib32 package for it. Download it then unpack with <br />
<br />
dpkg --extract libidn11_1.9-1_i386.deb .<br />
<br />
<br />
<br />
create the following script as /usr/games/SLVoice<br />
<br />
#!/bin/sh<br />
export LD_LIBRARY_PATH=/usr/share/slvoice/::/lib32/:/usr/lib32/:/lib:/usr/lib/<br />
/usr/games/SLVoice-bin -p tcp -h -c -ll -1<br />
<br />
copy the voice binary to /usr/games/SLVoice-bin</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/voice&diff=90097User:Michelle2 Zenovka/voice2008-09-07T09:04:52Z<p>Michelle2 Zenovka: New page: How to cook the voice daemon so it runs ok on linux including 64-bit ok brief description and details filled in on re-edits. My viewer binary lives in /usr/games/ so my voice needs to go...</p>
<hr />
<div>How to cook the voice daemon so it runs ok on linux including 64-bit<br />
<br />
ok brief description and details filled in on re-edits.<br />
<br />
My viewer binary lives in /usr/games/ so my voice needs to go along side it in /usr/games<br />
<br />
Create the following folder:-<br />
<br />
/usr/share/slvoice<br />
<br />
copy into this the following libraries from the latest offical linden distribution :-<br />
<br />
* libalut.so<br />
* libopenal.so.1 <br />
* libortp.so <br />
* libuuid.so.1 <br />
* libvivoxsdk.so <br />
<br />
if you are 64 bit you also need to get libidn.so. I got this from http://packages.debian.org/sid/i386/libidn11/download as i need a 32bit version and there is no lib32 package for it. Download it then unpack with <br />
<br />
dpkg --extract libidn11_1.9-1_i386.deb .<br />
<br />
<br />
<br />
create the following script as /usr/games/SLVoice<br />
<br />
#!/bin/sh<br />
export LD_LIBRARY_PATH=/usr/share/slvoicelibs/::/lib32/:/usr/lib32/:/lib:/usr/lib/<br />
/usr/games/SLVoice-bin -p tcp -h -c -ll -1<br />
<br />
copy the voice binary to /usr/games/SLVoice-bin</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=89644Open Source Meeting/Agenda2008-09-04T17:29:14Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
<br />
(As usual i've chucked some ideas together for an Ajenda, please feel free to edit, add-to, remove,skip, postpone or ignore as appropriate [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT))<br />
<br />
# LLMozlib, Webkit, *ping* . Xulrunner 1.9 is a disaster, any other even hacky ways to render a webpage to a memory buffer? [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
# OpenAL, haven't pinged this for a while. Not sure there is much to discuss but i've updated the patches for 1.21 compatibility and Tofu says he's imported it to an internal branch. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
# Cmake build issues,([[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)) i was going to bring these up but BoS seems to have jumped on them all and I am not sure there is much to discuss now :-<br />
## {{jira|VWR-8889}}<br />
## {{jira|VWR-9005}}<br />
## {{jira|VWR-8885}}<br />
## Any other build issues?<br />
# Linden's new Sustaining Engineering group, sounds cool, any Lindens want to add any more? [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
# SLCC (Seems relevant, whos going etc etc. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
#Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=89643Open Source Meeting/Agenda2008-09-04T17:27:45Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
<br />
(As usual i've chucked some ideas together for an Ajenda, please feel free to edit, add-to, remove,skip, postpone or ignore as appropriate [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT))<br />
<br />
# LLMozlib, Webkit, *ping* . Xulrunner 1.9 is a disaster, any other even hacky ways to render a webpage to a memory buffer? [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
# OpenAL, haven't pinged this for a while. Not sure there is much to discuss but i've updated the patches for 1.21 compatibility and Tofu says he's imported it to an internal branch. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
# Cmake build issues,([[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)) i was going to bring these up but BoS seems to have jumped on them all and I am not sure there is much to discuss now :-<br />
## {{jira|VWR-8889}}<br />
## {{jira|VWR-9005}}<br />
## {{jira|VWR-8885}}<br />
# Linden's new Sustaining Engineering group, sounds cool, any Lindens want to add any more? [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
# SLCC (Seems relevant, whos going etc etc. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 10:27, 4 September 2008 (PDT)<br />
#Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=88754Open Source Meeting/Agenda2008-08-29T06:52:24Z<p>Michelle2 Zenovka: /* Agenda */ Blank for next week</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
#Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=88535Open Source Meeting/Agenda2008-08-28T09:18:20Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
# Requesting textures via CAPS, any servers currently testing this. Any other info the lindens can provide on its deployment. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 02:14, 28 August 2008 (PDT)<br />
# What can we do about an appropriate "forum" (used in the general sense) to allow discussion of policy/licensing etc to stop it exploding on #sldev into a circular discussion with no end in site and no agreement. Things routinely get out of control and wiki/jira etc pages does not seem to quell the fire at all. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 02:18, 28 August 2008 (PDT)<br />
#Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
<br />
<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=88534Open Source Meeting/Agenda2008-08-28T09:14:32Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
# Requesting textures via CAPS, any servers currently testing this. Any other info the lindens can provide on its deployment. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 02:14, 28 August 2008 (PDT)<br />
#Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
<br />
<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=87387Open Source Meeting/Agenda2008-08-21T18:01:51Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
# Discussion of Trunk branch, build issues, updates on 1.21's QA progress etc [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 08:58, 21 August 2008 (PDT)<br />
# Any directly related to secondlife, opensource projects anyone wants yo update on (i have one hence my item) [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 11:01, 21 August 2008 (PDT)<br />
# Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=87358Open Source Meeting/Agenda2008-08-21T15:58:10Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
# Discussion of Trunk branch, build issues, updates on 1.21's QA progress etc [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 08:58, 21 August 2008 (PDT)<br />
# Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=83516Open Source Meeting/Agenda2008-08-07T13:14:19Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
# Quick update on cmake (again), quick report on building release (etc) branches with cmake (results from testing building outside Linden Labs), what works, whats broken etc. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 06:11, 7 August 2008 (PDT)<br />
# Documentation updates: anybody done any more filling in/documentation thats worth mentioning? [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 06:14, 7 August 2008 (PDT)<br />
# Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=83515Open Source Meeting/Agenda2008-08-07T13:11:59Z<p>Michelle2 Zenovka: /* Agenda */</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
# Quick update on cmake (again), quick report on building release (etc) branches with cmake (results from testing building outside Linden Labs), what works, whats broken etc. [[User:Michelle2 Zenovka|Michelle2 Zenovka]] 06:11, 7 August 2008 (PDT)<br />
# Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=Open_Source_Meeting/Agenda&diff=83514Open Source Meeting/Agenda2008-08-07T13:11:39Z<p>Michelle2 Zenovka: /* Agenda */ some more cmake stuff</p>
<hr />
<div>< [[Open Source Meeting]]<br />
<br />
<br />
Open source meeting - Thursday, 2pm PT.<br />
<br />
[http://slurl.com/secondlife/Hippotropolis/248/15/25/ Teleport] to the Linden Open Source Project headquarters.<br />
<br />
Please try to add your items as early as possible in the week to give Rob a chance to round up any Lindens that may be appropriate to the discussion. Please also bring items up on [[SLDev]] before or concurrently with adding them as agenda items here.<br />
<br />
== Agenda ==<br />
# Quick update on cmake (again), quick report on building release (etc) branches with cmake (results from testing building outside Linden Labs), what works, whats broken etc.<br />
# Next item? Your name? (sign with "<nowiki>~~~~</nowiki>" which will be converted to your name + timestamp)<br />
<br />
Default agenda (barring agenda above):<br />
* Update from the Lindens (standing item) - [[User:Rob Linden|Rob Linden]]<br />
* Triage of issues listed here: http://jira.secondlife.com/secure/IssueNavigator.jspa?mode=hide&requestId=11240</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=82925User:Michelle2 Zenovka/cmake2008-08-05T10:09:36Z<p>Michelle2 Zenovka: /* Get the source */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft <br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest release branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev <br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
HELP!<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the release branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/release release<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix. <br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/release release<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
Although the cmake process will now download the majority of the libraries there are still some files in the old libs package that you need to fetch.<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x release/doc/asset_urls.txt<br />
. release/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* release/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn release branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_debug/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release_client/<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py". <br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd release/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking release from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
=== Auto package download ===<br />
Last SVN commit broke it, so we all just have to wait a little while for the export scripts to be updated. Someone must have been hand merging the script and now as release with cmake approaches a real release, little issues with the automated scripts are turning up.<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 ===<br />
cmake 2.6 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=82924User:Michelle2 Zenovka/cmake2008-08-05T10:08:36Z<p>Michelle2 Zenovka: /* Get the source */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft <br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest release branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev <br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
HELP!<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the release branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/release release<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix. <br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/release release<br />
<br />
<br />
You no longer need to download the libs tarball/zip file as the develo.py will download the required libraries for you, note you still need the librarys and programs in the initial section of this page installed.<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x release/doc/asset_urls.txt<br />
. release/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* release/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn release branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_debug/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release_client/<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py". <br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd release/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking release from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
=== Auto package download ===<br />
Last SVN commit broke it, so we all just have to wait a little while for the export scripts to be updated. Someone must have been hand merging the script and now as release with cmake approaches a real release, little issues with the automated scripts are turning up.<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 ===<br />
cmake 2.6 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=82923User:Michelle2 Zenovka/cmake2008-08-05T10:08:21Z<p>Michelle2 Zenovka: /* Prerequisites for Linux */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft <br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest release branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev<br />
* libzip-dev<br />
* libfreetype6-dev <br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
HELP!<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the release branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/release<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix. <br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/release release<br />
<br />
<br />
You no longer need to download the libs tarball/zip file as the develo.py will download the required libraries for you, note you still need the librarys and programs in the initial section of this page installed.<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x release/doc/asset_urls.txt<br />
. release/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* release/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn release branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_debug/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release_client/<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py". <br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd release/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking release from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
=== Auto package download ===<br />
Last SVN commit broke it, so we all just have to wait a little while for the export scripts to be updated. Someone must have been hand merging the script and now as release with cmake approaches a real release, little issues with the automated scripts are turning up.<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 ===<br />
cmake 2.6 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovkahttps://wiki.secondlife.com/w/index.php?title=User:Michelle2_Zenovka/cmake&diff=82922User:Michelle2 Zenovka/cmake2008-08-05T10:07:25Z<p>Michelle2 Zenovka: /* FMOD */</p>
<hr />
<div>= How to build the viewer with cmake =<br />
<br />
This page represents some notes of mine for building the viewer via cmake. The process under linux is trivial but under windows it is slightly more involved (but not really that bad at all). If you've only ever been used to starting with a Visual Studio project file then the cmake steps may seem a little strange at first but its a great system for ensuring that radically different build environments start from the same "control" files.<br />
<br />
As cygwin is required for a couple of operations during the building of the viewer i make use of it for svn access too. If you are more familar with unix/linux then this will feel quite at home to you, if you are use to windows it all looks a bit scary!<br />
<br />
== Prerequisites ==<br />
<br />
=== Prerequisites for Windows ===<br />
<br />
* cmake (well duh!)<br />
* Python<br />
* bison and flex (from cygwin)<br />
* DirectX SDK (Microsoft DirectX SDK (November 2007))<br />
* Quicktime SDK<br />
* openssl SDK<br />
<br />
<br />
Get cmake from [http://www.cmake.org/HTML/Download.html http://www.cmake.org/HTML/Download.html]<br />
Download and install the setup executable<br />
<br />
<br />
Get python from [http://www.python.org http://www.python.org]<br />
<br />
When installing cmake and python, its important to allow the commands to be addded to the system path. Both installers give an option for this towards the end of the installation. (On my system i needed to select for current user only as for all users (silently) failed to work).<br />
<br />
<br />
Get cygwin from [http://www.cygwin.com/ http://www.cygwin.com/]<br />
<br />
When you get to the package choice make sure you select bison and flex, they are under development tools.<br />
<br />
<br />
Get DirectX SDK November 2007 from Microsoft <br />
Warning 400MB+ 2007 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en]<br />
<br />
<br />
Get Quicktime SDK from Apple [http://developer.apple.com/quicktime/download/ http://developer.apple.com/quicktime/download/]<br />
<br />
<br />
Openssl SDK<br />
<br />
I think this is now with the viewer code and shipped, Please double check me!<br />
<br />
Not sure why this is not packaged with the viewer. Probably license issues as OpenSSL can be troublesome WRT licenses and compatibility with other licenses. Some windows packages are available which may be a better solution. Work to do<br />
<br />
[http://www.openssl.org/ http://www.openssl.org/]<br />
<br />
=== Prerequisites for Linux ===<br />
<br />
For linux you will also need very similar packages to the windows build, but it is highly recommended that you install these via your distributions package management system.<br />
<br />
Required packages (based on a minimum debian lenny install):-<br />
<br />
* cmake<br />
* python<br />
* build-essential (gcc/ld/make etc)<br />
* svn (to get latest release branch)<br />
* unzip<br />
<br />
Some header/development packages are also required (note these are the debian package names, and these packages probably depend on other packages)<br />
<br />
* libgl1-mesa-dev?<br />
* libzip-dev<br />
* libfreetype6-dev ?<br />
* libxft2-dev<br />
* libxrandr-dev<br />
* libxcursor-dev<br />
* libglu1-mesa-dev<br />
* libxt-dev<br />
<br />
This list was generated by testing what the minimum packages required were to enable a successful build and link starting with a clean minimal Debian Lenny chroot.<br />
<br />
=== Prerequisites for Mac ===<br />
<br />
HELP!<br />
<br />
== Get the source ==<br />
<br />
At the time of writing the source is only available via SVN. cmake based viewer builds are in the release branch so it should be in a released zip ball soon and is expected to start shipping with the 1.21 RCs<br />
<br />
Check out the source :-<br />
<br />
svn co http://svn.secondlife.com/svn/linden/release<br />
<br />
Probably the best plan on Windows, if you do not have an svn client but have installed cygwin, is to go back to the cygwin setup and select the svn tools from the development group. Once these are installed you can checkout svn just like we do on unix. <br />
<br />
Open a cygwin prompt (or for linux just at your console) and run the following commands :-<br />
cd c:<br />
mkdir secondlife<br />
cd secondlife<br />
svn co http://svn.secondlife.com/svn/linden/release release<br />
<br />
<br />
You no longer need to download the libs tarball/zip file as the develo.py will download the required libraries for you, note you still need the librarys and programs in the initial section of this page installed.<br />
<br />
DON'T FORGET THE ARTWORK! and what remains of the libs<br />
<br />
If you are running from svn and still in your cygwin prompt/console, the easiest and quickest way to get the artwork is as follows (NOTE: on some branches, win32 asset_urls.txt are in linden/doc) -<br />
chmod +x release/doc/asset_urls.txt<br />
. release/doc/asset_urls.txt<br />
wget $SLASSET_ART<br />
wget $SLASSET_LIBS_WIN32<br />
unzip slviewer-artwork*<br />
unzip slviewer-*-libs*<br />
cp linden/* release/ -r<br />
<br />
For mac and linux you should use $SLASSET_LIBS_LINUXI386 or $SLASSET_LIBS_DARWIN and for linux its not unzip for the libs its tar :-<br />
tar -xvzf slviewer-*-libs*<br />
<br />
In fact the differences between the different libs packages now are trivial as it only contains some fonts and other trivial bits. But failure to download it (or the wrong one) can cause packaging later to fail.<br />
<br />
In the future this section will be supplemented by a straight forward download from the usual viewer source location as well as the option of downloading the latest and greatest direct from svn release branch.<br />
<br />
If you have many versions of the viewer on your machine, on Win32 it can be possible for the wrong messages.xml to get used sometimes if it isn't explicitly copied. Second Life will tend to run, but using the wrong one can cause subtle hard to trace errors. So an additional handcopy step I tend to do is cp linden/etc/messages.xml over to linden/indra/build-VC80/newview/app-settings.<br />
<br />
== Install FMOD API ==<br />
<br />
At the time of writing fmod still needs to be manually downloaded and installed within the linden source tree. This is assumed you are still working from the cygwin shell or a linux terminal.<br />
<br />
(linux)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz<br />
tar -xvzf fmodapi375linux.tar.gz<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_debug/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release/<br />
cp fmodapi375linux/api/libfmod-3.75.so release/libraries/i686-linux/lib_release_client/<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<br />
(windows)<br />
wget http://www.fmod.org/index.php/release/version/fmodapi375win.zip<br />
unzip fmodapi385win.zip<br />
cp fmodapi375linux/api/inc/* release/libraries/include/<br />
<NOT FINISHED><br />
<br />
basically for windows find the fmod.dll and copy it into the windows lib_debug and windows lib_release folders. Will confirm tomorrow and update (soon)<br />
<br />
== Generate the project files ==<br />
<br />
This is where the real fun and grace of cmake starts to take shape. Open a terminal window and go to the folder with the viewer source code. Enter the folder linden/indra/ now run the develop.py script. Probably on windows if python installed correctly you can just type "develop.py". <br />
<br />
(It seems possible to stay with in your cygwin prompt but if this breaks on windows, open a command prompt instead)<br />
<br />
cd release/indra<br />
./develop.py configure<br />
<br />
it may be necessary to add a -G option which selects which version of visual studio to target, possible options are :-<br />
* VC71<br />
* VC2003 (default)<br />
* VC80 (VS2005)<br />
* VC90 (VS2008)<br />
<br />
for example<br />
<br />
develop.py configure -G VC90<br />
<br />
will generate project files for Visual C++ 2008<br />
<br />
NOTE: This develop.py script now downloads the libraries that were previously in the libs zip file. This saves developers who are tracking release from constantly downloading them every update and only downloads updated libraries. This means on the first run develop.py will take ages download the libs and secondly if you manually want to override libs with older or newer versions it will take some dancing around (feel free to document this).<br />
<br />
== Build the viewer ==<br />
<br />
Now the previous cmake process will have generated some build project files, either Unix makefiles, xcode project files or Visual Studio project files.<br />
<br />
Visual Studio files (and xcode?) can be found under linden/indra/build-vc71 (in fact the exact path name depends on which target you have generated for). Just open the solution file .sln in that folder and build the solution in the standard way. Unix make files are found in the same location and a build can be started with a make in that directory as well. And i would guess that xcode projects are also created in the same way.<br />
<br />
If you don't have the VSTool.exe issues below, just opening up your Visual Studio c++ will show secondlife at the top of the recent projects, ready for you to open.<br />
<br />
It is also possible to start the build directly from the command line/console with :-<br />
<br />
./develop.py build<br />
<br />
On Windows (and mac?) this starts the build without using the Visual Studio/XCode environment but only using the compiler tool chain.<br />
<br />
== Problems ==<br />
<br />
=== Auto package download ===<br />
Last SVN commit broke it, so we all just have to wait a little while for the export scripts to be updated. Someone must have been hand merging the script and now as release with cmake approaches a real release, little issues with the automated scripts are turning up.<br />
<br />
===Express editions of Visual C++===<br />
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.<br />
<br />
===FMOD===<br />
FMOD headers and libs need to be copied into the viewer build directory as stated above BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release<br />
<br />
===LLKDU===<br />
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue<br />
<br />
===Linux===<br />
ligGL.a is supplied in the linden library package and it probably should not be. To avoid linker errors please remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a<br />
<br />
=== cmake 2.6 ===<br />
cmake 2.6 will fail to produce a package on linux and fail with a Make error. This does not happen with cmake 2.4<br />
<br />
== Custom builds ==<br />
<br />
If you wish to do custom builds or things that develop.py just was not intended for then please have a look at [[User:Michelle2_Zenovka/cmake-flags]]</div>Michelle2 Zenovka