FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.3.4 has been released on 28th of February, 2013!

Author Topic: Win32 compile SDK  (Read 5010 times)

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Win32 compile SDK
« on: March 19, 2008, 08:03:30 am »

A new version of the win32 compile SDK for FIFE is currently in the making. Planned changes:
- Upgrade SWIG to 1.3.34
- Add ffmpeg support
- Official MSVC 2008 support
- Upgrade boost to 1.35.0 (for mingw, msvc2005 & msvc2008)

There is already an experimental SDK addon that adds MSVC 2008 support. However this addon is based on a SVN snapshot of the upcoming boost 1.35.0 release and Joeh had some weird segfaults with it that happened after running the island_demo for about 5 minutes.

Proposal:
We should wait for the final boost 1.35.0 package and release a new version of the compile SDK after that.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #1 on: April 05, 2008, 09:47:50 pm »

New win32 compile SDK available!
http://downloads.sourceforge.net/fife/FIFE_2008.0-r1_win32_SDK.exe

You'll need to grab this new SDK version to build the latest trunk / datasets branch revision. List of changes can be found at the wiki:
http://wiki.fifengine.net/Win32_compile_SDK#2008.0-r1_SDK_.28draft.29

Hopefully a win32 programmer can take a look into the issues I've mentioned in the commit log and resolve them:
http://mirror1.cvsdude.com/trac/fife/engine/changeset/2372

There are still a couple of planned changes for the next compile SDK revision, see:
http://wiki.fifengine.net/Win32_compile_SDK#Planned_changes_for_the_next_SDK_release

Remember that we'll need to supply precompiled libraries for three different compilers now: mingw, msvc2005 & msvc2008!

Post in here if you got problems with the latest compile SDK. I tested all compilers in release and debug mode but it took me half the night and I might have overlooked something. Cheers!

EDIT: A newer compile SDK version is available now that contains all changes (besides the ffmpeg libraries) that were planned for the next SDK release. See:
http://mirror1.cvsdude.com/trac/fife/engine/wiki/2008/04/06/23.13
« Last Edit: April 07, 2008, 05:06:31 am by mvBarracuda »
Logged

cryptomancer

  • Newbie
  • Posts: 4
    • View Profile
Re: Win32 compile SDK
« Reply #2 on: April 17, 2008, 05:38:29 pm »

In trying to get FIFE built on Win32 via SCons, I think there's some SDK mismatches in the build scripts.

I downloaded these from sourceforge:
FIFE_2008.0_r2109_win32.exe
FIFE_2008.0-r2_win32_SSDK.7z

but get these errors:

Code: [Select]
scons: Reading SConscript files ...
no custom platform-config found (searched: build\win32-config.py)
FIFE msvc project file succesfully created (E:\Source\FIFE\FIFE_2008.0\build\win32\build_environments\visual_studio_8\fife.vcproj)
FIFE code::blocks project file succesfully created (E:\Source\FIFE\FIFE_2008.0\build\win32\build_environments\code_blocks\fife_engine.cbp)
scons: done reading SConscript files.
scons: Building targets ...
g++ -o engine\core\audio\soundclip.o -c -Wall -O2 -DLOG_ENABLED -DHAVE_ZIP -DHAVE_OPENGL -Ibuild\win32\includes\mingw\libogg
-Ibuild\win32\includes\mingw\openal -Ibuild\win32\includes\mingw\sdl_image -Ibuild\win32\includes\mingw\zlib
-Ibuild\win32\includes\mingw\libguichan -Ibuild\win32\includes\mingw\boost_1_33_1 -Ibuild\win32\includes\mingw\libvorbis
-Ibuild\win32\includes\mingw\sdl_ttf -Ibuild\win32\includes\mingw\sdl -Ibuild\win32\includes\mingw\python25
-Ibuild\win32\includes\mingw\libminizip -Iengine\core -Iengine\swigwrappers engine\core\audio\soundclip.cpp
In file included from engine\core\audio\/sounddecoder.h:37,
                 from engine\core\audio\/soundclip.h:38,
                 from engine\core\audio\soundclip.cpp:35:
engine\core\audio\/fife_openal.h:36:19: AL/al.h: No such file or directory
engine\core\audio\/fife_openal.h:37:20: AL/alc.h: No such file or directory

I noticed that the SDK is including boost_1_35_0 and openal-soft, where you can see in the build command above that it's looking for boost_1_33_1 and openal (no -soft).

Tried replacing FIFE from this:
FIFE_pre-2008.1_r2282_win32.exe
Thinking that maybe the latest FIFE would have matching build commands,

but got:
Code: [Select]
scons: Reading SConscript files ...
no custom platform-config found (searched: build\win32-config.py)
scons: done reading SConscript files.
scons: Building targets ...
generate_swig_wrappers(
   ...   )
Running swig...
   Generating language specific wrappers for python

Error while running swig, stopped
scons: building terminated because of errors.
scons: *** [engine\swigwrappers\python\fife.py] Explicit exit, status 1

So, ran the delete_sdk.bat, replaced the SDK with:
FIFE_2008.0-r1_win32.SDK.exe
(which I'll mention seems odd that it's gone from r2 to r1... was it supposed to be 2008.1-r1?)
and gives the same swig error.

Now, going back to the original 2008.0 FIFE/SDK I noted first, I just did a straight renaming of the directories so that the build would find them (boost, openal), and it went fine until:

Code: [Select]
In file included from engine\core\vfs\zip\zipdata.cpp:32:
engine\core\vfs\zip\/zipdata.h:29:19: unzip.h: No such file or directory

There, it looks like it's trying to include libminizip:
-Ibuild\win32\includes\mingw\libminizip
which isn't in either SDK package. Of course, I don't know that unzip.h is actually part of libminizip, but it isn't in includes\*\zlib.

So close to building! What else should I do/try?
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #3 on: April 18, 2008, 03:15:12 am »

The latest win32 SDK is for building FIFE from SVN sources. You should install an SVN client, check out trunk and unpack the SDK into <FIFE_SVN>/build/win32 after that.

All details can be found here:
http://wiki.fifengine.net/Subversion_repository
http://wiki.fifengine.net/Building:Win32:SCons

EDIT: I'm a bit short of time so I can't go into detail but the compile SDK releases are properly tagged. The release order is: 2008.0 (= 2008.0-r0), 2008.0-r1, 2008.0-r2. There is a wiki article about the compile SDK that reveals which SDK version can be used together with which SVN revision. See here:
http://wiki.fifengine.net/Win32_compile_SDK

Name scheme for compile SDKs is a bit hard to explain. The SDK is basically named after the latest major FIFE release and it contains a revision number in case we published more than one compile SDK between two FIFE releases. E.g. 2007.2-r4 is the fifth compile SDK release that has been released after the 2007.2 FIFE release.

For building the 2008.0 release from source you'll need the 2007.2-r4 SDK. For building the pre-2008.1 (r2282) snapshot you'll need the 2008.0(-r0) SDK. If you want to build FIFE from source I propose to always go for latest SVN trunk version though! The latest trunk rivision will build FIFE with the 2008.0-r2 SDK.
« Last Edit: April 18, 2008, 07:23:59 am by mvBarracuda »
Logged

cryptomancer

  • Newbie
  • Posts: 4
    • View Profile
Re: Win32 compile SDK
« Reply #4 on: April 18, 2008, 02:16:38 pm »

Ahh, small bit of confusion on the wiki page:

Code: [Select]
== Version history ==
=== 2008.0-r2 ===
==== Download URL ====
http://downloads.sourceforge.net/fife/FIFE_2008.0-r1_win32_SDK.7z

==== Works for ====
Revision 2376 >> latest trunk.

the link is labeled r1, when the header reads r2. I got
FIFE_2008.0-r2_win32_SDK.7z via download-
FIFE_2008.0-r1_win32_SDK.7z doesn't exist on sourceforge:

Code: [Select]
File Not found
File: FIFE_2008.0-r1_win32_SDK.7z not found.
To go back to the project page for fife [u]click here[/u]
[u]Click here[/u] for documentation about the download process on sf.net.


Nonetheless! With 2008.0-r2 I successfully built FIFE.  ;D
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #5 on: April 18, 2008, 02:47:38 pm »

Thanks for pointer about the broken file link :-) Just fixed it.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #6 on: March 11, 2009, 04:18:54 pm »

Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #7 on: November 11, 2009, 11:47:41 am »

I have some free time on my hands in the next days so I'll put together a new compile SDK for win32. List of planned changes:
http://wiki.fifengine.net/Win32_compile_SDK#Planned_changes_for_the_next_SDK_release

Especially the patched guichan library will get rid of the ugly control character bug:
http://fife.trac.cvsdude.com/engine/ticket/383

The original plan was to create an easy to use win32 installer for the compile SDK so you could either just install the SDK for one specific supported compiler / IDE or for all three of them. While I looked into NSIS, I haven't figured out all details yet so I'll release the new SDK version as 7zip archive, like I did before. If you think it would be usefuk, you can still turn the 7zip version into an installer later and offer it for download.

If you got any questions: shoot. I'll prolly have the time to put everything together at Saturday and upload it at sourceforge. I'll cover the update at the blog with some short news item.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #8 on: November 13, 2009, 05:55:33 pm »

I've put together a test package of the new compile SDK / now called Win32 DevKit.

Grab the test package here:
http://files.fifengine.net/FIFE_Win32_DevKit_Nov2009.7z

Tested the DevKit with code::blocks, msvc 2005 (debug & release), msvc 2008 (debug & release) & scons (/w mingw). Didn't check if the unittests are working but I've patched the relevant unittest files as well so they should work. Confirmation would be nice nevertheless.

I don't have time to post about the new DevKit at the blog today but I can hopefully look into it tomorrow. That also means we have another day to test the package before officially releasing it.

Some notes:
1. Don't get confused. This so called Win32 DevKit is simply the new name of the former Win32 compile SDK. It still has the same aims: to ease building FIFE on win32. We just thought that the new name DevKit reflects the nature of the package better than the old compile SDK label. Version scheme was changed as well. So now it's FIFE_Win32_DevKit_<abbreviated month><year>.

2. You'll need to apply a patch to FIFE/build if you want to use the new test package. This patch should get applied to SVN trunk when we officially release the DevKit:
http://files.fifengine.net/FIFE_Win32_DevKit_Nov2009.patch

3. The patch also changes the default location where the 3rd party dependency DLLs get copied to. They will now reside in FIFE/engine/swigwrappers/python instead of in every single FIFE client directory as it's right now. The reason why I changed the path is that Win32 searches for them in the FIFE/engine/swigwrappers/python directory first because that's where the _fife.pyd binary lies. The old location of the DLLs could lead to DLL clashes as Win32 would search in PATH directories first before looking for them in the FIFE clients directories. This lead to a problem for one user who tried to get the recent UH release working on his system. The new approach does come with drawbacks, especially as we plan to support C++ game creation with FIFE as well. A new place for the DLLs should be found in the long run but FIFE/engine/swigwrappers/python will do it for now.

4. The DevKit comes with some bloat as the headers of the 3rd party dependencies ship with the kit for every supported compiler although the headers seem to be identical (with the exception of SDL that comes with a custom sdl_config.h for MSVC!). We should try to get rid of the bloat in the long run. The best solution for this would be creating a win32 installer that gives the user the choice just to install the necessary files for the compiler of his choice. All of this needs some careful testing and I don't have time for this right now.

5. This said: this will be the last compile SDK / DevKit release from my side. I've maintained the package for a couple of years and it's time for me to move on and focus on PARPG. The project is in good hands now so I'm positive that somebody else will update the DevKit in the future when the necessity arises.

Quick and dirty copy and paste from the README:
Quote
===============================
FIFE Win32 DevKit November 2009
===============================

Changes:
===============================
* Updated SDL to 1.2.14
* Updated guichan to 0.8.2; applied key.hpp utf8 workaround, built against updated SDL lib
* Updated mingw to 4.4.1-tdm-2 from http://tdragon.net/recentgcc/
* Updated Python to 2.6 and got rid of debug lib versions for MSVC that were not actually used
* Updated SWIG to 1.3.40

Installation / build process
===============================
1. Check out the latest engine sources from SVN or update your SVN checkout in case you have already checked out from SVN before:
Repository URL: http://fife.svn.cvsdude.com/engine/trunk

2. Get ActivePython 2.6 and install it to a location of your choice:
http://downloads.activestate.com/ActivePython/windows/2.6/ActivePython-2.6.4.8-win32-x86.msi

3. In case you've built FIFE with an older compile SDK in the past, run <FIFE>\build\win32\delete_sdk.bat to get rid of the old SDK files

4. Extraction process
4.1 Extract the content of the compile SDK to:
<FIFE>\build\win32\
4.2 Check if there is an <FIFE>\build\win32\applications folder; if it's in place, you know that you extracted the SDK into the correct location. One possible issue is that you've checked out the whole engine SVN repository instead of just trunk. In this case extract the compile SDK to:
<FIFE>\trunk\build\win32 (if you want to compile trunk, otherwhise it needs to be extracted into the build\win32 directory of the branch that you want to compile)


5.1 Run <FIFE>\trunk\build\win32\update_project_files.bat.
5.2 Build files for each supported IDE can be found in the sub-directories of <FIFE>\build\win32\build_environments (code_blocks, scons, visual_studio_8, visual_studio_9).

6. The final dynamic library (_fife.pyd) is automatically moved to:
<FIFE>\engine

7. Depending on the IDE you have utilized for building FIFE you either need to run <FIFE>\build\win32\update_dlls_mingw.bat (in case you built FIFE with code::blocks or scons), <FIFE>\build\win32\update_dlls_msvc2005.bat (Visual Studio 2005) or <FIFE>\build\win32\update_dlls_msvc2008.bat (Visual Studio 2008).

8. You can now start your custom FIFE build by launching the python scripts that reside in the subdirectories of <FIFE>\clients
« Last Edit: November 13, 2009, 06:01:00 pm by mvBarracuda »
Logged

CheeseSucker

  • Developer
  • Newbie
  • *
  • Posts: 26
  • FIFE programmer
    • View Profile
Re: Win32 compile SDK
« Reply #9 on: November 14, 2009, 08:42:41 am »

I modified barra's devkit a little:

1) I have merged the include directories. This should save about 100 MB if all three compilers are installed. I edited SDL_config.h and made two new files SDL_config_mingw.h and SDL_config_msvc.h. Vtchill mentioned that SDL_config.h may be auto-generated, which means that we will have to copy the modified SDL_config.h manually each time we create a new Devkit.

2) I have created an installer which enables you to select which compiler specific files you want to install.

3) I fixed a bug where the DLL installer scripts tried to copy the mingw dlls instead of the msvc ones. I also changed clients\island_demo to clients\rio_de_hola.

Patch: http://members.fifengine.net/cheese/FIFE_Win32_DevKit_Nov2009b.patch
Installer (36MB): http://members.fifengine.net/cheese/FIFE_Win32_DevKit_Nov2009.exe
Installer source code: http://members.fifengine.net/cheese/devkit.iss

I can upload an archive in case the installer does not work.

I have tested the new devkit by compiling with MinGW and MSVC2008

Edit: Updated installer
« Last Edit: November 14, 2009, 12:09:41 pm by CheeseSucker »
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #10 on: November 14, 2009, 09:41:31 am »

Nice work cheese! I can give it a test later today and will report back after trying every supported IDE / compiler. If we don't run into any problems we should make the installer the official package. I can upload it at sourceforge tomorrow and word a short blog posting to inform the community about the new DevKit.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #11 on: November 16, 2009, 03:49:15 am »

Looks like support for Code::Blocks is currently broken (both for my devkit package as for cheese's ones). We should go forward with the release nevertheless but I'll create a Trac ticket for the Code::Blocks issue.

EDIT: the new Win32 DevKit has been released. Make sure you install Python 2.6! Python will not work anymore!

For details see: http://fifengine.net/2009/11/16/new-fife-win32-devkit-available/
« Last Edit: November 16, 2009, 07:01:44 am by mvBarracuda »
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 410
    • View Profile
Re: Win32 compile SDK
« Reply #12 on: November 23, 2009, 08:37:23 am »

Had some more time to test FIFE with Code::Blocks today. It seems that the build issues have vanished after upgrading to the latest Code::Blocks SVN snapshot (r5911).

I've added my findings to this ticket:
http://fife.trac.cvsdude.com/engine/ticket/415#comment:3
Logged