Building TGE1.5 tools under linux
by Todd "zaz" Koeckeritz · in Torque Game Engine · 11/14/2006 (4:45 pm) · 0 replies
Under linux with TGE 1.5, you can't build the tools out of the box. In fact, I'm sort of surprised the tools build and work properly under windoze given issue #1 below.
There are three issues I've run into so far building the tools:
1) In tools/map2difPlus/editGeometry.cc, gPlaneNormThresh and gPlaneDistThresh are declared as F64 globals. This collides with the F32 declaration of those same variables in engine/sceneGraph/sceneLighting.cc. I resolved this simply with:
2) I've always built the tools after doing a clean build of dedicated, i.e. "make clean; make dedicated; make tools". This still appears to be the better way to do this under 1.5.0, however we have a few references to EditTSCtrl::smCamPos and worldEditor::objClassIgnored. I eliminated these with by putting them into #ifndef DEDICATED/#endif blocks.
3) Once built this way, I'm getting SEGV's which I haven't had time to attempt to track down yet.
I've tried various ways to get around problems 1 and 2 without doing the things I have above. The above are the best solutions I've come up with so far. Since I won't have much time to work on this until next week or the week after, I'm tossing my unfinished work out for others to review and/or get inspired by, :-).
Edit: fixed reference to #ifndef.
There are three issues I've run into so far building the tools:
1) In tools/map2difPlus/editGeometry.cc, gPlaneNormThresh and gPlaneDistThresh are declared as F64 globals. This collides with the F32 declaration of those same variables in engine/sceneGraph/sceneLighting.cc. I resolved this simply with:
svn diff tools/map2difPlus/editGeometry.cc
Index: tools/map2difPlus/editGeometry.cc
===================================================================
--- tools/map2difPlus/editGeometry.cc (revision 1)
+++ tools/map2difPlus/editGeometry.cc (working copy)
@@ -484,8 +484,10 @@
// F64 gPlaneNormThresh = 1.0;
// F64 gPlaneDistThresh = 0.0;
-F64 gPlaneNormThresh = 0.99;
-F64 gPlaneDistThresh = 0.01;
+// F64 gPlaneNormThresh = 0.99; // TGE 1.5.0 dist
+// F64 gPlaneDistThresh = 0.01; // TGE 1.5.0 dist
+extern F32 gPlaneNormThresh; // Zaz fix, defined in engine/lightingSystem/sgSceneLighting.cc
+extern F32 gPlaneDistThresh; // Zaz fix, defined in engine/lightingSystem/sgSceneLighting.cc
U32 EditGeometry::insertPlaneEQ(const Point3D& normal, const F64 dist)
{2) I've always built the tools after doing a clean build of dedicated, i.e. "make clean; make dedicated; make tools". This still appears to be the better way to do this under 1.5.0, however we have a few references to EditTSCtrl::smCamPos and worldEditor::objClassIgnored. I eliminated these with by putting them into #ifndef DEDICATED/#endif blocks.
svn diff --diff-cmd diff -x -w engine/lightingSystem/sgLightManager.cc Index: engine/lightingSystem/sgLightManager.cc =================================================================== 868a869 > #ifndef DEDICATED 892a894,901 > #else // DEDICATED > // Refereences to EditTSCtrl::smCampPos were creating linker errors > // when trying to build tools under linux. Since tools are linked > // against a dedicated build of the game engine, we use the > // DEDICATED macro to eliminate the undefined references. > // > return false; > #endif // DEDICATED 896a906,913 > // Refereences to WorldEditor::objClassIgnored(SceneObject > // const*) and WorldEditor::renderObjectBox(SceneObject*, > // ColorI const&) were creating linker errors when trying to > // build tools under linux. Since tools are linked against a > // dedicated build of the game engine, we use the DEDICATED > // macro to eliminate the undefined references. > // > #ifndef DEDICATED 912a930 > #endif // DEDICATED
3) Once built this way, I'm getting SEGV's which I haven't had time to attempt to track down yet.
I've tried various ways to get around problems 1 and 2 without doing the things I have above. The above are the best solutions I've come up with so far. Since I won't have much time to work on this until next week or the week after, I'm tossing my unfinished work out for others to review and/or get inspired by, :-).
Edit: fixed reference to #ifndef.
About the author