Difference between revisions of "Scons command line flags"

From The Powder Toy
Jump to: navigation, search
m (moved SCONS command line flags to Scons command line flags: SCONS isn't an acronym)
(Add outdated notice)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This page will explain all the SCONS command line flags.  
+
'''ATTENTION: This guide is outdated as of 2021. Please use this guide for building any recent version of the game: [[Building TPT with Meson]]'''
 +
 
 +
This page will explain all the SCons command line flags. Note that <code>--release --sse --sse2 --no-warnings</code> are all enabled by default. Use <code>--no-sse</code>, <code>--wall</code>, or <code>--debugging</code> to disable these.
 +
 
 +
Some of these options are also auto-detected. Your platform is detected so <code>--win / --lin / --mac</code> aren't needed unless you are cross compiling. Some cross compilers are also auto-detected on Linux so <code>--tool</code> may not be needed. <code>--64bit</code> and <code>--32bit</code> shouldn't be necessary either.
  
 
{| class="wikitable" style="text-align: center; width: 100%;"
 
{| class="wikitable" style="text-align: center; width: 100%;"
 +
! Name !! Description !! Example usage
 +
|-
 +
| parallel compilation || Compiles in multiple threads, significally decreases compilation time if the number of threads equals the number of cores on your system. || -j4
 +
|-
 +
| Build || Sets the build directory. || --build-dir build/powder64
 
|-
 
|-
| Name
+
| Windows || Targets the Windows platform. || --win
| Description
 
| Define
 
 
|-
 
|-
| OpenGL
+
| Linux || Targets the Linux platform. || --lin
| Compiles using OpenGL instead of SDL
+
|-
| --opengl
+
| Mac OS X || Targets the Mac OS X platform. || --mac
 
|-
 
|-
| Renderer
+
| MSVC || Compiles using the Microsoft Visual Studio Compiler || --msvc
| Saves Renderer
 
| --renderer
 
 
|-
 
|-
| 64-bit
+
| Tool || Prefix for toolchain executables used for cross compiling. || --tool i586-mingw32msvc-
| Compiles a 64-bit (AMD64) version instead of 32-bit (x86) version.
 
| --64bit
 
 
|-
 
|-
| Static Linking
+
| Beta || Makes a beta build. || --beta
| Reduces external library dependencies
 
| --static
 
 
|-
 
|-
| Pthreadw32
+
| No Install Prompt || Disables the install prompt on first run. || --no-install-prompt
| Use PTW32_STATIC_LIB for pthreadw32 headers
 
| --pthreadw32-static
 
 
|-
 
|-
| Python Version
+
| Ignore Updates || Disables checking for updates. || --ignore-updates
| Determines which python version to use with generator.py
 
| --python-ver version
 
 
|-
 
|-
| Release
+
| Save Version || Defines save version. || --save-version 89
| Makes a release build (slows down compiling)
 
| --release
 
 
|-
 
|-
| Lua Directory
+
| Minor Version || Defines the minor version. || --minor-version 1
| Defines the directory in which the Lua headers are located.
 
| --lua-dir path
 
 
|-
 
|-
| SDL Directory
+
| Build Number || Defines the build number. || --build-number 281
| Defines the directory in which the SDL headers are located.
 
| --sdl-dir path
 
 
|-
 
|-
| Tool
+
| Snapshot || Makes a snapshot build. || --snapshot
| Usually used for cross compiling
 
| --tool
 
 
|-
 
|-
| SSE
+
| Snapshot ID || Defines the snapshot ID. || --snapshot-id 12345
| Compiles a legacy version
 
| --sse
 
 
|-
 
|-
| SSE2
+
| 64-bit || Compiles a 64-bit (AMD64) version. || --64bit
| Enable SSE2 optimisations
 
| --sse2
 
 
|-
 
|-
| SSE3
+
| 32-bit || Compiles a 32-bit (i386) version. || --32bit
| Enable SSE3 optimisations
 
| --sse3
 
 
|-
 
|-
| X86
+
| Universal || Compiles a universal (32 and 64 bit) binary, OS X only. || --universal
| Target Intel x86 platform (32-bit)
 
| --x86
 
 
|-
 
|-
| No FFT
+
| No SSE|| Compiles a legacy version, for older computers. || --no-sse
| Do not use fftw3f for gravity.
 
| --nofft
 
 
|-
 
|-
| No Lua
+
| SSE || Compiles an SSE-enabled, and thus, non-legacy binary. || --sse
| Disables all Lua scripting features.
 
| --nolua
 
 
|-
 
|-
| Debugging
+
| SSE2 || Enables SSE2 optimisations. || --sse2
| Enables Debug Options
 
| --debugging
 
 
|-
 
|-
| Beta
+
| SSE3 || Enables SSE3 optimisations. || --sse3
| Makes a beta build
 
| --beta
 
 
|-
 
|-
| Save Version
+
| Native || Compiles with --march=native. || --native
| Defines save version
 
| --save-version ver
 
 
|-
 
|-
| Minor Version
+
| Release || Enables compiler optimization and makes a release build (slows down compiling). || --release
| Defines the minor version
 
| --minor-version ver
 
 
|-
 
|-
| Build Number
+
| Debugging || Enables Debug Options. || --debugging
| Defines the build number
 
| --build-number ver
 
 
|-
 
|-
| Snapshot
+
| Preserve Symbols || Skips the step which strips the output of symbols. || --symbols
| Makes a snapshot build
 
| --snapshot
 
 
|-
 
|-
| Snapshot ID
+
| Static Linking || Reduces external library dependencies. || --static
| Defines the snapshot ID
 
| --snapshot-id id
 
 
|-
 
|-
| Stable
+
| OpenGL || Use OpenGL to render the interface. Currently defunct. || --opengl
| Makes a stable build
 
| --stable
 
 
|-
 
|-
| All at Once
+
| OpenGL Particles || Use OpenGL to render particles (turns on --opengl). Currently defunct. || --opengl-renderer
| Compiles everything at once
 
| --aao
 
 
|-
 
|-
| Windows
+
| Renderer || Compiles the save renderer instead of the game. || --renderer
| Targets the Windows platform
 
| --win
 
 
|-
 
|-
| Linux
+
| Font || Compiles the save font editor instead of the game. || --font
| Targets the Linux platform
+
|-
| --lin
+
| Error on warnings || Any compiler errors turn into warnings. || --wall
|-  
+
|-
| Mac OS X
+
| No warnings || Ignore all compiler warnings. || --no-warnings
| Targets the Mac OS X platform
+
|-
| --macosx
+
| No Lua || Disables all Lua scripting features. || --nolua
 +
|-
 +
| LuaJIT || Use LuaJIT. || --luajit
 +
|-
 +
| Lua 5.2 || Use version 5.2 of Lua. || --lua52
 
|-
 
|-
| Raspbian
+
| No FFT || Do not use fftw3f for gravity. || --nofft
| Targets the Raspbian (OS of Raspberry Pi) platform
 
| --rpi
 
 
|-
 
|-
| Build
+
| No HTTP || Disables internet connectivity. || --nohttp
| Sets the build directory
 
| --build
 
 
|-
 
|-
| Full Clean
+
| Executable name || Create an executable with a different name. || --output MyMod.exe
| For when nothing else works. Deletes all sconscript temporary files.
+
|}
| --fullclean
 

Latest revision as of 08:58, 3 April 2021

ATTENTION: This guide is outdated as of 2021. Please use this guide for building any recent version of the game: Building TPT with Meson

This page will explain all the SCons command line flags. Note that --release --sse --sse2 --no-warnings are all enabled by default. Use --no-sse, --wall, or --debugging to disable these.

Some of these options are also auto-detected. Your platform is detected so --win / --lin / --mac aren't needed unless you are cross compiling. Some cross compilers are also auto-detected on Linux so --tool may not be needed. --64bit and --32bit shouldn't be necessary either.

Name Description Example usage
parallel compilation Compiles in multiple threads, significally decreases compilation time if the number of threads equals the number of cores on your system. -j4
Build Sets the build directory. --build-dir build/powder64
Windows Targets the Windows platform. --win
Linux Targets the Linux platform. --lin
Mac OS X Targets the Mac OS X platform. --mac
MSVC Compiles using the Microsoft Visual Studio Compiler --msvc
Tool Prefix for toolchain executables used for cross compiling. --tool i586-mingw32msvc-
Beta Makes a beta build. --beta
No Install Prompt Disables the install prompt on first run. --no-install-prompt
Ignore Updates Disables checking for updates. --ignore-updates
Save Version Defines save version. --save-version 89
Minor Version Defines the minor version. --minor-version 1
Build Number Defines the build number. --build-number 281
Snapshot Makes a snapshot build. --snapshot
Snapshot ID Defines the snapshot ID. --snapshot-id 12345
64-bit Compiles a 64-bit (AMD64) version. --64bit
32-bit Compiles a 32-bit (i386) version. --32bit
Universal Compiles a universal (32 and 64 bit) binary, OS X only. --universal
No SSE Compiles a legacy version, for older computers. --no-sse
SSE Compiles an SSE-enabled, and thus, non-legacy binary. --sse
SSE2 Enables SSE2 optimisations. --sse2
SSE3 Enables SSE3 optimisations. --sse3
Native Compiles with --march=native. --native
Release Enables compiler optimization and makes a release build (slows down compiling). --release
Debugging Enables Debug Options. --debugging
Preserve Symbols Skips the step which strips the output of symbols. --symbols
Static Linking Reduces external library dependencies. --static
OpenGL Use OpenGL to render the interface. Currently defunct. --opengl
OpenGL Particles Use OpenGL to render particles (turns on --opengl). Currently defunct. --opengl-renderer
Renderer Compiles the save renderer instead of the game. --renderer
Font Compiles the save font editor instead of the game. --font
Error on warnings Any compiler errors turn into warnings. --wall
No warnings Ignore all compiler warnings. --no-warnings
No Lua Disables all Lua scripting features. --nolua
LuaJIT Use LuaJIT. --luajit
Lua 5.2 Use version 5.2 of Lua. --lua52
No FFT Do not use fftw3f for gravity. --nofft
No HTTP Disables internet connectivity. --nohttp
Executable name Create an executable with a different name. --output MyMod.exe