Wings 3D Development Forum
Building Wings3D 1.4.1 on Windows No GitHub - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Programming (https://www.wings3d.com/forum/forumdisplay.php?fid=7)
+--- Thread: Building Wings3D 1.4.1 on Windows No GitHub (/showthread.php?tid=1126)

Pages: 1 2


Building Wings3D 1.4.1 on Windows No GitHub - oort - 03-28-2015

What follows is the instructions for building Wings3D on Windows for those who do not want to use GitHub. Using GitHub is preferred but those just starting out may lack confidence and may want to first play with the code before setting up a GitHub account. I am starting with building the 32bit version of Wings3D on a Windows 7 64bit PC. I will be editing this post for a bit before it is finished, so please be patient. I will be copying and editing information from a thread in the old forum with instructions written by Optigon Optigon Build Instructions. Some things have changed since that was written.

First step - Get and install the following software:

MinGW 32bit = mingw-get-setup.exe = install to C:/MinGW MinGW on Sourceforge

MinGW comes with the program "msys" included. In order to open the MinGW/msys shell you will want to create a shortcut to msys.bat. The batch file is in the C:/MinGW/msys/1.0/ file folder. To create a shortcut, simply right click on msys.bat and select 'Create Shortcut'. You can then move the shortcut to your Desktop for quick access.

Erlang = otp_win32_R14B04.exe = install to C:/erl5.8.5 Erlang Website
ESDL = esdl-1.0.1.win.zip = extract to C:/esdl-1.0.1 ESDL Files on Sourceforge
Wings3D Source code = wings-1.4.1.tar.bz2 = extract to C:/wings-1.4.1 Wings3D 1.4.1 Files on Sourceforge

The program 7-Zip can be used to extract the files from wings-1.4.1.tar.bz2. 7-Zip Website

Second step - Set up your Windows PC Environment Variables

When building Wings3D, your computer needs to know where the various packages we've installed are located. Environment variables tell your computer where to look. Next we will manually edit the environment variables.

Open the Windows Start menu and right click Computer. From the pop up menu select Properties.
From the System Properties window select 'Advanced System Settings'. When the System Properties window opens select the 'Advanced' tab and then 'Environment Variables' towards the bottom. Now there should be a window with two panels. We will first be changing the 'User variables' in the upper panel.

Adding ESDL to the User Variables
----------------------------------------
In the upper panel click 'New' and a window will pop up with two entry boxes.
In 'Variable name' enter: ESDL_PATH
In 'Variable value' enter: C:/esdl-1.0.1 (Note the Unix backslash. This is so that Cygwin can find it (being a Unix type environment)).

Appending the PATH variable
---------------------------
All other environment variables will be added to the PATH in the System variables in the lower panel.
To do so, highlight PATH and then click 'Edit'. If there are already items listed, add a semi-colon to the end of the string and then add the following afterward.

Add the following to the PATH variable:

C:/MinGW/bin;C:/erl5.8.5/bin;

Third Step - Build Wings3D

If everything has been setup correctly, you should now be ready to build Wings3D. Open the MinGW shell and enter the following, pressing Enter after each line:

cd c:
cd wings-1.4.1
make

----------------------------------------------------------------------------
If there were no serious errors you should now have a working copy of Wings3D.
----------------------------------------------------------------------------

Fourth Step - Adding Native Windows Dialogs

While Wings3D will work without native dialogs (Open and Save), because it will use the OpenGL drawn ones that are used in Linux, if you would like Windows dialogs, then you'll have to do one additional build. It is very simple and will also allow Wings3D to open as full screen.

Open the MinGW shell and enter the following, pressing Enter after each line:

cd c:
cd wings-1.4.1/plugins_src/win32_file
make

Fifth Step - Create a Bash file

Now that Wings3D has been built we need a way to launch the program.
We will do this using a Bash script linked to a Windows shortcut.

First let's create the bash script. In a text editor, copy the following two lines followed by one blank line into a new file.

#!/bin/bash
exec werl -smp disable -pa $ESDL_PATH/ebin -pa C:/wings-1.4.1/ebin -run wings_start start_halt ${1+"$@"}

Name the file launch_wings (no file extension) and save to C:\wings-1.4.1


Sixth Step - Create a Windows Shortcut

Now we want to create a Windows shortcut to the bash file we just made so that with a single click we can launch Wings3D.

Navigate to the launch_wings file, right click and select 'Create Shortcut'.
Right click the new shortcut and select 'Properties'.
Change the 'Target' field to C:\MinGW\msys\1.0\bin\bash.exe ./launch_wings
Make sure the 'Start in' field is C:\wings-1.4.1
Now you can rename the shortcut, change the icon, and paste the shortcut in some useful location.

When you are ready to start looking at and editing the Wings3D source code you can use the free software jEdit. jEdit Website


RE: Building Wings3D on Windows No GitHub - ggaliens - 03-28-2015

I'm very suspicious of the need for cygwin and mingw ...

I thing they really should be using mingw and also msys ... but that's just my recollection (ie no cgywin).


RE: Building Wings3D on Windows No GitHub - oort - 03-28-2015

ggaliens,
Thanks for looking this over. I just got things working again on my new PC, since having my XP PC die many months ago. I installed Cygwin and MinGW many months ago but couldn't get things working back then. I think you are right that msys is what gets used and I think msys got installed with MinGW??

I am using Cygwin to launch Wings3D. It is listed in the "Target" listed in Step 6.

Thanks again,
oort


RE: Building Wings3D on Windows No GitHub - ggaliens - 03-28-2015

If you have msys ... then that should be sufficient to launch the bash file.


RE: Building Wings3D on Windows No GitHub - oort - 03-28-2015

ggaliens,
Yes, I got it working with msys now. I will update the info above.

Thanks,
oort


RE: Building Wings3D on Windows No GitHub - ggaliens - 03-28-2015

Another nice moving forwards thing to try would be a newer ESDL like 1.2 or 1.3


RE: Building Wings3D on Windows No GitHub - oort - 03-28-2015

ggaliens,
Will the newer versions of ESDL work with the older Wings-1.4.1? The reason I started with Wings-1.4.1 is because that was where I last was when I was editing code before my XP died. Now that I have things working I may try Wings3D 1.5.3. I am done for tonight... Smile

Thanks,
oort


RE: Building Wings3D on Windows No GitHub - ggaliens - 03-28-2015

I think ESDL 1.2 will work with older wings 1.4.1 . Yeah ... I'd try getting all the way up-to-date ... give 1.5.3 a try when you get a chance. If you find any issues ... give me or Micheus a holler.


RE: Building Wings3D on Windows No GitHub - micheus - 03-28-2015

oort, it seems like you could have added the information these instructions are to build the old 1.4 version.

For the current one you can use my thread as reference for the current needs. It requires ESDL 1.3.1; also if any code as cl, esdl, ... needs to be build from the sorces it will require you use the rebar.
Unfortunately the ESDL 1.3.1 packed file doesn't include the compiled files and it will need to be compiled. The ESDL 1.2 contains, but it's recommended you use always the lastest version of these "libraries" with the last (current) source code of Wings3D.


RE: Building Wings3D on Windows No GitHub - oort - 03-30-2015

Micheus,
Thanks for the feedback. I think I will make this thread specific to Wings3D 1.4.1, possibly adding info on how to add jpeg support. Then I would create a new thread for version 1.5.3 to keep things simple for me.

Sounds like the new version is a bit more complicated. I guess that is why it didn't work for me on my first try. Another reason why I dropped back to the 1.4.1 version... Smile

Thanks,
oort