Skip to content

Commit

Permalink
NOTE: The Windows make_installer has been changed to use the vcredist
Browse files Browse the repository at this point in the history
included with Erlang and to work solely with Msys. [optigon]
  • Loading branch information
Richard Jones committed Oct 12, 2010
1 parent 523822b commit e813d88
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 38 deletions.
58 changes: 28 additions & 30 deletions BUILD.win32
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@ 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.)
- MinGW, http://www.mingw.org, including MSYS, http://www.mingw.org/wiki/msys,
to compile the source code.

- Erlang/OTP R13B02 or later. http://www.erlang.org
- Erlang/Opt R14B (erts-5.8.1.1) 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.)

- 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
Expand All @@ -34,9 +31,6 @@ 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

Expand All @@ -48,34 +42,29 @@ 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".
for Windows globally from "My Computer".

ESDL_PATH need to be set to path of the directory you installed ESDL in.
ESDL_PATH needs to be set to the path of the directory where you installed ESDL.

Modify the PATH environment variable so that the following programs
are runnable from a Cygwin (bash) shell.
WINGS_VCREDIST needs to be set to point at vcredist.exe in your Erlang
installation. (c:\erl5.8.1.1\vcredist_x86.exe)

make (Cygwin, if you installed Make)
Modify the PATH environment variable so that the following programs
are runnable from an Msys (bash) shell.

erlc.exe (Erlang/OTP)
erlc.exe (Erlang/OTP)

mingw32-gcc (MinGW)
mingw32-gcc (MinGW)

makensis.exe (NSIS)
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" command in a shell like this:

$ which make
/usr/bin/make
Expand All @@ -89,14 +78,14 @@ the "bunzip2" program.

Example:

$ tar jxf wings-1.0.tar.bz2
$ tar jxf wings-1.3.1.tar.bz2

The build steps that follow assume that you are in the wings source
directory.

Example:

$ cd wings-1.0.tar.bz2
$ cd wings-1.3.1.tar.bz2

Basic build
===========
Expand All @@ -108,7 +97,7 @@ sources where unpacked.
Example:

$ pwd
/home/bjorng/wings-1.0
c:/wings-1.3.1
$ make
.
.
Expand Down Expand Up @@ -181,7 +170,7 @@ sources were unpacked.
Example:

$ pwd
/home/bjorng/wings_releases/wings-1.0
c:/wings-1.3.1
$

To build all (including the installer), run the following command:
Expand All @@ -198,6 +187,15 @@ $

When everything is done, there should be a file named like

wings-1.0.exe
wings-1.3.1.exe

in the current directory.

------------

NOTE:
msysgit, http://code.google.com/p/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 ;)
16 changes: 8 additions & 8 deletions win32/make_installer
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
# of the VC80.CRT. It must be updated if future release of Erlang
# requires a later version.
#
WINGS_VCREDIST_VERSION=8.0.50727.762
WINGS_VCREDIST_VERSION=2.0.50727.4053

OS=`uname -o`
if [ X$OS != XCygwin ]; then
if [ X$OS != XMsys ]; then
echo "This script is supposed to be run in the" \
"cygwin environment on windows only." >&2
"msys environment on windows only." >&2
exit 1
fi

# Configurable stuff.
TEMPDIR=$TMP
INSTALL=/usr/bin/install
NSIS=`which makensis 2>/dev/null`
if [ -z "$NSIS" ]; then
Expand Down Expand Up @@ -75,7 +76,7 @@ $INSTALL -c -m 644 shaders/* "$dest/shaders"
$INSTALL -d "$dest/plugins/default" "$dest/plugins/accel" \
"$dest/plugins/import_export" "$dest/plugins/commands" \
"$dest/plugins/primitives" "$dest/plugins/win32_file" \
"$dest/plugins/autouv" "$dest/plugins/jpeg" "$dest/plugins/fbx"
"$dest/plugins/autouv" "$dest/plugins/jpeg"

$INSTALL -c -m 644 fonts/* "$dest/fonts"

Expand All @@ -87,7 +88,6 @@ $INSTALL -c -m 644 plugins/primitives/* "$dest/plugins/primitives"
$INSTALL -c -m 644 plugins/win32_file/* "$dest/plugins/win32_file"
$INSTALL -c -m 644 plugins/autouv/* "$dest/plugins/autouv"
$INSTALL -c -m 644 plugins/jpeg/* "$dest/plugins/jpeg"
$INSTALL -c -m 644 plugins/fbx/* "$dest/plugins/fbx"

# Copy the relevant parts of Erlang/OTP.

Expand Down Expand Up @@ -129,12 +129,12 @@ $WINGS_DIR/tools/wings_reduce_otp "$DEST_ROOT"

# Strip debug information from all beam files.
cd "$latest_wings"
erlc -o`cygpath -m /tmp` tools/strip.erl
erlc -o "$TEMPDIR" tools/strip.erl
cd "$DEST_ROOT"
erl -noshell -pa `cygpath -m /tmp` -run strip strip
erl -noshell -pa $TEMPDIR -run strip strip

# Run NSIS
"$NSIS" /DWINGS_VERSION=$WINGS_VSN /DREDIST_DLL_VERSION=$WINGS_VCREDIST_VERSION wings.nsi
"$NSIS" //DREDIST_DLL_VERSION=$WINGS_VCREDIST_VERSION //DWINGS_VERSION=$WINGS_VSN wings.nsi

cd "$WINGS_DIR"
cp wings*.exe ..

0 comments on commit e813d88

Please sign in to comment.