Downloading and Compiling under Windows: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 17: | Line 17: | ||
* Open this VC10 solution: C:\Seb\Code\Libs\zlib-src\contrib\vstudio\vc10\zlibvc.sln | * Open this VC10 solution: C:\Seb\Code\Libs\zlib-src\contrib\vstudio\vc10\zlibvc.sln | ||
** Build the ReleaseWithoutAsm target | ** Build the ReleaseWithoutAsm target | ||
* Copy the generated library | * Copy the generated library | ||
** C:\Seb\Code\Libs\zlib-src\contrib\vstudio\vc10\x86\ZlibDllReleaseWithoutAsm\zlibwapi.lib | |||
** To the following location (replace the existing file): C:\Seb\Code\Libs\zlib\lib\zdll.lib | |||
* Copy the generated dll | |||
* Copy the generated dll | ** C:\Seb\Code\Libs\zlib-src\contrib\vstudio\vc10\x86\ZlibDllReleaseWithoutAsm\zlibwapi.dll | ||
** To the arx bin folder: E:\git\ArxFatalis\bin\zlibwapi.dll | |||
=== Freetype - http://freetype.sourceforge.net === | === Freetype - http://freetype.sourceforge.net === | ||
Line 33: | Line 31: | ||
** Build, should give you a lot of warnings but succeed anyway | ** Build, should give you a lot of warnings but succeed anyway | ||
* Copy the generated library | * Copy the generated library | ||
** C:\Seb\Code\Libs\freetype\objs\win32\vc2008\freetype244MT.lib | |||
** To the following location: C:\Seb\Code\Libs\freetype\lib\freetype.lib | |||
=== DevIL - http://openil.sourceforge.net === | === DevIL - http://openil.sourceforge.net === | ||
Download "DevIL 1.x.y SDK for 32-bit Windows": http://openil.sourceforge.net/download.php | * Download "DevIL 1.x.y SDK for 32-bit Windows": http://openil.sourceforge.net/download.php | ||
* Extract in "C:\Seb\Code\Libs\devil" | |||
Copy the following DLL | * Copy the following DLL | ||
** C:\Seb\Code\Libs\devil\lib\DevIL.dll | |||
** To the arx bin folder: E:\git\ArxFatalis\bin\DevIL.dll | |||
=== DirectX 7 SDK === | === DirectX 7 SDK === | ||
Not available anymore from Microsoft... so download it here: http://bcb-tools.com/Downloads/Microsoft/dx7adxf.exe | * Not available anymore from Microsoft... so download it here: http://bcb-tools.com/Downloads/Microsoft/dx7adxf.exe | ||
Run it, its a setup in a self extracting exe (extracted to C:\dx7asdk\ by default) | * Run it, its a setup in a self extracting exe (extracted to C:\dx7asdk\ by default) | ||
Run the setup | * Run the setup | ||
Add DX7SDK_PATH to your environment variable: | ** C:\dx7asdk\DXF\setup.exe | ||
DX7SDK_PATH=C:\Seb\Code\Libs\directx7 | ** Install to C:\Seb\Code\Libs\directx7 | ||
* Add DX7SDK_PATH to your environment variable: | |||
** DX7SDK_PATH=C:\Seb\Code\Libs\directx7 | |||
Add CMAKE_PREFIX_PATH to your environment variable: | === CMake === | ||
CMAKE_PREFIX_PATH=C:\Seb\Code\Libs\zlib;C:\Seb\Code\Libs\freetype;C:\Seb\Code\Libs\DevIL | We need to tell cmake where to search for our libs | ||
* Add CMAKE_PREFIX_PATH to your environment variable: | |||
** CMAKE_PREFIX_PATH=C:\Seb\Code\Libs\zlib;C:\Seb\Code\Libs\freetype;C:\Seb\Code\Libs\DevIL | |||
== Get the code == | == Get the code == | ||
GitBash | Run GitBash | ||
{code} | |||
git clone git@github.com:lubosz/ArxFatalis.git | git clone git@github.com:lubosz/ArxFatalis.git | ||
cd ArxFatalis | cd ArxFatalis | ||
{code} | |||
== Generating VC++ projects == | == Generating VC++ projects == | ||
We'll use CMake for that | We'll use CMake for that | ||
{code} | |||
mkdir build_vc10 | mkdir build_vc10 | ||
cd build_vc10 | cd build_vc10 | ||
cmake .. -G "Visual Studio 10" -DARX_USE_UNITYBUILD=1 | cmake .. -G "Visual Studio 10" -DARX_USE_UNITYBUILD=1 | ||
{code} | |||
== Building ArxFatalis == | == Building ArxFatalis == |
Revision as of 02:11, 5 May 2011
Applications
- Visual C++ 2010 Express Edition: http://www.microsoft.com/express/Downloads/
- You can optionally install Visual Studio 2010 Service Pack 1: http://www.microsoft.com/express/Downloads/#2010-Service-Pack-1
- CMake: http://www.cmake.org/cmake/resources/software.html
- MinGW: http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst
- In the installer, make sure you check MSYS
- msysgit: http://code.google.com/p/msysgit/
- Optional: TortoiseGit: http://code.google.com/p/tortoisegit/
Libraries
ZLib - http://www.zlib.net
- Download the latest version of the "zlib compiled DLL": http://zlib.net/zlib125-dll.zip
- Extract in C:\Seb\Code\Libs\zlib
- Download the latest version of the "zlib source code": http://zlib.net/zlib125.zip
- Extract in C:\Seb\Code\Libs\zlib-src
- Open this VC10 solution: C:\Seb\Code\Libs\zlib-src\contrib\vstudio\vc10\zlibvc.sln
- Build the ReleaseWithoutAsm target
- Copy the generated library
- C:\Seb\Code\Libs\zlib-src\contrib\vstudio\vc10\x86\ZlibDllReleaseWithoutAsm\zlibwapi.lib
- To the following location (replace the existing file): C:\Seb\Code\Libs\zlib\lib\zdll.lib
- Copy the generated dll
- C:\Seb\Code\Libs\zlib-src\contrib\vstudio\vc10\x86\ZlibDllReleaseWithoutAsm\zlibwapi.dll
- To the arx bin folder: E:\git\ArxFatalis\bin\zlibwapi.dll
Freetype - http://freetype.sourceforge.net
- Download freetype2: http://freetype.sourceforge.net/download.html
- Extract in C:\Seb\Code\Libs\freetype
- Open VC2008 solution: C:\Seb\Code\Libs\freetype\builds\win32\vc2008\freetype.sln", VC2010 should convert it without any problem.
- Select the "LIB Release Multithreaded" target
- Build, should give you a lot of warnings but succeed anyway
- Copy the generated library
- C:\Seb\Code\Libs\freetype\objs\win32\vc2008\freetype244MT.lib
- To the following location: C:\Seb\Code\Libs\freetype\lib\freetype.lib
DevIL - http://openil.sourceforge.net
- Download "DevIL 1.x.y SDK for 32-bit Windows": http://openil.sourceforge.net/download.php
- Extract in "C:\Seb\Code\Libs\devil"
- Copy the following DLL
- C:\Seb\Code\Libs\devil\lib\DevIL.dll
- To the arx bin folder: E:\git\ArxFatalis\bin\DevIL.dll
DirectX 7 SDK
- Not available anymore from Microsoft... so download it here: http://bcb-tools.com/Downloads/Microsoft/dx7adxf.exe
- Run it, its a setup in a self extracting exe (extracted to C:\dx7asdk\ by default)
- Run the setup
- C:\dx7asdk\DXF\setup.exe
- Install to C:\Seb\Code\Libs\directx7
- Add DX7SDK_PATH to your environment variable:
- DX7SDK_PATH=C:\Seb\Code\Libs\directx7
CMake
We need to tell cmake where to search for our libs
- Add CMAKE_PREFIX_PATH to your environment variable:
- CMAKE_PREFIX_PATH=C:\Seb\Code\Libs\zlib;C:\Seb\Code\Libs\freetype;C:\Seb\Code\Libs\DevIL
Get the code
Run GitBash {code} git clone git@github.com:lubosz/ArxFatalis.git cd ArxFatalis {code}
Generating VC++ projects
We'll use CMake for that {code} mkdir build_vc10 cd build_vc10 cmake .. -G "Visual Studio 10" -DARX_USE_UNITYBUILD=1 {code}
Building ArxFatalis
E:\git\ArxFatalis\build_vc10\ArxFatalis.sln If you use Visual C++ 2010, there's a bug causing all cpp files to be place in the root of the project... it is annoying but has no effect on the build itself. See http://public.kitware.com/Bug/view.php?id=11925. VC++ 2008 is fine.
You can build the debug target (has debug symbols & can be debugged) or the release target (faster, but currently without debug information)
Debugging ArxFatalis
Right click on the arx project and select "Properties..." Go to "Configuration Properties->Debugging" Change the "Working Directoy" property to "..\bin"
Note that this needs to be done for each target you wish to build/debug
Change full_screen to 0 in bin\cfg_default.ini, as debugging with a fullscreen dx windows is a pain Click the "debug" button (F5) and enjoy :D