Dev:JA/Doc/Building Blender

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

Blender をビルド

ゼロから Blender をビルドするための、OS ごとの解説は以下より。

Blender 2.5x 以上

Blender 2.4x

共通

以下のステップを踏むことで Blender をビルドできます。詳細は上のリンク先にあるガイドを参照してください。

  1. ビルド設定を選択する
    ビルドする前に、OS、ビルドシステム、コンパイラ、関係する開発ツールや依存関係にあるパッケージを決めましょう。
  2. 開発ツールをインストールする
  3. 必要な依存関係にあるパッケージインストールする
    手動でインストールしなければならないものもあれば、Blender のソースコードについてくるものもあります。依存関係にあるパッケージはたいてい、ヘッダファイルやライブラリです。
  4. ソースコードをダウンロードする。通常、 svn(subversion)経由で最新バージョンをダウンロードすることになります。
  5. ビルドしてみる。ビルド失敗を解決する(次項参照)。
  6. ビルド完了!

ビルド失敗を解決

Most building problems are not actually errors in the tree, although you can never fully rule out that possibility. Most likely, the problem is one or more missing dependencies.

Missing dependencies cause two types of compiler errors. No such file errors mean a header (.h) file is missing, while unresolved symbol errors when linking mean a library is missing. This is usually because either a path to the dependency was not set correctly in the build system, the dependency was not installed, or a wrong version of the dependency was used.

Finding out which dependencies are broken may sometimes be difficult. Searching online for the missing filenames or symbols will often give a quick answer. On systems with package managers, the headers and libraries are usually in a separate development package, called for example foo-dev or foo-devel.

ビルドシステム

Blender has two build system, SCons and CMake. Which one to use is a personal preference, and generally they can both build the same features, it's mostly a matter of personal preference. Besides that you must also choose a compiler to install, and choose if you want to build a 32bit or 64bit Blender.

SCons

  • Customization
    • blender/user-config.py (configuration file)
    • blender/build_files/scons/config/<platform>-config.py (for hints and documentation, don't edit these!)
  • Documentation
    • blender/doc/blender-scons.txt
  • Build Files
    • SConscript throughout the source tree.
    • blender/SConstruct
    • blender/build_files/scons/*
  • Output
    • install/<platform>/ by default, configurable with BF_INSTALLDIR=<dir>

CMake

  • Customization
    • Using cmake GUI, ccmake or editing build/CMakeCache.txt
    • Be sure to generate the build files in a directory other than blender/, e.g. build/
  • Documentation
    • blender/doc/build-systems/cmake.txt
  • Build Files
    • CMakeLists.txt throughout the source tree.
    • blender/build_files/cmake/*
  • Output
    • build/bin, or the project directory for the given generator (CMake -G <generator>).