1. Important information about the DigiBand developement environment for Linux
This is a cookbook on how I compiled DigiBand for Slackware 12. It is not going to be very specific as things
are different for each distro. Please understand you will need a basic understanding how to compile and package
applications for linux before attempting to compile DigiBand.
2. Download and installing SDL
Most distros come with SDL, you can more than likely obtain it using your package managing system.
Only compile if you absolutely need to, and compile all libraries with:
./configure --prefix=/usr/local
make
make install
You will need the following SDL libraries:
- SDL_ttf
- SDL_image
3. Download and installing FFMPEG
You will need to download ffmpeg. We have used some features of ffmpeg
that have been deprecated, and some distros install a version of ffmpeg with those features removed into a seperate package (Ubuntu to name one). Please
follow these instructions for using FFMPEG.
Using the version that comes with your distro:
You will need to install ffmpeg. If digiband still does not compile see if your distribution has a libavformat package. Using ubuntu for an example, type
apt-cache search avformat. Install that package.
Download ffmpeg using svn:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
- If this doesn't work, use this: ffmpeg.
- Open a console or terminal and navigate to the directory you have downloaded ffmpeg.
- type
tar -xvjf ffmpeg-0.4.9-p20051216.tar.bz2
cd ffmpeg-0.4.9-p20051216
./configure --prefix=/usr/local --enable-shared
make
make install
4. Download and installing OpenAL and FreeALUT.
This is not a mandatory compile, if your distro has a package of it, it is recommended to use your distros package.
- Download the OpenAL Source
- Open a console or terminal and navigate to the directory you have downloaded OpenAL.
- type
./configure --prefix=/usr/local
make
make install
- Download the FreeALUT Source
- Open a console or terminal and navigate to the directory you have downloaded OpenAL.
- type
./configure --prefix=/usr/local
make
make install
This should be all that you need to do for OpenAL.
5. Download and installing libsndfile
This is not a mandatory compile, if your distro has a package of it, it is recommended to use your distros package.
- Download libsndfile
- Open a console or terminal and navigate to the directory you have downloaded libsndfile.
- type
./configure --prefix=/usr/local
make
make install
6. Time to ldconfig
- Open a console or terminal.
- type:
ldconfig
7. Compiling DigiBand
Now are you ready for the fun part? If everything has gone well up til here, this next step should be
blindlessly easy.
- Download the DigiBand X.X.X for Linux to a location you will be using DigiBand, recommended /usr/local
- Open a console or terminal and navigate to where you downloaded DigiBand.
- type:
tar -xvjf digiband-vX.X.X.tar.bz2
cd DigiBand
make -f Makefile.linux
if everything went okay all you should see is:
:~/DigiBand/source# make -f Makefile.linux
g++ `sdl-config --cflags` `pkg-config --cflags sndfile` `pkg-config --cflags libavformat` -DLINUX -DDIGIBAND -Wno-deprecated -O2 -fverbose-asm -Wno-deprecated-declarations -c -o DigiBand.o DigiBand.cpp
g++ `sdl-config --cflags` `pkg-config --cflags sndfile` `pkg-config --cflags libavformat` -DLINUX -DDIGIBAND -Wno-deprecated -O2 -fverbose-asm -Wno-deprecated-declarations -c -o codec.o codec.cpp
g++ `sdl-config --cflags` `pkg-config --cflags sndfile` `pkg-config --cflags libavformat` -DLINUX -DDIGIBAND -Wno-deprecated -O2 -fverbose-asm -Wno-deprecated-declarations -c -o madcodec.o madcodec.cpp
g++ `sdl-config --cflags` `pkg-config --cflags sndfile` `pkg-config --cflags libavformat` -DLINUX -DDIGIBAND -Wno-deprecated -O2 -fverbose-asm -Wno-deprecated-declarations -c -o sndfilecodec.o sndfilecodec.cpp
g++ `sdl-config --cflags` `pkg-config --cflags sndfile` `pkg-config --cflags libavformat` -DLINUX -DDIGIBAND -Wno-deprecated -O2 -fverbose-asm -Wno-deprecated-declarations -c -o stream.o stream.cpp
g++ `sdl-config --cflags` `pkg-config --cflags sndfile` `pkg-config --cflags libavformat` -DLINUX -DDIGIBAND -Wno-deprecated -O2 -fverbose-asm -Wno-deprecated-declarations -c -o vorbisfilecodec.o vorbisfilecodec.cpp
g++ `sdl-config --cflags` `pkg-config --cflags sndfile` `pkg-config --cflags libavformat` -DLINUX -DDIGIBAND -Wno-deprecated -O2 -fverbose-asm -Wno-deprecated-declarations -c -o alsubsys.o alsubsys.cpp
g++ `sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL -lGL -lGLU `pkg-config --libs libavformat` -lopenal `pkg-config --libs vorbisfile` `pkg-config --libs sndfile` -lmad DigiBand.o codec.o madcodec.o sndfilecodec.o stream.o vorbisfilecodec.o alsubsys.o -o DigiBand
:~/DigiBand/source#
- now type:
cp DigiBand ..
8. Definition of compiling flags
You can pass these optional flags to digiband when compiling with -D. Enabling them requires knowledge of editing
Makefiles. Here is a list and definition of the flags:
- DEBUG - Tells DigiBand to display useful debug information such as error codes and timing codes.
- EXCESSIVE - Tells DigiBand to be a very mouthy program. This will cause DigiBand to announce everything
it is currently doing. Good for finding memory leaks or problematic code.
- EXCESSIVELITE - Tells excessive to tone it down a little. It will restrain a few events to allow DigiBand
to still be playable on higher end systems (requires a 4200+ or better processor).
- ARCADE - toggles a few bits of code for optimization in a arcade cabinent environment, as of right now this
is not really implemented.
- DEBUGDRAWTEXT - Prints very specific information about the DrawText subsystem for DigiBand.
- DIGIBAND - This used to be used for liboswego AL, but Velex has since merged the differences into one
library.
- DEBUGSONGLOAD - Prints specific information while a song is being loaded.
- OPTIMIZE/RELEASE - Compiles DigiBand with the optimization flags used in the official branded release.
- _CONSOLE/_MBCS - If you compiled SDL, you can use this to display the debug information in a console
window as it's happening live instead of stdout.txt.
- NOOSWEGO - Disables the Oswego AL sound system. This will disable any sound from DigiBand.
9. Understanding the DigiBand code tree structure
DigiBand was coded using C++ and C++ libraries, but I did not code it traditionally taking advantage
of some features from C++. Instead I optimized for speed by compiling it as one giant program.
The oswego AL library is coded as object oriented, but the base code and subsystems are in a
Hierarchy style of coding with the exception of a few classes having header files. So please
keep this in mine when editing DigiBand. Alot of variables are defined in globals.h, and alot of
functions are included in a very specific order in DigiBand.cpp.