-
Notifications
You must be signed in to change notification settings - Fork 27
/
INSTALL
247 lines (185 loc) · 9.64 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
COMPILING YATC
==============
Copyright (C) 2007-2010 OpenTibia Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0. GIT MIGRATION
1. Requirements
2. Building on Linux/Unix
3. Building on Windows
4. Devpaks and Debian packages
5. Building without OpenGL support
6. libGLICTd.a versus libGLICT.a
0. GIT MIGRATION
================
Note that YATC and GLICT have moved to Git. Some other dependencies
may have moved around; it's been many years since this document was
written.
- YATC can be found at https://github.com/opentibia/yatc/
- GLICT can be found at https://github.com/ivucica/glict/
- As a convenience, some of the dependencies for Windows have been
archived in the lib branch - https://github.com/opentibia/yatc/tree/lib
The text below has *not* been updated to reflect this and other
possible changes. Caveat.
1. Requirements
===============
- SDL 1.2 http://www.libsdl.org/
- GMP 4.2 http://gmplib.org/
- GLICT https://glict.svn.sf.net/svnroot/glict/ (svn)
- SDL_gfx for SDL1.2
- OpenGL and GLU
- autoconf 2.61
- automake 1.10
Please understand that while we have produced builds that run on
MacOS X platform, we are currently unable to provide systematic
instructions. Partial instructions below.
2. Building on Linux/Unix
=========================
0. First follow section 4.2, to make sure you installed all required packages.
Also follow section 2.1, to make sure you installed GLICT.
1. Make directory for yatc. For example "mkdir ~/yatc"
2. Go to the new directory. For example "cd ~/yatc"
3. Run "svn co https://opentibia.svn.sourceforge.net/svnroot/opentibia/yatc/trunk ."
4. Run "./autogen.sh".
5. Run "./configure"
6. Run "make"
7. Run "./yatc" to start the client.
== 2.1. Compiling and installing GLICT ==
GLICT started using autotools recently.
1. Make directory for glict. For example "mkdir ~/glict"
2. Go to the new directory. For example "cd ~/glict"
3. Run "svn co https://glict.svn.sf.net/svnroot/glict/trunk/glict/ ."
4. Run "./autogen.sh"
5. Run "./configure"
6. Run "make"
7. Run "sudo make install"
3. Building on Windows with Code::Blocks
===================================
You are expected to have Code::Blocks installed. Instructions are based around Windows XP environment, but you can easily adapt them to other OSes, if you turn on your brain.
When instructed to fetch code from SVN repository, and you don't have a SVN client, you can use the WebDAV client built into the XP. Instructions are in chapter 3.3.
If you have any problems please try to fix them yourself, and then contact Khaos via OTfans PM. If you really cannot find a solution, try contacting Khaos anyway. If you report the problem we can fix these instructions together -- if not, someone else will have the same problem!
We assume you have MinGW installed in C:\MinGW. By default Code::Blocks installs it into C:\Program Files\CodeBlocks\mingw or similar. Adjust the paths accordingly.
PLEASE NOTE.
These instructions were not tested. Only reason they're here is to replace outdated Dev-Cpp instructions. Building with Dev-Cpp is not supported by the team for about two years now (at the time of writing).
== 3.1. Compiling GLICT ==
1. Fetch the GLICT code from the SVN.
(https://glict.svn.sf.net/svnroot/glict/trunk/glict/)
2. Copy the entire "GLICT/" subfolder to C:\MinGW\include
(you should now have files such as:
C:\MinGW\include\GLICT\button.h
C:\MinGW\include\GLICT\container.h, ...)
3. Open GLICT.cbp and click Execute->Compile
4. Go to the root GLICT folder.
5. Find "libGLICT.a".
6. Copy it to "C:\MinGW\lib\libGLICT.a"
Alternatively, skip compling GLICT and fetch a nighly binary from:
http://ivan.vucica.net/nightly/
== 3.2. Compiling YATC ==
1) First, you'll need devpaks mentioned below. Fetch them and install them.
Hint: they are ordinary .tar.bz2 archives. You can easily rename them and unpack them into C:\MinGW with your favorite archiver. Alternatively use packman.exe from Dev-Cpp to install them (just copy it into C:\MinGW and open each devpak with it).
2) Fetch YATC SVN.
3) Open the yatc.cbp project file.
4) Press F9 to compile.
5) Copy C:\MinGW\bin\SDL.dll, C:\MinGW\bin\SDL_gfx.dll and other stuff you need into YATC's folder.
You should have YATC.exe built in the directory where YATC.dev was, and it should run correctly. Don't forget to copy Tibia.pic, Tibia.dat and Tibia.spr to YATC's folder!
== 3.3. Fetching SVN using XP's WebDAV client ==
Here are instructions on how to do fetch a Subversion repository without a Subversion client under XP, using the WebDAV client.
1. Go to My Network Places.
2. Click on Add a network place.
3. Select "Choose another network location".
4. Under "Internet or network address", enter SVN repository's URL. You'll get a warning about security certificate being invalid; just ignore it.
5. If you want, change the name of the shortcut that'll be created in My Network Places.
6. Then make sure that "Open this network place when I click finish" is checked.
7. Click Finish.
The repository's contents will open as a more-or-less regular folder.
8. Copy the files you need out of it into a new folder.
Then, proceed with instructions!
4. Devpaks and Debian packages
==============================
Here we include links to required Devpaks and Debian packages.
GLICT is not officially available as Devpak nor as Debian package, but
compile instructions are included above.
== 4.1. Devpaks
SDL: http://devpaks.org/details.php?devpak=200
SDL_gfx: http://old.devpaks.org/show.php?devpak=160
GMP: http://pekayz.googlepages.com/GMP.DevPak
GLICT: http://ivan.vucica.net/nightly/
== 4.2. Debian/Ubuntu packages
Just copypaste this to root commandline (type su and type root password, then
punch these lines in):
apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libgmp3-dev autoconf automake \
libgl1-mesa-dev libglu1-mesa-dev
5. Building without OpenGL support
==================================
If you are building for a platform that does not support OpenGL such as
Windows CE, you may want to use option --disable-opengl when running configure:
$ ./configure --disable-opengl
Configure script should detect GL's nonexistance automatically, but if it
does not, that's the way to do it.
Do not forget, your GLICT must also be compiled without OpenGL support; to do
that, define NO_GL macro. In the Makefile, find the line that begins with
CPPFLAGS= and in it, on the end, add -DNO_GL:
CPPFLAGS=[... stuff...] -DNO_GL
You probably had to do this anyway if you were working with WinCE or similar
platform, but it's sure worth mentioning in case you're, for a sick and twisted
reason to complicate yourself the building process, trying to compile it for
a platform that does have GL, you must not forget this since otherwise it'll
break badly and you'll be extremely unhappy.
6. libGLICTd.a versus libGLICT.a
================================
libGLICTd.a is regular GLICT, but compiled with these extra #defines:
_GLIBCXX_DEBUG
_GLIBCXX_DEBUG_PEDANTIC
These defines make program execute slower, but it's easier to debug C++ code.
To build Debug Unix build in Code::Blocks without libGLICTd.a, remove the
mentioned two defines in Project Options, and in the same place change all
references to GLICTd into GLICT. It should compile properly then even if you
don't create a libGLICTd.a.
(This is necessary because these two, although built from same code with
same compiler, are NOT binary compatible since those modifiers change behaviour
of G++'s implementation of STL.)
7. Mac notes
============
As of El Capitan, approximately:
- get SDL with Friends from http://thirdcog.eu/apps/frameworks,
place them all into ~/Library/Frameworks
- install X11, so you get the X11 headers in /opt/X11/include
(SDL seems to depend on that)
- replace SDL from SDL with Friends with SDL 1.2.15 or newer,
binaries at https://www.libsdl.org/download-1.2.php
- build GLICT (there’s an xcode project provided),
place GLICT.framework to ~/Library/Frameworks
- place Tibia.{spr,dat,pic} into YATC’s SRCROOT.
- open YATC’s .xcodeproj, build and enjoy
8. Bazel notes
==============
You will need to install `bazel-3.3.1` package. As of 2023, this is done as
follows on Debian:
sudo apt install apt-transport-https curl gnupg -y
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
You will have to grab submodules defined in this repo using:
git submodule init && git submodule update
Some libraries are grabbed from the system -- particularly so SDL 1.2 can be
built (rules being defined in one of the submodules initialized above):
* `libx11-dev`
* `libxext-dev`
* `libxrandr-dev`
* `libxrender-dev`
Besides X11, other dependencies include:
* `libgl-dev`
* `libglu-dev`
* `libasound-dev`
* `libalsaplayer-dev`
Please check vendor/github.com/ivucica/rules_libsdl12/README.md for more
detailed information.