Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 11:04

All times are UTC + 1 hour




Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next

Prefered Build System for Horde3D
Poll ended at 14.05.2008, 20:06
CMake 57%  57%  [ 4 ]
waf 14%  14%  [ 1 ]
Other 29%  29%  [ 2 ]
Total votes : 7
Author Message
PostPosted: 30.04.2008, 16:09 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
As I wrote in my Python thread I got Horde3D to compile using a cross compiler under Linux: mingw32.

To get this working I had to do the following:
Linker error, related to confusion between pow and powf:
Code:
diff --git a/Horde3D/Source/Horde3D Engine/egRenderer.cpp b/Horde3D/Source/Horde3D Engine/egRenderer.cpp
index d3a8823..6fc911f 100644
--- a/Horde3D/Source/Horde3D Engine/egRenderer.cpp
+++ b/Horde3D/Source/Horde3D Engine/egRenderer.cpp
@@ -729,7 +729,7 @@ void Renderer::updateShadowMap()
        for( uint32 i = 1; i < numMaps; i++ )
        {
                float f = i / (float)numMaps;
+               float log = nearDist * pow( farDist / nearDist, f );
-               float log = nearDist * powf( farDist / nearDist, f );^M
                float uni = nearDist + (farDist - nearDist) * f;

                _splitPlanes[i] = t * log + (1 - t) * uni;


wgl seems to be unsupported by mingw32:
Code:
diff --git a/Horde3D/Source/Horde3D Utils/main.cpp b/Horde3D/Source/Horde3D Utils/main.cpp
index be73011..b84a44a 100644
--- a/Horde3D/Source/Horde3D Utils/main.cpp
+++ b/Horde3D/Source/Horde3D Utils/main.cpp
@@ -22,7 +22,6 @@
 //
 // *************************************************************************************************

-
 #include "Horde3D.h"
 #include "utPlatform.h"
 #include "utMath.h"
@@ -39,10 +38,6 @@
 using namespace std;


+#ifdef __MINGW32__
+#undef PLATFORM_WIN
+#endif
+
 namespace Horde3DUtils
 {
        ofstream                        outf;


case matters on Linux:


Code:
diff --git a/Horde3D/Source/Shared/utXMLParser.cpp b/Horde3D/Source/Shared/utXMLParser.cpp
index 235ade0..e0e498f 100644
--- a/Horde3D/Source/Shared/utXMLParser.cpp
+++ b/Horde3D/Source/Shared/utXMLParser.cpp
@@ -82,7 +82,7 @@
 //#include <crtdbg.h>
 //#endif
 #define WIN32_LEAN_AND_MEAN
+#include <windows.h> // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files
-#include <Windows.h> // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files^M
                      // to have "MessageBoxA" to display error messages for openFilHelper
 #endif


utImage.cpp produces many warnings regarding conversion from "const char *" to "char *", but it works.


All other changes are related to makefiles. Simply replacing g++ with i586-mingw32msvc-g++, changing names of library files etc.


And here's my problem: It's not that easy to integrate the changes to the makefiles into the existing build system. Other problems like being unable to specify the compiler on Linux with the usual CC or CXX environment variables is not possible. Parallel compilation with -jN is not really supported....
I'm interested in moving away from the makefile approach to a platform independent build system.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 17:38 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I also thought about using CMake. But currently I don't have time to realize that. Any volunteers? :wink:


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 18:21 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Sure, I'll do it. It will help me a lot under Linux when I can produce windows executables. :)

I prefer to use waf (was: bksys, fork of scons). Worked so far very good for me in some of my projects. Disadvantage for Visual Studio users is that, there will be no native build file for them. But I believe Visual Studio can execute any command to build a project and that would be enough to get the build button to work.

The only dependency of waf is Python, that should be no problem.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 19:49 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Never heard of it, but if you think it is easy to configure and maintain we can use it. I never used the makefile project under visual studio, but if that's the only problem, we can maintain visual studio project files separately.
Anyway, a big thanks for managing this.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 19:54 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
+1 for cmake, it just works.

I had problems with scons in the past. If waf is a scons fork then i would prefer to have a cmake build system.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 20:03 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
In principle I would also prefer CMake since I know that is widely used. But I don't have much experience with those build systems. Most of the time I used Visual Studio.

[edit] I added a vote to the topic :-)


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 20:07 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
waf has not much to do with scons today. It's really simple:

Building the libHorde3D.so (or Horde3D.dll):
Code:
def build(bld):
        obj = bld.create_obj('cpp', 'shlib')
        obj.source = '''../Shared/utXMLParser.cpp
        egAnimatables.cpp
        egAnimation.cpp
        egCamera.cpp
        egCom.cpp
        egExtensions.cpp
        egGeometry.cpp
        egLight.cpp
        egMain.cpp
        egMaterial.cpp
        egModel.cpp
        egModules.cpp
        egParticle.cpp
        egPipeline.cpp
        egPrimitives.cpp
        egRendererBase.cpp
        egRenderer.cpp
        egResource.cpp
        egScene.cpp
        egSceneGraphRes.cpp
        egShader.cpp
        egTextures.cpp
        utImage.cpp
        utOpenGL.cpp
        '''
        obj.includes = '. ../Shared ../../Extensions'
        obj.uselib = 'GL'
        obj.target = 'Horde3D'
        obj.want_libtool = False

Really simple ;) The files for the samples and Horde3DUtils are similarly simple.

Building:
Code:
./waf configure
./waf


I don't like cmake that much: If you are doing something wrong you never know if cmake is the problem or the created makefile / projectfile.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 20:10 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I think we can start with waf as long as noone makes CMake files. If that's the case we can think about it again.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 20:18 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
Personally i will always use VS C++ compiler to build horde3d and not mingw32, i use multiple versions of gcc for different projects, including ARM programming, so i don't really like to mess with my configurations for Symbian compilation.

This doesn't really help me in any way, i will continue to use the visual studio solution files. But it may be useful for others :)


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 20:38 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Volker wrote:
I think we can start with waf as long as noone makes CMake files. If that's the case we can think about it again.
Waf is pretty much useless on the Mac (it would require rewriting major parts of waf itself), whereas CMake works flawlessly both with the Mac and with Visual Studio. Unfortunately I don't have the time to produce CMake files in the near future.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 20:58 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
So I think the long term goal should be CMake,... maybe I will find some time after next week to take a look at CMake.


Top
 Profile  
Reply with quote  
PostPosted: 30.04.2008, 21:28 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
DDd: Something better than the existing makefiles would be really usefull for me.

swiftcoder: I didn't know that. Is it really that bad? xmms2 uses waf and builds on OS X AFAIK. Could you test that?

Volker: If waf is really missing mac support I'll take a look at cmake.


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 00:09 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Codepoet wrote:
swiftcoder: I didn't know that. Is it really that bad? xmms2 uses waf and builds on OS X AFAIK. Could you test that?
It isn't so much that it doesn't work, more that it doesn't understand any differences between Mac and linux (or Windows for that matter).

CMake can output XCode project files (as well as Visual Studio project files) directly from the basic build system, which eases integration a lot. If we go with Waf, we will still have to maintain Visual Studio and XCode projects for those who need them.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 02:16 
Offline

Joined: 15.04.2008, 10:03
Posts: 3
I'm not a big fan of CMake, the whole scripting is just to/so ...
Lets just keep it at some people like cmake others don't.

I always liked the approach premake has, it uses the lua language to as scripting interface and it will generate the build files for the target system.
It's clean, easy to use and works on mac, linux, windows, ...

CMake is more mature and has more features, but with some time and a couple of good lua scripts premake could be far better then cmake ever will be.

As for Xcode :: gnu make files work on mac, lua scripting has the *if(mac)* option but no xcode project files atm. XCode project files have been on the todo list for some while, they might even be in the svn version. (allot of that stuff has been on hold for the 4.0 remake of premake ...)

http://premake.sourceforge.net/what_is_premake
http://industriousone.com/post/subversion-shuffling


Top
 Profile  
Reply with quote  
PostPosted: 01.05.2008, 07:35 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
premake 4 appears to be interesting, easier than cmake, but not as powerful and will have features similar to cmake, but i don't think it would be very good policy to start using premake 3.5 something that is not going to be compatible with 4.0.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group