「Dev:Doc/Building Blender/Windows/svn」の版間の差分

提供: wiki
移動先: 案内検索
(Remove worktree docs, this is NOT a stable feature - and gave new GSOC student some strange problems. Pleas don't add advanced git usage to basic docs.)
(相違点なし)

2017年5月22日 (月) 10:23時点における版

Set up your Repository

Create a folder to store your copy of the Blender source code. This guide will assume your chosen folder is C:\blender-git. Then use the command-line to download the Blender source code via git and precompiled libraries via SVN.

Note, to get the precompiled libraries you can use the command-line OR TortoiseSVN, no need to do both, however the command-line is relatively easy to do.

Using the Command line

Open the command prompt window by hitting Windows+R, and then typing cmd, or by searching for it in the start menu.

At the command prompt type the following commands:

cd C:\blender-git
git clone git://git.blender.org/blender.git
cd blender
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master

This will checkout the source files to blender/

For additional information on using Git with Blender's sources, see: Tools/Git

+ Checkout 32 Bit libraries...

Make sure the current working directory is the top-level Blender dev directory, so C:\blender-git in these examples.

If you plan on building 32-bit binaries with Microsoft VS-2013, checkout the pre-compiled library files by typing:

svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows_vc12  lib/windows_vc12

If you plan on building 32-bit binaries with Microsoft VS-2015 or VS-2017, checkout the pre-compiled library files by typing:

svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows_vc14  lib/windows_vc14


If building 32-bit binaries with MinGW, type:

svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/mingw32 lib/mingw32

This will checkout the libraries to lib/windows/ or lib/mingw32/ respectively.

+ Checkout 64 Bit libraries...

Make sure the current working directory is the top-level Blender dev directory, so C:\blender-git in these examples.

If you plan on building 64-bit binaries with Microsoft VS-2013, checkout the precompiled library files by typing:

svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc12  lib/win64_vc12

If you plan on building 64-bit binaries with Microsoft VS-2015 or VS-2017, checkout the precompiled library files by typing:

svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc14  lib/win64_vc14


Otherwise if building 64-bit binaries with MinGW-w64, type:

svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/mingw64 lib/mingw64

Again, this will check the libraries out in lib/win64/ or lib/mingw64/ respectively.


Using TortoiseSVN

Under no circumstances should you set the SVN repository for the C:\blender-git folder, because it could cause major conflicts with the git repository. If you want to update each precompiled library folder with the explorer context menu, you can do so by clicking on the requisite folders under lib/ and going to SVN checkout. After the checkout finishes you will see a revision and are able to close the dialog out.

The only safe folders that you should use this feature on are the following:

+ Safe Folders for 32 Bit libraries...

  • Precompiled libraries (if building 32-bit with VS-2013):
    Repository: https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows_vc12
    Directory: C:\blender-git\lib\windows_vc12
  • Precompiled libraries (if building 32-bit with VS-2015/VS-2017):
    Repository: https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows_vc14
    Directory: C:\blender-git\lib\windows_vc14
  • Precompiled libraries (if building 32-bit with MinGW):
    Repository: https://svn.blender.org/svnroot/bf-blender/trunk/lib/mingw32
    Directory: C:\blender-git\lib\mingw32

+ Safe Folders for 64 Bit libraries...

  • Precompiled libraries (if building 64-bit with VS-2013):
    Repository: https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc12
    Directory: C:\blender-git\lib\win64_vc12
  • Precompiled libraries (if building 64-bit with VS-2015/VS-2017):
    Repository: https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc14
    Directory: C:\blender-git\lib\win64_vc14
  • Precompiled libraries (if building 64-bit with MinGW-w64):
    Repository: https://svn.blender.org/svnroot/bf-blender/trunk/lib/mingw64
    Directory: C:\blender-git\lib\mingw64


Update your repository

To keep your local Blender source code and precompiled libraries up to date, you will need to do a git and SVN update once in a while. The most convenient way of doing this is to make a batch file containing the necessary commands.

Command line

Create this batch (.bat) file in C:\blender-git\:

+ Update 32 Bit libraries...

For Microsoft VS-2013 32-bit:

cd lib\windows_vc12
svn update
cd ..\..\blender
git pull --rebase
git submodule foreach git pull --rebase origin master
pause

For MinGW (32-bit):

cd lib\mingw32
svn update
cd ..\..\blender
git pull --rebase
git submodule foreach git pull --rebase origin master
pause

+ Update 64 Bit libraries...

For Microsoft VS-2013 64-bit:

cd lib\win64_vc12
svn update
cd ..\..\blender
git pull --rebase
git submodule foreach git pull --rebase origin master
pause

For MinGW-w64:

cd lib\mingw64
svn update
cd ..\..\blender
git pull --rebase
git submodule foreach git pull --rebase origin master
pause


Run this newly created .bat file whenever you want to update.

TortoiseSVN Explorer Menu

If you plan to compile different versions of Blender with different compilers or targets, and need to have more than one of the precompiled libraries, you can update them individually by right clicking on the requsite library under C:/blender-git/lib/PRECOMPILED-LIB where "PRECOMPILED-LIB" are the following:

C:/blender-git/lib/windows, C:/blender-git/lib/win64, C:/blender-git/lib/mingw32, and/or C:/blender-git/lib/mingw64

Once you right click on the C:/blender-git/lib/PRECOMPILED-LIB folder you should choose the SVN Update option. A TortoiseSVN window will appear listing the files that are updating.

Once the process is finished it will print Completed At Revision: xxxxx at the end of the list.

Just click the OK button to dismiss the dialog.