@@ -6,11 +6,26 @@ Introduction to the buildsystem
66.. highlight :: shell
77
88
9- Setup
10- -----
9+ Godot is a primarily C++ project and it :ref: `uses the SCons build system. <doc_faq_why_scons >`
10+ We love SCons for how maintainable and easy to set up it makes our buildsystem. And thanks to
11+ that compiling Godot from source can be as simple as running::
1112
12- :ref: `Godot uses the SCons build system. <doc_faq_why_scons >`
13- Please refer to the documentation for:
13+ scons
14+
15+ This produces an *export template * for your current platform, operating system, and architecture.
16+ An export template is a build of the engine that is used for running exported projects. To build
17+ the *editor * instead you can run the following command::
18+
19+ scons target=editor
20+
21+ If you plan to debug or develop the engine, then you might want to add another option to the command::
22+
23+ scons dev_build=yes
24+ scons target=editor dev_build=yes
25+
26+ Following sections in the article will explain these and other universal options in more detail. But
27+ before you can compile Godot, you need to install a few prerequisites. Please refer to the platform
28+ documentation to learn more:
1429
1530- :ref: `doc_compiling_for_android `
1631- :ref: `doc_compiling_for_ios `
@@ -20,6 +35,22 @@ Please refer to the documentation for:
2035- :ref: `doc_compiling_for_web `
2136- :ref: `doc_compiling_for_windows `
2237
38+ These articles cover in great detail both how to setup your environment to compile Godot on a specific
39+ platform, and how to compile for that platform. Please feel free to go back and forth between them and
40+ this article to reference platform-specific and universal configuration options.
41+
42+ Using multi-threading
43+ ---------------------
44+
45+ The build process may take a while, depending on how powerful your system is. By default, Godot's
46+ SCons setup is configured to use all CPU threads but one (to keep the system responsive during
47+ compilation). If you want to adjust how many CPU threads SCons will use, use the ``-j <threads> ``
48+ parameter to specify how many threads will be used for the build.
49+
50+ Example for using 4 threads::
51+
52+ scons -j4
53+
2354Platform selection
2455------------------
2556
@@ -53,18 +84,6 @@ To build for a platform (for example, ``linuxbsd``), run with the ``platform=``
5384
5485 scons platform=linuxbsd
5586
56- This will start the build process, which will take a while. By default, Godot's
57- SCons setup is configured to use all CPU threads but one (to keep the system
58- responsive during compilation). If you want to adjust how many CPU threads SCons
59- will use, use the ``-j <threads> `` parameter to specify how many threads will be
60- used for the build.
61-
62- Example for using 4 threads:
63-
64- ::
65-
66- scons platform=linuxbsd -j4
67-
6887.. _doc_introduction_to_the_buildsystem_resulting_binary :
6988
7089Resulting binary
0 commit comments