利用者:Kdawg/Building Blender/Download the dependency libraries

提供: wiki
移動先: 案内検索

Download the dependency libraries

Acquiring the dependency libraries is simple. If you are using Windows or Mac, you will need to use Subversion, a different repository than Git, to download the precompiled dependency libraries. The reason for this is that Git does not do well with large binary files. There is a script for Linux users to download and build the dependencies.

Install Dependency Libraries

Windows

Installing SVN

You have many choices for a subversion client. SlikSVN is a version of SVN for windows that is used by many of the Windows developers. Also, the Cygwin unix environment has an SVN package available. Alternately, TortoiseSVN integrates nicely with windows explorer.

About the precompiled libraries

Depending on your compiler, and whether you are going to target a 32-bit system or a 64-bit system, you will download a different set of libraries.

The three main supported compilers are MinGW, MSVC 2012 (for 2.71 and beyond), and MSVC 2008 (for pre-2.70 versions). Use the table below to figure out which version subversion repository to download. For example, if you are using MinGW on a 32-bit system, replace <libs_dir> below with mingw32.

  • MinGW - 32 bit: mingw32
  • MinGW - 64 bit: mingw64
  • MSVC 2012 - 32 bit: windows_vc12
  • MSVC 2012 - 64 bit: win64_vc12
  • Note: While MSVC 2010 support is now deprecated, you can still find the precompiled libraries under windows and win64.

Downloading the libraries

Once you have SVN installed, you can download the libraries from the command line, by using the following process:

cd \blender-dev
mkdir lib
cd lib
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/<libs_dir>

Under no circumstances should you set the SVN repository for the C:\blender-dev 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 be able to close the dialog out.

Linux

Automatic dependencies installation

The preferred way to install dependencies under Linux is now to use the install_deps.sh script featured with Blender sources. It currently supports Debian (and derived), Fedora, Suse and Arch distributions. To run the script, simply run the following commands:

cd ~/src/blender-dev
./blender/build_files/build_environment/install_deps.sh

This scripts accepts some optional command lines arguments (use --help one to get an exhaustive list), among which:

--source <path>
Where to store downloaded sources for libraries we have to build (defaults to ~/src/blender-deps).
--install <path>
Where to install the libraries we have to build (defaults to /opt/lib).
--with-osl
Try to build OpenShadingLanguage. Note that this is still considered as experimental!

Some commands in this script requires sudo, so you'll be likely asked couple of times for your password.

When the script finish installing/building all the packages, it'll print which parameters for CMake and SCons you should use to use the compiled libraries.

Exclamation mark.png
If you have to compile your own boost libraries, you will have to tell Linux where to find them to get blender running. Just run the following commands as root user, from a terminal window:
echo "/opt/lib/boost/lib" > /etc/ld.so.conf.d/boost.conf
ldconfig

Mac

Download external libraries from Subversion

The external libraries needed for building blender have been precompiled for Intel 32 bit and 64 bit and OS X 10.5+, and can be download with these commands:

cd ~/blender-dev
mkdir lib
cd lib
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/darwin-9.x.universal


Keep your repository up to date

On Mac and Windows, you can run the following command every so often to keep your precompiled libs up-to-date:

Mac

cd ~/blender-dev/lib
svn update

Windows

cd \blender-dev\lib
svn update