aramande/GameEngine
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Game Engine =========== This engine will be a library that is usable by anyone, so please document the functions you create in the h-files so that we can use doxygen, or a similar program later. How to add new sourcefiles -------------------------- To add a new file to the buildscript, open src/CMakeLists.txt in there, you will find add_library, this is a list of all sourcefiles that should be available in the library. To add a test file to the testsuite, simply add the h-file to the test_headers variable. To add a file to the game, add it to the add_executable list, and it will be compiled into the gametest executable. Compile everything and don't forget to execute the enginetest to run all unittests. How to compile -------------- $ cmake . $ make # make install Change cmake generator ---------------------- The choices of generator depends on platform. To find out what generators are available to you $ cmake --help Then simply choose your generator and compile with it. $ cmake -G "Visual Studio 10" . Dependencies ------------ libsdl1.2 libsdl-ttf2.0 libsdl-image1.2 cxxtest How to install SDL (Windows) ---------------------------- Step 1: Store the libraries in a convenient location like C:\lib\ Step 2: Add "C:\lib\SDL-1.2.14;C:\lib\SDL_ttf-2.0.10;C:\lib\SDL_image-1.2.10" to the system/user variable CMAKE_PREFIX_PATH Step 3: Run cmake with the configuration of your choice and compile the code Step 4: Locate where the executables are located(depends on your IDE) and copy all the dll files from the libraries to here How to install cxxtest (windows) --------------------------------- Step 1: Installing Perl or Python After installation, make sure that Python or Perl is in your path. Step 2: Installing CxxTest Download CxxTest from http://cxxtest.tigris.org/servlets/ProjectDocumentList. This example will unzip the file to C:\. After unzipping, add your directory to the PATH and to the INCLUDE environment variables. Here is how to do it in Vista/7: Click Start menu, click 'Control Panel' from the right column to start the control panel From the control panel's search box, type 'env' and you will see the choice for 'Edit environment variables for you account', click it. If the environment PATH does not exist, create it and assign the value C:\CxxTest (or the location of your CxxTest directory). If the PATH evironment already exist, append ;C:\CxxTest to it (note the semicolon which acts as a separator). Similarly, add C:\CxxTest to the INCLUDE variable Click OK to submit your changes (Source, with modifications: http://wuhrr.wordpress.com/2008/01/15/how-to-set-up-cxxtest/) How to install cxxtest (*nix) ----------------------------- Get the source http://cxxtest.tigris.org/servlets/ProjectDocumentList. Extract it to e.g. /tmp via tar xzf cxxtest-3.10.1.tar.gz Move the whole cxxtest directory with all files to /usr/local/ mv cxxtest /usr/local Symlink the executable cxxtestgen.py to /usr/local/bin/ cd /usr/local/bin && ln -s ../cxxtest/cxxtestgen.py Symlink the header directory (cxxtest) to /usr/local/includes/ cd /usr/local/include && ln -s ../cxxtest/cxxtest (Source: http://berkeley.informatik.uni-leipzig.de/trac/ow-public/wiki/IntegrateCxxTestInCMakeProject)