Compile from the sources

Important: This page is out of date, we now have a wiki with the latest info on how to compile Wagic: please go here


At the time of this writing, the sources for Wagic are available on google code

You might want to compile the game from the sources for various reasons. You want to add features to the game, or you want to see how to create a game with the JGE lib, or you’re trying to port Wagic to another platform, or trying to create a Pokemon card game, who knows…

Compiling Wagic shouldn’t be difficult, however you might need to have some basic in PSP programming or at least in bash or DOS shell commands…

This article deals with compilation under a Windows environment. If you have a Linux Desktop, the procedure for compiling the EBOOT shouldn’t be too different from the DOS one, except that you need to have the PSPSDK correctly set up, and I won’t teach you how to do that.

Thanks to JGE++, Wagic can ve compiled for both Windows and the PSP. Compiling a Windows version helps a lot for debugging, since you don’t have to spend that much time playing with PSPLINK (which is a great tool, don’t get me wrong).

This article explains both procedures

Compiling for Windows

Abrasax from our forums explained how to compile the windows version:

  1. Install Visual C++ express (freeware) from microsoft.
  2. download the whole source code (including the JGE) in any directory, using a svn client
  3. Copy the dirent.h and stdint.h from the extra folder in the include dir of your Microsoft SDK folder
  4. Copy the Res folder (the one that comes with Wagic) in projects/mtg/bin/
  5. Open the mtg.sln project (in the projects/mtg folder) with Visual Studio
  6. Open the winmain.cpp from the JGE source folder before the line “include glaux.h” put “//” or delete the line do the same for the line “#pragma comment( lib, “glaux.lib” )” since you do not need this librairy anymore in the new VC++
  7. Now you can clean the solution and regenerate the whole project. Pressing the “play” button in Visual Studio will compile then launch the game in debug mode, which give lots of information that are useful for… debugging

Step 6 is necessary because I (WilLoW) have an older version of Visual studio (VC 2005) that requires glaux, but most people now have a more recent version of VC

Compiling for the PSP (EBOOT.PBP)

I’ve succesfully tested this method on my Vista machine (with version 0.8.9 of the minimalist PSP SDK). Please report any issues or success !

  1. Download and install a PSPSDK environment for windows, such as the Minimalist PSP SDK by Heimdall
  2. Unzip the Wagic+JGE sources in any directory. It should consist in one “JGE” folder and one “projects” folder
  3. (Only if you want to rebuild JGE) Using a DOS Command line shell, go to the JGE Directory, and type “make clean” (and ENTER). This is to remove the old JGE library
  4. (Only if you want to rebuild JGE) in the same directory, type “make” (and ENTER). It should create some files. The important one is named libjge300.a in the lib/psp/ folder. If there is no lib/psp/libjge300.a file in your JGE directory, or if this file is old, something went bad
  5. go to the projects/mtg directory with a DOS shell
  6. type “make clean” (and ENTER)
  7. type “make” (and ENTER). It should create an EBOOT.PBP file in your projects/mtg folder. That’s it !

NOTE : If you do not do any change to the JGE library itself, you obviously don’t need to recreate it each time, so steps 3 and 4 are not necessary !

The “make clean” step itself is usually not necessary, but I highly recommend it to avoid weird bugs.

Notes

  • This is probably obvious, but you don’t need two differents copies of the sources if you want to create both a windows and a psp version.
  • It is more than recommended to develop using the windows/linux version and test with the psp version from time to time.
  • If you have any issue compiling, please report your problems either here or in the forums, with AS MUCH PRECISIONS as possible.

1 Response

Leave a Reply

Your email address will not be published. Required fields are marked *

Most comments are automatically approved, but in some cases, it might take up to 24h for your comments to show up on the site, if they need manual moderation. Thanks for your understanding