Building Blender 2.59.2 and beyond! For Windows Users

You don’t have to Build Blender to use it! You can get a copy of a supported, sales fully working copy at Blender.org. Or grab the latest Builds from GraphicAll.org. This Tutorial is for those that want to try and Build their own Blender.exe application form source files.

The Set up:

Download and install the following three applications to your PC ( I am using Windows Vista).

TortoiseSVN:

Follow the linked image and install TortoiseVNC on your PC. I am running Windows Vista SP2 at the time of this article. We will use this program to collect all the needed files from Blender’s Repository so we can Build Blender. You can get it here.

CMake:

Next you must obtain a copy of CMake in order for us to “make” a file from the files we collect so Visual C++ can Build Blender. You can get this here.

 

 

 Visual C++ 2008 Express Edition:

This is the last program we will need. It is Microsoft Visual C++ 2008 Express Edition. You can get it here.

 

 

 

Step one: Getting the files.

Now that we have the SVN tools needed (TortioseSVN)  we can now connect to the Blender foundation Repository.

 If you have successfully installed TortioseSVN, decease   just right click on your desktop and you should see a couple of new options. Choose “SVN Checkout“. A new widow will appear asking for some information. Fill in the following directories…

 

  …The first is URL of the Repository. Just copy and Paste this directory https://svn.blender.org/svnroot/bf-blender/trunk/blender This is where all the coders do a commit (save all their work to).

The second, visit this the Checkout Directory, is where do you want TortioseSVN to save these files. Please use the following directory C:BlenderBlender (This could be anywhere on your PC’s hard drive but for now please use that directory. You can change the path later but it will make things easier to find later if you use the one above.)

 A window like this should pop up and download all the files that make up Blender. These are the files you will need to update each time you want to Build a new revised Blender.exe These revisions are  made by the coders as they make commits.  SVN will update only the changed files when you do future Checkouts of the code, this one should be kind of large.

 Step two: Get the LIBS

Now we need a set LIBs (libraries) to aid CMake and Visual C++ 2008 Express as they attempt to build Blender for us. To do this just right click on your desktop and do another checkout with SVN, but this time change the URL of the repository to https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows and the Checkout directory to C:BlenderlibWindows

Because  building a 64bit version of Blender requires a patch to work, I will be building a 32 bit version. But if you want to build the 64bit version you will need the 64 bit LIBs. You can get those here:  URL of the repository to https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64 and the Checkout directory to C:BlenderlibWin64

Now back to our 32 bit build….

 

 

Once you have download all the files from the Blender repository you should see the following file structure on your C drive:

 
   

Step three: Using CMake

Open the CMake application from where ever you installed it and you should get this nice window. 

CMake will create what is called a “solution” for Visual Studio 9 2008 Express to use to build Blender from all those source files downloaded. We will tell CMake that our source code is in C:/Blender/Blender and that it should build the solution or Binaries here C:/Blender/build 

 

Then click the configure button in the Lower left to open a pop up window to tell CMake that we will be using Visual Studio 9 2008 (if that is what you are using too).

Then Click Finish.

 

 

The results is a checklist of sorts. Here you can include or remove options that will be in your new Blender.exe.

Note: I didn’t make any changes to these but to include just be sure the little tick box has a check and to remove make sure there is no check mark in the tick box. If you make any changes you will need to click on the Configure button again. If you get errors you may want to try this with all the options off.

Now Click on the Generate button!

 Step four: Using Microsoft Visual C++

This is the part we have been work towards. Navigate to our new Solution called Blender.sln it should be in C:/Blender/build/

Double click that file and MSVS will open.

Two important settings need to be made in MSVS before we build Blender:

 

1. Be sure to change Debug to Release.

 2. Then look for INSTALL and Right click that and select build!

 

 Finally: time to enjoy Blender!

To find your new Blender.exe just navigate over to C:BlenderuildBinRelease, there you will find

your brand new Blender.exe! Enjoy!

 
   

 Final notes: Keeping up with new builds:

The Blender coders commit all the time so you may want to up date your Build. To do this just right click on your Blender repository copy (remember C:/Blender/Blender ?) and select SVN Update. Check out you LIBs too just to be safe.

Now start at step three above to rebuild a new solution for MSVS. Navigate to your Blender.sln and double click…

 

Problems with MSVS: call Support at 800-936-4900

Problems with CMake: Support is Here

Problems with TortoiseSVN: Go Here

Problems with this tutorial: Leave a comment.

Problems with to much money? Send some to us!

Special thanks to Mike Pan for his help with this and the guys in IRC #Blendercoders for their help!

 

 

15 Replies to “Building Blender 2.59.2 and beyond! For Windows Users”

  1. Thanks gang. Was nearly bald trying to get a full Cuda build up and running.
    First time Ive had the gui of cmake and msvc to work.
    Great tute. Word perfect.

    Bogey aka Rebogey.

    forgot me password.

  2. wow great tutorial helpme a lot whit blender thanks…
    cant you make a tutorial like this one on how to build the gamekit from this page http://code.google.com/p/gamekit/
    the procedure they have in the wiki is givin problem to lots of people, i make the same process you explaine in this tut but this give me a lot of errors.

  3. I followed this tutorial to the iota (thanks for taking the time to write it!), but when the build is finished, my release folder appears to be missing blender.exe and blender.exp…?

    It may very well be missing other files, too.

    1. You set the Path to your new build in Cmake> Mine was

      Two important settings need to be made in MSVS before we build Blender:
      1. Be sure to change Debug to Release.

      2. Then look for INSTALL and Right click that and select build!

      Hope that helps. If not let me know.

      1. I guess you’re talking about CMAKE_INSTALL_PREFIX? I did steps 1 and 2…

        And what you set it to doesn’t seem to be showing up 🙂

  4. Ok… I copied the blender.exe from a build off of graphicall.org and it seems to be working now… but that really doesn’t seem like the right way to do it.

    1. It is not the right way to do it, you are right. The one you copied is already built. Most people like to build there own and others like to just get one that was built for them by some nice third party. If you want to just get up and running watch this short tut http://www.man-i-can.com/cycles-get-it/ .

      If you really want to build Blender than you must try again. I will try to help you get through it.

  5. Hi I did all the procedure described in the guide in visual c + + 2008 Express and it worked but then I install visual c + + 2010 Express to compile blender 64bit and there on It gives compilation error in both 32bit and in 64bit here I leave the last lines of the result in vc++.
    http://www.pasteall.org/26727

    1. If you have access to IRC go into #blender coders and ask about the error there. I have not come across that while building. I did how ever have issues with building the 64 bit.

  6. when i try to compile using cmake i got following error.

    “CMake Error at CMakeLists.txt:1308 (message):
    Apple and Windows require pre-compiled libs at: ‘D:/blender/../lib/windows'”

    1. I have not made a 64 bit version. I was told there was issues with doing so. You might want to just go to Graphicall.org and get a built version of Blender.

Leave a Reply

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

*