﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3A2.4%2FSource%2FBuild_systems%2FScons%2FRefactoring_-_Blender_2.42</id>
	<title>Dev:2.4/Source/Build systems/Scons/Refactoring - Blender 2.42 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3A2.4%2FSource%2FBuild_systems%2FScons%2FRefactoring_-_Blender_2.42"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Build_systems/Scons/Refactoring_-_Blender_2.42&amp;action=history"/>
	<updated>2026-05-14T20:25:22Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Build_systems/Scons/Refactoring_-_Blender_2.42&amp;diff=42066&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Build_systems/Scons/Refactoring_-_Blender_2.42&amp;diff=42066&amp;oldid=prev"/>
		<updated>2018-06-28T17:45:20Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 17:45時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Build_systems/Scons/Refactoring_-_Blender_2.42&amp;diff=42065&amp;oldid=prev</id>
		<title>wiki&gt;Mindrones bot: Robot: Changing template: UM/prettytable</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Build_systems/Scons/Refactoring_-_Blender_2.42&amp;diff=42065&amp;oldid=prev"/>
		<updated>2010-11-22T15:11:49Z</updated>

		<summary type="html">&lt;p&gt;Robot: Changing template: UM/prettytable&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;by [[User:JesterKing|Nathan Letwory]]&lt;br /&gt;
&lt;br /&gt;
assisted by lukep, [[user:korpse|Jonathan Jacobs]], Johnny Matthews&lt;br /&gt;
&lt;br /&gt;
=Current status=&lt;br /&gt;
{{tip|Progress|The work sofar has been committed to CVS and development will continue from there on, so no more patches from here - just get the current CVS&lt;br /&gt;
&lt;br /&gt;
'''Note''' win32/mingw must be compiled WITH_BF_OPENEXR&amp;amp;#61;0 , because there is no proper library in cvs yet - if you do have your own, use WITH_BF_OPENEXR&amp;amp;#61;1 by all means :)&lt;br /&gt;
&lt;br /&gt;
'''Note''' Through sheer stupidity I accidently deleted the directory with mingw-compiled and -compatible libraries to link agains. These were for commit to the lib/windows module, but I have to search and rebuild these libs again. Sorry for the inconvenience.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tip|Attention|(platform)-config.py -files needed for different platforms. See linux2-config.py, darwin-config.py, win32-vc-config.py and win32-mingw-config.py in config/ for template}}&lt;br /&gt;
&lt;br /&gt;
[http://projects.blender.org/viewcvs/viewcvs.cgi/blender/doc/blender-scons.txt?rev=1.1&amp;amp;cvsroot=bf-blender&amp;amp;content-type=text/vnd.viewcvs-markup blender-scons] user docs&lt;br /&gt;
&lt;br /&gt;
[http://projects.blender.org/viewcvs/viewcvs.cgi/blender/doc/blender-scons-dev.txt?rev=1.1&amp;amp;cvsroot=bf-blender&amp;amp;content-type=text/vnd.viewcvs-markup blender-scons-dev] developer docs&lt;br /&gt;
&lt;br /&gt;
=Don't forget=&lt;br /&gt;
&lt;br /&gt;
*{{done|added}} intern/elbeem/SConscript needs USE_MSVC6FIXES to compile ok for .net &amp;lt; 2003&lt;br /&gt;
*{{done|added}} add the BF_OPENGL_LIBPATH note to my Don't Forget section on the SConsRefactoring page&lt;br /&gt;
&lt;br /&gt;
=Roadmap=&lt;br /&gt;
*{{todo|test test test}}&lt;br /&gt;
*{{inprogress|50|documentation}}&lt;br /&gt;
*{{done|port to orange}} Orange was merged with HEAD and is now HEAD&lt;br /&gt;
*{{inprogress|75|compile flags}}&lt;br /&gt;
**{{todo|cygwin}}&lt;br /&gt;
**{{done|darwin (osx) }}&lt;br /&gt;
**{{todo|solaris}}&lt;br /&gt;
**{{todo|freebsd}}&lt;br /&gt;
**{{done|linux2 (dynamic)}}&lt;br /&gt;
**{{done|win32 (mingw)}}&lt;br /&gt;
**{{done|win32 (msvc)}}&lt;br /&gt;
*{{inprogress|75|release build}}&lt;br /&gt;
**{{todo|gettext .mo creation }}&lt;br /&gt;
*{{inprogress|25|cross-compile support}}&lt;br /&gt;
*{{inprogress|75|profile build}}&lt;br /&gt;
*{{done|clean up hard-coded tests}}&lt;br /&gt;
*{{done|debug build}}&lt;br /&gt;
**{{done|directory specific debug flags}}&lt;br /&gt;
*{{done|globbing of source directories}}&lt;br /&gt;
*{{done|silent Builder for cleaner output like nan makefiles}}&lt;br /&gt;
*{{done|create wrapper functions for blender library building}}&lt;br /&gt;
*{{done|make central libraryname repository crossplatform}} , ie. mingw/linux does libsomename.a, whereas windows wants somename.lib&lt;br /&gt;
*{{done|BF_QUICK&amp;amp;#61;lib1,lib2}}, build only lib1 and lib2, then relink (libs in a comma-seperated list)&lt;br /&gt;
*{{done|parse arguments and targets}}&lt;br /&gt;
*{{done|parse configuration file}}&lt;br /&gt;
*{{done|build dir}}&lt;br /&gt;
*{{done|add libraries}}&lt;br /&gt;
*{{done|platform specific code}}&lt;br /&gt;
&lt;br /&gt;
=Feature Requests=&lt;br /&gt;
* It would be great if this could be developed with similar ideas to the makefile refactoring I've been working on.  (I'm willing to change things in it as well to conform if needed.)  I'm thinking things like variable names should be similar, build targets, etc...  Here is the current implementation of it, I need to figureout the gameengine/plugin rules so that the seprate targets build correctly. After that I will submit it to the patch tracker.  Anyway here is the link: http://www.cs.umn.edu/~mein/blender/makefiles.tgz&lt;br /&gt;
&lt;br /&gt;
* scons vs config.opts --  Being able to recognize that the SConstruct file is newer than than config.opts and config.opts needs to be regenerated would be nice.  Everyone (meaning me) always forgets to delete config.opts after changing SConstruct.&lt;br /&gt;
&lt;br /&gt;
* A Builder for generating the BPy API docs using epydoc.&lt;br /&gt;
&lt;br /&gt;
==Arguments and Options==&lt;br /&gt;
I'll use arguments as per Kent Meins makefile rewrite. See the above link for info. Additionally the following arguments shall be implemented:&lt;br /&gt;
'''Almost done''': rename arguments below to be similar to Meins used arguments: BF_ARGUMENT see [[Dev:2.4/Doc/Building Blender/Linux/Scons Options|current arguments/options]]&lt;br /&gt;
&lt;br /&gt;
I decided to do a similar setup for platform-specific settings like the makefile: scons/(platform)-config.py. To override, just create a user-config.py in the rootdir. If you want event to override for ie. a single run a value from user-config, just specifiy it as an argument on the commandline.&lt;br /&gt;
&lt;br /&gt;
* {{inprogress|25|BF_CROSS&amp;amp;#61;1}} if 1 do a cross compile (on linux for windows)&lt;br /&gt;
* {{onhold|update&amp;amp;#61;1}} if 1 get sources from CVS before compiling&lt;br /&gt;
* {{done|BF_BUILDDIR&amp;amp;#61;/build/dir/path}} use the specified path as root_build_dir&lt;br /&gt;
* {{done|BF_TOOLSET&amp;amp;#61;gcc}} use the specified compiler (toolset, see SCons documentation for available toolsets)&lt;br /&gt;
* {{done|BF_INSTALLDIR&amp;amp;#61;/build/dir/path}} use the specified path to install to&lt;br /&gt;
* {{todo|program-name&amp;amp;#61;orange}} build the executable as orange (instead of default banana)&lt;br /&gt;
&lt;br /&gt;
==Targets==&lt;br /&gt;
The following targets shall be implemented:&lt;br /&gt;
* {{done|blender}}: builds dynamic blender (this is the default, so just 'scons').&lt;br /&gt;
* {{todo|blenderstatic}}: builds a static version of blender.&lt;br /&gt;
** this is for static linking against OpenGL libraries&lt;br /&gt;
* {{inprogress|50|blenderplayer}}: builds the stand alone game engine - linking problems.&lt;br /&gt;
* {{todo|webplugin}}: builds the webplugin.&lt;br /&gt;
* {{done|blendernogame}}: builds dyamic blender without game engine support.&lt;br /&gt;
* {{todo|blenderstaticnogame}}: builds static blender without game engine support.&lt;br /&gt;
* {{inprogress|75|release}}: builds release for whatever packages you have built.	&lt;br /&gt;
* {{inprogress|25|everything}}: builds blender, blenderstatic,blenderplayer, webplugin and release&lt;br /&gt;
* {{done|clean}} does what you would expect.&lt;br /&gt;
* {{done|install}} install blender and all necessary files to BF_INSTALLDIR&lt;br /&gt;
* {{done|install-bin}} only install the executables to BF_INSTALLDIR&lt;br /&gt;
* (installer: create installer (win32))&lt;br /&gt;
&lt;br /&gt;
==Cleaner Output==&lt;br /&gt;
{{done|It would be nice to have similar progress printing as the nan makefiles do.}}&lt;br /&gt;
&lt;br /&gt;
 $ scons&lt;br /&gt;
 building default&lt;br /&gt;
 == source/blender/avi&lt;br /&gt;
 == source/blender/blenapi/&lt;br /&gt;
 == source/blender/blenkernel/&lt;br /&gt;
 etc.&lt;br /&gt;
&lt;br /&gt;
See http://www.letwory.net/albums/v/Rt/ for some screenshots of the new output.&lt;br /&gt;
&lt;br /&gt;
==Comparing old and new==&lt;br /&gt;
&lt;br /&gt;
Test figures from my setup (Dual AMD MP 2200+, 1GB RAM). Although it is a dual-processor system, only one processor was used (no -j4 switch), so just vanilla 'scons' with the --debug option as below.&lt;br /&gt;
&lt;br /&gt;
{| {{Css/prettytable|100%}}&lt;br /&gt;
 !  !! old !! new&lt;br /&gt;
 |-&lt;br /&gt;
 | --debug=count || &lt;br /&gt;
*BuilderBase: 135&lt;br /&gt;
*CommandAction: 2333&lt;br /&gt;
*CommandGeneratorAction: 107&lt;br /&gt;
*CompositeBuilder: 72&lt;br /&gt;
*Executor: 939&lt;br /&gt;
*FS: 1&lt;br /&gt;
*FunctionAction: 14&lt;br /&gt;
*LazyCmdGenerator: 35&lt;br /&gt;
*ListAction: 155&lt;br /&gt;
*MultiStepBuilder: 61&lt;br /&gt;
*Node: 30912&lt;br /&gt;
*Node.FS.Base: 30908&lt;br /&gt;
*Node.FS.Dir: 1685&lt;br /&gt;
*Node.FS.File: 29221&lt;br /&gt;
*Node.FS.RootDir: 1&lt;br /&gt;
*SConsEnvironment: 12&lt;br /&gt;
 ||&lt;br /&gt;
*BlenderEnvironment: 1&lt;br /&gt;
*BuilderBase: 35&lt;br /&gt;
*CommandAction: 919&lt;br /&gt;
*CommandGeneratorAction: 43&lt;br /&gt;
*CompositeBuilder: 12&lt;br /&gt;
*Executor: 977&lt;br /&gt;
*FS: 1&lt;br /&gt;
*FunctionAction: 12&lt;br /&gt;
*LazyCmdGenerator: 31&lt;br /&gt;
*ListAction: 53&lt;br /&gt;
*MultiStepBuilder: 13&lt;br /&gt;
*Node: 27496&lt;br /&gt;
*Node.FS.Base: 27494&lt;br /&gt;
*Node.FS.Dir: 1592&lt;br /&gt;
*Node.FS.File: 25900&lt;br /&gt;
*Node.FS.RootDir: 1&lt;br /&gt;
*SConsEnvironment: 1&lt;br /&gt;
 |-&lt;br /&gt;
 | --debug=time ||&lt;br /&gt;
*scons: done building targets.&lt;br /&gt;
*Total build time: 804.516563 seconds&lt;br /&gt;
*Total SConscript file execution time: 2.534984 seconds&lt;br /&gt;
*Total SCons execution time: 59.832944 seconds&lt;br /&gt;
*Total command execution time: 742.148635 seconds&lt;br /&gt;
 ||&lt;br /&gt;
*scons: done building targets.&lt;br /&gt;
*Total build time: 526.923281 seconds&lt;br /&gt;
*Total SConscript file execution time: 2.012409 seconds&lt;br /&gt;
*Total SCons execution time: 43.008393 seconds&lt;br /&gt;
*Total command execution time: 481.902479 seconds&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
=Old news=&lt;br /&gt;
[[user:korpse|Jonathan Jacobs]] has sent me ([[User:JesterKing|NL]]) a very much cleaned implementation of scons for Blender. I'm currently working on getting it to work on win32 with msvc in a bare minimum setup to use as a further working platform.&lt;br /&gt;
&lt;br /&gt;
=Scons/Mingw/Win32 tutorial=&lt;br /&gt;
'''NOTE''' Due to a very nice fix in June, 2007, the short-path workarounds are no longer necessary. You can safely skip these steps now and use the default build and install directories.&lt;br /&gt;
&lt;br /&gt;
For the purposes of this exanmple Im assuming your blender source dir is &amp;quot;c:\blender&amp;quot;&lt;br /&gt;
and your build dir is &amp;quot;c:\b&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Required Software==&lt;br /&gt;
*TortoiseSVN from http://www.tortoisesvn.org/&lt;br /&gt;
*Python 2.4.x or greater from http://www.python.org&lt;br /&gt;
*Scons from http://www.scons.org (Tested with 0.96.91 - pre-release)&lt;br /&gt;
*Mingw from http://www.mingw.org (Tested with MinGW-5.0.2.exe - [http://prdownloads.sourceforge.net/mingw/MinGW-5.0.2.exe?download]) '''*Note, People have reported problems with mingw releases before 5.0.2, it is recommended you try whis release first'''&amp;lt;br&amp;gt;Run MinGW-5.0.2.exe. It will ask you to select a mirror. Choose one close to you.&amp;lt;br&amp;gt;Then select which Mingw package to install from Previous/Current/Candidate (Select Candidate) and packages. install packages '''&amp;quot;MinGW base tools&amp;quot;''' and '''&amp;quot;g++ compiler&amp;quot;''' &lt;br /&gt;
*or you can use Dev-C++ from http://www.bloodshed.net/devcpp.html as it is easier to setup and comes with mingW's g++,gcc compilers (but it lacks many of the optional programs that come with mingW) and  also provides a nice IDE to code your little blender projects&lt;br /&gt;
&lt;br /&gt;
==Modify your path==&lt;br /&gt;
To access commands directly from the command line you need to add some new directories to your path.&lt;br /&gt;
&lt;br /&gt;
Go to Start Menu &amp;gt;&amp;gt; Control Panel &amp;gt;&amp;gt; System &amp;gt;&amp;gt; Advanced (Tab) &amp;gt;&amp;gt; Envoronmant Variables (button) &amp;gt;&amp;gt; ''System Variables scroll area double click on the PATH item''&lt;br /&gt;
&lt;br /&gt;
At the end of the existing path text add the following&lt;br /&gt;
 ;C:\Python25;C:\Python25\Scripts;C:\Program Files\TortoiseSVN\bin;c:\mingw\bin &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;if you are using dev-c++ add the following &amp;lt;br&amp;gt;;C:\Dev-Cpp\mingw32\bin;C:\Dev-Cpp\mingw32\lib;C:\Dev-Cpp\bin&lt;br /&gt;
&lt;br /&gt;
Make sure to close all your command line windows before going further, the new path will not take effect on any cmd.exe's that are alredy open.&lt;br /&gt;
Start Menu &amp;gt;&amp;gt; Run &amp;gt;&amp;gt; cmd.exe (Type into text feild)&lt;br /&gt;
&lt;br /&gt;
Make sure you have commands available in your path. you should be able to type in the commands &amp;quot;python&amp;quot;, &amp;quot;cvs&amp;quot;, &amp;quot;g++&amp;quot; and &amp;quot;scons&amp;quot;, 'note that running these commands by them selves will not do anything'&lt;br /&gt;
&lt;br /&gt;
==Getting the sources==&lt;br /&gt;
The commands below make the folder c:\blender and populate it with the folders &amp;quot;blender&amp;quot; for the blender source code and &amp;quot;lib&amp;quot; for the windows spesific libraries&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 mkdir c:\blender&lt;br /&gt;
 cd c:\blender&lt;br /&gt;
 svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/blender blender&lt;br /&gt;
&lt;br /&gt;
 mkdir c:\blender\lib&lt;br /&gt;
 cd c:\blender\lib&lt;br /&gt;
 svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows/ windows&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have these directories downloaded, you can keep them up to date with commands from the commandline (run cmd.exe as before).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 cd c:\blender\blender&lt;br /&gt;
 svn update&lt;br /&gt;
 cd c:\blender\lib\windows&lt;br /&gt;
 svn update&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring the Build ==&lt;br /&gt;
To set options for the build you will need to create the file '''c:\blender\blender\user-config.py''' When building for the first time it can save you a headache if you turn many of blenders features off.&lt;br /&gt;
Here is the user-config.py I used to build blender with mingw for the first time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 WITH_BF_OPENAL = 'false'&lt;br /&gt;
 WITH_BF_GAMEENGINE='false'&lt;br /&gt;
 WITH_BF_BULLET = 'false'&lt;br /&gt;
 WITH_BF_INTERNATIONAL = 'false'&lt;br /&gt;
 WITH_BF_OPENEXR = 'false'&lt;br /&gt;
 BF_PYTHON_VERSION = '2.5' #(whatever version you have installed)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Feel free to enable eny of these.&lt;br /&gt;
&lt;br /&gt;
=== Compiler Flags ===&lt;br /&gt;
If you want you can specify custom compiler flags (options that are passed to the compiler - gcc, which can make fairly big performance improvements if used correctly)&lt;br /&gt;
&lt;br /&gt;
Compiler flags are also set in the '''c:\blender\blender\user-config.py''' file.&lt;br /&gt;
&lt;br /&gt;
It's important to use the defaults as a base and add more options from there, otherwise the .exe you make will have problems (in my case the screen started up and most of the display was black)&lt;br /&gt;
&lt;br /&gt;
The default flags at the time of writing are&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 CCFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]&lt;br /&gt;
 CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check c:\blender\blender\config\win32-mingw-config.py for CFLAGS and CCFLAGS variables before you copy these flags as your default.&lt;br /&gt;
you may want to add the optimize flag '''-O2''' for a faster build or '''-Os''' for a smaller yet still optimized blender.exe&lt;br /&gt;
&lt;br /&gt;
An examle of my flags&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 CCFLAGS =   ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]&lt;br /&gt;
 CXXFLAGS = [ '-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]&lt;br /&gt;
 &lt;br /&gt;
 # Add extra flags&lt;br /&gt;
 CCFLAGS.extend(   [ '-march=i586', '-Os', '-fomit-frame-pointer', '-mmmx' ] )&lt;br /&gt;
 CXXFLAGS.extend( [ '-march=i586', '-Os', '-fomit-frame-pointer', '-mmmx' ] )&lt;br /&gt;
 &lt;br /&gt;
 WITH_BF_OPENAL = 'false'&lt;br /&gt;
 WITH_BF_GAMEENGINE='false'&lt;br /&gt;
 WITH_BF_BULLET = 'false'&lt;br /&gt;
 WITH_BF_INTERNATIONAL = 'false'&lt;br /&gt;
 WITH_BF_OPENEXR = 'false'&lt;br /&gt;
 BF_PYTHON_VERSION = '2.5' #(whatever version you have installed)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling Blender ==&lt;br /&gt;
Build blender with the command (Run cmd.exe) and type in...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 cd c:\blender\blender&lt;br /&gt;
 scons BF_TOOLSET=mingw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
scons may take a while to compile so be patient (5 to 25min depending on the speed of your computer). Generally after that you can update the source with the CVS and running the compile again will only compile whats needed, taking a minute or 2.&lt;br /&gt;
&lt;br /&gt;
When the build is done you will have a &amp;quot;blender.exe&amp;quot; in &amp;quot;C:\blender\install\win32-mingw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Automating the build process===&lt;br /&gt;
Typing in '''scons BF_TOOLSET=mingw''' all the time is a pain.&lt;br /&gt;
So its a good idea to make a build script.&lt;br /&gt;
&lt;br /&gt;
Open a text editor and &lt;br /&gt;
copy the following into it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 cd c:\blender\lib&lt;br /&gt;
 svn update&lt;br /&gt;
 cd c:\blender\blender&lt;br /&gt;
 svn update&lt;br /&gt;
 &lt;br /&gt;
 scons BF_TOOLSET=mingw&lt;br /&gt;
 strip C:\blender\install\win32-mingw\blender.exe&lt;br /&gt;
 pause&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
save this file as c:\blender\build.bat, you can double click on this or run from the command line.&lt;br /&gt;
&lt;br /&gt;
SVN update commands are not needed but nice to keep up to date with daily SVN additions.&lt;br /&gt;
strip will cut about 1 meg off you blender.exe, just removes unneeded data from the exe.&lt;br /&gt;
&lt;br /&gt;
===Cleaning the build===&lt;br /&gt;
If you want to clean the build, you may have upgraded your compiler of changed flags,&lt;br /&gt;
&amp;lt;br&amp;gt;you will first need to make a clean build.&lt;br /&gt;
&amp;lt;br&amp;gt;Sometimes updates from SVN require you to make a clean build.&lt;br /&gt;
So open up a text editor and save the following as c:\blender\build_clean.bat&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 cd c:\blender\blender&lt;br /&gt;
 scons clean BF_TOOLSET=mingw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hope all goes well.&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
If you can compile Blender and are interested in development, then youll probably want to debug your code.&lt;br /&gt;
There are 2 steps to this &lt;br /&gt;
# Compile a debug build&lt;br /&gt;
# Install a debugger&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Compiling a debug build===&lt;br /&gt;
is done by adding &amp;quot;-g&amp;quot; to the compiler flags.&lt;br /&gt;
Its also a good to turn off optimizing flags like &amp;quot;-O2&amp;quot; when debugging. The resulting exe from a debug build may be 30 to 50 meg.&lt;br /&gt;
&lt;br /&gt;
===Installing a Debugger ===&lt;br /&gt;
I tried a few debuggers and insight seemed to be the best.&lt;br /&gt;
Get Insight.exe here [http://sourceforge.net/project/showfiles.php?group_id=2435&amp;amp;package_id=82725&amp;amp;release_id=371590]&lt;br /&gt;
&lt;br /&gt;
just extract it whereever you like.&lt;br /&gt;
&lt;br /&gt;
Open ''insight\bin\insight.exe'' and from insight open your debug Blender.exe&lt;br /&gt;
&lt;br /&gt;
Then run blender.exe by pressing the running man icon on the tool bar.&lt;br /&gt;
&lt;br /&gt;
It will automaticaly break at main(), just press the &amp;quot;C&amp;quot; key to launch blender.&lt;br /&gt;
&lt;br /&gt;
If you crash blender, go to ''View &amp;gt;&amp;gt; Trace'' and you can see the backtrace and what went wrong.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Mindrones bot</name></author>
		
	</entry>
</feed>