「Pt-PT/Dev:Doc/Building Blender」の版間の差分

提供: wiki
移動先: 案内検索
 
(1版 をインポートしました)
 
(相違点なし)

2018年6月29日 (金) 06:08時点における最新版

Criação do Blender

Instruções especificas do sistema operativo para a criação de raiz de uma compilação do Blender.



Sistemas de Compilação

O Blender tem dois sistemas de compilação, SCons e CMake. Qual dos dois a utilizar é uma preferência pessoal, e geralmente elas podem ser compiladas nas mesmas caraterísticas. É tudo uma questão de preferência pessoal. Além de, que deverá também escolher um compilador para instalar, e escolher de pretende compilar um Blender a 32 bits ou 64 bits.


CMake

  • Personalização
    • Using cmake GUI, ccmake or editing ./../build_<platform>/CMakeCache.txt
    • Be sure to generate the build files in a directory other than the source directory, e.g. ./../build/
  • Documentação
    • ./doc/build_systems/cmake.txt
  • Ficheiros de Compilação
    • CMakeLists.txt throughout the source tree.
    • ./build_files/cmake/*
  • Saída
    • ./../build_<platform>/bin, or the project directory for the given generator (CMake -G <generator>).


SCons

  • Personalização
    • ./user-config.py (configuration file)
    • ./build_files/scons/config/<platform>-config.py (for hints and documentation, don't edit these!)
  • Documentação
    • ./doc/build_systems/scons.txt
  • Ficheiros de Compilação
    • SConscript throughout the source tree.
    • ./SConstruct
    • ./build_files/scons/*
  • Saída
    • ./../install/<platform>/ by default, configurable with BF_INSTALLDIR=<dir>


Resolução de Falhas de Compilação

Most building problems are not actually errors in blenders source code, although you can never fully rule out that possibility. Here are common causes for failing to build.

Dependências Em Falta

On Windows or OS X we provide dependencies, so before troubleshooting further, make sure you updated your local "lib/" checkout.

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.

Alterações Locais

Some complaints of blender failing to build end up being caused by developers forgetting they have made changes to their code (patches applied or edits when developing).

Before spending too much time investigating an error building, check that your checkout has no local changes. You can stash those away (and restore later if desired) with this command:

git stash

Meio Ambiente Não Suportado

While Blender is portable, if you compile on a less common operating-system NetBSD for example, it may need some minor edits to compile. The same goes for compilers, less common version may need some adjustments if no active developers are currently using them.

Unless you want to spend time supporting less common development-environments, normally its best to use the default/standard development tools for your platform.

Comunicação de Problemas de Compilação

  • Incluir SEMPRE o registo de eventos completo do erro, e escrevendo "Isto falhou" com 1-2 linhas e com o erro não é muito útil.
  • Incluir a compilação do sistema em utilização, SCons/CMake, versão do compilador, revisão "git" do Blender.