Difference between revisions of "Compile ECWolf on Windows"

From ECWolf Wiki
(Created page with 'Compiling ECWolf on Windows is very similar to compiling under Linux. Until this guide is completed please use that page for reference.')
 
Line 1: Line 1:
Compiling ECWolf on Windows is very similar to [[Compile ECWolf on Linux|compiling under Linux]].  Until this guide is completed please use that page for reference.
+
This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.
 +
 
 +
== Dependencies ==
 +
 
 +
The following programs/libraries are used by ECWolf.  The versions listed below are known to work, however other versions may work.
 +
* [http://cmake.org/ CMake] 2.6
 +
* [http://www.libsdl.org/ libsdl] 1.2
 +
* [http://www.libsdl.org/projects/SDL_mixer/ SDL_mixer] 1.2.11
 +
In addition to the above, the following are optional dependencies.
 +
* [http://www.zlib.net/ zlib] 1.2.3
 +
* [http://bzip.org/ bzip2] 1.0.5
 +
 
 +
[http://tortoisehg.bitbucket.org/ Mercurial] is also needed to checkout a copy of the latest source. You will also need a compiler. MinGW and MSVC 2005 or later should work fine. The steps are more or less the same for both.
 +
 
 +
== Retrieving the Source ==
 +
Use Mercurial to retrieve the latest version of the source.
 +
  hg clone [https://bitbucket.org/Blzut3/ecwolf https://bitbucket.org/Blzut3/ecwolf]
 +
 
 +
== Compiling ==
 +
First open the CMake GUI and put the location to the source code in the source code path. (Note that this is not the src directory in the repository but the root.) Then for the directory to build the binary in, create a build directory in the source code directory and use that. Once the two paths are entered click "Configure."
 +
 
 +
Here select the compiler you're going to generate the project for. Use MinGW Makefiles for MinGW or select the Visual Studio version if you are using that. Once you've made your selection, click "Finish."
 +
 
 +
At this point CMake will likely error because it can't find SDL. Find the SDL_INCLUDE_DIR and SDL_LIBRARY_TEMP and set them accordingly (SDL_LIBRARY_TEMP should point to SDL.lib for MSVC or SDL.dll for MinGW).  Once you do that, clicking configure, and it will complain about SDL_mixer. Do basically the same thing only for SDLMIXER variables and click "Configure" again. It should succeed so click "Generate."
 +
 
 +
For MSVC you will now have a sln file which should build successfully. For MinGW open a command propmt and cd to the build directory and type mingw32-make. With MSVC you can statically link the standard library by adding /MT to CMAKE_CXX_FLAGS_RELEASE. MinGW can do the same by adding -static-libgcc.

Revision as of 17:07, 9 October 2012

This guide will demonstrate how to compile the Mercurial version of ECWolf on Linux.

Dependencies

The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.

In addition to the above, the following are optional dependencies.

Mercurial is also needed to checkout a copy of the latest source. You will also need a compiler. MinGW and MSVC 2005 or later should work fine. The steps are more or less the same for both.

Retrieving the Source

Use Mercurial to retrieve the latest version of the source.

hg clone https://bitbucket.org/Blzut3/ecwolf

Compiling

First open the CMake GUI and put the location to the source code in the source code path. (Note that this is not the src directory in the repository but the root.) Then for the directory to build the binary in, create a build directory in the source code directory and use that. Once the two paths are entered click "Configure."

Here select the compiler you're going to generate the project for. Use MinGW Makefiles for MinGW or select the Visual Studio version if you are using that. Once you've made your selection, click "Finish."

At this point CMake will likely error because it can't find SDL. Find the SDL_INCLUDE_DIR and SDL_LIBRARY_TEMP and set them accordingly (SDL_LIBRARY_TEMP should point to SDL.lib for MSVC or SDL.dll for MinGW). Once you do that, clicking configure, and it will complain about SDL_mixer. Do basically the same thing only for SDLMIXER variables and click "Configure" again. It should succeed so click "Generate."

For MSVC you will now have a sln file which should build successfully. For MinGW open a command propmt and cd to the build directory and type mingw32-make. With MSVC you can statically link the standard library by adding /MT to CMAKE_CXX_FLAGS_RELEASE. MinGW can do the same by adding -static-libgcc.