Table des matières
Building blender on Windows (64 bits) for blenderVR
This procedure has been done on Windows Seven. It should work on other versions of windows.
Prerequisite
- git (allow to use git from Windows command prompt; if you wants install TortoiseGit too)
- TortoiseSvn (check in PATH command line access when installing!)
- CMake 2.8 (not tested with greater version)
- Win64 gcc compiler as listed on Blender site for build with MinGW and CMake (note: tested with a more recent 4.8 version of gcc by rubenv, I confirm compiler crash)
- MinGW base tools (we need build tools like make & Co) via the MinGW installer
- PySide; you can install with command-line using
pip3 install pyside
(may prefix pip3 by its full path if Python install directory is not in the PATH)
In the PATH, check that Win64 gcc path come before MinGW bin path (in case MinGW intalled its version of gcc).
Install sources & Co
Make a build directory, go inside:
C:\>mkdir BlenderVRBuild C:\>cd BlenderVRBuild
Clone Blender
C:\BlenderVRBuild>git clone https://github.com/BlenderVR/blender.git Cloning into 'blender'... remote: Counting objects: 706234, done. remote: Compressing objects: 100% (88273/88273), done. remote: Total 706234 (delta 614695), reused 706229 (delta 614691) Receiving objects: 100% (706234/706234), 232.05 MiB | 13.92 MiB/s, done. Resolving deltas: 100% (614695/614695), done. Checking connectivity... done. Checking out files: 100% (7685/7685), done. C:\BlenderVRBuild>cd blender C:\BlenderVRBuild\blender>git pull --rebase Current branch blender-vr is up to date. C:\BlenderVRBuild\blender>git submodule foreach git pull --rebase origin master C:\BlenderVRBuild\blender>cd ..
Clone BlenderVR
C:\BlenderVRBuild>git clone https://github.com/BlenderVR/blender-vr.git Cloning into 'blender-vr'... remote: Counting objects: 538, done. remote: Compressing objects: 100% (197/197), done. remote: Total 538 (delta 320), reused 513 (delta 303) Receiving objects: 100% (538/538), 877.30 KiB | 649.00 KiB/s, done. Resolving deltas: 100% (320/320), done. Checking connectivity... done.
Clone samples to be able to test
C:\BlenderVRBuild>git clone https://github.com/BlenderVR/samples.git Cloning into 'samples'... remote: Counting objects: 140, done. remote: Compressing objects: 100% (53/53), done. remote: Total 140 (delta 78), reused 140 (delta 78) Receiving objects: 100% (140/140), 21.95 MiB | 2.97 MiB/s, done. Resolving deltas: 100% (78/78), done. Checking connectivity... done.
Install blender submodules, from blender site, into our local repository:
C:\BlenderVRBuild>cd blender C:\BlenderVRBuild\blender>git config submodule.scons.url git://git.blender.org/scons.git C:\BlenderVRBuild\blender>git config submodule.release/scripts/addons_contrib.url git://git.blender.org/blender-addons-contrib.git C:\BlenderVRBuild\blender>git config submodule.release/scripts/addons.url git://git.blender.org/blender-addons.git C:\BlenderVRBuild\blender>git config submodule.release/datafiles/locale.url git://git.blender.org/blender-translations.git C:\BlenderVRBuild\blender>git submodule update --init --recursive --remote C:\BlenderVRBuild\blender>cd ..
Install MinGW64 blender dependancies as listed on blender page.
C:\BlenderVRBuild>svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/mingw64 lib/mingw64
Prepare compilation
Prepare compilation makefiles with CMake gui:
TODO: add cmake screenshots.
If they are checked, uncheck option WITH_SDL
, WITH_LLVM
, WITH_CYCLES_OSL
.
Check option WITH_PLAYER
– this is the binary we need!.
- Select MinGW makefiles
- Configure
- Generate.
Now you are ready to compile
Compile BlenderVR
C:\BlenderVRBuild>cd build-blender C:\BlenderVRBuild\build-blender>mingw-make
or, depending on your make environment, by example:
C:\BlenderVRBuild\build-blender>\MinGW\bin\mingw32-make.exe
Take a cofee, go walking, listen music.
Finish the installation with:
C:\BlenderVRBuild\build-blender>mingw32-make install
This again take a long time, and we reach a |missing sqlite3.dll bug:
… -- Up-to-date: C:/BlenderVRBuild/build-blender/bin/python34.dll CMake Error at source/creator/cmake_install.cmake:496 (FILE): file INSTALL cannot find "C:/BlenderVRBuild/blender/../lib/mingw64/python/lib/sqlite3.dll". Call Stack (most recent call first): cmake_install.cmake:35 (INCLUDE)
But the dll is available within standard Blender distro. Download .zip 64 bits version of Blender, open the zip archive, and copy sqlite3.dll
file to C:/BlenderVRBuild/blender/../lib/mingw64/python/lib/
. Do again:
C:\BlenderVRBuild\build-blender>mingw32-make install
OLD compilation steps
Pre-requisite
Paths
Choose the root of your installation path. For instance, in the following, we will use Z:\blender\2.69
as root path.
Just create a compile folder:
mkdir Z:\blender\2.69\compile
Prepare blender
Download blender
Download blender tgz file and untar it (with software you prefer: 7-zip
, tar
, Winzip
…) in Z:\blender\2.69\compile
folder.
Patch it
Download the blenderVR patch. And apply it to blender sources.