forked from OctaForge/OF-Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
133 lines (89 loc) · 4.39 KB
/
INSTALL.txt
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Compiling OctaForge
********************
Officially supported platforms for OctaForge (those which include/will include
binaries) are currently Linux, FreeBSD, Windows and Mac OS X.
It should work without problems also on Solaris and other UNIX-like or UNIX
systems.
For different platforms, compilation instructions might differ a bit, so
separate OSes will be explained separately.
For all OSes
============
1. In all cases, you need to get source code.
You can use either release tarball or Git source versioning system to get
source code.
(Git will get you most recent source)
To get source from Git, use:
.. code-block :: bash
$ git clone git://github.com/OctaForge/OF-Engine.git
It assumes you have Git installed. (http://git-scm.com).
If you're using Windows, you can use TortoiseGit GUI or any other GUI client
to make download easier. On Mac, you can get packages for example here
http://code.google.com/p/git-osx-installer/
Linux, BSD, Solaris and other UNIX-like or UNIX systems (excluding Darwin)
==========================================================================
On these OSes compilation should be really trivial.
Instructions assume Linux with deb packaging system,
with little modifications it should work everywhere.
1. Open terminal window and get some dependencies to build.
1. build-essential - on Debian, metapackage installing GNU compiler set and
a few other things. Basically basic things you need to build sources.
2. SDL2 dev package, SDL2_image dev package, SDL2_mixer dev package
3. Zlib dev libraries and headers
4. LuaJIT 2.0 or higher
If you have a custom build of LuaJIT (static), you can put the lib as
libluajit.a into src/platform_{linux,freebsd,osx,solaris}/lib and the
header files into src/platform_*/include and then set LUAJIT_LOCAL in
the feature section of the Makefile to 1 or pass it to make.
2. Open a terminal, build OF:
.. code-block :: bash
$ cd $HOME/OctaForge_source/src
$ make install
If you have a multicore processor, you can use -jNUMCORES+1 as make argument.
On some systems (like FreeBSD), you'll have to use "gmake" instead of "make".
Add VERBOSE=1 at the end of the make command for verbose builds.
3. You're done, you should have binaries in OFROOT/bin_unix.
Windows
=======
On Windows, fetch the repository https://github.com/OctaForge/OF-Windows and
place the platform_windows directory into src and contents of bin_win32/64
to bin_win32/64.
Then just proceed with the compilation.
OF supports both Win32 and Win64 binaries. The variant is deduced from the
target compiler.
So the steps are:
1. Install latest MinGW distribution whichever way you want. You need just the
core (C/C++ support). You can install it wherever you want, but make sure to
change steps of this guide accordingly after that. Note that you need
MinGW64 to build 64bit binaries.
2. Append this into your PATH environment variable. (modify path if needed)
.. code-block :: bash
;C:\mingw\bin
3. Open a cmd, go to OFROOT\src, type
.. code-block :: bash
$ mingw32-make install
If you have a multicore processor, you can use -jNUMCORES+1 as make argument.
Add VERBOSE=1 at the end of the make command for verbose builds.
Mac OS X (Darwin)
=================
1. You'll need to get some dependencies, first. (I assume you've got OF
repository already downloaded)
1. XCode SDK installed (from Mac OS X DVD or XCode developer DVD).
2. The needed SDL2 frameworks - put them in src/platform_osx/Frameworks
http://github.com/OctaForge/OF-mac
3. LuaJIT 2.0 or higher
2. Go to OF's src directory in the terminal and do
.. code-block :: bash
$ make install
If you have a multicore processor, you can use -jNUMCORES+1 as make
argument. Add VERBOSE=1 at the end of the make command for verbose builds.
After everything goes OK, you should have binaries and you can launch.
CMake
=====
Alternatively, OF can be built using CMake. This is still largely experimental,
but it should cover all platforms and more compilers (such as MS Visual C++).
Options typically enabled via command line switches are available as CMake
options. The installation target works as usual.
Additional notes
================
Both CMake and Make based builds support amalgamated mode (instead of compiling
each file separately, they're all concatenated together and compiled at once).