From BlenderWiki

Jump to: navigation, search

[edit] Installation Procedure

This method assumes you will be using the Scons build system to compile Blender. It therefore does not cover using the toolkit with cygwin/make or the VC project files.

Please note, the toolkit requires Windows 2k, XP or later.

Step 1 If you do not already have the .NET Framework SDK, download and install this first. You can get it here.
Step 2 You will also need the Platform SDK to provide the Win32 API libraries. By default, this installs to C:\Program Files\Microsoft SDK. Make sure you select 'Register Environment Variables', as this will save you some work later.
Step 3 Download and install the VC Toolkit from http://msdn.microsoft.com/visualc/vctoolkit2003. This will install the optimising compiler in C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin.
Step 4 You will need to have DirecX SDK installed if you wish to compile blender with OpenAL sound. You can get that here (218mb)
Step 5 Modify the file 'sdkvars.bat' (found in the .NET Framework SDK install dir) by adding the paths to VC Toolkit 2003 for each item (INCLUDE, LIB, etc). Ensure that these directories are listed first!

So far so good, but here's where it gets a little tricky...

Scons looks for the file 'lib.exe', which is not distributed in any of the above downloads.

Essentially, lib.exe calls 'link.exe /lib' so, it is possible to create a substitute lib.exe...

Step 6 On this page (external link), you will find the source for an alternate lib.exe. Compile with the following: 'cl lib.c', and place the resulting lib.exe somewhere in your %PATH%, preferably in C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin.
Step 7 You may find that scons is unable to detect cl.exe at this point. If this is the case, you will need to modify the following files: blender\Sconstruct, blender\extern\solid\Sconscript, blender\extern\qhull\Sconscript, and blender\source\blender\makesdna\intern\Sconscript. You will see lines that show 'env = Environment()', you will need to add 'ENV = os.environ' between the brackets. Remember to add 'import os' at the top of the file if it is not already imported.
Step 8 The Platform SDK does not include the following libraries: odbc32.lib and odbccp32. You will therefore need to remove these from your Config.opts (blender doesn't need them anyway).

We've learned that the above packages don't contain the resource compiler, holding you back from compiling successfully. Do not despair, I've found an excellent replacement for that on www.godevtool.com Get the resource compiler ( www.jorgon.freeserve.co.uk/Gorcjorg.zip ), unzip it, rename gorc.exe to rc.exe and copy it to somewhere in your path. Tadaaa.

To complete this, edit source/icons/winblender.rc so that the resources also contain the path source/icons, so winblender.ico becomes source/icons/winblender.ico, etc.

At this point, you are ready to compile!

If you have any questions that aren't answered here (very likely!), feel free to drop in at #blendercoders @ irc.freenode.net.


[edit] References







Redirects to fix

  • Hackers Guide/Building → Dev:Doc/Hackers Guide/Building
  • Hackers Guide/Debugging → Dev:Doc/Hackers Guide/Debugging