Difference between revisions of "Scons command line flags"

From The Powder Toy
Jump to: navigation, search
m (Corrections to the Python Version Flag)
(update / reorganize page with new options)
Line 1: Line 1:
This page will explain all the SCONS command line flags.  
+
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.
  
 
{| class="wikitable" style="text-align: center; width: 100%;"
 
{| class="wikitable" style="text-align: center; width: 100%;"
Line 6: Line 8:
 
| parallel compilation || Compiles in multiple threads, significally decreases compilation time if the number of threads equals the number of cores on your system. || -j4
 
| parallel compilation || Compiles in multiple threads, significally decreases compilation time if the number of threads equals the number of cores on your system. || -j4
 
|-
 
|-
| OpenGL || Compiles using OpenGL instead of SDL || --opengl
+
| Build || Sets the build directory. || --build-dir build/powder64
 
|-
 
|-
| Renderer || Saves Renderer || --renderer
+
| Windows || Targets the Windows platform || --win
 
|-
 
|-
| 64-bit || Compiles a 64-bit (AMD64) version instead of 32-bit (x86) version. || --64bit
+
| Linux || Targets the Linux platform || --lin
 +
|-
 +
| Mac OS X || Targets the Mac OS X platform. || --mac
 
|-
 
|-
| Static Linking || Reduces external library dependencies || --static
+
| MSVC || Compiles using the Microsoft Visual Studio Compiler || --msvc
 
|-
 
|-
| Pthreadw32 || Use PTW32_STATIC_LIB for pthreadw32 headers || --pthreadw32-static
+
| Tool || Prefix for toolchain executables used for cross compiling. || --tool i586-ming32msvc-
 
|-
 
|-
| Python Version || Determines which python version to use with generator.py || --python-ver=python2.7
+
| Beta || Makes a beta build. || --beta
 
|-
 
|-
| Release || Makes a release build (slows down compiling) || --release
+
| Save Version || Defines save version. || --save-version 89
 
|-
 
|-
| Lua Directory || Defines the directory in which the Lua headers are located. || --lua-dir /usr/include/lua5.1/
+
| Minor Version || Defines the minor version. || --minor-version 1
 
|-
 
|-
| SDL Directory || Defines the directory in which the SDL headers are located. || --sdl-dir /usr/local/include/SDL/
+
| Build Number || Defines the build number. || --build-number 281
 
|-
 
|-
| Tool || Prefix for toolchain executables used for cross compiling. || --tool i586-ming32msvc-
+
| Snapshot || Makes a snapshot build. || --snapshot
 
|-
 
|-
| SSE || Compiles an SSE-enabled, and thus, non-legacy binary. || --sse
+
| Snapshot ID || Defines the snapshot ID. || --snapshot-id 12345
 
|-
 
|-
| SSE2 || Enables SSE2 optimisations. || --sse2
+
| 64-bit || Compiles a 64-bit (AMD64) version || --64bit
 
|-
 
|-
| SSE3 || Enables SSE3 optimisations. || --sse3
+
| 32-bit || Compiles a 32-bit (i386) version || --32bit
 
|-
 
|-
| X86 || Target Intel x86 platform (32-bit). || --x86
+
| Universal || Compiles a universal (32 and 64 bit) binary, OS X only || --universal
 
|-
 
|-
| No FFT || Do not use fftw3f for gravity. || --nofft
+
| No SSE|| Compiles a legacy version, for older computers || --no-sse
 
|-
 
|-
| No Lua || Disables all Lua scripting features. || --nolua
+
| SSE || Compiles an SSE-enabled, and thus, non-legacy binary. || --sse
 
|-
 
|-
| Debugging || Enables Debug Options. || --debugging
+
| SSE2 || Enables SSE2 optimisations. || --sse2
 
|-
 
|-
| Beta || Makes a beta build. || --beta
+
| SSE3 || Enables SSE3 optimisations. || --sse3
 
|-
 
|-
| Save Version || Defines save version. || --save-version 89
+
| Native || Compiles with --march=native || --native
 
|-
 
|-
| Minor Version || Defines the minor version. || --minor-version 1
+
| Release || Enables compiler optimization and makes a release build (slows down compiling) || --release
 
|-
 
|-
| Build Number || Defines the build number. || --build-number 281
+
| Debugging || Enables Debug Options || --debugging
 
|-
 
|-
| Snapshot || Makes a snapshot build. || --snapshot
+
| Static Linking || Reduces external library dependencies || --static
 
|-
 
|-
| Snapshot ID || Defines the snapshot ID. || --snapshot-id 12345
+
| OpenGL || Use OpenGL to render the interface || --opengl
 
|-
 
|-
| Stable || Makes a stable build. || --stable
+
| OpenGL Particles || Use OpenGL to render particles (turns on --opengl) || --opengl-renderer
 
|-
 
|-
| All at Once || Compiles everything at once, very slow. || --aao
+
| Renderer || Compiles the save renderer || --renderer
 
|-
 
|-
| Windows || Targets the Windows platform. || --win
+
| Error on warnings || Any compiler errors turn into warnings || --wall
 
|-
 
|-
| Linux || Targets the Linux platform || --lin
+
| No warnings || Ignore all compiler warnings || --no-warnings
|-
 
| Mac OS X || Targets the Mac OS X platform. || --macosx
 
 
|-
 
|-
| Raspbian || Targets the Raspbian (OS of Raspberry Pi) platform. || --rpi
+
| No FFT || Do not use fftw3f for gravity. || --nofft
 
|-
 
|-
| Build || Sets the build directory. || --build obj/
+
| No Lua || Disables all Lua scripting features. || --nolua
 
|-
 
|-
| Full Clean || For when nothing else works. Deletes all sconscript temporary files. || --fullclean
+
| Executable name || Create an executable with a different name || --output MyMod.exe
 
|}
 
|}

Revision as of 02:41, 31 August 2014

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-ming32msvc-
Beta Makes a beta build. --beta
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
Static Linking Reduces external library dependencies --static
OpenGL Use OpenGL to render the interface --opengl
OpenGL Particles Use OpenGL to render particles (turns on --opengl) --opengl-renderer
Renderer Compiles the save renderer --renderer
Error on warnings Any compiler errors turn into warnings --wall
No warnings Ignore all compiler warnings --no-warnings
No FFT Do not use fftw3f for gravity. --nofft
No Lua Disables all Lua scripting features. --nolua
Executable name Create an executable with a different name --output MyMod.exe