-
Notifications
You must be signed in to change notification settings - Fork 91
/
BUILD.win32
178 lines (119 loc) · 4.27 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
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 or git
- WSL for make and bash scripts
- Erlang/Otp 26.0 or later. http://www.erlang.org
Include the vcredist packaged with Erlang, in your installation.
(It is easiest to download the pre-built binaries for Windows.)
Optional software
=================
- NSIS 2.02 or higher, an installer/uninstaller maker.
http://nsis.sf.net.
- git (to fetch sources from github)
- cl-1.2.3 or later. http://github.com/tonyrog/cl
- rebar3 script see https://github.com/erlang/rebar3
To build opencl package above
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".
Modify the PATH environment variable so that the following programs
are runnable from an (bash) shell.
erl.exe escript.exe erlc.exe (Erlang/OTP)
MSYS:
gcc (MinGW)
export GCC=x86_64-w64-mingw32-gcc (for 64bits build)
WSL: (Linux in Windows 10)
Currently requires Microsoft Compiler installed,
Setup the MSVC environment with:
eval `cmd.exe /C "C:/Path/to/Wings/win32/SetupWSLcross.bat" x64`
Also if you want OpenCL built and build the installer you will need a
linux erlang installed in wsl, so that 'rebar3' and 'escript' works.
To build a distribution you need:
WINGS_VCREDIST needs to be set to point at vcredist.exe in your Erlang
installation. (c:\erl5.8.1.1\vcredist_x86.exe)
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
/usr/bin/make
$
Fetching/Unpacking the Wings source code
===============================
$ git clone https://github.com/dgud/wings.git
$ cd wings
Or decompress the src:
$ tar jxf wings-1.3.1.tar.bz2
$ cd wings-1.3.1
The build steps that follow assume that you are in the wings source
directory.
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
c:/wings-1.3.1
$ make
.
<A lot of output follows>
.
$
OpenCL is fetched (via git) and built automagically if it is not available in
$ERL_LIBS (example export ERL_LIBS=/Users/bjorng/src)
A built CL is not required to use wings, but recommended,
some functionality will not be available without CL,
but the build will not fail if building cl fails.
Read cl/README for information of requirements, mainly
OpenCL headers in the right place and rebar3 in the PATH
Running Wings
============
To run the Wings you have just build, you'll need to write a command line
similar to this:
werl.exe -pa ../wings/ebin -run wings_start start_halt
where you should substitute <MY_APP_DATA_DIRECTORY> with the path to the
local settings folder.
Or add the source directory to ERL_LIBS environment variable.
Example:
$ erl.exe -pa /Users/username/src/wings/ebin -run wings_start start_halt
$
An Erlang console should appear, followed by the Wings window.
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.exe -pa /Users/username/src/wings/ebin -smp -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.
You could also package the command line into a standard windows shortcut.
Building all
============
Make sure that your current directory is the directory in which the
sources were unpacked.
Example:
$ pwd
c:/wings-1.3.1
$
To build all (including the installer), run the following command:
this requires a working OpenCL setup
$ make win32
.
<A lot of output follows>
.
$
When everything is done, there should be a file named like
wings-1.3.1.exe
in the current directory.
------------