Thought I’d post this up as it took some doing and might be useful. There’s a few issues with this setup:
Latest VC2008
Latest DX9
Vista
DX8 never installed
Using MakePanda.bat
Which I’m guessing will become more of an issue for people as we migrate to newer versions in the near future. My fixes are a little hacky but I’m sure they could be written properly going forwards.
- Platform SDK has moved
The windows platform SDK is in a new folder:
C:\Program Files\Microsoft SDKs\Windows\v6.0A
So the search for the windows sdk doesn’t work. I modified MakePandaCore.py as follows:
def SdkLocateMSPlatform():
if (sys.platform != “win32”): return
platsdk=“C:\Program Files\Microsoft SDKs\Windows\v6.0A”
I’m sure theres a proper path info for it somewhere
-
Latest DX9 uses different registry key for SDK dir
The registry key used to find the DX9 dir has moved so it doesn’t get found. I add to SdkLocateDirectX in MakePandaCore.py as follows:
SDK[“DX9”] = “c:/Program Files/Microsoft DirectX SDK (March 2009)” -
Latest DX9 doesn’t supply dxtrans.h
This is a problem with Microsoft but unfortunately we have to deal with it. If you use certain bits of directx, the platform sdk file qedit.h fails to compile as the header is missing. The fix can be found here:
social.msdn.microsoft.com/forums … eaaf68252/
There is a hacky one where you just edit qedit.h, and a more solid method where you edit the file that includes it in your own code. -
link command doesn’t handle spaces in path
when calling link (and I guess other apps), the command line parameters that specify a path such as c:\progam files\something\somelib.lib don’t wrap the path in quotes. As a result, link would try and compile c:\program.lib in the above case. This is an issue for things like Maya, where maya specific libs are likely to have been stored in the program files dir. The fix: modify makepanda.py so it puts quotes around path such as this in CompileLink:
cmd = cmd + ’ /DEF:"’ + x + ‘"’ -
only a maya problem but could arise with other software. maya includes it’s own versions of some dlls, link cg.dll that are incompatible with panda for some reason, which causes exceptions trying to find entry points when running. The solution I went with was to put these dlls next to my panda app so they always got used. Check which dlls get loaded in the output window to make sure everythings coming from where it should be.
-
alts.lib not found
For some weird reason, alts.lib (a default library) isn’t found sometimes. I added /nod alts.lib to the link command and all went fine:
cmd = cmd + " /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls" -
squish not found.
Not used squish so don’t know why it’s not found - should the lib be provided in the 3rd party libraries? I just disabled squish for my purposes using the --no-squish option.
I can supply my modified makepanda.py and makepandacore.py if it helps - you can diff it with origonal to see the changes.
Still got 1 issue - opt1 bug works with release, but still not debug builds. Looking into that now.
A handy final tip - make sure your virus checker excludes the folders you’re building from/to. Sometimes it’ll make files readonly very briefly and this can cause file access errors due to the build randomly.