-
Notifications
You must be signed in to change notification settings - Fork 0
/
Readme.win32
executable file
·98 lines (73 loc) · 3.39 KB
/
Readme.win32
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
Instructions for building windows version of ESDL.
Not for the faint of heart, there are binaries to download.
1. Intro
2. Needed tools
3. Configuring
4. Building
5. Testing
Intro
-----
The windows version of ESDL has until now been built using Micro$ofts
visual C++ tools. This is no longer the case and if you find any
Makefile.win32 files sloshing around they are most probably
obsolete. Esdl on windows in now built using a combination of cygwin
and MinGW, cygwin beeing the basic build environment, emulating a
unixish environment well enough for most purpouses. MinGW is the GCC
port for windows which produces native windows binaries etc. Maybe the
cygwin gcc could be used instead, but cygwin works fine and is free,
so why bother...
A special little configure script is used to setup the environment for
building the windows version. You need to run that to get the C-code
to compile. A little shell script to aid your making is also created
by the pseudo-configure. ESDL should have a real autoconf-configure of
course, but time is a limited resource...
For all tools, directories and paths the following hold:
The less spaces in pathnames, the better. If you have somthing
installed in i.e. "Program Files" set the path so that "Program Files"
is replaced by the short DOS-name (which for most installations is PROGRA~1).
Needed tools
------------
*) Cygwin, full installation with development tools etc.
http://www.cygwin.com
*) MinGW, you can use the self installing EXE package.
Add to your cygwin path properly.
http://www.mingw.org
*) SDL, You need the development libraries, either for VC++ or mingw,
it doesn't matter really, the configure script handles both.
Add the SDL libdir (where SDL.dll resides) to your PATH. SDL.dll is
needed in runtime as well as compile time.
http://www.libsdl.org
*) Erlang, currently 5.3 (R9C-0) or later is required. Note the thing
about PATH's and spaces above. Erlang does not add itself to your
path upon installation, add the appropriate path to your .bashrc.
http://www.erlang.org
All tools are available as binary releases for windows.
Configuring
-----------
In the same directory as this file resides, you should find a shell
script named Configure-cygwin-mingw.sh. Run it from within the cygwin
bash shell. cd to the directory where it resides before running.
If it fails, try to correct what seems to be wrong and run again. When
successful, you should have everything you need to compile.
Building
---------
Run the generated script mingw_build.sh which should reside in the
same directory as the configure script. Everything should build more
or less without warnings, the exception beeing some HTML generation
which warns about some C API Ref's. Ignore those warnings.
Testing
-------
Run some of the tests in the ./test directory like this (make sure
SDL.dll is in your path):
$ cd tests
$ erl -pa ../ebin
Eshell V5.3 (abort with ^G)
1> testgl:go().
etc. You should get a spinning cube by running testgl:go(), a spinning
erlang logo by running erldemo:go(). After each test you need to
restart erlang, exit with q(). and run erl -pa ../ebin again. Erlang
may crash if you press Ctrl-C to exit, it's not Erlangs fault. ESDL
is a linked in driver and SDL is also in Erlangs memory space, that
makes signal handling barf... Just ignore.
Happy hacking.
/Patrik