In contrast to the MinGW build, the Microsoft Visual C++ build will require a bit more ground work before you actually can start to make your own pygame2 package.
First of all, you have to make sure, that you have at least a Microsoft Visual C++ compiler that matches your current Python version. For Python <= 2.5 this usually will be the Visual C++ 7.x compiler, shipped with e.g. the VC Toolkit 2003 or Visual Studio.NET 2003. For later Python releases, Visual Studio.NET 2008 or Visual C++ 2008 Express are required.
Note
If you are going to use the VC Toolkit 2003, make sure, you have some proper registry keys set. Otherwise Python’s distutils will not be able to detect the settings. Within the util/ directory you can find an example registry key. Change the paths within it according to your system configuration and import it into your registry to allow C Python modules to be built with the VC Toolkit 2003.
Note
The following list of dependencies might not be the most actual one. Please check the README.txt file in the top source directory for the most actual dependency list!
Make sure, you have at least one of the following Python versions installed:
To build anything, you will have to download the following additional packages:
The Win32 build chain for Pygame2 does not support building all dependencies from scratch. Instead it relies on already built libraries, correctly configured settings and matching includes. Thus you will either need to build them yourself or to rely on the offered prebuilt packages.
Once you downloaded and/or built all the dependencies, you have to make sure that they can be found by Pygame2’s build script. The script will search the directory where it resides, the parent directory of it and a directory named ‘prebuilt’ for the libraries and headers. If you installed the dependencies to different locations, you should change the _searchdirs entry within the config/config_win.py script to include the directories.
Note
At this point, we strongly recommend a directory named ‘prebuilt’ that is created under the Pygame2 source directory.
Note
The ‘prebuilt’ directory should have the following layout:
prebuilt\include -> Contains all header files and header subdirectories as installed by the dependencies.
prebuilt\lib -> Contains all library files (both, .dll and .lib) as installed by the dependencies.
If anything you can proceed to build and install Pygame2 itself. Simply type:
python setup.py build install
This will build and install Pygame2 in one step.
You also can use the small build.bat batch script, which optionally can set up the VC++ include and library paths for the VC Toolkit 2003. Change it to your needs and then execute it using
build.bat
This will build and install Pygame2 as above.