Compiling the Player Under WindowsCompiling the player is actually much easier than tackling the editor. All of the needed libraries can be downloaded with binaries, so it's all a cakewalk.
Table of Contents
download page, and scroll down to the section listed as Development Libraries. Under Win32, surprise, you'll see a release for MSVC 8, which you should get. For me, it was SDL-devel-1.2.13-VC8.zip. Download it, extract, and place the includes and libs in the correct folders in your MSVC installation.
here, and you should grab the VC8 devel release under Win32. Once again, download, extract, and move the files accordingly.
website, and grab the VC8 development release. I downloaded version 1.2.8, but you should get the latest. Follow the same procedure as above.
here, and just fetch whatever is the latest VC8 development release (for me, it was 2.0.9). I think you know what to do from here. ;)
website! Instead, there is only an older version, and the latest release comes in the form of source code. Luckily, compiling SDL_gfx was a piece of cake, and you can get my compiled variant from here. Now just place the files as usual.
First, we need to do one, small configuration step. We need to add an environment variable to your system, so right click My Computer, open the Advanced tab, and click the Environment Variables button on the bottom. In the System Variables frame, click New. In the dialog that just popped up, type in PKG_CONFIG_PATH for Variable Name. Now, assuming you installed GTK to C:\GTK, type in C:\GTK\lib\pkgconfig for the Variable Value field. Click OK and exit out of the dialogs. You now need to open up a command prompt window, and change into where you installed GTK, and then into the bin folder there. Once there, execute this command without the quotes:
"pkg-config.exe gtkmm-2.4 --cflags"
If everything went right, pkg-config will spit a bunch of paths. You should copy those (right click, Mark, select the text, Enter), and paste them into a blank Notepad document. The paths will be broken down into a few lines, so make sure everything is on one line in your Notepad. Now, replace all of those forward slashes with backward slashes (protip: Edit -> Replace *gasp*), and you should have a list of include paths. Make your compiler aware of them.
Usually, with includes come libraries that the linker needs. Luckily, pkg-config has all the answers. Repeat what you did above, except now, instead of running that other command, try this one: "pkg-config glibmm-2.4 --libs"
Once again, copy and paste that output into Notepad, and tidy it up. The output should contain many -lxxx bits. What you should do is to take each -lxxx, remove the prefix (-l), and add a .lib extension to the end. So, let's say we have: -lglibmm-2.4. You would change that to: glibmm-2.4.lib. Why all this extra effort? This is because pkg-config assumes you're using gcc (which takes linker libraries in that format), but since we're using MSVC, we need to be careful to pass the right arguments.
This is what my linker dependencies looked like:
With that, glibmm is out of the way. Now just add the remaining libraries:
With this, the compiler should now have everything it needs. The only piece of the puzzle is to add a preprocessor define. Since we're compiling on Windows, certain code needs to be included in the build. This is done by defining __WIN32__.
And that is all. You should now try compiling the project, and if all goes well, you should end up with a finished executable. However, before you can fire it up and start playing around, you need to throw in the data.dpkg resource file (found in CVS), along with the arial.ttf font file (also in CVS). Finally, you'll need to add in the missing DLLs, which can all be found on your system assuming you copied all of those library files correctly. More than likely, they'll be in your MSVC/bin folder.
Of course, no matter how much time I spent writing this guide, there is a good chance I missed something. If you are stuck somewhere along the line, or if you run into errors, please let me know so I can fix the documentation. As always, feel free to contact me.
Good luck. :)
Hosted on Sourceforge.net. All Phoenix Wright trademarks and other property are copyright Capcom.