-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcompile.txt
executable file
·265 lines (182 loc) · 9.91 KB
/
compile.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
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
================================================================================
Compiling Instructions
================================================================================
Compiling Sil is not very difficult, and has been tested on Macintosh,
Windows and Linux.
If you do compile Sil with a method marked "(untested)" or on a new system,
then send an email to sil@amirrorclear.net and I will update this file with your
method.
The first step is the same on all systems, so do this and then look through
this file for advice on your specific system.
0. Install the Sil source code:
Unzip the file "Sil-src.zip". It will become a folder called "Sil"
which contains subfolders called "lib" and "src". Move it to wherever
you want to keep it. The src folder contains all the source code
while the lib folder contains other files that the game uses.
When you are done compiling, the game will be automatically installed
in the Sil folder as well.
==========================================================
Linux or Unix with gcc (tested with Sil)
==========================================================
There are several different unix setups for Sil:
X11: Allows multiple windows, has correct colours.
GCU: Works in a terminal using 'curses', has only 16 or 8 colours.
CAP: Works even in old terminals, but is monochrome.
1. Mess with the Makefile:
Edit Makefile.std in the src directory.
Look for the section listing multiple "Variations".
Choose the variation that you like best.
Remove the # comments from that section's code.
Comment out the default section.
2. Compile Sil:
Run "make -f Makefile.std install" in the src directory.
3. Run Sil:
Go back to the Sil folder and start Sil with "sil".
==========================================================
Mac OS X (tested with Sil)
==========================================================
1. Compile Sil:
Open a new window in Terminal.
Go to the src directory.
Run "make -f Makefile.crb install".
Sil should now be compiled and installed into the Sil folder.
(Alternatively you could try the Sil.xcodeproj file,
which may also work -- it is what the main developer uses)
2. Run Sil:
Go back to the Sil folder and double click on Sil.
==========================================================
Windows with Cygwin (tested with Sil)
==========================================================
1. Getting the free Cygwin compiler:
Download the free Cygwin compiler. It provides a shell interface very
similar to a normal Unix/Linux shell with many useful tools. Install it
and start the shell. (Note: for use in windows, the computer's
autoexec.bat file needs to be edited to include a path to the Cygwin
Folder. Also, the "make" portion of Cygwin is not in the default
download. You have to search it out and specify that the download
include "make".)
2. Compile Sil:
(Note: In windows open up a DOS window and go to the src directory)
Go to the src directory and run "make -f Makefile.cyg install".
Sil should now be compiled and installed into the Sil folder.
The executable file will be called Sil.exe.
3. Run Sil:
Go back to the Sil folder and run Sil.exe.
==========================================================
Windows with lcc-win32 (untested)
==========================================================
1. Getting the free lcc-win32 compiler:
Download the compiler from http://www.cs.virginia.edu/~lcc-win32/
and install it.
2. Create the LCC project:
Start lcc-win32. Select 'File/New/Project...' from the menu and enter
"Sil" as the project name. On the "Definition of a new project" set the
working directory to "C:...\Sil\src" (wherever you extracted the source
code to) and then select the "Windows executable" option. Press the 'Create'
button and answer the question about using the wizard to generate the
application skeleton with "no". We want to use the existing Sil source
code, so we don't need the skeleton code.
3. Adding the Sil source files to the project:
Add all files from birth.c to load.c to the project, then add the
"main-win.c" file with the "Add new file..." option and finally the files
from melee1.c to z-virt.c. Select "Add new file..." again, and this time
select the "Resources" filetype and select the "sil.rc" file.
4. Setting various project options:
Type "winmm.lib" in the 'Additional files to be included in the link' field.
In the 'Debuggersettings' you should change the start directory to
"C:...\Sil" (again use your own path to the Sil directory). The 'Executable
to start' should be "C:...\Sil\Sil.exe". The settings part is now finished.
When asked if you want to "Open ... files?" simply say no.
5. Compiling:
Select 'Compiler/Generate Makefile' from the menu and wait for it to finish.
Now select 'Compiler/Make' and Sil should be compiled.
6. Run Sil:
Go back to the Sil folder and run the Sil.exe.
*. Possible problems:
When you run Sil, it may abort while initializing its internal files.
This can happen if the line-endings on the text files in the lib folder are
wrong. By default, they are set to unix line-endings '\n', but may need to
be set to DOS line-endings '\r\n'. Either use a tool to do this (there are
many available) or download a precompiled Windows version and take the lib
folder from that. The affected files are .txt .hlp & .prf
==========================================================
Windows with lcc-win32 -- using command line (untested)
==========================================================
1. Get the free lcc-win32 compiler:
Download the compiler from http://www.cs.virginia.edu/~lcc-win32/
and install it.
2. Adjust the lcc-win32 makefile:
Go to the Sil src-directory and open "Makefile.lcc" with a
text editor. Change the values of 'SIL_PATH' and 'LCC_PATH'
to the path of your Sil and LCC directories and save the
Makefile.
3. Compile Sil:
Run "make -f makefile.lcc" in the Sil src folder. The game
should now be compiled and installed into the Sil folder.
4. Run Sil:
Go back to the Sil folder and run Sil.exe.
*. Possible problems:
When you run Sil, it may abort while initializing its internal files.
This can happen if the line-endings on the text files in the lib folder are
wrong. By default, they are set to unix line-endings '\n', but may need to
be set to DOS line-endings '\r\n'. Either use a tool to do this (there are
many available) or download a precompiled Windows version and take the lib
folder from that. The affected files are .txt .hlp & .prf
==========================================================
Windows with Borland C++ 5.5 commandline tools (untested)
==========================================================
1. Get the free commandline tools:
Download the Borland commandline tools from
http://www.borland.com/bcppbuilder/freecompiler/
and follow the installation instructions.
2. Compile Sil:
Open a commandline window and go to the src-directory.
Run "make -f makefile.bcc install".
Sil should now be compiled and installed into the Sil folder.
3. Run Sil:
Go back to the Sil folder and run the Sil.exe.
*. Possible problems:
Make exits with a "Command line too long" error message:
Try to add the -l option to the make command. The make util
should have the "use long command lines" option enabled by
default, but some people reported that this is not always
the case.
When you run Sil, it may abort while initializing its internal files.
This can happen if the line-endings on the text files in the lib folder are
wrong. By default, they are set to unix line-endings '\n', but may need to
be set to DOS line-endings '\r\n'. Either use a tool to do this (there are
many available) or download a precompiled Windows version and take the lib
folder from that. The affected files are .txt .hlp & .prf
==========================================================
DOS + DJGPP (untested)
==========================================================
1. Install DJGPP:
You can get the freely available DJGPP C Compiler from
http://www.delorie.com/djgpp/
On the DJGPP-page go to the Zip-Picker
http://www.delorie.com/djgpp/zip-picker.html
This page helps you decide which ZIP files you need to download
and will even try to find a ftp-site near you.
Get all files and follow the installation instructions.
2. Select the makefile:
Go to the src-directory and rename 'Makefile.dos' to 'Makefile'.
3. Compile Sil:
Run "make install". Sil should now be compiled and installed
into the Sil folder.
4. Run Sil:
Go back to the Sil folder and run Sil.exe.
*. Possible problems:
Make exits with a 'Fatal: Command arguments too long' error message:
Such problems are usually caused by using the make.exe of another
compiler (like Borland C++ or cygwin). DJGPP uses some clever tricks
to get around the limitations of the MS-DOS "126 characters are enough
for anybody" commandline that require a specific make tool. So make
sure that DJGPP's make.exe is the first (or only) make.exe in your
path. See also the DJGPP FAQ entries 16.4, 16.5, and 16.6 for further
details.
When you run Sil, it may abort while initializing its internal files.
This can happen if the line-endings on the text files in the lib folder are
wrong. By default, they are set to unix line-endings '\n', but may need to
be set to DOS line-endings '\r\n'. Either use a tool to do this (there are
many available) or download a precompiled Windows version and take the lib
folder from that. The affected files are .txt .hlp & .prf