forked from The-Powder-Toy/The-Powder-Toy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
87 lines (64 loc) · 2.74 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
cmake is used as the build system. Note that after creating or
deleting source files, you will need to re-run cmake to update the list of
files to compile.
*** Building ***
To compile on Linux:
mkdir -p build
cd build
cmake ..
make
Executable name is powder
To cross compile for Windows using MinGW on Linux:
mkdir -p build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-cross-mingw-linux.cmake
make
Executable name is powder.exe
If compiling on Windows using MinGW or MSYS, you may need to change
the cmake generator type. Run cmake --help for a list of available
generator types
For example:
cmake .. -G "MSYS Makefiles"
So far, compiling with cmake has only been tested on Linux (both
native compiling and cross compiling for Windows), and MinGW+MSYS
running in Wine.
*** Build options ***
To turn debug symbols on or off, set CMAKE_BUILD_TYPE:
cmake .. -DCMAKE_BUILD_TYPE=DEBUG
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
Available options include:
CMake option name Default
-----------------------------------------
GravityFFT ON
LuaConsole ON
PreferStatic OFF
NoWarnings OFF
Optimisations ON
CheckPartsAlloc OFF
CheckBounds OFF
Tests maybe (tri-state)
simdpp maybe (tri-state)
TargetArch native
To change an option, add -DOptionName=value to the end of the cmake
command. For example, disable optimisations by adding
-DOptimisations=OFF
To see help for each option, and the current option values, run cmake -LH
The "maybe" value for Tests means "only if the relevant library is already
installed".
GravityFFT and LuaConsole are optional, and Powder Toy will function
fine if they are disabled. However, enabling them is recommended, since
GravityFFT allows part of the game (the Newtonian gravity
calculations) to run a lot faster, and LuaConsole adds useful extra
functionality.
GravityFFT requires the single precision version of the FFTW3 library
(fftw3f), and LuaConsole requires Lua 5.1.
libsimdpp can optionally be used to make some functions faster, by using SIMD
instructions.
If you get error messages mentioning "-march=native", try setting TargetArch
to "none". If compiling binaries to distribute to other people, you should
set TargetArch to something else, such as x86 or x86-legacy, to ensure that
they work on a wide variety of computers instead of just yours.
Most libraries are linked statically where available, to avoid having
to mess around with DLLs for Windows, and to try to avoid issues due to
differences in libbz2 naming conventions between Linux distros. Change
this with -DPreferStatic=OFF