1 An updated version of this guide can be found at:
3 http://www.blender3d.org/cms/Building_with_Cygwin.524.0.html
8 Here are some basic instructions for building
9 blender for windows using gcc under cygwin.
10 Please note that the resulting executable does not
11 depend on cygwin and can be distrubuted to machines
12 that don't have cygwin installed.
16 1. Download cygwin (www.cygwin.com) and use the setup program
17 to install packages for gcc, gcc-mingw, gcc-g++, w32api, make, cvs,
18 python, perl, gettext, and gettext-devel (and maybe others... the
19 dependency list is bound to change over time and hopefully these
20 instructions will keep up with the changes). All of the following
21 commands will be entered at the cygwin prompt so launch
24 2. Create a directory to put your sources and then enter that
29 *********WARNING: if the directory path you are in contains a space in
30 it you will get errors in trying to compile the code. Change directorys
31 to a one that does not contain a space in the path before creating the
32 above directory *********
35 Please note that a backslash at the end of a line in the following
36 means that the command spans two lines. If you wish to type the command as
37 one line, exclude the '\'.
39 3. Checkout the blender module from the bf-blender tree using cvs
40 (use password anonymous):
41 cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
42 cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender \
45 4. Checkout the lib/windows module from bf-blender using cvs:
46 cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender \
49 5. Enter the newly created blender directory:
52 6. To prepare the build system to use only the free tools we must
53 set some environment variables. This is done by creating a
54 file called "user-def.mk" in the blender directory and
55 inserting the following line with notepad or your favorite
57 export FREE_WINDOWS=true
59 The quickest way to do this though is to issue the following
61 echo 'export FREE_WINDOWS=true' > user-def.mk
63 7. Time to build... issue the command:
66 8. Wait for it to finish (there is this mysterious place called
67 'outside' that I am told is nice to go to while waiting for a
70 9. After it finishes compiling, if you would like to run your freshly compiled
71 blender, type make release. Then change directorys to obj/233.a/ and move
72 the zip file to where you want to use it, unzip the file, enter the directory
73 and run your brand new blender.
78 If you have problems, come by #blendercompilers on irc.freenode.net
79 or post questions to the "Compiling, Libraries, Modules" forum
80 at www.blender.org. There is also the very useful bf-committers
81 mailing list, what you can subscribe to here:
83 http://www.blender.org/mailman/listinfo/bf-committers
84 (as a bonus you can get info about the most recent features that
85 are coming down the pipe ...)
87 This said, the most common fix to a problem will
88 probably involve installing an additional cygwin package,
89 so keep that cygwin setup program close by ...
94 - The build will take a long time, even on a fast machine
95 (a clean build takes almost an hour on my Athlon 1800+
97 - If the build is successful you will find it has created
98 the program obj/windows/bin/blender.exe
99 - The executable generated by gcc will generally be slower
100 that an msvc++ generated executable at rendering, but the
101 OpenGL speed should be about the same.
103 - If you want to clean your sources issue a 'make clean'
104 in the top blender directory.
105 - If you want to update your sources when somebody has
106 added a new awesome feature, you will want to go to the
107 topmost blender directory and issue the following command:
109 It would probably be best to clean your sources before
110 re-building (see previous note).
111 - This is a work in progress, so some things may not be working
112 right or it may not support all of the cutting edge features.
113 - Want to make a fancy zipped up blender package to give
114 to your buddies? Try "make release" ... read the output
115 to find out where the zip file was placed (note: you will
116 probably need the zip/unzip packages from cygwin to do
118 - You can make a debug executable using 'make debug'. The
119 debug executable will be larger and slower that the
120 regular executable, but when used with the gnu debugger
121 (gdb) it can help debug a blender problem (for example,
122 it can locate the line of code that caused blender to