Difference between revisions of "Building from source"

From SfzWiki
Jump to: navigation, search
(linux dependencies as packages (debian/ubuntu))
(remove spam)
 
(45 intermediate revisions by 12 users not shown)
Line 10: Line 10:
 
* OGRE 1.4.* (eihort) http://www.ogre3d.org  
 
* OGRE 1.4.* (eihort) http://www.ogre3d.org  
 
* lua 5.0 http://www.lua.org ( http://sourceforge.net/project/showfiles.php?group_id=32250&package_id=115607 contains lua-5.0.2 working binaries/libraries for windows)
 
* lua 5.0 http://www.lua.org ( http://sourceforge.net/project/showfiles.php?group_id=32250&package_id=115607 contains lua-5.0.2 working binaries/libraries for windows)
* SDL-1.2.11 http://www.libsdl.org/download-1.2.php
 
 
* FModEx (4.*) http://www.fmod.org/index.php/download#FMODExProgrammersAPI  (you need the Ex package)
 
* FModEx (4.*) http://www.fmod.org/index.php/download#FMODExProgrammersAPI  (you need the Ex package)
 
* ODE physics engine http://ode.org/download.html ( ode-win32-0.8.zip or ode-src-0.8.zip )
 
* ODE physics engine http://ode.org/download.html ( ode-win32-0.8.zip or ode-src-0.8.zip )
* boost http://sourceforge.net/project/showfiles.php?group_id=7586  
+
* boost http://sourceforge.net/project/showfiles.php?group_id=7586 (for win see http://www.boost-consulting.com/products/free )
 
* zlib (static)
 
* zlib (static)
 
:get the static zlib from this package:
 
:get the static zlib from this package:
Line 31: Line 30:
  
 
=== linux dependencies as packages (debian/ubuntu) ===
 
=== linux dependencies as packages (debian/ubuntu) ===
 +
 +
* on ubuntu 7.10 or later you don't need to compile ogre and ois yourself, since an up to date ogre version (1.4.* eihort) is in the package repos, probably the same on the latest debian.
 +
** otherwise see [[compiling ogre]]
 
* the names of some packages that have to be installed to compile sfz,  
 
* the names of some packages that have to be installed to compile sfz,  
 
* install use "apt-get install packagename"
 
* install use "apt-get install packagename"
 
* (this list is probably incomplete, but it might help)
 
* (this list is probably incomplete, but it might help)
  
 
+
* liblua50-dev liblualib50-dev  
* liblua50 liblualib50 lua50 liblua50-dev liblualib50-dev
+
 
* libalut-dev
 
* libalut-dev
 
* libopenal-dev
 
* libopenal-dev
 
* libvorbisfile3
 
* libvorbisfile3
 
* libvorbis-dev
 
* libvorbis-dev
 +
* libogg-dev
 
* libboost-dev
 
* libboost-dev
 
* libboost-thread-dev
 
* libboost-thread-dev
 +
* libogre-dev libois-dev g++ gcc
 +
* nvidia-cg-toolkit (optional, for shaders) or http://developer.nvidia.com/object/cg_toolkit.html#downloads
 +
 +
on ubuntu in one commandline : ./installdeps.ubuntu.sh
  
 
maybe those for ode ? but i think i compiled from source
 
maybe those for ode ? but i think i compiled from source
 
* libode0-dev
 
* libode0-dev
* libode0c2
 
  
== Linux with scons ==
+
(lua is no longer a dependency when using the premake build system, as this includes the source of the lua version we use and compiles it in statically)
 +
 
 +
=== linux dependencies as packages (opensuse) ===
 +
* packman and OSS repository needed,  g++,gcc and make as well
 +
 
 +
* freealut-dev
 +
* openal-dev
 +
* libvorbis-dev
 +
* libogg-dev
 +
* boost-dev
 +
* ogre
 +
* ogre-dev
 +
* libois-dev
 +
 
 +
== building under linux ==
 +
 
 +
[[LinuxCompileTroubleShooting]]
 +
 
 +
we currently have 3 build systems,  automake, scons and premake
 +
automake is recommended for trying to make packages, as the it has config for installing etc,
 +
but noone currently active knows automake well, and it's macro-language can be a pain for some daily tasks.
 +
 
 +
we internally use scons(python based) and premake(lua based) during development,
 +
they are not so well adjusted to the many different linux distro's, so you might have to manually change some library names or similar, but we found tweaking them a lot easier than automake.
 +
 
 +
the scons one has been around longer, but since we are more comfortable with the lua scripting language
 +
we might move permanently to premake and drop scons.
 +
 
 +
we configured neither scons nor premake for "installing" sfz, as we start it directly during development,
 +
and we are not very familiar with the linux install process (especially when talking about multiple distros).
 +
 
 +
=== building with premake ===
 +
 
 +
use 
 +
  ./premakelinux.sh
 +
in the sfz directory to build
 +
 
 +
( if you have problems with libnames on your distro, editing premake.lua might help )
 +
 
 +
see http://premake.sourceforge.net/about for more infos,
 +
there is no need to install premake, it is included in the sfz download/svn.
 +
 
 +
[[User:Ghoulsblade|Ghoulsblade]] 04:14, 24 November 2007 (CET) : premake will try to compile lua statically from source included with sfz, we hope this solves a few problems with lua50 and 51 conflicting or confusing naming in several distros.
 +
 
 +
=== building with scons (deprecated) ===
 +
 
 +
WARNING : using the scons build system is deprecated, please try premake instead.
  
 
Requirements:
 
Requirements:
 
* scons http://www.scons.org/
 
* scons http://www.scons.org/
 +
* liblua50 liblualib50 lua50 liblua50-dev liblualib50-dev  (scons doesn't compile lua statically, so you need to install it seperately)
  
 
Scons replaces the old autotools build system, just run "scons" and it will automatically search for dependencies, then build SFZ if all the requirements are met.
 
Scons replaces the old autotools build system, just run "scons" and it will automatically search for dependencies, then build SFZ if all the requirements are met.
Line 63: Line 115:
  
 
See also http://www.ogre3d.org/phpBB2/viewtopic.php?t=32549 compile-guide for ogre 1.4.1
 
See also http://www.ogre3d.org/phpBB2/viewtopic.php?t=32549 compile-guide for ogre 1.4.1
 
[[LinuxCompileTroubleShooting]]
 
  
 
[[BuildingOnGentoo]]
 
[[BuildingOnGentoo]]
 
  
 
=== installing fmod in linux ===
 
=== installing fmod in linux ===
Line 97: Line 146:
 
** Microsoft® Platform SDK (psdk below) http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
 
** Microsoft® Platform SDK (psdk below) http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
  
* install "Visual C++ 2005 Express" (8.0) http://msdn.microsoft.com/vstudio/express/visualc/ (available for free)
+
* install "Visual C++ 2005 Express" (8.0) http://www.microsoft.com/express/2005/download/ (available for free)
* install "Visual C++ 2005 Express SP1" (Service Pack 1) http://msdn.microsoft.com/vstudio/express/downloads/ (see Download Additional Components) (approx 50 mb)
+
** install "Visual C++ 2005 Express SP1" (Service Pack 1) (see Download Additional Components below) (approx 50 mb)
  
 
* <b>configure library and include paths yourself:</b>
 
* <b>configure library and include paths yourself:</b>
Line 107: Line 156:
 
<pre>
 
<pre>
 
libraries:
 
libraries:
 +
C:\sfzlibs\\boost_1_34_1\lib
 
C:\sfzlibs\ogre\lib
 
C:\sfzlibs\ogre\lib
 
C:\sfzlibs\psdk\Lib
 
C:\sfzlibs\psdk\Lib
 
C:\sfzlibs\lua50\lib
 
C:\sfzlibs\lua50\lib
C:\sfzlibs\SDL-1.2.11\lib
 
 
C:\sfzlibs\fmodx\lib
 
C:\sfzlibs\fmodx\lib
 
C:\sfzlibs\zlib\lib (taken as static lib from Precompiled Dependencies)
 
C:\sfzlibs\zlib\lib (taken as static lib from Precompiled Dependencies)
Line 116: Line 165:
  
 
includes:
 
includes:
 +
C:\sfzlibs\boost_1_34_1
 
C:\sfzlibs\ogre\include
 
C:\sfzlibs\ogre\include
 
C:\sfzlibs\ogre\include\OIS
 
C:\sfzlibs\ogre\include\OIS
 
C:\sfzlibs\lua50\source\include
 
C:\sfzlibs\lua50\source\include
C:\sfzlibs\SDL-1.2.11\include
 
 
C:\sfzlibs\fmodx\include
 
C:\sfzlibs\fmodx\include
 
C:\sfzlibs\zlib\include\ (taken as static lib from Precompiled Dependencies)
 
C:\sfzlibs\zlib\include\ (taken as static lib from Precompiled Dependencies)
 
C:\sfzlibs\ode-0.8\include
 
C:\sfzlibs\ode-0.8\include
  
 +
 +
 +
project settings / linker / input should contain the following :
 +
libboost_thread-vc80-mt-s-1_34_1.lib ode.lib zlib.lib lua.lib lualib.lib LIBCMT.lib LIBCPMT.LIB User32.Lib AdvAPI32.Lib ws2_32.lib OgreMain.lib SDL.lib OIS.lib fmodex_vc.lib
 +
but they should already be in the project file contained in the svn.
 +
 +
</pre>
 +
 +
to compile with openal you also need the following :
 +
<pre>
 
         OpenAL (optional)
 
         OpenAL (optional)
 
         -----------------
 
         -----------------
Line 129: Line 188:
 
C:\sfzlibs\openalsdk\lib
 
C:\sfzlibs\openalsdk\lib
 
         C:\sfzlibs\freealut\lib
 
         C:\sfzlibs\freealut\lib
C:\sfzlibs\libogg\win32\Dynamic_Release
+
C:\sfzlibs\libogg\win32\Static_Release
C:\sfzlibs\libvorbis\win32\Vorbis_Dynamic_Release
+
C:\sfzlibs\libvorbis\win32\Vorbis_Static_Release
C:\sfzlibs\libvorbis\win32\VorbisFile_Dynamic_Release
+
C:\sfzlibs\libvorbis\win32\VorbisFile_Static_Release
  
 
         includes:
 
         includes:
Line 138: Line 197:
 
C:\sfzlibs\libogg\include
 
C:\sfzlibs\libogg\include
 
C:\sfzlibs\libvorbis\include
 
C:\sfzlibs\libvorbis\include
 +
 +
project settings / linker / input should contain the following :  add the following to the list :
 +
alut.lib OpenAL32.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib
 
</pre>
 
</pre>
  
Line 155: Line 217:
 
RenderSystem_Direct3D9.dll (ogre plugin)
 
RenderSystem_Direct3D9.dll (ogre plugin)
 
RenderSystem_GL.dll (ogre plugin)
 
RenderSystem_GL.dll (ogre plugin)
SDL.dll
 
  
 
         OpenAL (optional)
 
         OpenAL (optional)

Latest revision as of 10:19, 6 July 2012

see also the textfile INSTALL in the main dir

For building the Updater from source see UpdaterBuildingFromSource

problems with fmod ? you can try using openal instead, see BuildingWithOpenAL

Dependencies (linux and win)

Windows & Linux

get the static zlib from this package:
Visual C++.Net 2005 (8.0) SP1 Precompiled Dependencies 1.4.x

Linux only


you need either fmod or openal, fmod is used by default, to change this to openal see http://sfz.schattenkind.net/wiki/index.php/BuildingWithOpenAL

linux dependencies as packages (debian/ubuntu)

  • on ubuntu 7.10 or later you don't need to compile ogre and ois yourself, since an up to date ogre version (1.4.* eihort) is in the package repos, probably the same on the latest debian.
  • the names of some packages that have to be installed to compile sfz,
  • install use "apt-get install packagename"
  • (this list is probably incomplete, but it might help)

on ubuntu in one commandline : ./installdeps.ubuntu.sh

maybe those for ode ? but i think i compiled from source

  • libode0-dev

(lua is no longer a dependency when using the premake build system, as this includes the source of the lua version we use and compiles it in statically)

linux dependencies as packages (opensuse)

  • packman and OSS repository needed, g++,gcc and make as well
  • freealut-dev
  • openal-dev
  • libvorbis-dev
  • libogg-dev
  • boost-dev
  • ogre
  • ogre-dev
  • libois-dev

building under linux

LinuxCompileTroubleShooting

we currently have 3 build systems, automake, scons and premake automake is recommended for trying to make packages, as the it has config for installing etc, but noone currently active knows automake well, and it's macro-language can be a pain for some daily tasks.

we internally use scons(python based) and premake(lua based) during development, they are not so well adjusted to the many different linux distro's, so you might have to manually change some library names or similar, but we found tweaking them a lot easier than automake.

the scons one has been around longer, but since we are more comfortable with the lua scripting language we might move permanently to premake and drop scons.

we configured neither scons nor premake for "installing" sfz, as we start it directly during development, and we are not very familiar with the linux install process (especially when talking about multiple distros).

building with premake

use

 ./premakelinux.sh 

in the sfz directory to build

( if you have problems with libnames on your distro, editing premake.lua might help )

see http://premake.sourceforge.net/about for more infos, there is no need to install premake, it is included in the sfz download/svn.

Ghoulsblade 04:14, 24 November 2007 (CET) : premake will try to compile lua statically from source included with sfz, we hope this solves a few problems with lua50 and 51 conflicting or confusing naming in several distros.

building with scons (deprecated)

WARNING : using the scons build system is deprecated, please try premake instead.

Requirements:

  • scons http://www.scons.org/
  • liblua50 liblualib50 lua50 liblua50-dev liblualib50-dev (scons doesn't compile lua statically, so you need to install it seperately)

Scons replaces the old autotools build system, just run "scons" and it will automatically search for dependencies, then build SFZ if all the requirements are met.

If you have never used scons before, or if you get compile/linker errors after updating :

  • "scons --clean" (or -c) - Equivalent to "make clean"
  • "scons configure" - Forces scons to run the configure stage again (i.e ./configure)
  • see "scons -H" for more scons specific information

NOTE: If you've installed the libraries SFZ requires into /usr/local/lib/, make sure you add /usr/local/lib to /etc/ld.so.conf otherwise the game will complain about missing libraries.

See also http://www.ogre3d.org/phpBB2/viewtopic.php?t=32549 compile-guide for ogre 1.4.1

BuildingOnGentoo

installing fmod in linux

download FMOD Ex 4.x Programmers API for linux from http://www.fmod.org/

http://www.fmod.org/index.php/download#FMODExProgrammersAPI

 tar xfz fmodapi40622linux.tar.gz
 cd fmodapi40622linux
 su
 make install
 /sbin/ldconfig

if you encounter problems during compile you might have to also do the follwing

 cd /opt/
 mkdir fmod
 cd fmod
 cp -r PLACE_WHERE_UNPACKED/fmodapi40622linux/* .
 /sbin/ldconfig


(the old fmod3.* also needed this, but seems to be irrelevant now : cd /usr/local/lib  ; ln -s /opt/fmod/api/libfmod-3.75.so )

WIN32 with Visual C++ 8.0 Express

  • configure library and include paths yourself:
    • menu : extras : options
    • projects : VC++ directories
    • at the top-right corner choose "libraries" and "includes" from the dropdown and include these paths
      • "libraries"
	libraries:
	C:\sfzlibs\\boost_1_34_1\lib
	C:\sfzlibs\ogre\lib
	C:\sfzlibs\psdk\Lib
	C:\sfzlibs\lua50\lib
	C:\sfzlibs\fmodx\lib
	C:\sfzlibs\zlib\lib (taken as static lib from Precompiled Dependencies)
	C:\sfzlibs\ode-0.8\lib\releasedll

	includes:
	C:\sfzlibs\boost_1_34_1
	C:\sfzlibs\ogre\include
	C:\sfzlibs\ogre\include\OIS
	C:\sfzlibs\lua50\source\include
	C:\sfzlibs\fmodx\include
	C:\sfzlibs\zlib\include\ (taken as static lib from Precompiled Dependencies)
	C:\sfzlibs\ode-0.8\include



project settings / linker / input should contain the following : 
libboost_thread-vc80-mt-s-1_34_1.lib ode.lib zlib.lib lua.lib lualib.lib LIBCMT.lib LIBCPMT.LIB User32.Lib AdvAPI32.Lib ws2_32.lib OgreMain.lib SDL.lib OIS.lib fmodex_vc.lib
but they should already be in the project file contained in the svn.

to compile with openal you also need the following :

        OpenAL (optional)
        -----------------
        libraries:
	C:\sfzlibs\openalsdk\lib
        C:\sfzlibs\freealut\lib
	C:\sfzlibs\libogg\win32\Static_Release
	C:\sfzlibs\libvorbis\win32\Vorbis_Static_Release
	C:\sfzlibs\libvorbis\win32\VorbisFile_Static_Release

        includes:
	C:\sfzlibs\openalsdk\include
        C:\sfzlibs\freealut\include
	C:\sfzlibs\libogg\include
	C:\sfzlibs\libvorbis\include

	project settings / linker / input should contain the following :  add the following to the list :
		alut.lib OpenAL32.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib


  • compile - release build


  • copy the following dlls into the "\" (root) directory:
	cg.dll  (for shaders, see nvidia hp)
	fmodex.dll (soundsystem)
	OgreMain.dll
	OIS.dll
	Plugin_CgProgramManager.dll (ogre plugin)
	Plugin_OctreeSceneManager.dll (ogre plugin)
	Plugin_ParticleFX.dll (ogre plugin)
	RenderSystem_Direct3D9.dll (ogre plugin)
	RenderSystem_GL.dll (ogre plugin)

        OpenAL (optional)
        -----------------
	alut.dll  (openal)
	ogg.dll   (ogg vorbis)
	vorbis.dll (ogg vorbis)
	vorbisenc.dll (ogg vorbis)
	vorbisfile.dll (ogg vorbis)