Fetching contributors…
Cannot retrieve contributors at this time
202 lines (134 sloc) 4.74 KB
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.
- MinGW,, including MSYS,,
to compile the source code.
- Erlang/Opt R14B01 or later.
Include the vcredist packaged with Erlang, in your installation.
(It is easiest to download the pre-built binaries for Windows.)
- ESDL 1.0.1 or later.
It is easiest to download the pre-built binary.
Optional software
- libjpeg for build the jpeg plug-in.
- res2coff. Can be found in the mingw-utils package
- NSIS 2.02 or higher, an installer/uninstaller maker.
Installing the software
In general, you should follow the instructions for each package.
Setting up the environment
A few environment variables need to be set. They can be set
for Windows globally from "My Computer".
ESDL_PATH needs to be set to the path of the directory where you installed ESDL.
WINGS_VCREDIST needs to be set to point at vcredist.exe in your Erlang
installation. (c:\erl5.8.1.1\vcredist_x86.exe)
Modify the PATH environment variable so that the following programs
are runnable from an Msys (bash) shell.
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 shell like this:
$ which make
Unpacking the Wings source code
Give the "j" flag to the "tar" program to tell it to decompress using
the "bunzip2" program.
$ tar jxf wings-1.3.1.tar.bz2
The build steps that follow assume that you are in the wings source
$ cd wings-1.3.1.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.
$ pwd
$ 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 -extra <MY_APP_DATA_DIRECTORY>
where you should substitute <MY_WINGS_PATH> with the path to the Wings
source directory and <MY_APP_DATA_DIRECTORY> with the path to the
local settings folder.
$ werl -smp disable -pa $ESDL_PATH/ebin -pa c:/cygwin/home/bjorng/wings-1.0/ebin -run wings_start start_halt -extra "c:/Documents and Settings/bjorng/Application Data"
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:
exec werl -smp disable -pa $ESDL_PATH/ebin -pa c:/cygwin/home/bjorng/wings-1.0/ebin -run wings_start start_halt ${1+"$@"}
[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
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.
$ pwd
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
in the current directory.
msysgit,, is needed if you want the proper
version number to be output with your build. Wings uses Git for version
control, and <git describe> is used to generate the version number.
Git is also good if you want to contribute code ;)