forked from bookshelfdave/wings
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.win32
202 lines (136 loc) · 4.68 KB
/
BUILD.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
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
BUILDING WINGS 3D ON WINDOWS
============================
This guide describes how you can build Wings 3D from the
sources on a Windows system.
Required software
=================
Wings can be built on Windows using only free/open-source software.
The following software is needed:
- The Wings source. http://www.wings3d.com
- Cygwin, a unix-like environment for Windows. http://www.cygwin.com
(Alternatively, it should now be possible to use MSYS,
http://www.mingw.org/wiki/msys, for development work, but we have
not tested to package an release using MSYS.)
- Erlang/OTP R13B02 or later. http://www.erlang.org
(It is easiest to download the pre-built binaries for Windows.)
- ESDL 1.0.1 or later. http://esdl.sf.net
It is easiest to download the pre-built binary.
- MinGW, a C compiler and libraries for building native Windows applications.
http://www.mingw.org
Optional software
=================
- libjpeg for build the jpeg plug-in.
http://www.ijg.org
- To build the fbx plugin, you'll need the fbx library.
http://www.autodesk.com/fbx
- res2coff. Can be found in the mingw-utils package
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=61599
- NSIS 2.02 or higher, an installer/uninstaller maker.
http://nsis.sf.net.
Installing the software
=======================
In general, you should follow the instructions for each package.
Installing Cygwin
-----------------
Make sure that you install the GNU Make program. It will be needed
later in the build process.
Setting up the environment
==========================
A few environment variables need to be set. They can be set
for Windows globally from "My Computer", or only in the Cygwin shell
by adding them to ".profile".
ESDL_PATH need to be set to path of the directory you installed ESDL in.
Modify the PATH environment variable so that the following programs
are runnable from a Cygwin (bash) shell.
make (Cygwin, if you installed Make)
erlc.exe (Erlang/OTP)
mingw32-gcc (MinGW)
makensis.exe (NSIS)
An easy way to check that the programs are runnable is to use the
"which" command in a cygwin shell like this:
$ which make
/usr/bin/make
$
Unpacking the Wings source code
===============================
Give the "j" flag to the "tar" program to tell it to decompress using
the "bunzip2" program.
Example:
$ tar jxf wings-1.0.tar.bz2
The build steps that follow assume that you are in the wings source
directory.
Example:
$ cd wings-1.0.tar.bz2
Basic build
===========
To build a minimal Wings that can be used for development purposes,
all you need is to run make from inside the directory where the
sources where unpacked.
Example:
$ pwd
/home/bjorng/wings-1.0
$ make
.
.
.
<A lot of output follows>
.
.
.
$
Running Wings
============
To run the Wings you have just build, you'll need to write a command line
similar to this:
werl -smp disable -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 -smp disable -pa $ESDL_PATH/ebin -pa c:/cygwin/home/bjorng/wings-1.0/ebin -run wings_start start_halt
$
An Erlang console should appear, followed by the Wings window.
It should work OK except that there will be no file dialog boxes
if you try File|Open or File|Save. (See the next section on how
to remedy that.)
Instead of writing the command line every time you want to start Wings,
you can package it in a script like this:
#!/bin/bash
exec werl -smp disable -pa $ESDL_PATH/ebin -pa c:/cygwin/home/bjorng/wings-1.0/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.
[3] The "-smp disable" flag is necessary in R12B if you have a multi-core/
multi-CPU computer. Wings will only work with the single-thread Erlang
emulator.
You could also package the command line into a standard windows shortcut.
Building the file dialog plug-in
================================
To get native Windows file dialog boxes, you'll need to compile
the file dialog plug-in the "plugins_src/win32_file" directory.
$ cd plugins_src/win32_file
$ make
<Some output>
$
Building all
============
Make sure that your current directory is the directory in which the
sources were unpacked.
Example:
$ pwd
/home/bjorng/wings_releases/wings-1.0
$
To build all (including the installer), run the following command:
$ make win32
.
.
.
<A lot of output follows>
.
.
.
$
When everything is done, there should be a file named like
wings-1.0.exe
in the current directory.