-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.unix
139 lines (92 loc) · 3.41 KB
/
BUILD.unix
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
BUILDING WINGS 3D ON UNIX-LIKE SYSTEMS (including MacOS X)
==========================================================
This guide describes how you can build Wings on unix-like
systems, such as GNU Linux, FreeBSD, Solaris, and MacOS X.
$Revision: 1.5 $
$Date: 2005/04/08 06:02:54 $
Required software
=================
The following software is needed:
- Erlang/OTP R10B-4 or later. http://www.erlang.org
- SDL development library. http://www.libsdl.org.
(There are pre-built libraries for most platforms.)
- ESDL 0.94.1025 or later. http://esdl.sf.net
- A GNU compatible "make" program. Included with most unix-like
systems; otherwise get it from http://www.gnu.org.
- bunzip2 for unpacking the Wings source tar file.
Included with most unix-like systems; otherwise get it
from http://sources.redhat.com/bzip2.
- And, of course, the Wings source files. http://www.wings3d.com
Summary of build process
========================
The following is a quick summary of the build process.
* Download and install Erlang/OTP.
* Download and install SDL.
* Download and install ESDL.
* Download and upnpack the Wings source file.
* Run "make".
Installing Erlang/OTP
=====================
Building Erlang/OTP according to the instructions in the README file.
A few hints:
The Erlang/OTP source tar file must be unpacked using a
GNU compatible "tar" utility. On a MacOS X, you'll need
to use the "gnutar" command, NOT "tar" or the StuffIt extractor.
On Linux, make sure to use the "--enable-thread" option to
the "configure" script.
When you have built Erlang/OTP, modify the PATH environment variable
so that the "erl" and "erlc" programs can be started from a shell prompt.
Installing SDL
=============
Install SDL. Make sure that the library is found in the standard
library search path.
Installing ESDL
===============
Download ESDL and unpack it. Compile by running "make" from
the source directory.
Set the environment variable ESDL_PATH to point to top of the
compiled ESDL installation.
Unpacking the Wings source code
===============================
If you have the GNU tar program, use the "tar" program with
the "j" flag to tell it to decompress using the "bunzip2" program.
Example:
$ tar jxf wings-0.98.16b.tar.bz2
Otherwise, feed the output of "bzcat" to tar:
$ bzcat wings-0.98.16b-pre1.tar.bz2 | tar xf -
The build steps that follow assume that you are in the wings source
directory.
Example:
$ cd wings-0.98.16b.tar.bz2
Building Wings
==============
Build a Wings from the directory where the sources where unpacked.
Example:
$ pwd
/home/bjorng/wings-0.98.16b
$ make
.
.
.
<A lot of output follows>
.
.
.
$
To run the Wings you have just build, you'll need to write a command line
similar to this:
erl -pa $ESDL_PATH/ebin -pa <MY_WINGS_PATH>/ebin -run wings_start start_halt
where you should substitute <MY_WINGS_PATH> with the path to the Wings
source directory.
Example:
$ werl -pa $ESDL_PATH/ebin -pa /home/bjorng/wings-0.98.16b/ebin -run wings_start start_halt
$
Instead of writing the command line every time you want to start Wings,
you can package it in a script like this:
#!/bin/sh
exec erl -pa $ESDL_PATH/ebin -pa /home/bjorng/wings-0.98.16b/ebin -run wings_start start_halt ${1+"$@"}
Notes:
[1] "exec" kills the shell process running the script, saving a
tiny amount of system memory.
[2] The "${1+"$@"}" thing passes along any arguments (or none) to Wings,
allowing Wings to open up a wings file when it starts.