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: - The Wings source files. http://www.wings3d.com - Erlang/OTP R11B-2 or later. http://www.erlang.org - SDL development library. http://www.libsdl.org. (There are pre-built libraries for most platforms.) - ESDL 0.96.0626 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. Optional software ================= To build the fbx plugin, you'll need the fbx library. http://www.autodesk.com/fbx 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 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.36.tar.bz2 Otherwise, feed the output of "bzcat" to tar: $ bzcat wings-0.98.36-pre1.tar.bz2 | tar xf - The build steps that follow assume that you are in the wings source directory. Example: $ cd wings-0.98.36.tar.bz2 Building Wings ============== Build a Wings from the directory where the sources where unpacked. Example: $ pwd /home/bjorng/wings-0.98.36 $ make . . . . . . $ 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 /ebin -run wings_start start_halt where you should substitute with the path to the Wings source directory. Example: $ werl -pa $ESDL_PATH/ebin -pa /home/bjorng/wings-0.98.36/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.36/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. Building all for Mac OS X ========================= To build everything and pack it into a DMG file, you'll need: - Xcode 2.4.1 Make sure that your current directory is the directory in which the sources where unpacked. Example: $ pwd /Users/bjorng/wings_releases/wings-0.98.36 $ To build all (including the installer), run the following command: $ make macosx . . . . . . $ When everything is done, there should be a file named like wings-0.98.36-macosx.dmg in the current directory.