blender.org
code.blender.org
User:Jr100/CMake
for
User:Jr100/CMake
User page
No discussion
Links
View source
History
From BlenderWiki
Jump to:
navigation
,
search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on
wiki.blender.org
.
You can view and copy the source of this page:
= Introduction = Building Blender on any system is very easy. All you will need are a couple of software tools and of course, a computer! The instructions below apply to any type of operating system and the software packages used should work on Mac OSX, Windows, and 99% of Linux distros. The steps in building Blender are: # Get the software # Get the source # Build it! = Installing The Software = To get and build Blender, you need a number of packages installed on your system. To get them follow these simple instructions. == Git == Git is a version control system that we use to download, list changes to, and update Blender's source. For a more in-depth overview, look at [http://wiki.blender.org/index.php/Dev:Doc/Tools/Git this page.] === Mac OSX === To install Git on Mac, go to [http://www.git-scm.com/download/ http://www.git-scm.com/download] and select the installer for Mac. === Windows === To install Git on Windows, go to [http://www.git-scm.com/download/ http://www.git-scm.com/download] and select the installer for Windows. === Linux === To install Git on any Linux distro, go to [http://www.git-scm.com/download/ http://www.git-scm.com/download] and select the installer for Linux. You can also install git through your package manager. === Test The Install === Once it has installed, open up your terminal (in Mac and Linux) or your git bash (in Windows) and test it by typing <source lang="bash"> git --help </source> If you see output like, <source lang="bash"> usage: git [--version] [--help] [-C <path>] [-c name=value]..... </source> you will know that it has been installed correctly. == CMake == CMake is a family of tools designed to build, test and package software. We use it to configure our code for building. === Mac OSX === To install CMake for OSX, go to [http://www.cmake.org/download/ http://www.cmake.org/download/] and select the package for Mac. Currently, CMake only supports OSX 10.6 and newer. After installing, you should have CMake.app in your applications folder. === Windows === To install CMake go to [http://www.cmake.org/download/ http://www.cmake.org/download/] and select the Windows installer. After installing you should have Cmake in your start menu with an icon on your desktop if you selected to have it. === Linux === To install go to [http://www.cmake.org/download/ http://www.cmake.org/download/] there you can download the package for Linux. If you want, you can install cmake through your distro's package manager. Just make sure that you install <source lang="bash">cmake</source> and <source lang="bash">cmake-gui</source> == The Libs For Linux == A number of other packages are needed to build on Linux, run the auto installer by typing <source lang="bash"> cd ~/blender-git ./blender/build_files/build_environment/install_deps.sh </source> = Getting The Source = Getting the source is as easy as running a few commands. Be warned that Blender's source is over 300 megabytes and it will take a little while to download. == Mac OSX == === Creating the blender-git folder === To get the source, you first have to have somewhere to put it! So, the first thing you should do, is open up terminal.app and type in these commands to make and go to a new blender folder. <source lang="bash"> mkdir ~/blender-git cd ~/blender-git </source> === Checking Out The Source === Now it's time to actually get the source code, just type these commands into the terminal and away you go! ==== The Code ==== <source lang="bash"> git clone http://git.blender.org/blender.git </source> ==== The Libs ==== <source lang="bash"> mkdir lib cd lib svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/darwin-9.x.universal </source> == Windows and Linux == === Creating the blender-git folder === To get the source, you first have to have somewhere to put it! So, the first thing you should do, is open up terminal on Linux and cmd.exe on Windows and type in these commands to make and go to a new blender folder. <source lang="bash"> mkdir ~/blender-git cd ~/blender-git </source> === Checking Out The Source === Now it's time to actually get the source code, just type these commands into the terminal on Linux and the git bash on Windows. ==== The Code ==== <source lang="bash"> git clone http://git.blender.org/blender.git </source> == Updating == If you ever want to update your code to the latest version, it is suggested that you do this every day, just use these commands. === All Systems === <source lang="bash"> cd ~/blender-git/blender git pull --rebase git submodule foreach git pull --rebase origin master </source> === Mac (For The Libs) === <source lang="bash"> cd ~/blender-git/lib/darwin-9.x.universal svn update </source> = Building It = To build Blender on all systems, open up the CMake program, cmake-gui on Linux, and follow the instructions below. == Configuring The Build == # Set the source path to be blender-git/blender # Create a new folder in blender-git called build and set the build directory to blender-git/build # Click the configure button and select Unix Makefiles on the popup. Don't be frightened by the red, that is fine. # After that has finished, click the generate button to generate the makefiles. # When that is finished, close Cmake. == Building The Source == To build the source, follow the steps and wait while it compiles. Warning: on first build, the code takes an average or 2 hours to compile, after that, it will only compile what you have changed. <source lang="bash"> cd ~/blender-git/build make make install </source> == Testing The Build == To test the newly compiled version of Blender, run one of these commands for your system. === Mac OSX === Go to blender-git/build/bin and open the blender.app that should be there. === Windows === Go to blender-git/build/bin and open the blender.exe that should be there. === Linux === Type <source lang="bash"> cd ~blender-git/build ./bin/blender </source> and Blender will open. = Closing Notes = We hope that you have found this helpful and informative. If you have any questions or the build didn't work for some reason, contact a developer on the #blendercoders irc channel. Thanks, The Blender Developer Team
Return to
User:Jr100/CMake
.
User:Jr100
Unversioned
Main Page
Blender Development
Blender 2.6
User Manual
Tutorials
Books
Scripts
2.72 Python API
(external link)
Blender Development
Blender 2.5
2.59 Python API
(external link)
Blender Development
Blender 2.4
User Manual
Tutorials
Books
Scripts
2.49 Python API
(external link)
Blender Development