======= Building blender on Windows (64 bits) for blenderVR =======
This procedure has been done on Windows Seven. It should work on other versions of windows.
I'm working on it, take notes here
===== Prerequisite =====
* [[http://git-scm.com/download/win|git]] (allow to use git from Windows command prompt; if you wants install [[https://code.google.com/p/tortoisegit/wiki/Download|TortoiseGit]] too)
* [[http://tortoisesvn.net/downloads.html|TortoiseSvn]] (check in PATH command line access when installing!)
* [[http://www.cmake.org/files/v2.8/cmake-2.8.12.2-win32-x86.exe|CMake 2.8]] (not tested with greater version)
* [[http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.7-release/x86_64-w64-mingw32-gcc-4.7.1-release-win64_rubenvb.7z/download|Win64 gcc compiler]] as listed on [[http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Windows/MinGW/CMake|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)
* [[http://www.mingw.org/|MinGW]] base tools (we need build tools like make & Co) via the [[http://sourceforge.net/projects/mingw/files/|MinGW installer]]
* [[https://www.python.org/downloads/|Python 3.4]]
* 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).
I hope I miss nothing (there may be some dependancies already intalled from another test or another project using the same system, that I miss to list here)
===== 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 [[http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Windows/MinGW/CMake|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
The install command must be done with Windows administration rights (right-click on Accessories/Command program, and choose Run as Administrator), as it install Blender in the Program Files directory.
This again take a long time, and we reach a [[https://developer.blender.org/T42144||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 [[http://www.blender.org/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 ======
Before compiling blender, you must install:
* [[http://www.microsoft.com/en-us/download/details.aspx?id=34673|Visual Studio Express 2012]] ;
* [[http://www.cmake.org/files/v2.8/cmake-2.8.12.2-win32-x86.exe|CMake version 2.8.12.2]] ;
* [[http://www.python.org/ftp/python/3.3.5/python-3.3.5.amd64.msi|Python 3.3.5]] ;
To run blenderVR on the [[doc:split#console|console]], you must also install:
* [[http://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-4.10.4/PyQt4-4.10.4-gpl-Py3.3-Qt4.8.5-x64.exe| PyQt 4.10.4 for Python 3.3 and Qt 4.8.5]];
* [[http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-opensource-windows-x86-vs2010-4.8.6.exe|Qt 4.8.6 for Visual Studio 2010]];
====== 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 [[http://download.blender.org/source/blender-2.69.tar.gz|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 [[http://blendervr.limsi.fr/downloads/patchs/blender-2.69.patch|blenderVR patch]]. And apply it to blender sources.
[[doc:build_windows_old|Previous version]]