Build Your Own Blender For Windows

construction_small.pngThe common trait of software is the need to compile source code to build the applications that we all use. Normally, we are stuck with whatever build a company wants us to use. But in the case of open source software, you the user can compile and build your own with any option your heart desires. Blender is of course no exception. For example, want to optimize your build to take advantage of certain CPU instructions? Want to add a patch that hasn’t made it into the CVS? Then your dream build can become a reality!

Recently, Mike "awesome fluid sims" Pan (mpan3) and myself began writing instructions for compiling Windows builds using two different methods:

1. Scons

Mike has done a clear and concise write up of how to build Blender with Scons based on the classic wiki. It’s short, concise, and will give you a build fast and easy.

Pros: Quick and Easy
Cons: Some minor effort getting Quicktime and AVI codecs working.

2. Microsoft Visual C++ (MSVC) 2005

I did a write up using Microsoft’s Visual C++ 2005 Express (it’s free), most of which was gleaned from the Blender dev forum or other sites (1, 2). This is probably the longest and hardest way to build, so set aside some time for this one (mostly because there are lots of downloads). I’m still getting used to MSCV, so if any of you pro compilers out there see a mistake, please post it here and I will correct it.

Pros: Quicktime, OpenEXR, and AVI codecs work with the method I wrote up, great optimization.
Cons: Lots of effort in getting everything set up.

Mike has also started a thread on BA, so feel free to ask questions there. Happy building!



Related Posts


Related posts are selected automatically based on their content.


22 Responses to “Build Your Own Blender For Windows”  

  1. 1 Jogai Edit Link

    Is Scons for linux? Because with apt in debian you get 2.32 or something

  2. 2 Michael Crawford Edit Link

    Great. Could somebody post a "build your own" for mac osx. I've had no problems building on my linux box but the last time i tried to build on my mac stuff stuff didn't link and the build threw a fit. I didn't fiddle with it for long since i didn't really have a need to… but i've been interested in modifying blender for a while so it would be nice to be able to do.

    It would be great to have a "known issues" or "FAQ" regarding building on multiple platforms. If it was a wiki it could be kept up to date. (as people run into problems they are reported and workarounds / fixes are found.) Probably this already takes place on the listserves but it would be nice to have it all in one place so ppl don't have to search through the archives.

  3. 3 Michael Crawford Edit Link

    @jogai: scons is for linux. it's written in python. it runs on osx too. not sure about windows. Don't use windows, don't care to. I know fedora has 2.42 on yum server (x86-64 too). If you want 242 on debian, just build from source. It worked for me (results may vary). Scons works very very well btw.

  4. 4 panzi Edit Link

    SCons also runs on Windows. It runs (almost) everywhere. ;)

  5. 5 Gez Edit Link

    I think I will try now that Graphicall.org disappeared.
    Anyone knows what happened?
    I miss messing around with builds
    :-(

  6. 6 Eugene Edit Link

    I'm also wondering what happened to graphicall. I tried to e-mail ZanQdo, but the only address I have for him is @graphicall.org. :(

  7. 7 jswoerner Edit Link

    Will Blender build in MSC 6 or ist strictly a .net app now

  8. 8 mpan3 Edit Link

    FYI: Blender compiled under Scons/GCC/Minwg as presented by the first guide has no problem with OpenEXR support. The only problem is Quicktime and Windows AVI. But those can be resolved with additional libraries.

  9. 9 LOGAN Edit Link

    Someone should make a source download that also includes all dependancies and libraries.

  10. 10 Eugene (etr9j) Edit Link

    @mpan3
    Didn't realize! Good thing you're watching the thread. I corrected the "cons" if you can call it that now.

    @jswoerner
    From what I have seen, version six *might* not be able to be used since I only see a MSC 6 solution file in the main blender directory and not in the extern and intern directories. But I could certianly be wrong since it might have been build differently with 6.

  11. 11 CubOfJudahsLion Edit Link

    For windows users wanting to build with patches: you may need to go to http://gnuwin32.sourceforge.net/packages/patch.htm to download a win32 patch.exe.

  12. 12 Hos Edit Link

    Real coders use 'make' to build blender:

    http://mediawiki.blender.org/index.php/Hackers_Guide/Building_Cygwin_Make

    Chris

  13. 13 Hos Edit Link

    (Not to disparage the hard work of mpan3, I'm just prejudiced.)

  14. 14 harkyman Edit Link

    Compiling Blender with scons on Windows only works if you're running Windows XP. Windows 2000 users (yes, there are some of us) have to use make.

    Compiling Blender with scons works great for Mac OSX users.

  15. 15 Marty_D Edit Link

    Not to mention that the 'make' sources are probably the best maintained. Is that you Hos? Like a rock.

    When I tried to build with vc express I had a few issues with linking. I guess you've solved that by copying the files to the vc express directories. Hope to give all this a try sometime but it's a little complicated and can take some time. Thanks though for the tutorial. Saved.

  16. 16 Eugene Edit Link

    @CubOfJudahsLion
    Or you can get it from cygwin.

    @harkyman
    Thanks for the tip about Windows 2000. Any chance you could do a write up of how to compile in Mac OSX? Is it any different from mpan3's scons write up (with the exception of adding environment variables)?

  17. 17 Erwin Coumans Edit Link

    Don't listen to Unix extremists ;-)

    Most professional developers use graphical debuggers and graphical user interfaces, and I haven't seen anything that boost productivity better then Visual Studio. And I many all OS'es and build systems, including BeOS, Linux, Mac OS X and Windows. In the game industry, which pushes things further then most areas, MSVC is used by 95% of the developers.

    I've been maintaining MSVC projectfiles, which build out-of-the-box, no fuzz. Just open the .sln file, hit F5 and you go. It includes the zipfile with external dependencies. Unzip the archive and you go. No manual. Unfortunately this requires manual updating. See http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/

    Luckily, a new buildsystem is coming for Blender, which helps autogenerating projectfiles for Visual Studio, Mac OS X Xcode, KDevelop, but also generated makefiles etc. See the Blender develop mailing list for more details.

    It is called Cmake, see cmake.org
    Erwin

  18. 18 Eugene Edit Link

    @Erwin
    Thanks for chiming in! Thanks for your thoughts on MSVC and the projectfile link - I just downloaded the vc8 files (june 2006 are the latest ones right?).

    And thanks for mentioning Cmake since this is something we should all look forward to. I see it mentioned frequently in the mailing lists.

  19. 19 adrian Edit Link

    Thanks very much for the instructions, got blender to compile fine using scons on winxp.
    I am struggling to apply a patch (lens_shift) though.
    I would apprieciate instructions. Thanks in advance.

  20. 20 Eugene (etr9j) Edit Link

    @adrian
    Ah, Wybren and Brecht's patch. Rather than bombard this post with patch help, I'll e-mail you directly to see if we can work it out.

  21. 21 Jedrzej_s Edit Link

    Link to compiling Windows builds using Scons doesn't work, because Mike modifed own site ! Here is correct link: http://mpan3.homeip.net/page?compileblender

    Eugene

  22. 22 Jedrzej_s Edit Link

    Hehe… Here is rest of my reply :) :

    Eugene: Would be nice if you will updated this link :).

Leave a Reply