forked from Attnam/ivan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
180 lines (112 loc) · 5.57 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
Compiling IVAN under different systems
--------------------------------------
To build IVAN from source, you need to have the following dependencies
installed on your system:
- compiler with C++11 support (e.g. Clang 3.3 or newer, GCC 4.8 or newer)
- CMake (https://cmake.org) version 2.8.12.2 or newer
- SDL (https://www.libsdl.org) version 1.2 or newer, at least 2.0 recommended
- libpng (http://www.libpng.org/pub/png/libpng.html)
- pcre, not pcre2 (ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/)
--------------------------------------
Under Linux and OS X, type:
cmake .
make -j
make install
Note: Wizard Mode is disabled by default. To enable it run:
cmake -D CMAKE_CXX_FLAGS="-DWIZARD" .
make -j
make install
To install IVAN to a custom prefix, pass the additional flag
-DCMAKE_INSTALL_PREFIX=/your/prefix/path to the cmake invocation.
(In particular, simply doing `make DESTDIR=/your/prefix/path install`
doesn't work because IVAN needs the prefix information at build-time.)
If config options toggle is too fast, you can add this flag '-DFELIST_WAITKEYUP',
like this: CMAKE_CXX_FLAGS="-DFELIST_WAITKEYUP -DWIZARD" (you may chose what
flags to add independently of each other).
--------------------------------------
Under DOS:
If you have DJGPP 2.03+ and gcc 2.952+
installed, type:
make -f ivandj.mak
--------------------------------------
Under Windows - Visual Studio:
Install SDL2
Download SDL2-devel-2.0.4-VC.zip from http://www.libsdl.org/
and install somewhere in system, e.g. D:\Apps\SDL2-2.0.4
Set system environment variable SDL2DIR to "D:\Apps\SDL2-2.0.4".
Make sure to open command prompt after that (so this variable is taken into account).
Alternatively set it just in current command prompt:
D:\buildy\ivan>set SDL2DIR=D:\Apps\SDL2-2.0.4
Compile IVAN
Either use cmake-gui if system environment variable was set, or:
D:\buildy\ivan>mkdir vs2015
D:\buildy\ivan>cd vs2015
D:\buildy\ivan\vs2015>cmake -G "Visual Studio 14 2015" .. -DCMAKE_INSTALL_PREFIX=D:/buildy/ivan/inst_vs2015
Now open and compile D:\buildy\ivan\vs2015\ivan.sln in VS2015 IDE.
Now you can run ivan from D:/buildy/ivan/inst_vs2015/ivan/ directory.
--------------------------------------
Under Windows - MinGW:
Install SDL2
Download SDL2-devel-2.0.4-mingw.tar.gz from http://www.libsdl.org/
and install somewhere in system, e.g. D:\Apps\SDL2-devel-2.0.4-mingw
Set environment variable SDL2DIR to "D:\Apps\SDL2-devel-2.0.4-mingw\SDL2-2.0.4\i686-w64-mingw32\".
Make sure to open command prompt after that (so this variable is taken into account).
Alternatively set it just in current command prompt:
set SDL2DIR=D:\Apps\SDL2-devel-2.0.4-mingw\SDL2-2.0.4\i686-w64-mingw32\
Use command line to generate MinGW makefiles in IVAN source directory:
D:\buildy\ivan>mkdir mingw
D:\buildy\ivan>cd mingw
D:\buildy\ivan\mingw2>cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:/buildy/ivan/inst_mingw
Now you can compile from command line:
D:\buildy\ivan\mingw2>mingw32-make -j4 install
If you get a lot of weird compilation errors, try invoking cmake again with
-DCMAKE_CXX_FLAGS='-std=gnu++11' as a workaround.
Now you can run ivan from D:/buildy/ivan/inst_mingw/ivan/ directory.
--------------------------------------
Under Windows - MSYS2:
Download MSYS2 from http://www.msys2.org/ selecting the right download for your architecture.
Follow instructions on the page to install correctly.
Run MSYS2.exe from either the "-msys64" or "-msys32" folder, depending on your system, and type these commands
$ pacman -Syu
Proceed with installation (option Y), then exit by closing the terminal window. The terminal window will crash and burn eventually but may take some time to do so.
Run MSYS2.exe again:
$ pacman -Su
proceed with installation (option Y). This will take a long time to download all the packages, depending on your download speed
$ pacman -S git
Proceed with installation (option Y) etcetera
$ pacman -S mingw-w64-i686-gcc
$ pacman -S make
$ pacman -S mingw-w64-i686-cmake
$ pacman -S mingw-w64-i686-libpng
$ pacman -S mingw-w64-i686-SDL2
$ pacman -S mingw-w64-i686-SDL2_mixer
$ pacman -S mingw-w64-i686-pkg-config
Now the MSYS2 build system is installed, you only need to follow the instructions below to keep IVAN up to date
Create an empty folder in \ivan\ called msys2
run MinGW32.exe (from your "-msys64" or "-msys32" folder, whichever is applicable) and change directory to your newly created \ivan\msys2\ folder
In MinGW32.exe type the following commands, respecting the direction of the slashes:
$ cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ivan/inst_msys2
$ make -j4 install
Navigate to \ivan\inst_msys2\ivan and you will find the ivan.exe executable!
You will probably need to copy a bunch of DLLs into the directory where ivan.exe is located. These may include the following, likely not an exhaustive list, but they can be found under for example C:\-msys64\mingw32\bin:
libpng16-16.dll
libstdc++-6.dll
libwinpthread-1.dll
zlib.dll
libgcc_s_dw2-1.dll
libSDL2_mixer-2-0-0.dll
libmad-0.dll
Use dependencywalker if you need to check for missing libraries, and if you get the message: "error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)" then you need to include zlib1.dll
--------------------------------------
To build standalone application on MacOS:
Using Homebrew: https://brew.sh/
$ export SDL2DIR="$HOME/Downloads/SDL2Frameworks"
$ export BUILD_MAC_APP=ON
$ export IVAN_BUILD_DIR="$PWD/build"
$ mkdir build && cd build
$ ../ci/osx/requirements.sh
$ ../ci/osx/build.sh
$ make install
$ ../ci/osx/package.sh
$ ls ./osx
The user data will be stored at "$HOME/Library/Application Support/IVAN".