Panda3D Manual: Tutorial: Compiling the Panda3D Source on Windows

Note: The information below applies to Panda3D 1.6.0 and later. Versions before that use Visual C++ 2005.

Contents

Compiling Panda3D on Windows

Step 1: Installing the Requirements

If you don't have it already, download and install Visual C++ from:

http://www.microsoft.com/express/2008/

If you have the Express version and not the full version, you will need to download and install the Microsoft Platform SDK. This version is the only one I found that includes ATL (which is required):

http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb&displaylang=en

Next download and install the DirectX SDK from:

http://www.microsoft.com/downloads/details.aspx?FamilyID=C72D9F1E-53F3-4747-8490-6801D8E8B4EF&displaylang=en

If all goes well you are all set to use makepanda to compile panda.

Step 2: Download the source

You can download the latest stable version of the Panda 3D source available at:

http://panda3d.org/download.php

Extract to an easily accessible place on your HDD (example: C:\panda_source)

Or alternatively you can get the newest CVS version with these commands. You'll need to have a cvs client installed.

cvs -z3 -d:pserver:anonymous@panda3d.cvs.sourceforge.net:/cvsroot/panda3d co -P panda3d

Step 3: Open a command prompt

Easiest way is: START->RUN and type cmd, hit ok.

You will now have a command prompt open.

You will most likely be in the C:\Documents and Settings\<your user name> folder.

Type: cd C:\panda_source

This command cd "change directory" changes the directory to C:\panda_source

Type: makepanda\makepanda.bat

This brings up all the command options for makepanda.bat

For more info on dos commands: http://www.google.com/search?q=dos+prompt+for+beginners

Step 4: "The simplest way to compile panda is to just type..."

As the help text says:

Type: makepanda\makepanda.bat --everything

This process will take an hour or so, so it is best to go do something else because your comp will be using most of its resources on compiling.

For more information on using the makepanda tool to compile, please read the INSTALL-MK document, which is also available within the doc directory of your source tree.

Alternative way: In the directory "makepanda", you will find a "makepanda.sln" file. If you open it, it should launch the Visual Studio environment, you can also compile Panda3D from within there. Internally, this just invokes the makepanda script. If you use this method instead, be sure to set the build configuration to "Release" (unless you want a debug build of course.)

Step 5: Make an installer

Note: If you've used the .sln file to build Panda, and used "Release" mode, the installer .exe has already been created for you.

Type: makepanda\makepanda.bat --everything --installer

This should take much less time because if you notice there will be a "built" folder in your C:\panda_source, this was created in the previous step. If you've used different compile options than just --everything in the previous step, make sure those options are the same in this step.

Using newer June 2010 DirectX SDK and Windows 7.1 SDK

   The latest version of makepanda.py includes built-in support for recent directX and Microsoft Platform SDKs such as June 2010 Dx Sdk and Win7.1 SDK. The builder will always default to the latest SDKs found on the user's system unless told otherwise with the switches --dxSdk, --MSPlatSdk. If you are using a specific version of the SDK that is not explicitly support by makepanda or if makepanda has problems locating a custom installion of the SDK, then amend SdkLocateDirectX and  SdkLocateMSPlatform in makepandacore.py appropriately.
   Newer versions of the DirectX and MSPlatform SDK omits files such as qedit.h and ddraw.lib that certain Panda modules depend on. 99% of the problems originate with the Panda directcam and vision libraries and can be avoided by compiling with --no-directcam --no-vision. If you need support for the directcam or vision packages, then you will have to locate an old version of the appropriate SDK and place the file into the compiler search path such as placing (an old copy of) ddraw.lib into ..\Microsoft DirectX SDK (June 2010)\Lib\x86 .
  If you really want to build the directcam module, you will have to edit webcamVideoDs.cxx, changing the appropriate lines to:

[code]

  1. pragma include_alias( "dxtrans.h", "qedit.h" )
  2. define __IDxtCompositor_INTERFACE_DEFINED__
  3. define __IDxtAlphaSetter_INTERFACE_DEFINED__
  4. define __IDxtJpeg_INTERFACE_DEFINED_
  5. define __IDxtKey_INTERFACE_DEFINED__
  6. define IDXEffect IUnknown
  7. include <tchar.h>
  8. include <Dshow.h>
  9. include <uuids.h>
  10. pragma comment(lib, "strmiids.lib")
  1. include <qedit.h>

struct __declspec(uuid("6B652FFF-11FE-4fce-92AD-0266B5D7C78F")) ISampleGrabber;

  1. include <atlbase.h>[/code]


Conclusion

And that's it. Depending on your needs you can configure Panda3D any way you wish.