You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(20) |
Feb
(11) |
Mar
(6) |
Apr
(5) |
May
(4) |
Jun
(7) |
Jul
(9) |
Aug
(11) |
Sep
|
Oct
(4) |
Nov
(13) |
Dec
(21) |
2010 |
Jan
(23) |
Feb
(32) |
Mar
(6) |
Apr
(2) |
May
(10) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
(16) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(19) |
Apr
(13) |
May
(4) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(13) |
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(15) |
Apr
(2) |
May
(4) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(6) |
Jun
(6) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sgv...@us...> - 2012-02-14 15:48:12
|
Revision: 291 http://simspark.svn.sourceforge.net/simspark/?rev=291&view=rev Author: sgvandijk Date: 2012-02-14 15:48:05 +0000 (Tue, 14 Feb 2012) Log Message: ----------- - add --init-script-prefix option to specify location of spark.rb, zeitgeist.rb, etc Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp trunk/spark/spark/spark.cpp trunk/spark/spark/spark.h Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2012-01-25 18:04:21 UTC (rev 290) +++ trunk/spark/ChangeLog 2012-02-14 15:48:05 UTC (rev 291) @@ -1,3 +1,10 @@ +2012-02-14 Sander van Dijk <sgv...@gm...> + + * lib/zeitgeist/scriptserver/scriptserver.cpp (RunInitScript): + * spark/spark.h (Spark): + * spark/spark.cpp (Spark): + - add --init-script-prefix option to specify location of spark.rb, zeitgeist.rb, etc + 2012-01-22 Hedayat Vatankhah <hed...@gm...> * lib/kerosin/renderserver/rendercontrol.cpp (RenderControl::EndCycle): Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2012-01-25 18:04:21 UTC (rev 290) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2012-02-14 15:48:05 UTC (rev 291) @@ -614,6 +614,23 @@ ERunScriptErrorType result = eNotFound; + // Trying directory given in mRelPathPrefix + result = RunInitScriptInternal(mRelPathPrefix, fileName, validDotDir, dotDir); + if (result == eOK) + { + GetLog()->Debug() << "(ScriptServer) : Ran init script '" + << mRelPathPrefix << salt::RFile::Sep() << fileName << "'\n"; + return true; + } + else if (result == eError) + { + GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" + << mRelPathPrefix << salt::RFile::Sep() << fileName << "'\n"; + return false; + } + + + if (validDotDir) { // Trying dot-dir in home directory Modified: trunk/spark/spark/spark.cpp =================================================================== --- trunk/spark/spark/spark.cpp 2012-01-25 18:04:21 UTC (rev 290) +++ trunk/spark/spark/spark.cpp 2012-02-14 15:48:05 UTC (rev 291) @@ -38,12 +38,7 @@ using namespace std; using namespace boost; -Spark::Spark(const string& relPathPrefix) : - mZeitgeist(new Zeitgeist("." PACKAGE_NAME, relPathPrefix)), - mOxygen(new Oxygen(*mZeitgeist)) -#if HAVE_KEROSIN_KEROSIN_H - , mKerosin(new Kerosin(*mZeitgeist)) -#endif +Spark::Spark() { } @@ -104,12 +99,28 @@ bool Spark::Init(int argc, char** argv) { + // See if user gave path prefix for init scripts + string relPathPrefix = "../.."; + for (int i = 1; i < argc; ++i) + { + if (strcmp(argv[i], "--init-script-prefix") == 0) + { + relPathPrefix = argv[i + 1]; + } + } + + mZeitgeist = shared_ptr<Zeitgeist>(new Zeitgeist("." PACKAGE_NAME, relPathPrefix)); + mOxygen = shared_ptr<Oxygen>(new Oxygen(*mZeitgeist)); +#if HAVE_KEROSIN_KEROSIN_H + mKerosin = shared_ptr<Kerosin>(new Kerosin(*mZeitgeist)); +#endif + // run the spark init script mZeitgeist->GetCore()->GetScriptServer()->RunInitScript ( "spark.rb", "lib/spark", - ScriptServer::IS_USERLOCAL + ScriptServer::IS_COMMON ); UpdateCached(); Modified: trunk/spark/spark/spark.h =================================================================== --- trunk/spark/spark/spark.h 2012-01-25 18:04:21 UTC (rev 290) +++ trunk/spark/spark/spark.h 2012-02-14 15:48:05 UTC (rev 291) @@ -72,7 +72,7 @@ class SPARK_API Spark { public: - Spark(const std::string& relPathPrefix); + Spark(); virtual ~Spark(); /** inits the Spark lib, returns true on success, has to be called once This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-01-25 18:04:27
|
Revision: 290 http://simspark.svn.sourceforge.net/simspark/?rev=290&view=rev Author: yxu Date: 2012-01-25 18:04:21 +0000 (Wed, 25 Jan 2012) Log Message: ----------- return 0 when feedback is disabled Modified Paths: -------------- trunk/spark/plugin/odeimps/odehingejoint.cpp Modified: trunk/spark/plugin/odeimps/odehingejoint.cpp =================================================================== --- trunk/spark/plugin/odeimps/odehingejoint.cpp 2012-01-25 18:03:43 UTC (rev 289) +++ trunk/spark/plugin/odeimps/odehingejoint.cpp 2012-01-25 18:04:21 UTC (rev 290) @@ -91,5 +91,8 @@ { dJointID ODEJoint = (dJointID) jointID; dJointFeedback* fb = dJointGetFeedback(ODEJoint); - return dLENGTH(fb->t1) + dLENGTH(fb->t2); + if(fb) + return dLENGTH(fb->t1) + dLENGTH(fb->t2); + else + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-01-25 18:03:52
|
Revision: 289 http://simspark.svn.sourceforge.net/simspark/?rev=289&view=rev Author: yxu Date: 2012-01-25 18:03:43 +0000 (Wed, 25 Jan 2012) Log Message: ----------- enable joint feed back in script Modified Paths: -------------- trunk/spark/lib/oxygen/physicsserver/joint_c.cpp Modified: trunk/spark/lib/oxygen/physicsserver/joint_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/joint_c.cpp 2012-01-25 18:03:13 UTC (rev 288) +++ trunk/spark/lib/oxygen/physicsserver/joint_c.cpp 2012-01-25 18:03:43 UTC (rev 289) @@ -545,6 +545,21 @@ return true; } +FUNCTION(Joint,enableFeedback) +{ + bool inSet; + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0],inSet)) + ) + { + return false; + } + + obj->EnableFeedback(inSet); + return true; +} + void CLASS(Joint)::DefineClass() { DEFINE_BASECLASS(oxygen/PhysicsObject); @@ -579,5 +594,6 @@ DEFINE_FUNCTION(getMaxMotorForce); DEFINE_FUNCTION(setJointMaxSpeed1); DEFINE_FUNCTION(setJointMaxSpeed2); + DEFINE_FUNCTION(enableFeedback); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2012-01-25 18:03:22
|
Revision: 288 http://simspark.svn.sourceforge.net/simspark/?rev=288&view=rev Author: yxu Date: 2012-01-25 18:03:13 +0000 (Wed, 25 Jan 2012) Log Message: ----------- bugfix in joint feedback Modified Paths: -------------- trunk/spark/lib/oxygen/physicsserver/int/jointint.h trunk/spark/plugin/odeimps/odehingejoint.cpp trunk/spark/plugin/odeimps/odehingejoint.h trunk/spark/plugin/odeimps/odejoint.cpp trunk/spark/plugin/odeimps/odejoint.h Modified: trunk/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2012-01-21 22:56:08 UTC (rev 287) +++ trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2012-01-25 18:03:13 UTC (rev 288) @@ -88,7 +88,7 @@ does not collect any feedback information. */ virtual void EnableFeedback(bool enable, long jointID, - boost::shared_ptr<GenericJointFeedback> feedback) = 0; + boost::shared_ptr<GenericJointFeedback>& feedback) = 0; /** returns true if the joint is set to collect feedback information Modified: trunk/spark/plugin/odeimps/odehingejoint.cpp =================================================================== --- trunk/spark/plugin/odeimps/odehingejoint.cpp 2012-01-21 22:56:08 UTC (rev 287) +++ trunk/spark/plugin/odeimps/odehingejoint.cpp 2012-01-25 18:03:13 UTC (rev 288) @@ -32,7 +32,6 @@ { dWorldID ODEWorld = (dWorldID) worldID; dJointID ODEJoint = dJointCreateHinge(ODEWorld, 0); - dJointSetFeedback( ODEJoint, &mFeedback ); return (long) ODEJoint; } Modified: trunk/spark/plugin/odeimps/odehingejoint.h =================================================================== --- trunk/spark/plugin/odeimps/odehingejoint.h 2012-01-21 22:56:08 UTC (rev 287) +++ trunk/spark/plugin/odeimps/odehingejoint.h 2012-01-25 18:03:13 UTC (rev 288) @@ -39,9 +39,6 @@ float GetAngle(long jointID) const; float GetAngleRate(long jointID) const; float GetTorque(long jointID) const; -private: - dJointFeedback mFeedback; - }; DECLARE_CLASS(HingeJointImp); Modified: trunk/spark/plugin/odeimps/odejoint.cpp =================================================================== --- trunk/spark/plugin/odeimps/odejoint.cpp 2012-01-21 22:56:08 UTC (rev 287) +++ trunk/spark/plugin/odeimps/odejoint.cpp 2012-01-25 18:03:13 UTC (rev 288) @@ -74,7 +74,7 @@ } void JointImp::EnableFeedback(bool enable, long jointID, - boost::shared_ptr<GenericJointFeedback> feedback) + boost::shared_ptr<GenericJointFeedback>& feedback) { dJointID JointImp = (dJointID) jointID; Modified: trunk/spark/plugin/odeimps/odejoint.h =================================================================== --- trunk/spark/plugin/odeimps/odejoint.h 2012-01-21 22:56:08 UTC (rev 287) +++ trunk/spark/plugin/odeimps/odejoint.h 2012-01-25 18:03:13 UTC (rev 288) @@ -42,7 +42,7 @@ int GetType(long jointID) const; long GetBodyID(int idx, long jointID); void EnableFeedback(bool enable, long jointID, - boost::shared_ptr<oxygen::GenericJointFeedback> feedback); + boost::shared_ptr<oxygen::GenericJointFeedback>& feedback); bool FeedbackEnabled(long jointID) const; salt::Vector3f GetFeedbackForce(int idx, boost::shared_ptr<oxygen::GenericJointFeedback> feedback) const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2012-01-21 22:56:15
|
Revision: 287 http://simspark.svn.sourceforge.net/simspark/?rev=287&view=rev Author: hedayat Date: 2012-01-21 22:56:08 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Handle window quit event Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/kerosin/openglserver/openglserver.cpp trunk/spark/lib/kerosin/openglserver/openglsystem.h trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp trunk/spark/plugin/openglsyssdl/openglsystemsdl.h Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-07-25 19:41:53 UTC (rev 286) +++ trunk/spark/ChangeLog 2012-01-21 22:56:08 UTC (rev 287) @@ -1,3 +1,16 @@ +2012-01-22 Hedayat Vatankhah <hed...@gm...> + + * lib/kerosin/renderserver/rendercontrol.cpp (RenderControl::EndCycle): + * lib/kerosin/openglserver/openglserver.cpp (OpenGLServer::Init): + - check if opengl system wants to quit + + * plugin/openglsyssdl/openglsystemsdl.h (OpenGLSystemSDL.mWantsToQuit): + * plugin/openglsyssdl/openglsystemsdl.cpp (OpenGLSystemSDL::Update): + - handle SDL_QUIT event and add WantsToQuit function + + * lib/kerosin/openglserver/openglsystem.h (OpenGLSystem): + - add WantsToQuit() function + 2011-05-02 Hedayat Vatankhah <hed...@gm...> * CMakeLists.txt: Modified: trunk/spark/lib/kerosin/openglserver/openglserver.cpp =================================================================== --- trunk/spark/lib/kerosin/openglserver/openglserver.cpp 2011-07-25 19:41:53 UTC (rev 286) +++ trunk/spark/lib/kerosin/openglserver/openglserver.cpp 2012-01-21 22:56:08 UTC (rev 287) @@ -96,6 +96,10 @@ } mGLSystem->Update(); + if (mGLSystem->WantsToQuit()) + { + mWantsToQuit = true; + } } void Modified: trunk/spark/lib/kerosin/openglserver/openglsystem.h =================================================================== --- trunk/spark/lib/kerosin/openglserver/openglsystem.h 2011-07-25 19:41:53 UTC (rev 286) +++ trunk/spark/lib/kerosin/openglserver/openglsystem.h 2012-01-21 22:56:08 UTC (rev 287) @@ -55,6 +55,9 @@ //! return if the GL subsystem locks using OpenGL to get exclusive access. virtual bool IsGLLocked() const { return false; } + //! return if the GL subsystem have received a quit event. + virtual bool WantsToQuit() const { return false; } + protected: // // members Modified: trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp =================================================================== --- trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp 2011-07-25 19:41:53 UTC (rev 286) +++ trunk/spark/lib/kerosin/renderserver/rendercontrol.cpp 2012-01-21 22:56:08 UTC (rev 287) @@ -21,6 +21,7 @@ #include "customrender.h" #include <zeitgeist/logserver/logserver.h> #include <oxygen/sceneserver/sceneserver.h> +#include <oxygen/simulationserver/simulationserver.h> using namespace kerosin; using namespace oxygen; @@ -87,6 +88,8 @@ // update the window (pumps event loop, etc..) and render the // current frame mOpenGLServer->Update(); + if (mOpenGLServer->WantsToQuit()) + GetSimulationServer()->Quit(); mRenderServer->Render(true); RenderCustom(); mOpenGLServer->SwapBuffers(); Modified: trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp =================================================================== --- trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp 2011-07-25 19:41:53 UTC (rev 286) +++ trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp 2012-01-21 22:56:08 UTC (rev 287) @@ -37,7 +37,7 @@ OpenGLSystemSDL *gInputSystem; -OpenGLSystemSDL::OpenGLSystemSDL() : OpenGLSystem() +OpenGLSystemSDL::OpenGLSystemSDL() : OpenGLSystem(), mWantsToQuit(false) { } @@ -54,6 +54,8 @@ // Grab all the events off the queue. while( SDL_PollEvent( &event ) ) { + if (event.type == SDL_QUIT) + mWantsToQuit = true; } } @@ -172,3 +174,8 @@ return true; } + +bool OpenGLSystemSDL::WantsToQuit() const +{ + return mWantsToQuit; +} Modified: trunk/spark/plugin/openglsyssdl/openglsystemsdl.h =================================================================== --- trunk/spark/plugin/openglsyssdl/openglsystemsdl.h 2011-07-25 19:41:53 UTC (rev 286) +++ trunk/spark/plugin/openglsyssdl/openglsystemsdl.h 2012-01-21 22:56:08 UTC (rev 287) @@ -47,6 +47,12 @@ OpenGLSystems that support double buffering */ virtual void SwapBuffers(); + + //! return if the GL subsystem have received a quit event. + virtual bool WantsToQuit() const; + +private: + bool mWantsToQuit; }; DECLARE_CLASS(OpenGLSystemSDL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2011-07-25 19:41:59
|
Revision: 286 http://simspark.svn.sourceforge.net/simspark/?rev=286&view=rev Author: sgvandijk Date: 2011-07-25 19:41:53 +0000 (Mon, 25 Jul 2011) Log Message: ----------- - Enable hinge joint feedback request Modified Paths: -------------- trunk/spark/plugin/odeimps/odehingejoint.cpp Modified: trunk/spark/plugin/odeimps/odehingejoint.cpp =================================================================== --- trunk/spark/plugin/odeimps/odehingejoint.cpp 2011-06-23 18:00:49 UTC (rev 285) +++ trunk/spark/plugin/odeimps/odehingejoint.cpp 2011-07-25 19:41:53 UTC (rev 286) @@ -32,7 +32,7 @@ { dWorldID ODEWorld = (dWorldID) worldID; dJointID ODEJoint = dJointCreateHinge(ODEWorld, 0); - //dJointSetFeedback( ODEJoint, &mFeedback ); + dJointSetFeedback( ODEJoint, &mFeedback ); return (long) ODEJoint; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2011-06-23 18:00:56
|
Revision: 285 http://simspark.svn.sourceforge.net/simspark/?rev=285&view=rev Author: sgvandijk Date: 2011-06-23 18:00:49 +0000 (Thu, 23 Jun 2011) Log Message: ----------- - Can requast full monitor frame from MonitorControl - Trainer command to request full monitor frame - Start of RCS3DMonitor (to be able to add RCS3D specific data to monitor data) - Option in vision perceptor to request ball ground truth Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg trunk/rcssserver3d/plugin/soccer/CMakeLists.txt trunk/rcssserver3d/plugin/soccer/export.cpp trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h trunk/rcssserver3d/rcssmonitor3d/main.cpp trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp trunk/spark/lib/oxygen/simulationserver/monitorcontrol.h Added Paths: ----------- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2011-06-23 18:00:49 UTC (rev 285) @@ -89,6 +89,7 @@ (nd RestrictedVisionPerceptor (setViewCones 120 120) (setSenseMyPos false) + (setSenseBallPos false) (setStaticSenseAxis false) (addNoise true) (setInterval 3) Modified: trunk/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2011-06-23 18:00:49 UTC (rev 285) @@ -47,6 +47,7 @@ hmdp_effector/naospecific.h line/line.h agentcollisionhandler/agentcollisionhandler.h + rcs3dmonitor/rcs3dmonitor.h ) set(soccer_LIB_SRCS @@ -123,6 +124,8 @@ line/line_c.cpp agentcollisionhandler/agentcollisionhandler.cpp agentcollisionhandler/agentcollisionhandler_c.cpp + rcs3dmonitor/rcs3dmonitor.cpp + rcs3dmonitor/rcs3dmonitor_c.cpp ) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${FREETYPE_INCLUDE_DIRS} Modified: trunk/rcssserver3d/plugin/soccer/export.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/export.cpp 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/plugin/soccer/export.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -55,6 +55,7 @@ #include "hmdp_effector/hmdpperceptor.h" #include "line/line.h" #include "agentcollisionhandler/agentcollisionhandler.h" +#include "rcs3dmonitor/rcs3dmonitor.h" ZEITGEIST_EXPORT_BEGIN() ZEITGEIST_EXPORT(SoccerControlAspect); @@ -92,5 +93,6 @@ ZEITGEIST_EXPORT(HMDPEffector); ZEITGEIST_EXPORT(Line); ZEITGEIST_EXPORT(AgentCollisionHandler); + ZEITGEIST_EXPORT(RCS3DMonitor); ZEITGEIST_EXPORT_END() Added: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp (rev 0) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -0,0 +1,459 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: RCS3DMonitor.cpp 246 2011-02-18 18:44:14Z sgvandijk $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "rcs3dmonitor.h" +#include <zeitgeist/logserver/logserver.h> +#include <kerosin/sceneserver/singlematnode.h> +#include <kerosin/materialserver/material.h> +#include <oxygen/monitorserver/monitorcmdparser.h> +#include <oxygen/sceneserver/sceneserver.h> +#include <sstream> + +using namespace kerosin; +using namespace oxygen; +using namespace zeitgeist; +using namespace boost; +using namespace salt; +using namespace std; + +RCS3DMonitor::RCS3DMonitor() : oxygen::MonitorSystem() +{ + mFullState = true; +} + +RCS3DMonitor::~RCS3DMonitor() +{ +} + +void RCS3DMonitor::ClearNodeCache() +{ + mNodeCache.clear(); +} + +void RCS3DMonitor::UpdateCached() +{ + MonitorSystem::UpdateCached(); + ClearNodeCache(); +} + +void RCS3DMonitor::OnLink() +{ + // setup SceneServer reference + mSceneServer = shared_dynamic_cast<SceneServer> + (GetCore()->Get("/sys/server/scene")); + + if (mSceneServer.get() == 0) + { + GetLog()->Error() + << "(RCS3DMonitor) ERROR: SceneServer not found\n"; + } +} + +void RCS3DMonitor::OnUnlink() +{ + mSceneServer.reset(); + mActiveScene.reset(); + ClearNodeCache(); +} + +void RCS3DMonitor::ParseMonitorMessage(const std::string& data) +{ + // pass the received string on to all installed CommandParsers + TLeafList items; + ListChildrenSupportingClass<MonitorCmdParser>(items); + + for ( + TLeafList::iterator iter = items.begin(); + iter != items.end(); + ++iter + ) + { + shared_static_cast<MonitorCmdParser>(*iter) + ->ParseMonitorMessage(data); + } +} + +string RCS3DMonitor::GetMonitorInfo(const PredicateList& pList) +{ + stringstream ss; + mFullState = false; + DescribeCustomPredicates(ss,pList); + DescribeActiveScene(ss); + + return ss.str(); +} + +string RCS3DMonitor::GetMonitorHeaderInfo(const PredicateList& pList) +{ + stringstream ss; + mFullState = true; + ClearNodeCache(); + DescribeCustomPredicates(ss,pList); + DescribeActiveScene(ss); + + return ss.str(); +} + +void RCS3DMonitor::DescribeCustomPredicates(stringstream& ss,const PredicateList& pList) +{ + ss << "("; + + for ( + PredicateList::TList::const_iterator iter = pList.begin(); + iter != pList.end(); + ++iter + ) + { + const Predicate& pred = (*iter); + + ss << "("; + ss << pred.name; + + const ParameterList& paramList = pred.parameter; + ParameterList::TVector::const_iterator pIter = paramList.begin(); + + std::string param; + while ( + (pIter != paramList.end()) && + (paramList.AdvanceValue(pIter, param)) + ) + { + ss << " "; + ss << param; + } + + ss << ")"; + } + + ss << ")"; +} + +void RCS3DMonitor::DescribeBall(stringstream& ss, NodeCache& entry, boost::shared_ptr<Ball> ball) +{ + if (mFullState) + { + ss << "(nd Ball"; + } else + { + ss << "(nd"; + } + + DescribeTransform(ss, entry, boost::shared_static_cast<Transform>(ball), false); +} + +void RCS3DMonitor::DescribeBaseNode(stringstream& ss) +{ + if (mFullState) + { + ss << "(nd BN"; + } else + { + ss << "(nd"; + } +} + +void RCS3DMonitor::DescribeLight(stringstream& ss, boost::shared_ptr<Light> light) +{ + if (! mFullState) + { + return DescribeBaseNode(ss); + } + + ss << "(nd Light "; + + const RGBA& diff = light->GetDiffuse(); + ss << "(setDiffuse " << diff.r() << " " << diff.g() << " " + << diff.b() << " " << diff.a() << ") "; + + const RGBA& amb = light->GetAmbient(); + ss << "(setAmbient " << amb.r() << " " << amb.g() << " " + << amb.b() << " " << amb.a() << ") "; + + const RGBA& spec = light->GetSpecular(); + ss << "(setSpecular " << spec.r() << " " << spec.g() << " " + << spec.b() << " " << spec.a() << ")"; +} + +void RCS3DMonitor::DescribeTransform(stringstream& ss, NodeCache& entry, boost::shared_ptr<Transform> transform, bool prefix) +{ + if (prefix) + if (mFullState) + { + ss << "(nd TRF"; + } else + { + ss << "(nd"; + } + + // include transform data only for fullstate or a modified + // transform node + const float precision = 0.005f; + const Matrix& mat = transform->GetLocalTransform(); + + bool update = false; + + if (mFullState) + { + update = true; + } else + { + const salt::Matrix& old = entry.transform; + + for (int i=0;i<16;++i) + { + const float d = fabs(old.m[i] - mat.m[i]); + + if (d > precision) + { + update = true; + break; + } + } + } + + if (update) + { + ss << " (SLT"; + + for (int i=0;i<16;++i) + { + ss << " " << mat.m[i]; + } + + ss << ")"; + + // update cache + entry.transform = mat; + } +} + +void RCS3DMonitor::DescribeMesh(stringstream& ss, boost::shared_ptr<StaticMesh> mesh) +{ + boost::shared_ptr<SingleMatNode> singleMat = + shared_dynamic_cast<SingleMatNode>(mesh); + + if (singleMat.get() != 0) + { + ss << "(nd SMN"; + } else + { + ss << "(nd StaticMesh"; + } + + if (mFullState || mesh->VisibleToggled()) + if (mesh->IsVisible()) + ss << " (setVisible 1)"; + else + ss << " (setVisible 0)"; + + if (! mFullState) + return; + + if (mesh->IsTransparent()) + { + ss << " (setTransparent)"; + } + + ss << " (load " << mesh->GetMeshName(); + + const ParameterList& params = mesh->GetMeshParameter(); + for ( + ParameterList::TVector::const_iterator iter = params.begin(); + iter != params.end(); + ++iter + ) + { + string str; + params.GetValue(iter,str); + ss << " " << str; + } + + ss << ")"; + + const Vector3f& scale = mesh->GetScale(); + + ss << " (sSc " + << scale[0] << " " + << scale[1] << " " + << scale[2] << ")"; + + if (singleMat.get() != 0) + { + boost::shared_ptr<Material> mat = singleMat->GetMaterial(); + if (mat.get() != 0) + { + ss << " (sMat " << mat->GetName() << ")"; + } + } + else{ + std::vector<std::string> mats = mesh->GetMaterialNames(); + if ( !mats.empty() ){ + ss<<"(resetMaterials"; + for(std::vector<std::string>::const_iterator iter = mats.begin(); + mats.end() != iter; ++iter){ + ss<<' '<<*iter; + } + ss<<')'; + } + } +} + +RCS3DMonitor::NodeCache* RCS3DMonitor::LookupNode(boost::shared_ptr<BaseNode> node) +{ + if (node.get() == 0) + { + assert(false); + return 0; + } + + // Check whether we already have this node in cache + TNodeCacheMap::iterator iter = mNodeCache.find(node); + if (iter != mNodeCache.end()) + { + return &((*iter).second); + } + + // Ball + boost::shared_ptr<Ball> ball + = shared_dynamic_cast<Ball>(node); + if (ball.get() != 0) + { + mNodeCache[node] + = NodeCache(NT_BALL, ball->GetLocalTransform()); + + return &(mNodeCache[node]); + } + + // Transform + boost::shared_ptr<Transform> transform + = shared_dynamic_cast<Transform>(node); + if (transform.get() != 0) + { + mNodeCache[node] + = NodeCache(NT_TRANSFORM, transform->GetLocalTransform()); + + return &(mNodeCache[node]); + } + + boost::shared_ptr<StaticMesh> mesh + = shared_dynamic_cast<StaticMesh>(node); + if (mesh.get() != 0) + { + mNodeCache[node] = NodeCache(NT_STATICMESH); + return &(mNodeCache[node]); + } + + boost::shared_ptr<Light> light + = shared_dynamic_cast<Light>(node); + if (light.get() != 0) + { + mNodeCache[node] = NodeCache(NT_LIGHT); + return &(mNodeCache[node]); + } + + // treat every other node type as a BaseNode + mNodeCache[node] = NodeCache(NT_BASE); + + return &(mNodeCache[node]); +} + +bool RCS3DMonitor::DescribeNode(stringstream& ss, boost::shared_ptr<BaseNode> node) +{ + NodeCache* entry = LookupNode(node); + if (entry == 0) + { + // skip node + assert(false); + return false; + } + + switch (entry->type) + { + default: + assert(false); + // fall through + + case NT_BASE: + // skip node + return false; + + case NT_BALL: + DescribeBall + (ss, (*entry), shared_static_cast<Ball>(node)); + + case NT_TRANSFORM: + DescribeTransform + (ss, (*entry), shared_static_cast<Transform>(node)); + return true; + + case NT_STATICMESH: + DescribeMesh + (ss, shared_static_cast<StaticMesh>(node)); + return true; + + case NT_LIGHT: + DescribeLight + (ss, shared_static_cast<Light>(node)); + return true; + } +} + +void RCS3DMonitor::DescribeActiveScene(stringstream& ss) +{ + if (mSceneServer.get() == 0) + { + return; + } + + mActiveScene = mSceneServer->GetActiveScene(); + + if (mActiveScene.get() != 0) + { + if (mFullState) + { + ss << "(RSG 0 1)"; + } else + { + ss << "(RDS 0 1)"; + } + + ss << "("; + DescribeScene(ss,mActiveScene); + ss << ")"; + } +} + +void RCS3DMonitor::DescribeScene(stringstream& ss, boost::shared_ptr<BaseNode> node) +{ + bool closeParen = DescribeNode(ss, node); + + TLeafList baseNodes = node->GetBaseNodeChildren(); + for (TLeafList::iterator i = baseNodes.begin(); i!= baseNodes.end(); ++i) + { + boost::shared_ptr<BaseNode> baseNode = shared_dynamic_cast<BaseNode>(*i); + DescribeScene(ss,baseNode); + } + + if (closeParen) + { + ss << ")"; + } +} Added: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h (rev 0) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor.h 2011-06-23 18:00:49 UTC (rev 285) @@ -0,0 +1,150 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: sparkmonitor.h 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef RCS3DMONITOR_H__ +#define RCS3DMONITOR_H__ + +#include <oxygen/monitorserver/monitorsystem.h> +#include <oxygen/sceneserver/sceneserver.h> +#include <oxygen/sceneserver/scene.h> +#include <oxygen/sceneserver/transform.h> +#include <kerosin/sceneserver/staticmesh.h> +#include <kerosin/sceneserver/light.h> +#include <oxygen/physicsserver/body.h> +#include "../ball/ball.h" + +class RCS3DMonitor : public oxygen::MonitorSystem +{ +public: + enum ENodeType + { + NT_BASE = 0, + NT_TRANSFORM, + NT_STATICMESH, + NT_LIGHT, + NT_BALL + }; + + struct NodeCache + { + public: + ENodeType type; + + /** the last local transform matrix sent to the client */ + salt::Matrix transform; + + public: + NodeCache(ENodeType nt = NT_BASE) + : type(nt) + { + } + + NodeCache(ENodeType nt, const salt::Matrix& t) + : type(nt), transform(t) + { + } + }; + + typedef std::map<boost::shared_ptr<oxygen::BaseNode>, NodeCache> TNodeCacheMap; + +public: + RCS3DMonitor(); + virtual ~RCS3DMonitor(); + + /** If a monitor sends information to the world model, this + * function is called to process it. + * @param data data sent from monitor to monitorsystem via SPADES. + */ + void ParseMonitorMessage(const std::string& data); + + /** This function will be called periodically to get information + * about the current state of the world. + * \param items holds a list of additional name value pairs. These + * predicates are collected from MonitorItem objects registered to + * the MonitorServer. The monitor should transfer them to the + * client if possible. + */ + virtual std::string GetMonitorInfo(const oxygen::PredicateList& pList); + + /** This function is called once for every MonitorSystem each time + * a new client connects. It should return any header/setup + * information that is needed. + * \param items holds a list of additional name value + * pairs. These predicates are collected from MonitorItem objects + * registered to the MonitorServer. The monitor should transfer + * them to the client if possible. + */ + virtual std::string GetMonitorHeaderInfo(const oxygen::PredicateList& pList); + + /** update variables from a script */ + virtual void UpdateCached(); + +protected: + virtual void OnLink(); + virtual void OnUnlink(); + + void ClearNodeCache(); + + /** This function looks the cached node entry in the node + cache. The entry is added to the cache if it does not exist + */ + NodeCache* LookupNode(boost::shared_ptr<oxygen::BaseNode> node); + + void DescribeCustomPredicates(std::stringstream& ss,const oxygen::PredicateList& pList); + void DescribeActiveScene(std::stringstream& ss); + void DescribeScene(std::stringstream& ss, + boost::shared_ptr<oxygen::BaseNode> node); + + /** This function writes the s-expression for the given node to + the given strinstream, omitting the closing parentheses. It + returns false if the node is skipped and no description is + created. Skipped nodes are invisible scene graph nodes. + */ + bool DescribeNode(std::stringstream& ss, + boost::shared_ptr<oxygen::BaseNode> node); + void DescribeBaseNode(std::stringstream& ss); + void DescribeBall(std::stringstream& ss, NodeCache& entry, + boost::shared_ptr<Ball> ball); + void DescribeTransform(std::stringstream& ss, NodeCache& entry, + boost::shared_ptr<oxygen::Transform> transform, bool prefix = true); + void DescribeMesh(std::stringstream& ss, + boost::shared_ptr<kerosin::StaticMesh> mesh); + void DescribeLight(std::stringstream& ss, + boost::shared_ptr<kerosin::Light> light); + +protected: + /** cached reference to the SceneServer */ + boost::shared_ptr<oxygen::SceneServer> mSceneServer; + + /** cached reference to the current active scene */ + boost::shared_ptr<oxygen::Scene> mActiveScene; + + /** true, if the full state is generated */ + bool mFullState; + + /** cached node type and state */ + TNodeCacheMap mNodeCache; +}; + +DECLARE_CLASS(RCS3DMonitor); + +#endif // RCS3DMONITOR_H__ + Added: trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp (rev 0) +++ trunk/rcssserver3d/plugin/soccer/rcs3dmonitor/rcs3dmonitor_c.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -0,0 +1,29 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: sparkmonitor_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "rcs3dmonitor.h" + +void +CLASS(RCS3DMonitor)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseParser); +} + Modified: trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -38,6 +38,7 @@ RestrictedVisionPerceptor::RestrictedVisionPerceptor() : Perceptor(), mSenseMyPos(false), + mSenseBallPos(false), mAddNoise(true), mStaticSenseAxis(true), mSenseLine(false) @@ -460,6 +461,21 @@ element.AddValue(sensedMyPos[2]); } + if (mSenseBallPos) + { + TTeamIndex ti = mAgentState->GetTeamIndex(); + boost::shared_ptr<Ball> ball; + SoccerBase::GetBall(*this, ball); + Vector3f sensedBallPos = SoccerBase::FlipView(ball->GetWorldTransform().Pos(), ti); + + ParameterList& element = predicate.parameter.AddList(); + element.AddValue(std::string("ballpos")); + element.AddValue(sensedBallPos[0]); + element.AddValue(sensedBallPos[1]); + element.AddValue(sensedBallPos[2]); + + } + if (mSenseLine) { SenseLine(predicate); @@ -562,6 +578,21 @@ element.AddValue(sensedMyPos[2]); } + if (mSenseBallPos) + { + TTeamIndex ti = mAgentState->GetTeamIndex(); + boost::shared_ptr<Ball> ball; + SoccerBase::GetBall(*this, ball); + Vector3f sensedBallPos = SoccerBase::FlipView(ball->GetWorldTransform().Pos(), ti); + + ParameterList& element = predicate.parameter.AddList(); + element.AddValue(std::string("ballpos")); + element.AddValue(sensedBallPos[0]); + element.AddValue(sensedBallPos[1]); + element.AddValue(sensedBallPos[2]); + + } + if (mSenseLine) { SenseLine(predicate); @@ -633,6 +664,12 @@ mSenseMyPos = sense; } +void +RestrictedVisionPerceptor::SetSenseBallPos(bool sense) +{ + mSenseBallPos = sense; +} + bool RestrictedVisionPerceptor::CheckVisuable(RestrictedVisionPerceptor::ObjectData& od) const { // theta is the angle in horizontal plane, with fwAngle as 0 degree Modified: trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor.h 2011-06-23 18:00:49 UTC (rev 285) @@ -30,6 +30,7 @@ #include <oxygen/agentaspect/agentaspect.h> #include <agentstate/agentstate.h> #include "../line/line.h" +#include "../ball/ball.h" class RestrictedVisionPerceptor : public oxygen::Perceptor { @@ -104,6 +105,9 @@ //! Turn sensing of agent position on/off void SetSenseMyPos(bool sense); + //! Turn sensing of agent position on/off + void SetSenseBallPos(bool sense); + // turn sensing of lines on/off void SetSenseLine(bool sense); @@ -207,6 +211,9 @@ //! true, if the absolute position of the agent is sensed. bool mSenseMyPos; + + //! true, if the absolute position of the ball is sensed. + bool mSenseBallPos; //! sigma for random measurement error (distance) float mSigmaDist; Modified: trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/plugin/soccer/restrictedvisionperceptor/restrictedvisionperceptor_c.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -80,6 +80,22 @@ return true; } +FUNCTION(RestrictedVisionPerceptor,setSenseBallPos) +{ + bool inSenseBallPos; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(),inSenseBallPos)) + ) + { + return false; + } + + obj->SetSenseBallPos(inSenseBallPos); + return true; +} + FUNCTION(RestrictedVisionPerceptor,setStaticSenseAxis) { bool inStaticAxis; @@ -172,6 +188,7 @@ DEFINE_FUNCTION(setNoiseParams); DEFINE_FUNCTION(addNoise); DEFINE_FUNCTION(setSenseMyPos); + DEFINE_FUNCTION(setSenseBallPos); DEFINE_FUNCTION(setStaticSenseAxis); DEFINE_FUNCTION(setViewCones); DEFINE_FUNCTION(setPanRange); Modified: trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -51,6 +51,8 @@ mCommandMap["kill"] = CT_KILL; mCommandMap["repos"] = CT_REPOS; mCommandMap["killsim"] = CT_KILLSIM; + mCommandMap["reqfullstate"] = CT_REQFULLSTATE; + // setup team index map // Originally team sides were "L","R" and "N" // But this seems to be unused @@ -128,7 +130,13 @@ GetLog()->Error() << "ERROR: (TrainerCommandParser) Unable to get SimulationServer\n"; } - + mMonitorControl = shared_dynamic_cast<MonitorControl> + (mSimServer->GetControlNode("MonitorControl")); + + if (mMonitorControl.get() == 0) + { + GetLog()->Error() << "ERROR: (TrainerCommandParser) Unable to get MonitorControl\n"; + } } void TrainerCommandParser::OnUnlink() @@ -224,6 +232,10 @@ case CT_KILLSIM: ParseKillSimCommand(predicate); break; + case CT_REQFULLSTATE: + mMonitorControl->RequestFullState(); + break; + default: return false; } Modified: trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/plugin/soccer/trainercommandparser/trainercommandparser.h 2011-06-23 18:00:49 UTC (rev 285) @@ -33,6 +33,7 @@ #include <soccertypes.h> #include <soccerruleaspect/soccerruleaspect.h> #include <oxygen/simulationserver/simulationserver.h> +#include <oxygen/simulationserver/monitorcontrol.h> namespace oxygen { @@ -54,7 +55,8 @@ CT_SELECT, CT_KILL, CT_REPOS, - CT_KILLSIM + CT_KILLSIM, + CT_REQFULLSTATE }; typedef std::map<std::string, ECommandType> TCommandMap; @@ -148,6 +150,8 @@ boost::shared_ptr<oxygen::GameControlServer> mGameControl; //! cached reference to the simulation server boost::shared_ptr<oxygen::SimulationServer> mSimServer; + //! cahced reference to the monitor control node + boost::shared_ptr<oxygen::MonitorControl> mMonitorControl; bool mGetAck; std::string mAckString; Modified: trunk/rcssserver3d/rcssmonitor3d/main.cpp =================================================================== --- trunk/rcssserver3d/rcssmonitor3d/main.cpp 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/rcssserver3d/rcssmonitor3d/main.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -121,6 +121,17 @@ GetScriptServer()->Eval(serverIPStr); } } + else if (strcmp(argv[i], "--server-port") == 0) + { + i++; + if (i < argc) + GetScriptServer()->Eval(string("$monitorPort = ") + argv[i]); + else + { + PrintHelp(); + return false; + } + } } return true; Modified: trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp 2011-06-23 18:00:49 UTC (rev 285) @@ -158,3 +158,8 @@ } } } + +void MonitorControl::RequestFullState() +{ + mFullStateLogged--; +} Modified: trunk/spark/lib/oxygen/simulationserver/monitorcontrol.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/monitorcontrol.h 2011-06-06 10:23:16 UTC (rev 284) +++ trunk/spark/lib/oxygen/simulationserver/monitorcontrol.h 2011-06-23 18:00:49 UTC (rev 285) @@ -54,6 +54,9 @@ /** sets the monitor update interval in cycles */ void SetMonitorInterval(int i); + /** Request that next update gives the full state */ + void RequestFullState(); + protected: virtual void OnLink(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-06-06 10:23:23
|
Revision: 284 http://simspark.svn.sourceforge.net/simspark/?rev=284&view=rev Author: hedayat Date: 2011-06-06 10:23:16 +0000 (Mon, 06 Jun 2011) Log Message: ----------- Fixed a small but important mistake I made in AnalyseTouchGroups Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-05-13 21:56:12 UTC (rev 283) +++ trunk/rcssserver3d/ChangeLog 2011-06-06 10:23:16 UTC (rev 284) @@ -1,3 +1,10 @@ +2011-06-06 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp + (SoccerRuleAspect::AnalyseTouchGroups): + - fixed a horrible mistake of mine which prevented from touch group rules + to be applied at all + 2011-05-14 Hedayat Vatankhah <hed...@gm...> * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-05-13 21:56:12 UTC (rev 283) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-06-06 10:23:16 UTC (rev 284) @@ -277,10 +277,11 @@ SoccerBase::TAgentStateList::iterator i = agent_states.begin(); for (; i != agent_states.end(); ++i) { - boost::shared_ptr<TouchGroup> touchGroup = (*i)->GetOldTouchGroup(); + boost::shared_ptr<TouchGroup> touchGroup = (*i)->GetTouchGroup(); // Wasn't touching before, joined group making group too large - if (touchGroup->size() == 1 && touchGroup->size() > mMaxTouchGroupSize) + if ((*i)->GetOldTouchGroup()->size() == 1 && + touchGroup->size() > mMaxTouchGroupSize) { // determine the team that has more players in the touch group int pl[3] = { 0 }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-05-13 21:56:18
|
Revision: 283 http://simspark.svn.sourceforge.net/simspark/?rev=283&view=rev Author: hedayat Date: 2011-05-13 21:56:12 +0000 (Fri, 13 May 2011) Log Message: ----------- Fixed a bug in goal counting Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-05-01 22:11:58 UTC (rev 282) +++ trunk/rcssserver3d/ChangeLog 2011-05-13 21:56:12 UTC (rev 283) @@ -1,3 +1,10 @@ +2011-05-14 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp + (SoccerRuleAspect::CheckGoal): + - fixed a small bug in goal counting which cause this function to always + count a goal when ball moved out of the field + 2011-05-02 Hedayat Vatankhah <hed...@gm...> * CMakeLists.txt: Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-05-01 22:11:58 UTC (rev 282) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-05-13 21:56:12 UTC (rev 283) @@ -1067,7 +1067,7 @@ salt::Vector3f normBVel = mBallBody->GetVelocity(); // ball should be inside the field recently (assumes that the simulation // step size is smaller than 1 second) - if (ballPos.x() - normBVel.x() > mGoalBallLineX) + if (fabs(ballPos.x() - normBVel.x()) > mGoalBallLineX) return false; normBVel.Normalize(); @@ -1083,6 +1083,8 @@ else idx = TI_RIGHT; } + else + return false; } // score the lucky team This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-05-01 22:12:05
|
Revision: 282 http://simspark.svn.sourceforge.net/simspark/?rev=282&view=rev Author: hedayat Date: 2011-05-01 22:11:58 +0000 (Sun, 01 May 2011) Log Message: ----------- More fine tuning of the mingw32 installer Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/plugin/collisionperceptor/CMakeLists.txt trunk/spark/plugin/odeimps/CMakeLists.txt Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2011-05-01 11:27:27 UTC (rev 281) +++ trunk/rcssserver3d/CMakeLists.txt 2011-05-01 22:11:58 UTC (rev 282) @@ -117,6 +117,7 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) +set(CPACK_STRIP_FILES TRUE) set(CPACK_PACKAGE_VENDOR "RoboCup Soccer Server 3D Maintenance Group") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "RoboCup Soccer Simulation Server 3D") Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-05-01 11:27:27 UTC (rev 281) +++ trunk/rcssserver3d/ChangeLog 2011-05-01 22:11:58 UTC (rev 282) @@ -1,3 +1,8 @@ +2011-05-02 Hedayat Vatankhah <hed...@gm...> + + * CMakeLists.txt: + - strip files when creating a binary package + 2011-05-01 Hedayat Vatankhah <hed...@gm...> * windows/uninstall_extra.nsi: Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2011-05-01 11:27:27 UTC (rev 281) +++ trunk/spark/CMakeLists.txt 2011-05-01 22:11:58 UTC (rev 282) @@ -43,9 +43,9 @@ set(Boost_USE_STATIC_RUNTIME OFF) # this must be added by cmake itself, but it is not - if ("${CMAKE_CXX_COMPILER}" MATCHES "mingw") + if (${CMAKE_CXX_COMPILER} MATCHES "mingw") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -shared") - endif ("${CMAKE_CXX_COMPILER}" MATCHES "mingw") + endif (${CMAKE_CXX_COMPILER} MATCHES "mingw") endif (WIN32) include(AdditionalSearchPaths) @@ -203,32 +203,59 @@ ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) if (WIN32) # try to find and install third-party .dlls to lib/thirdparty directory - set(THLIBDIR ${LIBDIR}/thirdparty) + set(THLIBDIR ${LIBDIR}/thirdparty) - string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") - if (EXISTS ${ODEDLL}) - install(PROGRAMS ${ODEDLL} DESTINATION ${THLIBDIR}) - endif (EXISTS ${ODEDLL}) + # MinGW dll installation on a single root system + if (${CMAKE_CXX_COMPILER} MATCHES "mingw") + set(MINGW_BIN_DIR "${Boost_LIBRARY_DIRS}/../bin/") + install(DIRECTORY ${MINGW_BIN_DIR} DESTINATION ${THLIBDIR} + FILES_MATCHING + PATTERN "libstdc++*.dll" + PATTERN "libgcc_s_sjlj*.dll" + PATTERN "libode*.dll" + PATTERN "tbb*.dll" + PATTERN "*boost*regex*mt*.dll" + PATTERN "*boost*date_time*mt*.dll" + PATTERN "*boost*thread*mt*.dll" + PATTERN "libIL*.dll" + PATTERN "libjpeg*.dll" + PATTERN "libpng*.dll" + PATTERN "*freetype*.dll" + PATTERN "*SDL*.dll") + endif (${CMAKE_CXX_COMPILER} MATCHES "mingw") + + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") + if (EXISTS ${ODEDLL} AND ${ODEDLL} MATCHES ".dll$") + install(PROGRAMS ${ODEDLL} DESTINATION ${THLIBDIR}) + endif (EXISTS ${ODEDLL} AND ${ODEDLL} MATCHES ".dll$") + + install(DIRECTORY "${Boost_LIBRARY_DIRS}/" DESTINATION ${THLIBDIR} + FILES_MATCHING PATTERN "*boost*regex*mt*.dll" + PATTERN "*boost*date_time*mt*.dll" + PATTERN "*boost*thread*mt*.dll") + + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" DevIL_DLL "${IL_LIBRARIES}") + if (EXISTS ${DevIL_DLL} AND ${DevIL_DLL} MATCHES ".dll$") + install(PROGRAMS ${DevIL_DLL} DESTINATION ${THLIBDIR}) + endif (EXISTS ${DevIL_DLL} AND ${DevIL_DLL} MATCHES ".dll$") + + string(REGEX REPLACE "(.*)/ruby(.exe)?" "\\1/" RUBY_BINDIR "${RUBY_EXECUTABLE}") + install(DIRECTORY "${RUBY_BINDIR}" + DESTINATION ${THLIBDIR} FILES_MATCHING PATTERN "*.dll") + + install(DIRECTORY "${FREETYPE_INCLUDE_DIR_ft2build}/../bin/" + DESTINATION ${THLIBDIR} FILES_MATCHING + PATTERN "*freetype*.dll" PATTERN "*zlib*.dll") - install(DIRECTORY "${Boost_LIBRARY_DIRS}/" DESTINATION ${THLIBDIR} - FILES_MATCHING PATTERN "*.dll") + set(SDL_DLL "${SDL_INCLUDE_DIR}/../lib/sdl.dll") + if (EXISTS ${SDL_DLL}) + install(PROGRAMS ${SDL_DLL} DESTINATION ${THLIBDIR}) + endif (EXISTS ${SDL_DLL}) - string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" DevIL_DLL "${IL_LIBRARIES}") - if (EXISTS ${DevIL_DLL}) - install(PROGRAMS ${DevIL_DLL} DESTINATION ${THLIBDIR}) - endif (EXISTS ${DevIL_DLL}) - - string(REGEX REPLACE "(.*)/ruby(.exe)?" "\\1/" RUBY_BINDIR "${RUBY_EXECUTABLE}") - install(DIRECTORY "${RUBY_BINDIR}" - DESTINATION ${THLIBDIR} FILES_MATCHING PATTERN "*.dll") - - install(DIRECTORY "${FREETYPE_INCLUDE_DIR_ft2build}/../bin/" - DESTINATION ${THLIBDIR} FILES_MATCHING PATTERN "*.dll") - - set(SDL_DLL "${SDL_INCLUDE_DIR}/../lib/sdl.dll") - if (EXISTS ${SDL_DLL}) - install(PROGRAMS ${SDL_DLL} DESTINATION ${THLIBDIR}) - endif (EXISTS ${SDL_DLL}) + if (CMAKE_STRIP) + set(STRIP_FILES_GLOB "'\${CMAKE_INSTALL_PREFIX}/${THLIBDIR}/'*.dll") + install(CODE "EXECUTE_PROCESS(COMMAND sh -c \"${CMAKE_STRIP} ${STRIP_FILES_GLOB}\")") + endif (CMAKE_STRIP) endif (WIN32) ########### uninstall support ############ @@ -248,7 +275,8 @@ set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) - + +set(CPACK_STRIP_FILES TRUE) set(CPACK_PACKAGE_VENDOR "RoboCup Soccer Server 3D Maintenance Group") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A generic physical simulation system") Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-05-01 11:27:27 UTC (rev 281) +++ trunk/spark/ChangeLog 2011-05-01 22:11:58 UTC (rev 282) @@ -1,3 +1,13 @@ +2011-05-02 Hedayat Vatankhah <hed...@gm...> + + * CMakeLists.txt: + - strip files when creating binary packages + - installer enhancements for mingw32 based setup + + * plugin/odeimps/CMakeLists.txt: + * plugin/collisionperceptor/CMakeLists.txt: + - added complete ode dependencies + 2011-05-01 Hedayat Vatankhah <hed...@gm...> * cmake/FindODE.cmake: Modified: trunk/spark/plugin/collisionperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/collisionperceptor/CMakeLists.txt 2011-05-01 11:27:27 UTC (rev 281) +++ trunk/spark/plugin/collisionperceptor/CMakeLists.txt 2011-05-01 22:11:58 UTC (rev 282) @@ -22,7 +22,7 @@ add_library(collisionperceptor MODULE ${collisionperceptor_LIB_SRCS}) -target_link_libraries(collisionperceptor ${ODE_LIBRARY} ${spark_libs}) +target_link_libraries(collisionperceptor ${ODE_LIBRARY} ${ODE_LDFLAGS} ${spark_libs}) if (NOT APPLE) set_target_properties(collisionperceptor PROPERTIES VERSION 0.0.0 SOVERSION 0) Modified: trunk/spark/plugin/odeimps/CMakeLists.txt =================================================================== --- trunk/spark/plugin/odeimps/CMakeLists.txt 2011-05-01 11:27:27 UTC (rev 281) +++ trunk/spark/plugin/odeimps/CMakeLists.txt 2011-05-01 22:11:58 UTC (rev 282) @@ -106,7 +106,7 @@ add_library(odeimps MODULE ${odeimps_LIB_SRCS}) -target_link_libraries(odeimps ${ODE_LIBRARY} ${spark_libs}) +target_link_libraries(odeimps ${ODE_LIBRARY} ${ODE_LDFLAGS} ${spark_libs}) if (NOT APPLE) set_target_properties(odeimps PROPERTIES VERSION 0.0.0 SOVERSION 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-05-01 11:27:33
|
Revision: 281 http://simspark.svn.sourceforge.net/simspark/?rev=281&view=rev Author: hedayat Date: 2011-05-01 11:27:27 +0000 (Sun, 01 May 2011) Log Message: ----------- - A few more fixes for Windows installation - add double quotes for cp/copy command Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/windows/install_extra.nsi trunk/rcssserver3d/windows/uninstall_extra.nsi trunk/spark/ChangeLog trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-05-01 03:05:00 UTC (rev 280) +++ trunk/rcssserver3d/ChangeLog 2011-05-01 11:27:27 UTC (rev 281) @@ -1,5 +1,10 @@ 2011-05-01 Hedayat Vatankhah <hed...@gm...> + * windows/uninstall_extra.nsi: + * windows/install_extra.nsi: + - install an rcsoccersim3d script under Windows + - fixed path commands to not include = sign + * cmake/FindODE.cmake: - don't overwrite config options obtained from ode-config if available Modified: trunk/rcssserver3d/windows/install_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/install_extra.nsi 2011-05-01 03:05:00 UTC (rev 280) +++ trunk/rcssserver3d/windows/install_extra.nsi 2011-05-01 11:27:27 UTC (rev 281) @@ -6,25 +6,32 @@ ${if} $MyTemp != ">" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSServer3D.lnk" "$INSTDIR\bin\rcssserver3d.cmd" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSMonitor3D.lnk" "$INSTDIR\bin\rcssmonitor3d.cmd" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSoccerSim3D.lnk" "$INSTDIR\bin\rcsoccersim3d.cmd" ${endif} WriteRegExpandStr HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' '$INSTDIR' ClearErrors FileOpen $0 $INSTDIR\bin\rcssserver3d.cmd w -FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'PATH %PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' -FileWrite $0 'rcssserver3d.exe %1 %2 %3 %4' +FileWrite $0 'rcssserver3d.exe %1 %2 %3 %4$\n' FileClose $0 ClearErrors FileOpen $0 $INSTDIR\bin\rcssmonitor3d.cmd w -FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'PATH %PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' -FileWrite $0 'rcssmonitor3d.exe %1 %2 %3 %4' +FileWrite $0 'rcssmonitor3d.exe %1 %2 %3 %4$\n' FileClose $0 ClearErrors FileOpen $0 $INSTDIR\bin\rcssagent3d.cmd w -FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'PATH %PATH%;%SPARK_DIR%\lib\simspark;%SPARK_DIR%\lib\thirdparty;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' -FileWrite $0 'rcssagent3d.exe %1 %2 %3 %4' +FileWrite $0 'rcssagent3d.exe %1 %2 %3 %4$\n' FileClose $0 +ClearErrors +FileOpen $0 $INSTDIR\bin\rcsoccersim3d.cmd w +FileWrite $0 'start cmd /c "%RCSSSERVER3D_DIR%\bin\rcssserver3d.cmd"$\n' +FileWrite $0 'start /b /wait cmd /c "%RCSSSERVER3D_DIR%\bin\rcssmonitor3d.cmd"$\n' +FileClose $0 + Modified: trunk/rcssserver3d/windows/uninstall_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/uninstall_extra.nsi 2011-05-01 03:05:00 UTC (rev 280) +++ trunk/rcssserver3d/windows/uninstall_extra.nsi 2011-05-01 11:27:27 UTC (rev 281) @@ -1,6 +1,7 @@ Delete '$INSTDIR\bin\rcssserver3d.cmd' Delete '$INSTDIR\bin\rcssmonitor3d.cmd' Delete '$INSTDIR\bin\rcssagent3d.cmd' +Delete '$INSTDIR\bin\rcsoccersim3d.cmd' DeleteRegValue HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' Var /GLOBAL STARTMENU_DIR_FORLINKS @@ -8,3 +9,5 @@ Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\RCSSServer3D.lnk" Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\RCSSMonitor3D.lnk" +Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\RCSoccerSim3D.lnk" + Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-05-01 03:05:00 UTC (rev 280) +++ trunk/spark/ChangeLog 2011-05-01 11:27:27 UTC (rev 281) @@ -8,6 +8,8 @@ * lib/salt/sharedlibrary.cpp: * lib/zeitgeist/scriptserver/scriptserver.cpp: - compilation fix under mingw32 + (ScriptServer::RunInitScriptInternal): + - enclose source and dest paths for copy command in double quotes * utility/rcssnet/socket.hpp: * utility/rcssnet/tcpsocket.cpp: Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-05-01 03:05:00 UTC (rev 280) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-05-01 11:27:27 UTC (rev 281) @@ -511,9 +511,9 @@ stringstream s; #ifdef WIN32 - s << "copy " << sourcePath << " " << destPath; + s << "copy \"" << sourcePath << "\" \"" << destPath << '"'; #else - s << "cp " << sourcePath << " " << destPath; + s << "cp \"" << sourcePath << "\" \"" << destPath << '"'; #endif system(s.str().c_str()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-05-01 03:05:06
|
Revision: 280 http://simspark.svn.sourceforge.net/simspark/?rev=280&view=rev Author: hedayat Date: 2011-05-01 03:05:00 +0000 (Sun, 01 May 2011) Log Message: ----------- MinGW32 Compilation Fixes: simspark and rcssserver3d can now be built under Linux using mingw32 compiler :) Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/cmake/FindODE.cmake trunk/rcssserver3d/rcssagent3d/CMakeLists.txt trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/cmake/FindODE.cmake trunk/spark/lib/kerosin/openglserver/openglserver.cpp trunk/spark/lib/salt/gmath.h trunk/spark/lib/salt/sharedlibrary.cpp trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp trunk/spark/utility/rcssnet/addr.cpp trunk/spark/utility/rcssnet/handler.hpp trunk/spark/utility/rcssnet/socket.cpp trunk/spark/utility/rcssnet/socket.hpp trunk/spark/utility/rcssnet/tcpsocket.cpp trunk/spark/utility/rcssnet/udpsocket.cpp Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/rcssserver3d/CMakeLists.txt 2011-05-01 03:05:00 UTC (rev 280) @@ -15,6 +15,11 @@ set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) + + # this must be added by cmake itself, but it is not + if ("${CMAKE_CXX_COMPILER}" MATCHES "mingw") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -shared") + endif ("${CMAKE_CXX_COMPILER}" MATCHES "mingw") endif (WIN32) include(AdditionalSearchPaths) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/rcssserver3d/ChangeLog 2011-05-01 03:05:00 UTC (rev 280) @@ -1,7 +1,14 @@ 2011-05-01 Hedayat Vatankhah <hed...@gm...> + * cmake/FindODE.cmake: + - don't overwrite config options obtained from ode-config if available + + * rcssagent3d/CMakeLists.txt: + - use lowercase ws2_32 to be compatible with mingw32 + * CMakeLists.txt: - include AdditionalSearchPaths.cmake + - added -shared flag for mingw when linking modules * cmake/AdditionalSearchPaths.cmake: - sets up additional search paths under Windows to find dependencies in Modified: trunk/rcssserver3d/cmake/FindODE.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindODE.cmake 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/rcssserver3d/cmake/FindODE.cmake 2011-05-01 03:05:00 UTC (rev 280) @@ -110,13 +110,13 @@ NO_DEFAULT_PATH ) - IF (WIN32) + IF (WIN32 AND NOT ODE_CONFIG) IF("${ODE_LIBRARY}" MATCHES ".*double.*") SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") ELSE("${ODE_LIBRARY}" MATCHES ".*double.*") SET(ODE_EXTRA_CFLAGS "-DdSINGLE") ENDIF("${ODE_LIBRARY}" MATCHES ".*double.*") - ENDIF (WIN32) + ENDIF (WIN32 AND NOT ODE_CONFIG) IF (ODE_EXTRA_CFLAGS) SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") Modified: trunk/rcssserver3d/rcssagent3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/rcssagent3d/CMakeLists.txt 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/rcssserver3d/rcssagent3d/CMakeLists.txt 2011-05-01 03:05:00 UTC (rev 280) @@ -16,7 +16,7 @@ add_executable(rcssagent3d ${rcssagent3d_SRCS}) if (WIN32) - set(NET_LIBS WS2_32.lib) + set(NET_LIBS ws2_32.lib) endif (WIN32) target_link_libraries(rcssagent3d ${SPARK_LIBRARIES} ${SALT_LIBRARIES} Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/CMakeLists.txt 2011-05-01 03:05:00 UTC (rev 280) @@ -9,7 +9,7 @@ check_include_file("resolv.h" HAVE_RESOLV_H) check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H) check_include_file("netinet/in.h" HAVE_NETINET_IN_H) -check_include_file("Winsock2.h" HAVE_WINSOCK2_H) +check_include_file("winsock2.h" HAVE_WINSOCK2_H) check_include_file("arpa/nameser.h" HAVE_ARPA_NAMESER_H) check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) check_include_file("string.h" HAVE_STRING_H) @@ -41,6 +41,11 @@ set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) + + # this must be added by cmake itself, but it is not + if ("${CMAKE_CXX_COMPILER}" MATCHES "mingw") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -shared") + endif ("${CMAKE_CXX_COMPILER}" MATCHES "mingw") endif (WIN32) include(AdditionalSearchPaths) @@ -93,7 +98,7 @@ endif (NOT FUNC_HSTRERROR_EXISTS) if (WIN32) - set(NET_LIBS ${NET_LIBS} WS2_32.lib) + set(NET_LIBS ${NET_LIBS} ws2_32.lib) endif (WIN32) ########## add extra flags ########## @@ -213,7 +218,7 @@ install(PROGRAMS ${DevIL_DLL} DESTINATION ${THLIBDIR}) endif (EXISTS ${DevIL_DLL}) - string(REGEX REPLACE "(.*)/ruby.exe" "\\1/" RUBY_BINDIR "${RUBY_EXECUTABLE}") + string(REGEX REPLACE "(.*)/ruby(.exe)?" "\\1/" RUBY_BINDIR "${RUBY_EXECUTABLE}") install(DIRECTORY "${RUBY_BINDIR}" DESTINATION ${THLIBDIR} FILES_MATCHING PATTERN "*.dll") Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/ChangeLog 2011-05-01 03:05:00 UTC (rev 280) @@ -1,7 +1,27 @@ 2011-05-01 Hedayat Vatankhah <hed...@gm...> + * cmake/FindODE.cmake: + - don't overwrite ode-config settings under windows platform (if available) + + * lib/kerosin/openglserver/openglserver.cpp (OpenGLServer::GetExtension): + * lib/salt/gmath.h: + * lib/salt/sharedlibrary.cpp: + * lib/zeitgeist/scriptserver/scriptserver.cpp: + - compilation fix under mingw32 + + * utility/rcssnet/socket.hpp: + * utility/rcssnet/tcpsocket.cpp: + * utility/rcssnet/udpsocket.cpp: + * utility/rcssnet/socket.cpp: + * utility/rcssnet/handler.hpp: + * utility/rcssnet/addr.cpp: + - convert Winsock2.h to lowercase + * CMakeLists.txt: - include AdditionalSearchPaths.cmake + - use lower case name for Windows winsock header and library (for use with + mingw32 under Linux) + - added a missing flag for linking modules with mingw32 * cmake/AdditionalSearchPaths.cmake: - sets up additional search paths under Windows to find dependencies in Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/cmake/FindODE.cmake 2011-05-01 03:05:00 UTC (rev 280) @@ -110,13 +110,13 @@ NO_DEFAULT_PATH ) - IF (WIN32) + IF (WIN32 AND NOT ODE_CONFIG) IF("${ODE_LIBRARY}" MATCHES ".*double.*") SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") ELSE("${ODE_LIBRARY}" MATCHES ".*double.*") SET(ODE_EXTRA_CFLAGS "-DdSINGLE") ENDIF("${ODE_LIBRARY}" MATCHES ".*double.*") - ENDIF (WIN32) + ENDIF (WIN32 AND NOT ODE_CONFIG) IF (ODE_EXTRA_CFLAGS) SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") Modified: trunk/spark/lib/kerosin/openglserver/openglserver.cpp =================================================================== --- trunk/spark/lib/kerosin/openglserver/openglserver.cpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/lib/kerosin/openglserver/openglserver.cpp 2011-05-01 03:05:00 UTC (rev 280) @@ -183,7 +183,7 @@ void* OpenGLServer::GetExtension(const char* name) { #ifdef WIN32 - return wglGetProcAddress(name); + return reinterpret_cast<void*>(wglGetProcAddress(name)); #elif defined(__APPLE__) return NSGLGetProcAddress(name); #else Modified: trunk/spark/lib/salt/gmath.h =================================================================== --- trunk/spark/lib/salt/gmath.h 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/lib/salt/gmath.h 2011-05-01 03:05:00 UTC (rev 280) @@ -221,7 +221,7 @@ template <class TYPE> f_inline bool gIsFinite(TYPE f) { -#ifdef WIN32 +#ifdef _MSC_VER // isfinite is part of C99 but not available in Visual C++ assert(std::numeric_limits<TYPE>::has_infinity); return (std::numeric_limits<double>::infinity() != f); @@ -232,7 +232,7 @@ f_inline int gRound(float f) { -#ifdef WIN32 +#ifdef _MSC_VER // Uses the FloatToInt functionality int a; int *int_pointer = &a; Modified: trunk/spark/lib/salt/sharedlibrary.cpp =================================================================== --- trunk/spark/lib/salt/sharedlibrary.cpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/lib/salt/sharedlibrary.cpp 2011-05-01 03:05:00 UTC (rev 280) @@ -52,7 +52,7 @@ { if (mLibHandle) { - return ::GetProcAddress((HMODULE)mLibHandle, procName.c_str()); + return reinterpret_cast<void*>(::GetProcAddress((HMODULE)mLibHandle, procName.c_str())); } return NULL; } Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-05-01 03:05:00 UTC (rev 280) @@ -23,13 +23,15 @@ #include <boost/scoped_array.hpp> #include <sstream> #include <salt/fileclasses.h> -#include "rubywrapper.h" -#include "scriptserver.h" +#include <zeitgeist/core.h> #include <zeitgeist/corecontext.h> -#include <zeitgeist/core.h> #include <zeitgeist/logserver/logserver.h> #include <zeitgeist/fileserver/fileserver.h> #include <sys/stat.h> +// rubywrapper.h should be before scriptserver.h (gcvalue.h). also, they were +// moved down to prevent a compilation error with mingw32 +#include "rubywrapper.h" +#include "scriptserver.h" #ifdef HAVE_CONFIG_H #include <sparkconfig.h> Modified: trunk/spark/utility/rcssnet/addr.cpp =================================================================== --- trunk/spark/utility/rcssnet/addr.cpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/utility/rcssnet/addr.cpp 2011-05-01 03:05:00 UTC (rev 280) @@ -41,7 +41,7 @@ #endif #ifdef HAVE_WINSOCK2_H -#include "Winsock2.h" +#include "winsock2.h" #endif #include "handler.hpp" Modified: trunk/spark/utility/rcssnet/handler.hpp =================================================================== --- trunk/spark/utility/rcssnet/handler.hpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/utility/rcssnet/handler.hpp 2011-05-01 03:05:00 UTC (rev 280) @@ -22,7 +22,7 @@ #define RCSS_NET_HANDLER_HPP #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(CYGWIN) -#include "Winsock2.h" +#include "winsock2.h" #endif #include "rcssnet3D_defines.h" Modified: trunk/spark/utility/rcssnet/socket.cpp =================================================================== --- trunk/spark/utility/rcssnet/socket.cpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/utility/rcssnet/socket.cpp 2011-05-01 03:05:00 UTC (rev 280) @@ -47,7 +47,7 @@ #endif #ifdef HAVE_WINSOCK2_H -#include "Winsock2.h" +#include "winsock2.h" #endif #include "handler.hpp" Modified: trunk/spark/utility/rcssnet/socket.hpp =================================================================== --- trunk/spark/utility/rcssnet/socket.hpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/utility/rcssnet/socket.hpp 2011-05-01 03:05:00 UTC (rev 280) @@ -31,7 +31,7 @@ #include "addr.hpp" #ifdef HAVE_WINSOCK2_H -#include "Winsock2.h" +#include "winsock2.h" #endif namespace rcss Modified: trunk/spark/utility/rcssnet/tcpsocket.cpp =================================================================== --- trunk/spark/utility/rcssnet/tcpsocket.cpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/utility/rcssnet/tcpsocket.cpp 2011-05-01 03:05:00 UTC (rev 280) @@ -34,7 +34,7 @@ #endif #ifdef HAVE_WINSOCK2_H -#include "Winsock2.h" +#include "winsock2.h" #endif #include <iostream> Modified: trunk/spark/utility/rcssnet/udpsocket.cpp =================================================================== --- trunk/spark/utility/rcssnet/udpsocket.cpp 2011-04-30 21:27:46 UTC (rev 279) +++ trunk/spark/utility/rcssnet/udpsocket.cpp 2011-05-01 03:05:00 UTC (rev 280) @@ -34,7 +34,7 @@ #endif #ifdef HAVE_WINSOCK2_H -#include "Winsock2.h" +#include "winsock2.h" #endif #include <iostream> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-30 21:27:52
|
Revision: 279 http://simspark.svn.sourceforge.net/simspark/?rev=279&view=rev Author: hedayat Date: 2011-04-30 21:27:46 +0000 (Sat, 30 Apr 2011) Log Message: ----------- Removed additional .cmake files (FindFreetype and FindZLIB) Added AdditionalSearchPaths.cmake to add search paths so that CMake's own FindMODULE's work with our setup Some cleanup Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/windows/install_extra.nsi trunk/spark/CMakeLists.txt trunk/spark/ChangeLog Added Paths: ----------- trunk/rcssserver3d/cmake/AdditionalSearchPaths.cmake trunk/spark/cmake/AdditionalSearchPaths.cmake Removed Paths: ------------- trunk/rcssserver3d/cmake/FindFreetype.cmake trunk/spark/cmake/FindFreetype.cmake trunk/spark/cmake/FindZLIB.cmake Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/rcssserver3d/CMakeLists.txt 2011-04-30 21:27:46 UTC (rev 279) @@ -10,7 +10,6 @@ check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) -set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" "C:/Program Files (x86)/SDL/" C:/SDL/) if (WIN32) set(Boost_USE_STATIC_LIBS ON) @@ -18,6 +17,8 @@ set(Boost_USE_STATIC_RUNTIME OFF) endif (WIN32) +include(AdditionalSearchPaths) + find_package(Spark REQUIRED) find_package(Freetype REQUIRED) find_package(Boost REQUIRED) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/rcssserver3d/ChangeLog 2011-04-30 21:27:46 UTC (rev 279) @@ -1,3 +1,16 @@ +2011-05-01 Hedayat Vatankhah <hed...@gm...> + + * CMakeLists.txt: + - include AdditionalSearchPaths.cmake + + * cmake/AdditionalSearchPaths.cmake: + - sets up additional search paths under Windows to find dependencies in + common directories and the ones documented on the wiki + + * cmake/FindFreetype.cmake: + - removed; and additional search paths have been added to + AdditionalSearchPaths.cmake file + 2011-04-29 Hedayat Vatankhah <hed...@gm...> * CMakeLists.txt: Added: trunk/rcssserver3d/cmake/AdditionalSearchPaths.cmake =================================================================== --- trunk/rcssserver3d/cmake/AdditionalSearchPaths.cmake (rev 0) +++ trunk/rcssserver3d/cmake/AdditionalSearchPaths.cmake 2011-04-30 21:27:46 UTC (rev 279) @@ -0,0 +1,29 @@ +if (WIN32) + set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ + "C:/Program Files/SDL/" + "C:/Program Files (x86)/SDL/" + C:/SDL/ + ) + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} + C:/Library/ + C:/Library/ruby/bin + ) + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} + C:/Library/include + C:/Library/boost + C:/library/devil/include + "C:/Program Files/GnuWin32/include" + "C:/Program Files (x86)/GnuWin32/include" + C:/library/GnuWin32/include + C:/GnuWin32/include + ) + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} + C:/Library/lib + C:/Library/boost + C:/library/devil + "C:/Program Files/GnuWin32" + "C:/Program Files (x86)/GnuWin32" + C:/library/GnuWin32/ + C:/GnuWin32/ + ) +endif (WIN32) Deleted: trunk/rcssserver3d/cmake/FindFreetype.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindFreetype.cmake 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/rcssserver3d/cmake/FindFreetype.cmake 2011-04-30 21:27:46 UTC (rev 279) @@ -1,94 +0,0 @@ -# - Locate FreeType library -# This module defines -# FREETYPE_LIBRARIES, the library to link against -# FREETYPE_FOUND, if false, do not try to link to FREETYPE -# FREETYPE_INCLUDE_DIRS, where to find headers. -# This is the concatenation of the paths: -# FREETYPE_INCLUDE_DIR_ft2build -# FREETYPE_INCLUDE_DIR_freetype2 -# -# $FREETYPE_DIR is an environment variable that would -# correspond to the ./configure --prefix=$FREETYPE_DIR -# used in building FREETYPE. - -# Created by Eric Wing. -# Modifications by Alexander Neundorf. -# This file has been renamed to "FindFreetype.cmake" instead of the correct -# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. - -# Ugh, FreeType seems to use some #include trickery which -# makes this harder than it should be. It looks like they -# put ft2build.h in a common/easier-to-find location which -# then contains a #include to a more specific header in a -# more specific location (#include <freetype/config/ftheader.h>). -# Then from there, they need to set a bunch of #define's -# so you can do something like: -# #include FT_FREETYPE_H -# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES() -# wants explicit full paths and this trickery doesn't work too well. -# I'm going to attempt to cut out the middleman and hope -# everything still works. -FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h - HINTS - $ENV{FREETYPE_DIR} - PATH_SUFFIXES include - PATHS - /usr/local/X11R6/include - /usr/local/X11/include - /usr/X11/include - /sw/include - /opt/local/include - /usr/freeware/include - C:/library/GnuWin32/include - "C:/Program Files/GnuWin32/include" - "C:/Program Files (x86)/GnuWin32/include" - C:/GnuWin32/include -) - -FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h - HINTS - $ENV{FREETYPE_DIR}/include/freetype2 - PATHS - /usr/local/X11R6/include - /usr/local/X11/include - /usr/X11/include - /sw/include - /opt/local/include - /usr/freeware/include - C:/library/GnuWin32/include/freetype2 - "C:/Program Files/GnuWin32/include/freetype2" - "C:/Program Files (x86)/GnuWin32/include/freetype2" - C:/GnuWin32/include/freetype2 - PATH_SUFFIXES freetype2 -) - -FIND_LIBRARY(FREETYPE_LIBRARY - NAMES freetype libfreetype freetype219 - HINTS - $ENV{FREETYPE_DIR} - PATH_SUFFIXES lib64 lib - PATHS - /usr/local/X11R6 - /usr/local/X11 - /usr/X11 - /sw - /usr/freeware - C:/library/GnuWin32/lib - "C:/Program Files/GnuWin32/lib" - "C:/Program Files (x86)/GnuWin32/lib" - C:/GnuWin32/lib -) - -# set the user variables -IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) - SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") -ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) -SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") - -# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) - - -MARK_AS_ADVANCED(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) \ No newline at end of file Modified: trunk/rcssserver3d/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2011-04-30 21:27:46 UTC (rev 279) @@ -36,4 +36,4 @@ ${CMAKE_CURRENT_BINARY_DIR}/simspark DESTINATION ${BINDIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) -endif (NOT WIN32) \ No newline at end of file +endif (NOT WIN32) Modified: trunk/rcssserver3d/windows/install_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/install_extra.nsi 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/rcssserver3d/windows/install_extra.nsi 2011-04-30 21:27:46 UTC (rev 279) @@ -8,6 +8,7 @@ CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSMonitor3D.lnk" "$INSTDIR\bin\rcssmonitor3d.cmd" ${endif} + WriteRegExpandStr HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' '$INSTDIR' ClearErrors FileOpen $0 $INSTDIR\bin\rcssserver3d.cmd w Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/spark/CMakeLists.txt 2011-04-30 21:27:46 UTC (rev 279) @@ -36,7 +36,6 @@ endif (NOT USE_COREFOUNDATION STREQUAL "OFF") set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) -set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" "C:/Program Files (x86)/SDL/" C:/SDL/) if (WIN32) set(Boost_USE_STATIC_LIBS ON) @@ -44,6 +43,8 @@ set(Boost_USE_STATIC_RUNTIME OFF) endif (WIN32) +include(AdditionalSearchPaths) + find_package(Ruby REQUIRED) find_package(Freetype REQUIRED) find_package(DevIL REQUIRED) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/spark/ChangeLog 2011-04-30 21:27:46 UTC (rev 279) @@ -1,3 +1,17 @@ +2011-05-01 Hedayat Vatankhah <hed...@gm...> + + * CMakeLists.txt: + - include AdditionalSearchPaths.cmake + + * cmake/AdditionalSearchPaths.cmake: + - sets up additional search paths under Windows to find dependencies in + common directories and the ones documented on the wiki + + * cmake/FindZLIB.cmake: + * cmake/FindFreetype.cmake: + - removed; and additional search paths have been added to + AdditionalSearchPaths.cmake file + 2011-04-29 Hedayat Vatankhah <hed...@gm...> * lib/zeitgeist/scriptserver/gcvalue.cpp: Added: trunk/spark/cmake/AdditionalSearchPaths.cmake =================================================================== --- trunk/spark/cmake/AdditionalSearchPaths.cmake (rev 0) +++ trunk/spark/cmake/AdditionalSearchPaths.cmake 2011-04-30 21:27:46 UTC (rev 279) @@ -0,0 +1,35 @@ +if (WIN32) + set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ + "C:/Program Files/SDL/" + "C:/Program Files (x86)/SDL/" + C:/SDL/ + ) + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} + C:/Library/ + C:/Library/ruby/bin + ) + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} + C:/Library/include + C:/Library/boost + C:/library/devil/include + "C:/Program Files/GnuWin32/include" + "C:/Program Files (x86)/GnuWin32/include" + C:/library/GnuWin32/include + C:/GnuWin32/include + C:/library/zlib123/include + "C:/Program Files/zlib123/include" + "C:/Program Files (x86)/zlib123/include" + ) + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} + C:/Library/lib + C:/Library/boost + C:/library/devil + "C:/Program Files/GnuWin32" + "C:/Program Files (x86)/GnuWin32" + C:/library/GnuWin32/ + C:/GnuWin32/ + C:/library/zlib123/ + "C:/Program Files/zlib123/" + "C:/Program Files (x86)/zlib123/" + ) +endif (WIN32) Deleted: trunk/spark/cmake/FindFreetype.cmake =================================================================== --- trunk/spark/cmake/FindFreetype.cmake 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/spark/cmake/FindFreetype.cmake 2011-04-30 21:27:46 UTC (rev 279) @@ -1,94 +0,0 @@ -# - Locate FreeType library -# This module defines -# FREETYPE_LIBRARIES, the library to link against -# FREETYPE_FOUND, if false, do not try to link to FREETYPE -# FREETYPE_INCLUDE_DIRS, where to find headers. -# This is the concatenation of the paths: -# FREETYPE_INCLUDE_DIR_ft2build -# FREETYPE_INCLUDE_DIR_freetype2 -# -# $FREETYPE_DIR is an environment variable that would -# correspond to the ./configure --prefix=$FREETYPE_DIR -# used in building FREETYPE. - -# Created by Eric Wing. -# Modifications by Alexander Neundorf. -# This file has been renamed to "FindFreetype.cmake" instead of the correct -# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. - -# Ugh, FreeType seems to use some #include trickery which -# makes this harder than it should be. It looks like they -# put ft2build.h in a common/easier-to-find location which -# then contains a #include to a more specific header in a -# more specific location (#include <freetype/config/ftheader.h>). -# Then from there, they need to set a bunch of #define's -# so you can do something like: -# #include FT_FREETYPE_H -# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES() -# wants explicit full paths and this trickery doesn't work too well. -# I'm going to attempt to cut out the middleman and hope -# everything still works. -FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h - HINTS - $ENV{FREETYPE_DIR} - PATH_SUFFIXES include - PATHS - /usr/local/X11R6/include - /usr/local/X11/include - /usr/X11/include - /sw/include - /opt/local/include - /usr/freeware/include - C:/library/GnuWin32/include - "C:/Program Files/GnuWin32/include" - "C:/Program Files (x86)/GnuWin32/include" - C:/GnuWin32/include -) - -FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h - HINTS - $ENV{FREETYPE_DIR}/include/freetype2 - PATHS - /usr/local/X11R6/include - /usr/local/X11/include - /usr/X11/include - /sw/include - /opt/local/include - /usr/freeware/include - C:/library/GnuWin32/include/freetype2 - "C:/Program Files/GnuWin32/include/freetype2" - "C:/Program Files (x86)/GnuWin32/include/freetype2" - C:/GnuWin32/include/freetype2 - PATH_SUFFIXES freetype2 -) - -FIND_LIBRARY(FREETYPE_LIBRARY - NAMES freetype libfreetype freetype219 - HINTS - $ENV{FREETYPE_DIR} - PATH_SUFFIXES lib64 lib - PATHS - /usr/local/X11R6 - /usr/local/X11 - /usr/X11 - /sw - /usr/freeware - C:/library/GnuWin32/lib - "C:/Program Files/GnuWin32/lib" - "C:/Program Files (x86)/GnuWin32/lib" - C:/GnuWin32/lib -) - -# set the user variables -IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) - SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") -ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) -SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") - -# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) - - -MARK_AS_ADVANCED(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) \ No newline at end of file Deleted: trunk/spark/cmake/FindZLIB.cmake =================================================================== --- trunk/spark/cmake/FindZLIB.cmake 2011-04-29 18:46:08 UTC (rev 278) +++ trunk/spark/cmake/FindZLIB.cmake 2011-04-30 21:27:46 UTC (rev 279) @@ -1,44 +0,0 @@ -# - Find zlib -# Find the native ZLIB includes and library -# -# ZLIB_INCLUDE_DIR - where to find zlib.h, etc. -# ZLIB_LIBRARIES - List of libraries when using zlib. -# ZLIB_FOUND - True if zlib found. - - -IF (ZLIB_INCLUDE_DIR) - # Already in cache, be silent - SET(ZLIB_FIND_QUIETLY TRUE) -ENDIF (ZLIB_INCLUDE_DIR) - -FIND_PATH(ZLIB_INCLUDE_DIR zlib.h - $ENV{ZLIB_DIR} - C:/library/ - C:/ - "C:/Program Files/" - "C:/Program Files (x86)/" - PATH_SUFFIXES zlib123 -) - -SET(ZLIB_NAMES z zlib zdll zlib1) -FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} - $ENV{ZLIB_DIR} - C:/library/zlib123/ - C:/zlib123/ - "C:/Program Files/zlib123/" - "C:/Program Files (x86)/zlib123/" - PATH_SUFFIXES projects/visualc6/Win32_DLL_Release -) - -# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR) - -IF(ZLIB_FOUND) - SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} ) -ELSE(ZLIB_FOUND) - SET( ZLIB_LIBRARIES ) -ENDIF(ZLIB_FOUND) - -MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-29 18:46:14
|
Revision: 278 http://simspark.svn.sourceforge.net/simspark/?rev=278&view=rev Author: hedayat Date: 2011-04-29 18:46:08 +0000 (Fri, 29 Apr 2011) Log Message: ----------- Fix a weird complain by svn Modified Paths: -------------- trunk/spark/plugin/imageperceptor/export.cpp trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp trunk/spark/plugin/imageperceptor/imagerender_c.cpp Modified: trunk/spark/plugin/imageperceptor/export.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/export.cpp 2011-04-29 18:28:11 UTC (rev 277) +++ trunk/spark/plugin/imageperceptor/export.cpp 2011-04-29 18:46:08 UTC (rev 278) @@ -2,7 +2,7 @@ this file is part of rcssserver3D Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group - $Id:$ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp 2011-04-29 18:28:11 UTC (rev 277) +++ trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp 2011-04-29 18:46:08 UTC (rev 278) @@ -2,7 +2,7 @@ this file is part of rcssserver3D Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group - $Id:$ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/spark/plugin/imageperceptor/imagerender_c.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imagerender_c.cpp 2011-04-29 18:28:11 UTC (rev 277) +++ trunk/spark/plugin/imageperceptor/imagerender_c.cpp 2011-04-29 18:46:08 UTC (rev 278) @@ -2,7 +2,7 @@ this file is part of rcssserver3D Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group - $Id:$ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-29 18:28:18
|
Revision: 277 http://simspark.svn.sourceforge.net/simspark/?rev=277&view=rev Author: hedayat Date: 2011-04-29 18:28:11 +0000 (Fri, 29 Apr 2011) Log Message: ----------- Some compilation fixes for Windows and a small cleanup Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/windows/install_extra.nsi Removed Paths: ------------- trunk/rcssserver3d/cmake/FindBoost.cmake Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2011-04-29 18:16:55 UTC (rev 276) +++ trunk/rcssserver3d/CMakeLists.txt 2011-04-29 18:28:11 UTC (rev 277) @@ -12,6 +12,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" "C:/Program Files (x86)/SDL/" C:/SDL/) +if (WIN32) + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) + set(Boost_USE_STATIC_RUNTIME OFF) +endif (WIN32) + find_package(Spark REQUIRED) find_package(Freetype REQUIRED) find_package(Boost REQUIRED) @@ -41,7 +47,7 @@ endif (UNIX) if(WIN32) - add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) include_directories(${CMAKE_SOURCE_DIR}/windows/include) if(MSVC) add_definitions(/Gm /Zi /GL) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-04-29 18:16:55 UTC (rev 276) +++ trunk/rcssserver3d/ChangeLog 2011-04-29 18:28:11 UTC (rev 277) @@ -1,3 +1,17 @@ +2011-04-29 Hedayat Vatankhah <hed...@gm...> + + * CMakeLists.txt: + - use static boost libraries under Windows + + * windows/install_extra.nsi: + - adopt the script for the latest version of CMake and NSIS + + * rcssserver3d/CMakeLists.txt: + - don't install Linux only files in Windows + + * cmake/FindBoost.cmake: + - removed in favor of CMake's own version + 2011-04-21 Hedayat Vatankhah <hed...@gm...> * NEWS: Deleted: trunk/rcssserver3d/cmake/FindBoost.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindBoost.cmake 2011-04-29 18:16:55 UTC (rev 276) +++ trunk/rcssserver3d/cmake/FindBoost.cmake 2011-04-29 18:28:11 UTC (rev 277) @@ -1,938 +0,0 @@ -# - Try to find Boost include dirs and libraries -# Usage of this module as follows: -# -# NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below. -# Due to Boost naming conventions and limitations in CMake this find -# module is NOT future safe with respect to Boost version numbers, -# and may break. -# -# == Using Header-Only libraries from within Boost: == -# -# find_package( Boost 1.36.0 ) -# if(Boost_FOUND) -# include_directories(${Boost_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# endif() -# -# -# == Using actual libraries from within Boost: == -# -# set(Boost_USE_STATIC_LIBS ON) -# set(Boost_USE_MULTITHREADED ON) -# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... ) -# -# if(Boost_FOUND) -# include_directories(${Boost_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# target_link_libraries(foo ${Boost_LIBRARIES}) -# endif() -# -# -# The components list needs to contain actual names of boost libraries only, -# such as "date_time" for "libboost_date_time". If you're using parts of -# Boost that contain header files only (e.g. foreach) you do not need to -# specify COMPONENTS. -# -# You should provide a minimum version number that should be used. If you provide this -# version number and specify the REQUIRED attribute, this module will fail if it -# can't find the specified or a later version. If you specify a version number this is -# automatically put into the considered list of version numbers and thus doesn't need -# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below). -# -# NOTE for Visual Studio Users: -# Automatic linking is used on MSVC & Borland compilers by default when -# #including things in Boost. It's important to note that setting -# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking, -# should you need this feature. Automatic linking typically uses static -# libraries with a few exceptions (Boost.Python is one). -# -# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for -# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example -# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS -# gets set to OFF. It is suggested you avoid automatic linking since it -# will make your application less portable. -# -# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============ -# -# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of -# boost version numbers that should be taken into account when searching -# for Boost. Unfortunately boost puts the version number into the -# actual filename for the libraries, so this variable will certainly be needed -# in the future when new Boost versions are released. -# -# Currently this module searches for the following version numbers: -# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, -# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, -# 1.40, 1.40.0, 1.41, 1.41.0 -# -# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should -# add both 1.x and 1.x.0 as shown above. Official Boost include directories -# omit the 3rd version number from include paths if it is 0 although not all -# binary Boost releases do so. -# -# SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0") -# -# ===================================== ============= ======================== -# -# Variables used by this module, they can change the default behaviour and -# need to be set before calling find_package: -# -# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded -# boost libraries. If not specified, defaults -# to ON. -# -# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static -# boost libraries. Defaults to OFF. -# -# Other Variables used by this module which you may want to set. -# -# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching -# the boost include directory. Please see -# the documentation above regarding this -# annoying, but necessary variable :( -# -# Boost_DEBUG Set this to TRUE to enable debugging output -# of FindBoost.cmake if you are having problems. -# Please enable this before filing any bug -# reports. -# -# Boost_DETAILED_FAILURE_MSG FindBoost doesn't output detailed information -# about why it failed or how to fix the problem -# unless this is set to TRUE or the REQUIRED -# keyword is specified in find_package(). -# [Since CMake 2.8.0] -# -# Boost_COMPILER Set this to the compiler suffix used by Boost -# (e.g. "-gcc43") if FindBoost has problems finding -# the proper Boost installation -# -# These last three variables are available also as environment variables: -# -# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for -# Boost. Set this if the module has problems finding -# the proper Boost installation. -# -# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the -# module has problems finding the proper Boost installation -# -# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the -# module has problems finding the proper Boost installation -# -# Variables defined by this module: -# -# Boost_FOUND System has Boost, this means the include dir was -# found, as well as all the libraries specified in -# the COMPONENTS list. -# -# Boost_INCLUDE_DIRS Boost include directories: not cached -# -# Boost_INCLUDE_DIR This is almost the same as above, but this one is -# cached and may be modified by advanced users -# -# Boost_LIBRARIES Link to these to use the Boost libraries that you -# specified: not cached -# -# Boost_LIBRARY_DIRS The path to where the Boost library files are. -# -# Boost_VERSION The version number of the boost libraries that -# have been found, same as in version.hpp from Boost -# -# Boost_LIB_VERSION The version number in filename form as -# it's appended to the library filenames -# -# Boost_MAJOR_VERSION major version number of boost -# Boost_MINOR_VERSION minor version number of boost -# Boost_SUBMINOR_VERSION subminor version number of boost -# -# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call -# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) -# to have diagnostic information about Boost's -# automatic linking outputted during compilation time. -# -# For each component you specify in find_package(), the following (UPPER-CASE) -# variables are set. You can use these variables if you would like to pick and -# choose components for your targets instead of just using Boost_LIBRARIES. -# -# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. -# -# Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost -# "component" (includes debug and optimized keywords -# when needed). - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# Copyright 2006-2008 Andreas Schneider <ma...@cy...> -# Copyright 2007 Wengo -# Copyright 2007 Mike Jackson -# Copyright 2008 Andreas Pakulat <ap...@gm...> -# Copyright 2008-2009 Philip Lowman <ph...@yh...> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - -#------------------------------------------------------------------------------- -# FindBoost functions & macros -# -############################################ -# -# Check the existence of the libraries. -# -############################################ -# This macro was taken directly from the FindQt4.cmake file that is included -# with the CMake distribution. This is NOT my work. All work was done by the -# original authors of the FindQt4.cmake file. Only minor modifications were -# made to remove references to Qt and make this file more generally applicable -# And ELSE/ENDIF pairs were removed for readability. -######################################################################### - -MACRO (_Boost_ADJUST_LIB_VARS basename) - IF (Boost_INCLUDE_DIR ) - IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) - # if the generator supports configuration types then set - # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value - IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) - ELSE() - # if there are no configuration types and CMAKE_BUILD_TYPE has no value - # then just use the release libraries - SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) - ENDIF() - # FIXME: This probably should be set for both cases - SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) - ENDIF() - - # if only the release version was found, set the debug variable also to the release version - IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) - SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) - SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) - SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) - ENDIF() - - # if only the debug version was found, set the release variable also to the debug version - IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) - SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) - SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) - SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) - ENDIF() - - IF (Boost_${basename}_LIBRARY) - set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") - - # Remove superfluous "debug" / "optimized" keywords from - # Boost_LIBRARY_DIRS - FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY}) - GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH) - LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path}) - ENDFOREACH() - LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS) - - set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") - SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") - ENDIF(Boost_${basename}_LIBRARY) - - ENDIF (Boost_INCLUDE_DIR ) - # Make variables changeble to the advanced user - MARK_AS_ADVANCED( - Boost_${basename}_LIBRARY - Boost_${basename}_LIBRARY_RELEASE - Boost_${basename}_LIBRARY_DEBUG - ) -ENDMACRO (_Boost_ADJUST_LIB_VARS) - -#------------------------------------------------------------------------------- - -# -# Runs compiler with "-dumpversion" and parses major/minor -# version with a regex. -# -FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) - - EXEC_PROGRAM(${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _boost_COMPILER_VERSION - ) - STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" - _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) - - SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) -ENDFUNCTION() - -# -# A convenience function for marking desired components -# as found or not -# -function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no) - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} UPPERCOMPONENT) - set(Boost_${UPPERCOMPONENT}_FOUND ${_yes_or_no} CACHE INTERNAL "Whether the Boost ${COMPONENT} library found" FORCE) - endforeach() -endfunction() - -# -# End functions/macros -# -#------------------------------------------------------------------------------- - - - - -IF(NOT DEFINED Boost_USE_MULTITHREADED) - SET(Boost_USE_MULTITHREADED TRUE) -ENDIF() - -if(Boost_FIND_VERSION_EXACT) - # The version may appear in a directory with or without the patch - # level, even when the patch level is non-zero. - set(_boost_TEST_VERSIONS - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}" - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") -else(Boost_FIND_VERSION_EXACT) - # The user has not requested an exact version. Among known - # versions, find those that are acceptable to the user request. - set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" - "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" - "1.34" "1.33.1" "1.33.0" "1.33") - set(_boost_TEST_VERSIONS) - if(Boost_FIND_VERSION) - set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") - # Select acceptable versions. - foreach(version ${_Boost_KNOWN_VERSIONS}) - if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}") - # This version is high enough. - list(APPEND _boost_TEST_VERSIONS "${version}") - elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99") - # This version is a short-form for the requested version with - # the patch level dropped. - list(APPEND _boost_TEST_VERSIONS "${version}") - endif() - endforeach(version) - else(Boost_FIND_VERSION) - # Any version is acceptable. - set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}") - endif(Boost_FIND_VERSION) -endif(Boost_FIND_VERSION_EXACT) - -# The reason that we failed to find Boost. This will be set to a -# user-friendly message when we fail to find some necessary piece of -# Boost. -set(Boost_ERROR_REASON) - -SET( _boost_IN_CACHE TRUE) -IF(Boost_INCLUDE_DIR) - - # On versions < 1.35, remove the System library from the considered list - # since it wasn't added until 1.35. - if(Boost_VERSION AND Boost_FIND_COMPONENTS) - math(EXPR _boost_maj "${Boost_VERSION} / 100000") - math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000") - if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35) - list(REMOVE_ITEM Boost_FIND_COMPONENTS system) - endif() - endif() - - FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} COMPONENT) - IF(NOT Boost_${COMPONENT}_FOUND) - SET( _boost_IN_CACHE FALSE) - ENDIF(NOT Boost_${COMPONENT}_FOUND) - ENDFOREACH(COMPONENT) -ELSE(Boost_INCLUDE_DIR) - SET( _boost_IN_CACHE FALSE) -ENDIF(Boost_INCLUDE_DIR) - -IF (_boost_IN_CACHE) - # in cache already - SET(Boost_FOUND TRUE) - FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} COMPONENT) - _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) - SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) - ENDFOREACH(COMPONENT) - SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) - IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") - MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") - MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") - MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") - ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " - "is already in the cache. For debugging messages, please clear the cache.") - endif() -ELSE (_boost_IN_CACHE) - # Need to search for boost - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost not in cache") - # Output some of their choices - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}") - endif() - - IF(WIN32) - # In windows, automatic linking is performed, so you do not have - # to specify the libraries. If you are linking to a dynamic - # runtime, then you can choose to link to either a static or a - # dynamic Boost library, the default is to do a static link. You - # can alter this for a specific library "whatever" by defining - # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be - # linked dynamically. Alternatively you can force all Boost - # libraries to dynamic link by defining BOOST_ALL_DYN_LINK. - - # This feature can be disabled for Boost library "whatever" by - # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining - # BOOST_ALL_NO_LIB. - - # If you want to observe which libraries are being linked against - # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking - # code to emit a #pragma message each time a library is selected - # for linking. - SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS - "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") - ENDIF(WIN32) - - SET(_boost_INCLUDE_SEARCH_DIRS - C:/boost/include - C:/boost - C:/library/boost - "C:/Program Files/boost" - "C:/Program Files (x86)/boost" - "$ENV{ProgramFiles}/boost/include" - "$ENV{ProgramFiles}/boost" - /sw/local/include - ) - - # If BOOST_ROOT was defined in the environment, use it. - if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") - set(BOOST_ROOT $ENV{BOOST_ROOT}) - endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") - - # If BOOSTROOT was defined in the environment, use it. - if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") - set(BOOST_ROOT $ENV{BOOSTROOT}) - endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") - - # If BOOST_INCLUDEDIR was defined in the environment, use it. - IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) - set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) - ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) - - # If BOOST_LIBRARYDIR was defined in the environment, use it. - IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) - set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) - ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) - - IF( BOOST_ROOT ) - file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) - ENDIF( BOOST_ROOT ) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Declared as CMake or Environmental Variables:") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_ROOT = ${BOOST_ROOT}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") - endif() - - IF( BOOST_ROOT ) - SET(_boost_INCLUDE_SEARCH_DIRS - ${BOOST_ROOT}/include - ${BOOST_ROOT} - ${_boost_INCLUDE_SEARCH_DIRS}) - ENDIF( BOOST_ROOT ) - - IF( BOOST_INCLUDEDIR ) - file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR) - SET(_boost_INCLUDE_SEARCH_DIRS - ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) - ENDIF( BOOST_INCLUDEDIR ) - - # ------------------------------------------------------------------------ - # Search for Boost include DIR - # ------------------------------------------------------------------------ - # Try to find Boost by stepping backwards through the Boost versions - # we know about. - IF( NOT Boost_INCLUDE_DIR ) - # Build a list of path suffixes for each version. - SET(_boost_PATH_SUFFIXES) - FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) - # Add in a path suffix, based on the required version, ideally - # we could read this from version.hpp, but for that to work we'd - # need to know the include dir already - set(_boost_BOOSTIFIED_VERSION) - - # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0 - IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") - STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" - _boost_BOOSTIFIED_VERSION ${_boost_VER}) - ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+") - STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" - _boost_BOOSTIFIED_VERSION ${_boost_VER}) - ENDIF() - - list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}") - if(WIN32) - # For BoostPro's underscores (and others?) - list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}") - endif() - - ENDFOREACH(_boost_VER) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Include debugging info:") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}") - endif() - - # Look for a standard boost header file. - FIND_PATH(Boost_INCLUDE_DIR - NAMES boost/config.hpp - HINTS ${_boost_INCLUDE_SEARCH_DIRS} - PATH_SUFFIXES ${_boost_PATH_SUFFIXES} - ) - ENDIF( NOT Boost_INCLUDE_DIR ) - - # ------------------------------------------------------------------------ - # Extract version information from version.hpp - # ------------------------------------------------------------------------ - - IF(Boost_INCLUDE_DIR) - # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp - # Read the whole file: - # - SET(BOOST_VERSION 0) - SET(BOOST_LIB_VERSION "") - FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") - endif() - - STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") - STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") - - SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") - SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") - - IF(NOT "${Boost_VERSION}" STREQUAL "0") - MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") - MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") - MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") - - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") - ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "version.hpp reveals boost " - "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") - endif() - ELSE(Boost_INCLUDE_DIR) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") - ENDIF(Boost_INCLUDE_DIR) - - # ------------------------------------------------------------------------ - # Suffix initialization and compiler suffix detection. - # ------------------------------------------------------------------------ - - # Setting some more suffixes for the library - SET (Boost_LIB_PREFIX "") - if ( WIN32 AND Boost_USE_STATIC_LIBS ) - SET (Boost_LIB_PREFIX "lib") - endif() - - if (Boost_COMPILER) - set(_boost_COMPILER ${Boost_COMPILER}) - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "using user-specified Boost_COMPILER = ${_boost_COMPILER}") - endif() - else(Boost_COMPILER) - # Attempt to guess the compiler suffix - # NOTE: this is not perfect yet, if you experience any issues - # please report them and use the Boost_COMPILER variable - # to work around the problems. - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") - if(WIN32) - set (_boost_COMPILER "-iw") - else() - set (_boost_COMPILER "-il") - endif() - elseif (MSVC90) - SET (_boost_COMPILER "-vc90") - elseif (MSVC10) - SET (_boost_COMPILER "-vc100") - elseif (MSVC80) - SET (_boost_COMPILER "-vc80") - elseif (MSVC71) - SET (_boost_COMPILER "-vc71") - elseif (MSVC70) # Good luck! - SET (_boost_COMPILER "-vc7") # yes, this is correct - elseif (MSVC60) # Good luck! - SET (_boost_COMPILER "-vc6") # yes, this is correct - elseif (BORLAND) - SET (_boost_COMPILER "-bcb") - elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro") - set(_boost_COMPILER "-sw") - elseif (MINGW) - if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) - SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34 - else() - _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) - SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") - endif() - elseif (UNIX) - if (CMAKE_COMPILER_IS_GNUCXX) - if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) - SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34 - else() - _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) - # Determine which version of GCC we have. - IF(APPLE) - IF(Boost_MINOR_VERSION) - IF(${Boost_MINOR_VERSION} GREATER 35) - # In Boost 1.36.0 and newer, the mangled compiler name used - # on Mac OS X/Darwin is "xgcc". - SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") - ELSE(${Boost_MINOR_VERSION} GREATER 35) - # In Boost <= 1.35.0, there is no mangled compiler name for - # the Mac OS X/Darwin version of GCC. - SET(_boost_COMPILER "") - ENDIF(${Boost_MINOR_VERSION} GREATER 35) - ELSE(Boost_MINOR_VERSION) - # We don't know the Boost version, so assume it's - # pre-1.36.0. - SET(_boost_COMPILER "") - ENDIF(Boost_MINOR_VERSION) - ELSE() - SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") - ENDIF() - endif() - endif (CMAKE_COMPILER_IS_GNUCXX) - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "guessed _boost_COMPILER = ${_boost_COMPILER}") - endif() - endif(Boost_COMPILER) - - SET (_boost_MULTITHREADED "-mt") - if( NOT Boost_USE_MULTITHREADED ) - set (_boost_MULTITHREADED "") - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_MULTITHREADED = ${_boost_MULTITHREADED}") - endif() - - SET( _boost_STATIC_TAG "") - set( _boost_ABI_TAG "") - IF (WIN32) - IF(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") - SET (_boost_ABI_TAG "g") - ENDIF() - IF( Boost_USE_STATIC_LIBS ) - SET( _boost_STATIC_TAG "-s") - ENDIF( Boost_USE_STATIC_LIBS ) - ENDIF(WIN32) - SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_STATIC_TAG = ${_boost_STATIC_TAG}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_ABI_TAG = ${_boost_ABI_TAG}") - endif() - - # ------------------------------------------------------------------------ - # Begin finding boost libraries - # ------------------------------------------------------------------------ - - SET(_boost_LIBRARIES_SEARCH_DIRS - ${Boost_INCLUDE_DIR}/lib - ${Boost_INCLUDE_DIR}/../lib - C:/boost/lib - C:/boost - "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib" - "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib" - "$ENV{ProgramFiles}/boost/lib" - C:/library/boost/stage/lib - "C:/Program Files/boost/stage/lib" - "C:/Program Files (x86)/boost/stage/lib" - "$ENV{ProgramFiles}/boost" - /sw/local/lib - ) - IF( BOOST_ROOT ) - SET(_boost_LIBRARIES_SEARCH_DIRS - ${BOOST_ROOT}/lib - ${BOOST_ROOT}/stage/lib - ${_boost_LIBRARIES_SEARCH_DIRS}) - ENDIF( BOOST_ROOT ) - - IF( BOOST_LIBRARYDIR ) - file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) - SET(_boost_LIBRARIES_SEARCH_DIRS - ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) - ENDIF( BOOST_LIBRARYDIR ) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}") - endif() - - FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) - SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) - SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) - SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") - - # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES - IF( Boost_USE_STATIC_LIBS ) - SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - IF(WIN32) - SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - ELSE(WIN32) - SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - ENDIF(WIN32) - ENDIF( Boost_USE_STATIC_LIBS ) - - FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE - NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT} - HINTS ${_boost_LIBRARIES_SEARCH_DIRS} - ) - - FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG - NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} - HINTS ${_boost_LIBRARIES_SEARCH_DIRS} - ) - - _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) - IF( Boost_USE_STATIC_LIBS ) - SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) - ENDIF( Boost_USE_STATIC_LIBS ) - ENDFOREACH(COMPONENT) - # ------------------------------------------------------------------------ - # End finding boost libraries - # ------------------------------------------------------------------------ - - SET(Boost_INCLUDE_DIRS - ${Boost_INCLUDE_DIR} - ) - - SET(Boost_FOUND FALSE) - IF(Boost_INCLUDE_DIR) - SET( Boost_FOUND TRUE ) - - # Check the version of Boost against the requested version. - if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) - message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34") - endif (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) - if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) - endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) - endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) - - if (NOT Boost_FOUND) - _Boost_MARK_COMPONENTS_FOUND(OFF) - endif() - - if (Boost_FOUND AND Boost_FIND_VERSION_EXACT) - # If the user requested an exact version of Boost, check - # that. We already know that the Boost version we have is >= the - # requested version. - set(_Boost_VERSION_AGE "new") - - # If the user didn't specify a patchlevel, it's 0. - if (NOT Boost_FIND_VERSION_PATCH) - set(Boost_FIND_VERSION_PATCH 0) - endif (NOT Boost_FIND_VERSION_PATCH) - - # We'll set Boost_FOUND true again if we have an exact version match. - set(Boost_FOUND FALSE) - _Boost_MARK_COMPONENTS_FOUND(OFF) - if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) - set( Boost_FOUND TRUE ) - _Boost_MARK_COMPONENTS_FOUND(ON) - endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) - endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT) - - if(NOT Boost_FOUND) - # State that we found a version of Boost that is too new or too old. - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") - if (Boost_FIND_VERSION_PATCH) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}") - endif (Boost_FIND_VERSION_PATCH) - if (NOT Boost_FIND_VERSION_EXACT) - set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)") - endif (NOT Boost_FIND_VERSION_EXACT) - set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.") - endif (NOT Boost_FOUND) - - # Always check for missing components - set(_boost_CHECKED_COMPONENT FALSE) - set(_Boost_MISSING_COMPONENTS "") - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} COMPONENT) - set(_boost_CHECKED_COMPONENT TRUE) - if(NOT Boost_${COMPONENT}_FOUND) - string(TOLOWER ${COMPONENT} COMPONENT) - list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) - set( Boost_FOUND FALSE) - endif(NOT Boost_${COMPONENT}_FOUND) - endforeach(COMPONENT) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") - endif() - - if (_Boost_MISSING_COMPONENTS) - # We were unable to find some libraries, so generate a sensible - # error message that lists the libraries we were unable to find. - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") - foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON} boost_${COMPONENT}\n") - endforeach(COMPONENT) - - list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED) - list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) - if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") - else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") - endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) - endif (_Boost_MISSING_COMPONENTS) - - IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) - # Compatibility Code for backwards compatibility with CMake - # 2.4's FindBoost module. - - # Look for the boost library path. - # Note that the user may not have installed any libraries - # so it is quite possible the Boost_LIBRARY_PATH may not exist. - SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) - - IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") - GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) - ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") - - IF("${_boost_LIB_DIR}" MATCHES "/include$") - # Strip off the trailing "/include" in the path. - GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) - ENDIF("${_boost_LIB_DIR}" MATCHES "/include$") - - IF(EXISTS "${_boost_LIB_DIR}/lib") - SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) - ELSE(EXISTS "${_boost_LIB_DIR}/lib") - IF(EXISTS "${_boost_LIB_DIR}/stage/lib") - SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) - ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib") - SET(_boost_LIB_DIR "") - ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib") - ENDIF(EXISTS "${_boost_LIB_DIR}/lib") - - IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") - SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") - ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") - - ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) - - ELSE(Boost_INCLUDE_DIR) - SET( Boost_FOUND FALSE) - ENDIF(Boost_INCLUDE_DIR) - - IF (Boost_FOUND) - IF (NOT Boost_FIND_QUIETLY) - MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") - if(Boost_FIND_COMPONENTS) - message(STATUS "Found the following Boost libraries:") - endif() - ENDIF(NOT Boost_FIND_QUIETLY) - FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} ) - STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT ) - IF ( Boost_${UPPERCOMPONENT}_FOUND ) - IF (NOT Boost_FIND_QUIETLY) - MESSAGE (STATUS " ${COMPONENT}") - ENDIF(NOT Boost_FIND_QUIETLY) - SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) - ENDIF ( Boost_${UPPERCOMPONENT}_FOUND ) - ENDFOREACH(COMPONENT) - else() - if(Boost_FIND_REQUIRED) - message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}") - else() - if(NOT Boost_FIND_QUIETLY) - # we opt not to automatically output Boost_ERROR_REASON here as - # it could be quite lengthy and somewhat imposing in it's requests - # Since Boost is not always a required dependency we'll leave this - # up to the end-user. - if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG) - message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}") - else() - message(STATUS "Could NOT find Boost") - endif() - endif() - endif(Boost_FIND_REQUIRED) - endif() - - # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view - MARK_AS_ADVANCED(Boost_INCLUDE_DIR - Boost_INCLUDE_DIRS - Boost_LIBRARY_DIRS - ) -ENDIF(_boost_IN_CACHE) - Modified: trunk/rcssserver3d/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2011-04-29 18:16:55 UTC (rev 276) +++ trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2011-04-29 18:28:11 UTC (rev 277) @@ -31,7 +31,9 @@ internalsoccermonitor.rb internalsoccerbindings.rb DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d - ${CMAKE_CURRENT_BINARY_DIR}/simspark DESTINATION ${BINDIR} - PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +if (NOT WIN32) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d + ${CMAKE_CURRENT_BINARY_DIR}/simspark DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +endif (NOT WIN32) \ No newline at end of file Modified: trunk/rcssserver3d/windows/install_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/install_extra.nsi 2011-04-29 18:16:55 UTC (rev 276) +++ trunk/rcssserver3d/windows/install_extra.nsi 2011-04-29 18:28:11 UTC (rev 277) @@ -1,8 +1,13 @@ -CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSServer3D.lnk" "$INSTDIR\bin\rcssserver3d.cmd" -CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSMonitor3D.lnk" "$INSTDIR\bin\rcssmonitor3d.cmd" -!insertmacro MUI_STARTMENU_WRITE_END -!define MUI_STARTMENUPAGE_CURRENT_ID "SOMETHING_NOT_AVAILABLE" +; Creating Start Menu shortcuts only if it is enabled +Var /GLOBAL MyTemp +StrCpy $MyTemp "${MUI_STARTMENUPAGE_Application_VARIABLE}" 1 +;If the folder start with >, the user has chosen not to create a shortcut +${if} $MyTemp != ">" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSServer3D.lnk" "$INSTDIR\bin\rcssserver3d.cmd" + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSMonitor3D.lnk" "$INSTDIR\bin\rcssmonitor3d.cmd" +${endif} + WriteRegExpandStr HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' '$INSTDIR' ClearErrors FileOpen $0 $INSTDIR\bin\rcssserver3d.cmd w This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-29 18:17:01
|
Revision: 276 http://simspark.svn.sourceforge.net/simspark/?rev=276&view=rev Author: hedayat Date: 2011-04-29 18:16:55 +0000 (Fri, 29 Apr 2011) Log Message: ----------- * Make sure ruby.h is included before gcvalue.h Modified Paths: -------------- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-04-29 18:13:43 UTC (rev 275) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-04-29 18:16:55 UTC (rev 276) @@ -23,8 +23,8 @@ #include <boost/scoped_array.hpp> #include <sstream> #include <salt/fileclasses.h> +#include "rubywrapper.h" #include "scriptserver.h" -#include "rubywrapper.h" #include <zeitgeist/corecontext.h> #include <zeitgeist/core.h> #include <zeitgeist/logserver/logserver.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-29 18:13:53
|
Revision: 275 http://simspark.svn.sourceforge.net/simspark/?rev=275&view=rev Author: hedayat Date: 2011-04-29 18:13:43 +0000 (Fri, 29 Apr 2011) Log Message: ----------- * Removed FindBoost.cmake and FindRuby.cmake in favor of CMake's own files * Use boost static libraries under Windows by default * A few compilation fixes under Windows * Fixed a bug in RubySceneImporter, and removed the workaround from log file server * Fixed a small bug in s-expression parser when facing single quotes (don't generate an extra empty node there) * Removed NSIS hack from install_extra.nsi Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/lib/kerosin/imageserver/image.h trunk/spark/lib/kerosin/imageserver/imageserver.h trunk/spark/lib/zeitgeist/scriptserver/gcvalue.cpp trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp trunk/spark/plugin/rubysceneimporter/rubysceneimporter.cpp trunk/spark/plugin/sparkmonitor/sparkmonitorlogfileserver.cpp trunk/spark/plugin/timersystemboost/timersystemboost.cpp trunk/spark/plugin/timersystemsdl/timersystemsdl.cpp trunk/spark/utility/sfsexp/parser.c trunk/spark/windows/install_extra.nsi Removed Paths: ------------- trunk/spark/cmake/FindBoost.cmake trunk/spark/cmake/FindRuby.cmake Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/CMakeLists.txt 2011-04-29 18:13:43 UTC (rev 275) @@ -38,6 +38,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" "C:/Program Files (x86)/SDL/" C:/SDL/) +if (WIN32) + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) + set(Boost_USE_STATIC_RUNTIME OFF) +endif (WIN32) + find_package(Ruby REQUIRED) find_package(Freetype REQUIRED) find_package(DevIL REQUIRED) @@ -122,7 +128,7 @@ endif(BUILD_SHARED_LIBS) if(WIN32) - add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) include_directories(${CMAKE_SOURCE_DIR}/windows/include) if(MSVC) add_definitions(/Gm /Zi /GL) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/ChangeLog 2011-04-29 18:13:43 UTC (rev 275) @@ -1,3 +1,40 @@ +2011-04-29 Hedayat Vatankhah <hed...@gm...> + + * lib/zeitgeist/scriptserver/gcvalue.cpp: + - include ruby header before gcvalue.h, so that it can define STR2CSTR + + * utility/sfsexp/parser.c (cparse_sexp): + - correctly handle final single quotes + + * lib/zeitgeist/scriptserver/scriptserver.cpp: + - use copy command on Windows + + * CMakeLists.txt: + - use boost static libraries on Windows + + * cmake/FindBoost.cmake: + * cmake/FindRuby.cmake: + - removed in favor of CMake's own one + + * plugin/timersystemsdl/timersystemsdl.cpp: + * plugin/timersystemboost/timersystemboost.cpp: + - using boost round function for MSVC which doesn't have C99's round function + + * lib/kerosin/imageserver/image.h: + * lib/kerosin/imageserver/imageserver.h: + - including IL directory from include directives + + * windows/install_extra.nsi: + - removed the hack for excluding the command from start menu page as it is + fixed in cpack + + * plugin/rubysceneimporter/rubysceneimporter.cpp (RubySceneImporter::ReadDeltaGraph): + - don't try to use iter when it's at the end + + * plugin/sparkmonitor/sparkmonitorlogfileserver.cpp + (SparkMonitorLogFileServer::StartCycle): + - removed the workaround in favor of a real fix + 2011-04-21 Hedayat Vatankhah <hed...@gm...> * NEWS: @@ -2,3 +39,3 @@ * RELEASE: - - Added info about the network change for 0.2.2 release + - added info about the network change for 0.2.2 release @@ -107,29 +144,29 @@ * plugin/timersystemboost/timersystemboost_c.cpp: * plugin/timersystemboost/export.cpp: * plugin/timersystemboost/CMakeLists.txt: - - Added TimerSystemBoost which uses Boost facilities for timing + - added TimerSystemBoost which uses Boost facilities for timing * plugin/CMakeLists.txt: - - Added timersystemboost to the list of plugins - - Reordering the list of plugins to make it sorted again + - added timersystemboost to the list of plugins + - reordering the list of plugins to make it sorted again * CMakeLists.txt: - - Prepare for 0.2.2 release: changed the version number and update library + - prepare for 0.2.2 release: changed the version number and update library versions * spark/spark.rb: - - Disable old style timer and add sparkSetupTimer() function for + - disable old style timer and add sparkSetupTimer() function for setting up a timer system * lib/oxygen/simulationserver/simulationserver.h: * lib/oxygen/simulationserver/simulationserver.cpp: * lib/oxygen/simulationserver/simulationserver_c.cpp: - - Use TimerSystem for timing - - Added InitTimerSystem() to setup a timer system for simulation server - - Fixed a few spelling errors - - Added SyncTime() method which is responsible for updating mSumDeltaTime + - use TimerSystem for timing + - added InitTimerSystem() to setup a timer system for simulation server + - fixed a few spelling errors + - added SyncTime() method which is responsible for updating mSumDeltaTime using a TimerSystem or simulator's internal clock. - - Using Step() in multi-threaded mode in addition to the single threaded + - using Step() in multi-threaded mode in addition to the single threaded mode. Looks like that there is no need to differentiate any more. * lib/oxygen/oxygen.cpp: @@ -137,12 +174,12 @@ * lib/oxygen/CMakeLists.txt: * lib/oxygen/simulationserver/timersystem.h: * lib/oxygen/simulationserver/timersystem_c.cpp: - - Added a new TimerSystem mechanism to control simulator timing + - added a new TimerSystem mechanism to control simulator timing 2011-03-23 Hedayat Vatankhah <hed...@gm...> * RELEASE: - - Updated release information for the next release + - updated release information for the next release 2010-12-15 Yuan Xu <xu...@in...> * plugin/imageperceptor/CMakeLists.txt Deleted: trunk/spark/cmake/FindBoost.cmake =================================================================== --- trunk/spark/cmake/FindBoost.cmake 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/cmake/FindBoost.cmake 2011-04-29 18:13:43 UTC (rev 275) @@ -1,938 +0,0 @@ -# - Try to find Boost include dirs and libraries -# Usage of this module as follows: -# -# NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below. -# Due to Boost naming conventions and limitations in CMake this find -# module is NOT future safe with respect to Boost version numbers, -# and may break. -# -# == Using Header-Only libraries from within Boost: == -# -# find_package( Boost 1.36.0 ) -# if(Boost_FOUND) -# include_directories(${Boost_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# endif() -# -# -# == Using actual libraries from within Boost: == -# -# set(Boost_USE_STATIC_LIBS ON) -# set(Boost_USE_MULTITHREADED ON) -# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... ) -# -# if(Boost_FOUND) -# include_directories(${Boost_INCLUDE_DIRS}) -# add_executable(foo foo.cc) -# target_link_libraries(foo ${Boost_LIBRARIES}) -# endif() -# -# -# The components list needs to contain actual names of boost libraries only, -# such as "date_time" for "libboost_date_time". If you're using parts of -# Boost that contain header files only (e.g. foreach) you do not need to -# specify COMPONENTS. -# -# You should provide a minimum version number that should be used. If you provide this -# version number and specify the REQUIRED attribute, this module will fail if it -# can't find the specified or a later version. If you specify a version number this is -# automatically put into the considered list of version numbers and thus doesn't need -# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below). -# -# NOTE for Visual Studio Users: -# Automatic linking is used on MSVC & Borland compilers by default when -# #including things in Boost. It's important to note that setting -# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking, -# should you need this feature. Automatic linking typically uses static -# libraries with a few exceptions (Boost.Python is one). -# -# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for -# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example -# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS -# gets set to OFF. It is suggested you avoid automatic linking since it -# will make your application less portable. -# -# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============ -# -# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of -# boost version numbers that should be taken into account when searching -# for Boost. Unfortunately boost puts the version number into the -# actual filename for the libraries, so this variable will certainly be needed -# in the future when new Boost versions are released. -# -# Currently this module searches for the following version numbers: -# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, -# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, -# 1.40, 1.40.0, 1.41, 1.41.0 -# -# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should -# add both 1.x and 1.x.0 as shown above. Official Boost include directories -# omit the 3rd version number from include paths if it is 0 although not all -# binary Boost releases do so. -# -# SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0") -# -# ===================================== ============= ======================== -# -# Variables used by this module, they can change the default behaviour and -# need to be set before calling find_package: -# -# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded -# boost libraries. If not specified, defaults -# to ON. -# -# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static -# boost libraries. Defaults to OFF. -# -# Other Variables used by this module which you may want to set. -# -# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching -# the boost include directory. Please see -# the documentation above regarding this -# annoying, but necessary variable :( -# -# Boost_DEBUG Set this to TRUE to enable debugging output -# of FindBoost.cmake if you are having problems. -# Please enable this before filing any bug -# reports. -# -# Boost_DETAILED_FAILURE_MSG FindBoost doesn't output detailed information -# about why it failed or how to fix the problem -# unless this is set to TRUE or the REQUIRED -# keyword is specified in find_package(). -# [Since CMake 2.8.0] -# -# Boost_COMPILER Set this to the compiler suffix used by Boost -# (e.g. "-gcc43") if FindBoost has problems finding -# the proper Boost installation -# -# These last three variables are available also as environment variables: -# -# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for -# Boost. Set this if the module has problems finding -# the proper Boost installation. -# -# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the -# module has problems finding the proper Boost installation -# -# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the -# module has problems finding the proper Boost installation -# -# Variables defined by this module: -# -# Boost_FOUND System has Boost, this means the include dir was -# found, as well as all the libraries specified in -# the COMPONENTS list. -# -# Boost_INCLUDE_DIRS Boost include directories: not cached -# -# Boost_INCLUDE_DIR This is almost the same as above, but this one is -# cached and may be modified by advanced users -# -# Boost_LIBRARIES Link to these to use the Boost libraries that you -# specified: not cached -# -# Boost_LIBRARY_DIRS The path to where the Boost library files are. -# -# Boost_VERSION The version number of the boost libraries that -# have been found, same as in version.hpp from Boost -# -# Boost_LIB_VERSION The version number in filename form as -# it's appended to the library filenames -# -# Boost_MAJOR_VERSION major version number of boost -# Boost_MINOR_VERSION minor version number of boost -# Boost_SUBMINOR_VERSION subminor version number of boost -# -# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call -# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) -# to have diagnostic information about Boost's -# automatic linking outputted during compilation time. -# -# For each component you specify in find_package(), the following (UPPER-CASE) -# variables are set. You can use these variables if you would like to pick and -# choose components for your targets instead of just using Boost_LIBRARIES. -# -# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. -# -# Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost -# "component" (includes debug and optimized keywords -# when needed). - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# Copyright 2006-2008 Andreas Schneider <ma...@cy...> -# Copyright 2007 Wengo -# Copyright 2007 Mike Jackson -# Copyright 2008 Andreas Pakulat <ap...@gm...> -# Copyright 2008-2009 Philip Lowman <ph...@yh...> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - -#------------------------------------------------------------------------------- -# FindBoost functions & macros -# -############################################ -# -# Check the existence of the libraries. -# -############################################ -# This macro was taken directly from the FindQt4.cmake file that is included -# with the CMake distribution. This is NOT my work. All work was done by the -# original authors of the FindQt4.cmake file. Only minor modifications were -# made to remove references to Qt and make this file more generally applicable -# And ELSE/ENDIF pairs were removed for readability. -######################################################################### - -MACRO (_Boost_ADJUST_LIB_VARS basename) - IF (Boost_INCLUDE_DIR ) - IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) - # if the generator supports configuration types then set - # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value - IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) - ELSE() - # if there are no configuration types and CMAKE_BUILD_TYPE has no value - # then just use the release libraries - SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) - ENDIF() - # FIXME: This probably should be set for both cases - SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) - ENDIF() - - # if only the release version was found, set the debug variable also to the release version - IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) - SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) - SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) - SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) - ENDIF() - - # if only the debug version was found, set the release variable also to the debug version - IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) - SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) - SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) - SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) - ENDIF() - - IF (Boost_${basename}_LIBRARY) - set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") - - # Remove superfluous "debug" / "optimized" keywords from - # Boost_LIBRARY_DIRS - FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY}) - GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH) - LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path}) - ENDFOREACH() - LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS) - - set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") - SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") - ENDIF(Boost_${basename}_LIBRARY) - - ENDIF (Boost_INCLUDE_DIR ) - # Make variables changeble to the advanced user - MARK_AS_ADVANCED( - Boost_${basename}_LIBRARY - Boost_${basename}_LIBRARY_RELEASE - Boost_${basename}_LIBRARY_DEBUG - ) -ENDMACRO (_Boost_ADJUST_LIB_VARS) - -#------------------------------------------------------------------------------- - -# -# Runs compiler with "-dumpversion" and parses major/minor -# version with a regex. -# -FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) - - EXEC_PROGRAM(${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _boost_COMPILER_VERSION - ) - STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" - _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) - - SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) -ENDFUNCTION() - -# -# A convenience function for marking desired components -# as found or not -# -function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no) - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} UPPERCOMPONENT) - set(Boost_${UPPERCOMPONENT}_FOUND ${_yes_or_no} CACHE INTERNAL "Whether the Boost ${COMPONENT} library found" FORCE) - endforeach() -endfunction() - -# -# End functions/macros -# -#------------------------------------------------------------------------------- - - - - -IF(NOT DEFINED Boost_USE_MULTITHREADED) - SET(Boost_USE_MULTITHREADED TRUE) -ENDIF() - -if(Boost_FIND_VERSION_EXACT) - # The version may appear in a directory with or without the patch - # level, even when the patch level is non-zero. - set(_boost_TEST_VERSIONS - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}" - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") -else(Boost_FIND_VERSION_EXACT) - # The user has not requested an exact version. Among known - # versions, find those that are acceptable to the user request. - set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" - "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" - "1.34" "1.33.1" "1.33.0" "1.33") - set(_boost_TEST_VERSIONS) - if(Boost_FIND_VERSION) - set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") - # Select acceptable versions. - foreach(version ${_Boost_KNOWN_VERSIONS}) - if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}") - # This version is high enough. - list(APPEND _boost_TEST_VERSIONS "${version}") - elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99") - # This version is a short-form for the requested version with - # the patch level dropped. - list(APPEND _boost_TEST_VERSIONS "${version}") - endif() - endforeach(version) - else(Boost_FIND_VERSION) - # Any version is acceptable. - set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}") - endif(Boost_FIND_VERSION) -endif(Boost_FIND_VERSION_EXACT) - -# The reason that we failed to find Boost. This will be set to a -# user-friendly message when we fail to find some necessary piece of -# Boost. -set(Boost_ERROR_REASON) - -SET( _boost_IN_CACHE TRUE) -IF(Boost_INCLUDE_DIR) - - # On versions < 1.35, remove the System library from the considered list - # since it wasn't added until 1.35. - if(Boost_VERSION AND Boost_FIND_COMPONENTS) - math(EXPR _boost_maj "${Boost_VERSION} / 100000") - math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000") - if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35) - list(REMOVE_ITEM Boost_FIND_COMPONENTS system) - endif() - endif() - - FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} COMPONENT) - IF(NOT Boost_${COMPONENT}_FOUND) - SET( _boost_IN_CACHE FALSE) - ENDIF(NOT Boost_${COMPONENT}_FOUND) - ENDFOREACH(COMPONENT) -ELSE(Boost_INCLUDE_DIR) - SET( _boost_IN_CACHE FALSE) -ENDIF(Boost_INCLUDE_DIR) - -IF (_boost_IN_CACHE) - # in cache already - SET(Boost_FOUND TRUE) - FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} COMPONENT) - _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) - SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) - ENDFOREACH(COMPONENT) - SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) - IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") - MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") - MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") - MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") - ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " - "is already in the cache. For debugging messages, please clear the cache.") - endif() -ELSE (_boost_IN_CACHE) - # Need to search for boost - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost not in cache") - # Output some of their choices - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}") - endif() - - IF(WIN32) - # In windows, automatic linking is performed, so you do not have - # to specify the libraries. If you are linking to a dynamic - # runtime, then you can choose to link to either a static or a - # dynamic Boost library, the default is to do a static link. You - # can alter this for a specific library "whatever" by defining - # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be - # linked dynamically. Alternatively you can force all Boost - # libraries to dynamic link by defining BOOST_ALL_DYN_LINK. - - # This feature can be disabled for Boost library "whatever" by - # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining - # BOOST_ALL_NO_LIB. - - # If you want to observe which libraries are being linked against - # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking - # code to emit a #pragma message each time a library is selected - # for linking. - SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS - "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") - ENDIF(WIN32) - - SET(_boost_INCLUDE_SEARCH_DIRS - C:/boost/include - C:/boost - C:/library/boost - "C:/Program Files/boost" - "C:/Program Files (x86)/boost" - "$ENV{ProgramFiles}/boost/include" - "$ENV{ProgramFiles}/boost" - /sw/local/include - ) - - # If BOOST_ROOT was defined in the environment, use it. - if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") - set(BOOST_ROOT $ENV{BOOST_ROOT}) - endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") - - # If BOOSTROOT was defined in the environment, use it. - if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") - set(BOOST_ROOT $ENV{BOOSTROOT}) - endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") - - # If BOOST_INCLUDEDIR was defined in the environment, use it. - IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) - set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) - ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) - - # If BOOST_LIBRARYDIR was defined in the environment, use it. - IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) - set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) - ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) - - IF( BOOST_ROOT ) - file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) - ENDIF( BOOST_ROOT ) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Declared as CMake or Environmental Variables:") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_ROOT = ${BOOST_ROOT}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") - endif() - - IF( BOOST_ROOT ) - SET(_boost_INCLUDE_SEARCH_DIRS - ${BOOST_ROOT}/include - ${BOOST_ROOT} - ${_boost_INCLUDE_SEARCH_DIRS}) - ENDIF( BOOST_ROOT ) - - IF( BOOST_INCLUDEDIR ) - file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR) - SET(_boost_INCLUDE_SEARCH_DIRS - ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) - ENDIF( BOOST_INCLUDEDIR ) - - # ------------------------------------------------------------------------ - # Search for Boost include DIR - # ------------------------------------------------------------------------ - # Try to find Boost by stepping backwards through the Boost versions - # we know about. - IF( NOT Boost_INCLUDE_DIR ) - # Build a list of path suffixes for each version. - SET(_boost_PATH_SUFFIXES) - FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) - # Add in a path suffix, based on the required version, ideally - # we could read this from version.hpp, but for that to work we'd - # need to know the include dir already - set(_boost_BOOSTIFIED_VERSION) - - # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0 - IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") - STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" - _boost_BOOSTIFIED_VERSION ${_boost_VER}) - ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+") - STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" - _boost_BOOSTIFIED_VERSION ${_boost_VER}) - ENDIF() - - list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}") - if(WIN32) - # For BoostPro's underscores (and others?) - list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}") - endif() - - ENDFOREACH(_boost_VER) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "Include debugging info:") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}") - endif() - - # Look for a standard boost header file. - FIND_PATH(Boost_INCLUDE_DIR - NAMES boost/config.hpp - HINTS ${_boost_INCLUDE_SEARCH_DIRS} - PATH_SUFFIXES ${_boost_PATH_SUFFIXES} - ) - ENDIF( NOT Boost_INCLUDE_DIR ) - - # ------------------------------------------------------------------------ - # Extract version information from version.hpp - # ------------------------------------------------------------------------ - - IF(Boost_INCLUDE_DIR) - # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp - # Read the whole file: - # - SET(BOOST_VERSION 0) - SET(BOOST_LIB_VERSION "") - FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") - endif() - - STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") - STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") - - SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") - SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") - - IF(NOT "${Boost_VERSION}" STREQUAL "0") - MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") - MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") - MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") - - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") - ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "version.hpp reveals boost " - "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") - endif() - ELSE(Boost_INCLUDE_DIR) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") - ENDIF(Boost_INCLUDE_DIR) - - # ------------------------------------------------------------------------ - # Suffix initialization and compiler suffix detection. - # ------------------------------------------------------------------------ - - # Setting some more suffixes for the library - SET (Boost_LIB_PREFIX "") - if ( WIN32 AND Boost_USE_STATIC_LIBS ) - SET (Boost_LIB_PREFIX "lib") - endif() - - if (Boost_COMPILER) - set(_boost_COMPILER ${Boost_COMPILER}) - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "using user-specified Boost_COMPILER = ${_boost_COMPILER}") - endif() - else(Boost_COMPILER) - # Attempt to guess the compiler suffix - # NOTE: this is not perfect yet, if you experience any issues - # please report them and use the Boost_COMPILER variable - # to work around the problems. - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") - if(WIN32) - set (_boost_COMPILER "-iw") - else() - set (_boost_COMPILER "-il") - endif() - elseif (MSVC90) - SET (_boost_COMPILER "-vc90") - elseif (MSVC10) - SET (_boost_COMPILER "-vc100") - elseif (MSVC80) - SET (_boost_COMPILER "-vc80") - elseif (MSVC71) - SET (_boost_COMPILER "-vc71") - elseif (MSVC70) # Good luck! - SET (_boost_COMPILER "-vc7") # yes, this is correct - elseif (MSVC60) # Good luck! - SET (_boost_COMPILER "-vc6") # yes, this is correct - elseif (BORLAND) - SET (_boost_COMPILER "-bcb") - elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro") - set(_boost_COMPILER "-sw") - elseif (MINGW) - if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) - SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34 - else() - _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) - SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") - endif() - elseif (UNIX) - if (CMAKE_COMPILER_IS_GNUCXX) - if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) - SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34 - else() - _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) - # Determine which version of GCC we have. - IF(APPLE) - IF(Boost_MINOR_VERSION) - IF(${Boost_MINOR_VERSION} GREATER 35) - # In Boost 1.36.0 and newer, the mangled compiler name used - # on Mac OS X/Darwin is "xgcc". - SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") - ELSE(${Boost_MINOR_VERSION} GREATER 35) - # In Boost <= 1.35.0, there is no mangled compiler name for - # the Mac OS X/Darwin version of GCC. - SET(_boost_COMPILER "") - ENDIF(${Boost_MINOR_VERSION} GREATER 35) - ELSE(Boost_MINOR_VERSION) - # We don't know the Boost version, so assume it's - # pre-1.36.0. - SET(_boost_COMPILER "") - ENDIF(Boost_MINOR_VERSION) - ELSE() - SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") - ENDIF() - endif() - endif (CMAKE_COMPILER_IS_GNUCXX) - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "guessed _boost_COMPILER = ${_boost_COMPILER}") - endif() - endif(Boost_COMPILER) - - SET (_boost_MULTITHREADED "-mt") - if( NOT Boost_USE_MULTITHREADED ) - set (_boost_MULTITHREADED "") - endif() - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_MULTITHREADED = ${_boost_MULTITHREADED}") - endif() - - SET( _boost_STATIC_TAG "") - set( _boost_ABI_TAG "") - IF (WIN32) - IF(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") - SET (_boost_ABI_TAG "g") - ENDIF() - IF( Boost_USE_STATIC_LIBS ) - SET( _boost_STATIC_TAG "-s") - ENDIF( Boost_USE_STATIC_LIBS ) - ENDIF(WIN32) - SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_STATIC_TAG = ${_boost_STATIC_TAG}") - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_ABI_TAG = ${_boost_ABI_TAG}") - endif() - - # ------------------------------------------------------------------------ - # Begin finding boost libraries - # ------------------------------------------------------------------------ - - SET(_boost_LIBRARIES_SEARCH_DIRS - ${Boost_INCLUDE_DIR}/lib - ${Boost_INCLUDE_DIR}/../lib - C:/boost/lib - C:/boost - "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib" - "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib" - "$ENV{ProgramFiles}/boost/lib" - C:/library/boost/stage/lib - "C:/Program Files/boost/stage/lib" - "C:/Program Files (x86)/boost/stage/lib" - "$ENV{ProgramFiles}/boost" - /sw/local/lib - ) - IF( BOOST_ROOT ) - SET(_boost_LIBRARIES_SEARCH_DIRS - ${BOOST_ROOT}/lib - ${BOOST_ROOT}/stage/lib - ${_boost_LIBRARIES_SEARCH_DIRS}) - ENDIF( BOOST_ROOT ) - - IF( BOOST_LIBRARYDIR ) - file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) - SET(_boost_LIBRARIES_SEARCH_DIRS - ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) - ENDIF( BOOST_LIBRARYDIR ) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}") - endif() - - FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) - SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) - SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) - SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") - - # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES - IF( Boost_USE_STATIC_LIBS ) - SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) - IF(WIN32) - SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - ELSE(WIN32) - SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - ENDIF(WIN32) - ENDIF( Boost_USE_STATIC_LIBS ) - - FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE - NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT} - HINTS ${_boost_LIBRARIES_SEARCH_DIRS} - ) - - FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG - NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} - ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} - HINTS ${_boost_LIBRARIES_SEARCH_DIRS} - ) - - _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) - IF( Boost_USE_STATIC_LIBS ) - SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) - ENDIF( Boost_USE_STATIC_LIBS ) - ENDFOREACH(COMPONENT) - # ------------------------------------------------------------------------ - # End finding boost libraries - # ------------------------------------------------------------------------ - - SET(Boost_INCLUDE_DIRS - ${Boost_INCLUDE_DIR} - ) - - SET(Boost_FOUND FALSE) - IF(Boost_INCLUDE_DIR) - SET( Boost_FOUND TRUE ) - - # Check the version of Boost against the requested version. - if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) - message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34") - endif (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) - if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) - set( Boost_FOUND FALSE ) - set(_Boost_VERSION_AGE "old") - endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) - endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) - endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) - - if (NOT Boost_FOUND) - _Boost_MARK_COMPONENTS_FOUND(OFF) - endif() - - if (Boost_FOUND AND Boost_FIND_VERSION_EXACT) - # If the user requested an exact version of Boost, check - # that. We already know that the Boost version we have is >= the - # requested version. - set(_Boost_VERSION_AGE "new") - - # If the user didn't specify a patchlevel, it's 0. - if (NOT Boost_FIND_VERSION_PATCH) - set(Boost_FIND_VERSION_PATCH 0) - endif (NOT Boost_FIND_VERSION_PATCH) - - # We'll set Boost_FOUND true again if we have an exact version match. - set(Boost_FOUND FALSE) - _Boost_MARK_COMPONENTS_FOUND(OFF) - if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) - set( Boost_FOUND TRUE ) - _Boost_MARK_COMPONENTS_FOUND(ON) - endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) - endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) - endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) - endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT) - - if(NOT Boost_FOUND) - # State that we found a version of Boost that is too new or too old. - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") - if (Boost_FIND_VERSION_PATCH) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}") - endif (Boost_FIND_VERSION_PATCH) - if (NOT Boost_FIND_VERSION_EXACT) - set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)") - endif (NOT Boost_FIND_VERSION_EXACT) - set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.") - endif (NOT Boost_FOUND) - - # Always check for missing components - set(_boost_CHECKED_COMPONENT FALSE) - set(_Boost_MISSING_COMPONENTS "") - foreach(COMPONENT ${Boost_FIND_COMPONENTS}) - string(TOUPPER ${COMPONENT} COMPONENT) - set(_boost_CHECKED_COMPONENT TRUE) - if(NOT Boost_${COMPONENT}_FOUND) - string(TOLOWER ${COMPONENT} COMPONENT) - list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) - set( Boost_FOUND FALSE) - endif(NOT Boost_${COMPONENT}_FOUND) - endforeach(COMPONENT) - - if(Boost_DEBUG) - message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") - endif() - - if (_Boost_MISSING_COMPONENTS) - # We were unable to find some libraries, so generate a sensible - # error message that lists the libraries we were unable to find. - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") - foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON} boost_${COMPONENT}\n") - endforeach(COMPONENT) - - list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED) - list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) - if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") - else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) - set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") - endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) - endif (_Boost_MISSING_COMPONENTS) - - IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) - # Compatibility Code for backwards compatibility with CMake - # 2.4's FindBoost module. - - # Look for the boost library path. - # Note that the user may not have installed any libraries - # so it is quite possible the Boost_LIBRARY_PATH may not exist. - SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) - - IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") - GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) - ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") - - IF("${_boost_LIB_DIR}" MATCHES "/include$") - # Strip off the trailing "/include" in the path. - GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) - ENDIF("${_boost_LIB_DIR}" MATCHES "/include$") - - IF(EXISTS "${_boost_LIB_DIR}/lib") - SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) - ELSE(EXISTS "${_boost_LIB_DIR}/lib") - IF(EXISTS "${_boost_LIB_DIR}/stage/lib") - SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) - ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib") - SET(_boost_LIB_DIR "") - ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib") - ENDIF(EXISTS "${_boost_LIB_DIR}/lib") - - IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") - SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") - ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") - - ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) - - ELSE(Boost_INCLUDE_DIR) - SET( Boost_FOUND FALSE) - ENDIF(Boost_INCLUDE_DIR) - - IF (Boost_FOUND) - IF (NOT Boost_FIND_QUIETLY) - MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") - if(Boost_FIND_COMPONENTS) - message(STATUS "Found the following Boost libraries:") - endif() - ENDIF(NOT Boost_FIND_QUIETLY) - FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} ) - STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT ) - IF ( Boost_${UPPERCOMPONENT}_FOUND ) - IF (NOT Boost_FIND_QUIETLY) - MESSAGE (STATUS " ${COMPONENT}") - ENDIF(NOT Boost_FIND_QUIETLY) - SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) - ENDIF ( Boost_${UPPERCOMPONENT}_FOUND ) - ENDFOREACH(COMPONENT) - else() - if(Boost_FIND_REQUIRED) - message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}") - else() - if(NOT Boost_FIND_QUIETLY) - # we opt not to automatically output Boost_ERROR_REASON here as - # it could be quite lengthy and somewhat imposing in it's requests - # Since Boost is not always a required dependency we'll leave this - # up to the end-user. - if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG) - message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}") - else() - message(STATUS "Could NOT find Boost") - endif() - endif() - endif(Boost_FIND_REQUIRED) - endif() - - # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view - MARK_AS_ADVANCED(Boost_INCLUDE_DIR - Boost_INCLUDE_DIRS - Boost_LIBRARY_DIRS - ) -ENDIF(_boost_IN_CACHE) - Deleted: trunk/spark/cmake/FindRuby.cmake =================================================================== --- trunk/spark/cmake/FindRuby.cmake 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/cmake/FindRuby.cmake 2011-04-29 18:13:43 UTC (rev 275) @@ -1,112 +0,0 @@ -# - Find Ruby -# This module finds if Ruby is installed and determines where the include files -# and libraries are. It also determines what the name of the library is. This -# code sets the following variables: -# -# RUBY_INCLUDE_PATH = path to where ruby.h can be found -# RUBY_EXECUTABLE = full path to the ruby binary -# RUBY_LIBRARY = full path to the ruby library - -# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. -# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - -# RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` -# RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` -# RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` -# RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` -# RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` - -FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19 ruby1.9.1) - - -IF(RUBY_EXECUTABLE AND NOT RUBY_ARCH_DIR) - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['archdir']" - OUTPUT_VARIABLE RUBY_ARCH_DIR) - - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubyhdrdir']" - OUTPUT_VARIABLE RUBY_HDR_DIR) - - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['libdir']" - OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_DIR) - - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']" - OUTPUT_VARIABLE RUBY_RUBY_LIB_DIR) - - # site_ruby - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitearchdir']" - OUTPUT_VARIABLE RUBY_SITEARCH_DIR) - - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitelibdir']" - OUTPUT_VARIABLE RUBY_SITELIB_DIR) - - # vendor_ruby available ? - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'" - OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY ERROR_QUIET) - - IF(RUBY_HAS_VENDOR_RUBY) - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorlibdir']" - OUTPUT_VARIABLE RUBY_VENDORLIB_DIR) - - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorarchdir']" - OUTPUT_VARIABLE RUBY_VENDORARCH_DIR) - ENDIF(RUBY_HAS_VENDOR_RUBY) - - # save the results in the cache so we don't have to run ruby the next time again - SET(RUBY_ARCH_DIR ${RUBY_ARCH_DIR} CACHE PATH "The Ruby arch dir") - SET(RUBY_HDR_DIR ${RUBY_HDR_DIR} CACHE PATH "The Ruby header dir") - SET(RUBY_POSSIBLE_LIB_DIR ${RUBY_POSSIBLE_LIB_DIR} CACHE PATH "The Ruby lib dir") - SET(RUBY_RUBY_LIB_DIR ${RUBY_RUBY_LIB_DIR} CACHE PATH "The Ruby ruby-lib dir") - SET(RUBY_SITEARCH_DIR ${RUBY_SITEARCH_DIR} CACHE PATH "The Ruby site arch dir") - SET(RUBY_SITELIB_DIR ${RUBY_SITELIB_DIR} CACHE PATH "The Ruby site lib dir") - SET(RUBY_HAS_VENDOR_RUBY ${RUBY_HAS_VENDOR_RUBY} CACHE BOOL "Vendor Ruby is available") - SET(RUBY_VENDORARCH_DIR ${RUBY_VENDORARCH_DIR} CACHE PATH "The Ruby vendor arch dir") - SET(RUBY_VENDORLIB_DIR ${RUBY_VENDORLIB_DIR} CACHE PATH "The Ruby vendor lib dir") - -ENDIF(RUBY_EXECUTABLE AND NOT RUBY_ARCH_DIR) - -# for compatibility -SET(RUBY_POSSIBLE_LIB_PATH ${RUBY_POSSIBLE_LIB_DIR}) -SET(RUBY_RUBY_LIB_PATH ${RUBY_RUBY_LIB_DIR}) - - -FIND_PATH(RUBY_INCLUDE_PATH - NAMES ruby.h - PATHS - ${RUBY_ARCH_DIR} - ${RUBY_HDR_DIR} - /usr/lib/ruby/1.8/i586-linux-gnu/ - C:/library/ruby/lib/ruby/1.8/i386-mswin32/ - C:/Program Files/ruby/lib/ruby/1.8/i386-mswin32/ - "C:/Program Files (x86)/ruby/lib/ruby/1.8/i386-mswin32/" - C:/library/ruby/include/ruby-1.9.1/ - C:/Program Files/ruby/include/ruby-1.9.1/ - "C:/Program Files (x86)/ruby/include/ruby-1.9.1/" - ) - -# search the ruby library, the version for MSVC can have the "msvc" prefix and the "static" suffix -FIND_LIBRARY(RUBY_LIBRARY - NAMES ruby ruby1.8 ruby1.9 ruby-1.9.1 - msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby191 msvcrt-ruby18-static msvcrt-ruby19-static msvcrt-ruby191-static - PATHS ${RUBY_POSSIBLE_LIB_DIR} - C:/library/ruby/lib/ - C:/Program Files/ruby/lib/ - "C:/Program Files (x86)/ruby/lib/" - ) - -set(RUBY_INCLUDE_PATH ${RUBY_INCLUDE_PATH} ${RUBY_ARCH_DIR} "${RUBY_INCLUDE_PATH}/i386-mswin32") - -MARK_AS_ADVANCED( - RUBY_EXECUTABLE - RUBY_LIBRARY - RUBY_INCLUDE_PATH - RUBY_HDR_DIR - RUBY_ARCH_DIR - RUBY_POSSIBLE_LIB_DIR - RUBY_RUBY_LIB_DIR - RUBY_SITEARCH_DIR - RUBY_SITELIB_DIR - RUBY_HAS_VENDOR_RUBY - RUBY_VENDORARCH_DIR - RUBY_VENDORLIB_DIR - ) Modified: trunk/spark/lib/kerosin/imageserver/image.h =================================================================== --- trunk/spark/lib/kerosin/imageserver/image.h 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/lib/kerosin/imageserver/image.h 2011-04-29 18:13:43 UTC (rev 275) @@ -35,7 +35,7 @@ #include <sparkconfig.h> #endif #ifdef HAVE_IL_IL_H -#include <IL/il.h> +#include <il.h> #endif #include <kerosin/kerosin_defines.h> Modified: trunk/spark/lib/kerosin/imageserver/imageserver.h =================================================================== --- trunk/spark/lib/kerosin/imageserver/imageserver.h 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/lib/kerosin/imageserver/imageserver.h 2011-04-29 18:13:43 UTC (rev 275) @@ -26,7 +26,7 @@ #include <sparkconfig.h> #endif #ifdef HAVE_IL_IL_H -#include <IL/il.h> +#include <il.h> #ifndef IL_ILBM #define IL_ILBM IL_LBM #endif Modified: trunk/spark/lib/zeitgeist/scriptserver/gcvalue.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/gcvalue.cpp 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/lib/zeitgeist/scriptserver/gcvalue.cpp 2011-04-29 18:13:43 UTC (rev 275) @@ -19,8 +19,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "rubywrapper.h" // might define STR2CSTR #include "gcvalue.h" -#include "rubywrapper.h" #include <sstream> using namespace zeitgeist; Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2011-04-29 18:13:43 UTC (rev 275) @@ -508,7 +508,11 @@ << " to " << destPath << endl; stringstream s; +#ifdef WIN32 + s << "copy " << sourcePath << " " << destPath; +#else s << "cp " << sourcePath << " " << destPath; +#endif system(s.str().c_str()); return eOK; @@ -591,7 +595,7 @@ { GetLog()->Debug() << "(ScriptServer) Attempting to run init script '" << fileName << "'\n"; - + string dotDir; bool validDotDir = (type == IS_USERLOCAL) && Modified: trunk/spark/plugin/rubysceneimporter/rubysceneimporter.cpp =================================================================== --- trunk/spark/plugin/rubysceneimporter/rubysceneimporter.cpp 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/plugin/rubysceneimporter/rubysceneimporter.cpp 2011-04-29 18:13:43 UTC (rev 275) @@ -1004,9 +1004,9 @@ (Lookup(string(sub->val)) == S_NODE) ) { - node = shared_dynamic_cast<BaseNode>(*iter); if (iter != root->end()) { + node = shared_dynamic_cast<BaseNode>(*iter); ++iter; } } else { Modified: trunk/spark/plugin/sparkmonitor/sparkmonitorlogfileserver.cpp =================================================================== --- trunk/spark/plugin/sparkmonitor/sparkmonitorlogfileserver.cpp 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/plugin/sparkmonitor/sparkmonitorlogfileserver.cpp 2011-04-29 18:13:43 UTC (rev 275) @@ -111,10 +111,6 @@ void SparkMonitorLogFileServer::StartCycle() { - // work around a random crash! - if (GetTime() < 0.1) - return; - if (mPause && !mForwardStep) { return; Modified: trunk/spark/plugin/timersystemboost/timersystemboost.cpp =================================================================== --- trunk/spark/plugin/timersystemboost/timersystemboost.cpp 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/plugin/timersystemboost/timersystemboost.cpp 2011-04-29 18:13:43 UTC (rev 275) @@ -22,6 +22,11 @@ #include <boost/date_time/posix_time/posix_time.hpp> #include <zeitgeist/logserver/logserver.h> +#ifdef _MSC_VER +#include <boost/math/special_functions/round.hpp> +using boost::math::round; +#endif + using namespace oxygen; void TimerSystemBoost::Initialize() Modified: trunk/spark/plugin/timersystemsdl/timersystemsdl.cpp =================================================================== --- trunk/spark/plugin/timersystemsdl/timersystemsdl.cpp 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/plugin/timersystemsdl/timersystemsdl.cpp 2011-04-29 18:13:43 UTC (rev 275) @@ -22,6 +22,11 @@ #include <zeitgeist/logserver/logserver.h> #include <SDL.h> +#ifdef _MSC_VER +#include <boost/math/special_functions/round.hpp> +using boost::math::round; +#endif + using namespace oxygen; void TimerSystemSDL::Initialize() Modified: trunk/spark/utility/sfsexp/parser.c =================================================================== --- trunk/spark/utility/sfsexp/parser.c 2011-04-27 19:37:07 UTC (rev 274) +++ trunk/spark/utility/sfsexp/parser.c 2011-04-29 18:13:43 UTC (rev 275) @@ -769,6 +769,9 @@ squoted = 0; state = 3; break; + case '\'': + if (squoted) + t++; default: squoted = 0; state = 1; Modified: trunk/spark/windows/install_extra.nsi =================================================================== --- trunk/spark/windows/install_extra.nsi 2011-04-27 19:37:07 UTC (rev 274... [truncated message content] |
From: <he...@us...> - 2011-04-27 19:37:13
|
Revision: 274 http://simspark.svn.sourceforge.net/simspark/?rev=274&view=rev Author: hedayat Date: 2011-04-27 19:37:07 +0000 (Wed, 27 Apr 2011) Log Message: ----------- Try to find ODE library suggested by ode-config script first. Modified Paths: -------------- trunk/rcssserver3d/cmake/FindODE.cmake trunk/spark/cmake/FindODE.cmake Modified: trunk/rcssserver3d/cmake/FindODE.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindODE.cmake 2011-04-27 07:51:06 UTC (rev 273) +++ trunk/rcssserver3d/cmake/FindODE.cmake 2011-04-27 19:37:07 UTC (rev 274) @@ -60,7 +60,20 @@ ENDFOREACH(flag) SET(ODE_EXTRA_LDFLAGS ${ODE_CONFIG_LIBS}) - ELSE("${ODE_CONFIG_RESULT}" MATCHES "^0$") + + # Convert the linker flags to a CMake list. + STRING(REGEX REPLACE " +" ";" + ODE_CONFIG_LIBS "${ODE_CONFIG_LIBS}") + + # Look for -l options. + FOREACH(flag ${ODE_CONFIG_LIBS}) + IF("${flag}" MATCHES "^-l.*ode.*") + STRING(REGEX REPLACE "^-l" "" + ODE_LIB_NAME "${flag}") + ENDIF("${flag}" MATCHES "^-l.*ode.*") + ENDFOREACH(flag) + + ELSE("${ODE_CONFIG_RESULT}" MATCHES "^0$") MESSAGE("Error running ${ODE_CONFIG}: [${ODE_CONFIG_RESULT}]") ENDIF("${ODE_CONFIG_RESULT}" MATCHES "^0$") @@ -79,7 +92,7 @@ NO_DEFAULT_PATH ) FIND_LIBRARY(ODE_LIBRARY - NAMES ode ode_double ode_single + NAMES ${ODE_LIB_NAME} ode ode_double ode_single PATHS ${ODE_CONFIG_PREFIX}/lib /usr/lib Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2011-04-27 07:51:06 UTC (rev 273) +++ trunk/spark/cmake/FindODE.cmake 2011-04-27 19:37:07 UTC (rev 274) @@ -60,7 +60,20 @@ ENDFOREACH(flag) SET(ODE_EXTRA_LDFLAGS ${ODE_CONFIG_LIBS}) - ELSE("${ODE_CONFIG_RESULT}" MATCHES "^0$") + + # Convert the linker flags to a CMake list. + STRING(REGEX REPLACE " +" ";" + ODE_CONFIG_LIBS "${ODE_CONFIG_LIBS}") + + # Look for -l options. + FOREACH(flag ${ODE_CONFIG_LIBS}) + IF("${flag}" MATCHES "^-l.*ode.*") + STRING(REGEX REPLACE "^-l" "" + ODE_LIB_NAME "${flag}") + ENDIF("${flag}" MATCHES "^-l.*ode.*") + ENDFOREACH(flag) + + ELSE("${ODE_CONFIG_RESULT}" MATCHES "^0$") MESSAGE("Error running ${ODE_CONFIG}: [${ODE_CONFIG_RESULT}]") ENDIF("${ODE_CONFIG_RESULT}" MATCHES "^0$") @@ -79,7 +92,7 @@ NO_DEFAULT_PATH ) FIND_LIBRARY(ODE_LIBRARY - NAMES ode ode_double ode_single + NAMES ${ODE_LIB_NAME} ode ode_double ode_single PATHS ${ODE_CONFIG_PREFIX}/lib /usr/lib This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-27 07:51:13
|
Revision: 273 http://simspark.svn.sourceforge.net/simspark/?rev=273&view=rev Author: hedayat Date: 2011-04-27 07:51:06 +0000 (Wed, 27 Apr 2011) Log Message: ----------- Apply the same change as in spark's: can use alternative config scripts for ode Modified Paths: -------------- trunk/rcssserver3d/cmake/FindODE.cmake Modified: trunk/rcssserver3d/cmake/FindODE.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindODE.cmake 2011-04-26 20:33:14 UTC (rev 272) +++ trunk/rcssserver3d/cmake/FindODE.cmake 2011-04-27 07:51:06 UTC (rev 273) @@ -8,7 +8,7 @@ IF (NOT ODE_FOUND) - FIND_PROGRAM(ODE_CONFIG ode-config) + FIND_PROGRAM(ODE_CONFIG NAMES ${ODE_CONFIG_EXEC} ode-config) IF(ODE_CONFIG) # Use the newer EXECUTE_PROCESS command if it is available. IF(COMMAND EXECUTE_PROCESS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-26 20:33:20
|
Revision: 272 http://simspark.svn.sourceforge.net/simspark/?rev=272&view=rev Author: hedayat Date: 2011-04-26 20:33:14 +0000 (Tue, 26 Apr 2011) Log Message: ----------- Tagged rcssserver3d 0.6.5 Release Added Paths: ----------- tags/RCSSSERVER3D_0.6.5_RELEASE/ Property changes on: tags/RCSSSERVER3D_0.6.5_RELEASE ___________________________________________________________________ Added: svn:ignore + .project .cproject Makefile.in rcssserver3d_config.h rcssserver3d_config.h.in configure stamp-h1 aclocal.m4 autom4te.cache config.status .cdtconfigure.Build (GNU) libtool Makefile .settings Added: svn:mergeinfo + /branches/agentselection/rcssserver3d:195-206 /branches/treehole/rcssserver3d:175 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-26 20:30:37
|
Revision: 271 http://simspark.svn.sourceforge.net/simspark/?rev=271&view=rev Author: hedayat Date: 2011-04-26 20:30:31 +0000 (Tue, 26 Apr 2011) Log Message: ----------- Tagged SimSpark 0.2.2 Release Added Paths: ----------- tags/SIMSPARK_0.2.2_RELEASE/ Property changes on: tags/SIMSPARK_0.2.2_RELEASE ___________________________________________________________________ Added: svn:ignore + .project .cproject autom4te.cache configure sparkconfig.h.in Makefile.in aclocal.m4 .cdtconfigure.Build (GNU) Makefile config.status stamp-h1 libtool sparkconfig.h .settings Added: svn:mergeinfo + /branches/agentselection/spark:195-206 /branches/treehole/spark:175 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-21 15:29:31
|
Revision: 270 http://simspark.svn.sourceforge.net/simspark/?rev=270&view=rev Author: hedayat Date: 2011-04-21 15:29:25 +0000 (Thu, 21 Apr 2011) Log Message: ----------- Do not block on sending data to clients over network! Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/NEWS trunk/spark/RELEASE trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp trunk/spark/lib/oxygen/simulationserver/netcontrol.h Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-04-21 13:55:47 UTC (rev 269) +++ trunk/spark/ChangeLog 2011-04-21 15:29:25 UTC (rev 270) @@ -1,3 +1,13 @@ +2011-04-21 Hedayat Vatankhah <hed...@gm...> + + * NEWS: + * RELEASE: + - Added info about the network change for 0.2.2 release + + * lib/oxygen/simulationserver/netcontrol.cpp (NetControl::SendClientMessage): + - don't block on sending data to agents. if a receiver cannot receive data, + it'll lose future messages until it can receive furthur messages + 2011-04-20 Hedayat Vatankhah <hed...@gm...> * cmake/FindODE.cmake: Modified: trunk/spark/NEWS =================================================================== --- trunk/spark/NEWS 2011-04-21 13:55:47 UTC (rev 269) +++ trunk/spark/NEWS 2011-04-21 15:29:25 UTC (rev 270) @@ -15,6 +15,8 @@ - HingePerceptor can report torque - Better Performance - New timing system result in more cleaner code and prevent wasting CPU time +- Do not block on sending data to clients. Previously, simulator would block on + send() until it can send all data to clients. [0.2.1] This release of simspark is prepared for RoboCup 2010 competitions in Singapore. Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2011-04-21 13:55:47 UTC (rev 269) +++ trunk/spark/RELEASE 2011-04-21 15:29:25 UTC (rev 270) @@ -16,6 +16,8 @@ - HingePerceptor can report torque - Better Performance - New timing system result in more cleaner code and prevent wasting CPU time +- Do not block on sending data to clients. Previously, simulator would block on + send() until it can send all data to clients. You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2011-04-21 13:55:47 UTC (rev 269) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2011-04-21 15:29:25 UTC (rev 270) @@ -253,6 +253,7 @@ << endl; mClientId++; + mSendBuffers.resize(mClientId); ClientConnect(client); } @@ -318,12 +319,33 @@ // udp client if (mSocket.get() != 0) { - rval = mSocket->send(msg.data(), msg.size(), client->addr); + do + { + rval = mSocket->send(msg.data(), msg.size(), + client->addr, rcss::net::Socket::DONT_CHECK); + } + while (rval == -1 && errno == EINTR); + // don't retry unless an interrupt is received } } else { // tcp client - rval = socket->send(msg.data(), msg.size()); + const string &sendMsg = mSendBuffers[client->id].empty() ? msg + : mSendBuffers[client->id]; + unsigned sent = 0; + do + { + rval = socket->send(sendMsg.data() + sent, + sendMsg.size() - sent, 0, + rcss::net::Socket::DONT_CHECK); + if ( rval > 0 ) + sent += rval; + } + while (sent < sendMsg.size() && (rval != -1 || errno == EINTR)); + // try to send unless an EINTR error happens + + mSendBuffers[client->id].assign(sendMsg.data() + sent, + sendMsg.size() - sent); } if (rval < 0) Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.h 2011-04-21 13:55:47 UTC (rev 269) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.h 2011-04-21 15:29:25 UTC (rev 270) @@ -22,6 +22,7 @@ #include "simcontrolnode.h" #include "netbuffer.h" +#include <vector> #include <rcssnet/socket.hpp> #include <boost/shared_array.hpp> #include <oxygen/oxygen_defines.h> @@ -198,6 +199,9 @@ /** the size of the allocated receive buffer */ int mBufferSize; + /** a buffer to store partial messages to be sent */ + std::vector<std::string> mSendBuffers; + /** the receive buffer */ boost::shared_array<char> mBuffer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-21 13:55:54
|
Revision: 269 http://simspark.svn.sourceforge.net/simspark/?rev=269&view=rev Author: hedayat Date: 2011-04-21 13:55:47 +0000 (Thu, 21 Apr 2011) Log Message: ----------- - use float variables in CheckGoal - remove an opponent when the number of opponents in a group are greater than the number of team mates Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-04-20 23:19:27 UTC (rev 268) +++ trunk/rcssserver3d/ChangeLog 2011-04-21 13:55:47 UTC (rev 269) @@ -1,11 +1,23 @@ 2011-04-21 Hedayat Vatankhah <hed...@gm...> + * NEWS: + * RELEASE: + - updated for 0.6.5 to reflect removing an opponent from a touch group when + there are more opponents in the group than teammates + * plugin/soccer/soccerruleaspect/soccerruleaspect.h: - * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp (SoccerRuleAspect::CheckGoal): + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp + (SoccerRuleAspect::CheckGoal): - if goal recorder's cannot detect any goals, geometrically check to make sure that no goal is actually happened. Thanks to Luis for starting the effort and Mahdi for the initial code for calculating where the ball crosses the goal geometrically. + (SoccerRuleAspect::AnalyseTouchGroups): + - reposition a player from a team with more players in a touch group. Thanks + to Nexus3D (Mehdi?) for the initial patch. It intended to reposition the + player who joined last even from the opponent team, but we don't have + this info now so remove an unspecified player from the opponent if the + last player is not going to be removed. 2011-03-28 Hedayat Vatankhah <hed...@gm...> Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2011-04-20 23:19:27 UTC (rev 268) +++ trunk/rcssserver3d/NEWS 2011-04-21 13:55:47 UTC (rev 269) @@ -12,7 +12,9 @@ a high number of collisions in 9 vs 9 games: - If an agent is in touch with more than 2 agents (including himself), and he wasn't in such a situation in the previous time step - which means he is the - last to join the group - he is relocated outside of the field. + last to join the group - he is relocated outside of the field. However, if + the number of opponents in the group are more than teammates, an unspecified + opponent will be relocated instead. - If it is not clear which agent joined the group last, e.g. when 3 players were all separate at time t, but were all touching each other in time t + 1, an agent is chosen at random for relocation. Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2011-04-20 23:19:27 UTC (rev 268) +++ trunk/rcssserver3d/RELEASE 2011-04-21 13:55:47 UTC (rev 269) @@ -13,7 +13,9 @@ a high number of collisions in 9 vs 9 games: - If an agent is in touch with more than 2 agents (including himself), and he wasn't in such a situation in the previous time step - which means he is the - last to join the group - he is relocated outside of the field. + last to join the group - he is relocated outside of the field. However, if + the number of opponents in the group are more than teammates, an unspecified + opponent will be relocated instead. - If it is not clear which agent joined the group last, e.g. when 3 players were all separate at time t, but were all touching each other in time t + 1, an agent is chosen at random for relocation. Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-04-20 23:19:27 UTC (rev 268) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-04-21 13:55:47 UTC (rev 269) @@ -84,7 +84,7 @@ } /* Uses only Ball and Players positions and detects overcrowind near ball and areas and -players innappropriate behavior (laying on the ground or not walking for too much time) */ +players inappropriate behavior (laying on the ground or not walking for too much time) */ void SoccerRuleAspect::AutomaticSimpleReferee(TPlayMode playMode) { @@ -98,11 +98,13 @@ { CalculateDistanceArrays(TI_LEFT); // Calculates distance arrays for left team CalculateDistanceArrays(TI_RIGHT); // Calculates distance arrays for right team - AnalyseFaults(TI_LEFT); // Analyses simple faults for the left team - AnalyseFaults(TI_RIGHT); // Analyses simple faults for the right team + AnalyseFaults(TI_LEFT); // Analyzes simple faults for the left team + AnalyseFaults(TI_RIGHT); // Analyzes simple faults for the right team AnalyseTouchGroups(TI_LEFT); AnalyseTouchGroups(TI_RIGHT); - // Only apply rules during play-on + + // Only apply rules during play-on, leaves some time for agents to + // solve it themselves if (playMode == PM_PlayOn) { ClearPlayersAutomatic(TI_LEFT); // enforce standing and not overcrowding rules for left team @@ -275,12 +277,39 @@ SoccerBase::TAgentStateList::iterator i = agent_states.begin(); for (; i != agent_states.end(); ++i) { + boost::shared_ptr<TouchGroup> touchGroup = (*i)->GetOldTouchGroup(); + // Wasn't touching before, joined group making group too large - if ((*i)->GetOldTouchGroup()->size() == 1 && (*i)->GetTouchGroup()->size() > mMaxTouchGroupSize) + if (touchGroup->size() == 1 && touchGroup->size() > mMaxTouchGroupSize) { - playerFaultTime[(*i)->GetUniformNumber()][idx]++; - // Remove player from touch group so no more agents are replaced - (*i)->GetTouchGroup()->erase(*i); + // determine the team that has more players in the touch group + int pl[3] = { 0 }; + TTeamIndex oppIdx; + TouchGroup::iterator oppIt; // stores the last opponent in touch group + for (TouchGroup::iterator agentIt = touchGroup->begin(); + agentIt != touchGroup->end(); ++agentIt) + { + pl[(*agentIt)->GetTeamIndex()]++; + if ((*agentIt)->GetTeamIndex() != idx) + { + oppIdx = (*agentIt)->GetTeamIndex(); + oppIt = agentIt; + } + } + + if (pl[idx] >= touchGroup->size() - pl[idx]) + { + playerFaultTime[(*i)->GetUniformNumber()][idx]++; + // Remove player from touch group so no more agents are replaced + touchGroup->erase(*i); + } + else + { + // I am the last one to enter the group, but the number of + // opponents in the group are more than us + playerFaultTime[(*oppIt)->GetUniformNumber()][oppIdx]++; + touchGroup->erase(*oppIt); + } } } } @@ -1042,8 +1071,8 @@ return false; normBVel.Normalize(); - double velCos = normBVel.x(); - double dist = xDist2Goal / velCos; + float velCos = normBVel.x(); + float dist = xDist2Goal / velCos; salt::Vector3f crossPoint = ballPos - normBVel * dist; if (fabs(crossPoint.y()) < mGoalWidth / 2.0 && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-20 23:19:33
|
Revision: 268 http://simspark.svn.sourceforge.net/simspark/?rev=268&view=rev Author: hedayat Date: 2011-04-20 23:19:27 +0000 (Wed, 20 Apr 2011) Log Message: ----------- Implementing a fix for goal counting problem based on Luis's suggestion and Mahdi's work. Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2011-04-20 23:14:35 UTC (rev 267) +++ trunk/rcssserver3d/ChangeLog 2011-04-20 23:19:27 UTC (rev 268) @@ -1,3 +1,12 @@ +2011-04-21 Hedayat Vatankhah <hed...@gm...> + + * plugin/soccer/soccerruleaspect/soccerruleaspect.h: + * plugin/soccer/soccerruleaspect/soccerruleaspect.cpp (SoccerRuleAspect::CheckGoal): + - if goal recorder's cannot detect any goals, geometrically check to + make sure that no goal is actually happened. Thanks to Luis for starting + the effort and Mahdi for the initial code for calculating where the ball + crosses the goal geometrically. + 2011-03-28 Hedayat Vatankhah <hed...@gm...> * rcssmonitor3d/rcssmonitor3d.rb: Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-04-20 23:14:35 UTC (rev 267) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2011-04-20 23:19:27 UTC (rev 268) @@ -63,7 +63,7 @@ mMaxPlayersInsideOwnArea(1000), // maximum number of players of the defending team that may be inside own penalty area mMinOppDistance(0), // min dist for closest Opponent to ball in order to use repositions for 2nd, 3rd player mMin2PlDistance(0), // min dist for second closest of team before being repositioned - mMin3PlDistance(0), // min dist for third closest of team before being repositioned + mMin3PlDistance(0), // min dist for third closest of team before being repositioned mMaxTouchGroupSize(1000), mMaxFaultTime(0.0) // maximum time allowed for a player to commit a positional fault before being repositioned { @@ -83,23 +83,23 @@ mBallBody->Enable(); } -/* Uses only Ball and Players positions and detects overcrowind near ball and areas and +/* Uses only Ball and Players positions and detects overcrowind near ball and areas and players innappropriate behavior (laying on the ground or not walking for too much time) */ -void +void SoccerRuleAspect::AutomaticSimpleReferee(TPlayMode playMode) { // Reset counters before kickoff if (playMode == PM_BeforeKickOff) - { + { ResetFaultCounter(TI_LEFT); ResetFaultCounter(TI_RIGHT); } else { - CalculateDistanceArrays(TI_LEFT); // Calculates distance arrays for left team - CalculateDistanceArrays(TI_RIGHT); // Calculates distance arrays for right team - AnalyseFaults(TI_LEFT); // Analyses simple faults for the left team - AnalyseFaults(TI_RIGHT); // Analyses simple faults for the right team + CalculateDistanceArrays(TI_LEFT); // Calculates distance arrays for left team + CalculateDistanceArrays(TI_RIGHT); // Calculates distance arrays for right team + AnalyseFaults(TI_LEFT); // Analyses simple faults for the left team + AnalyseFaults(TI_RIGHT); // Analyses simple faults for the right team AnalyseTouchGroups(TI_LEFT); AnalyseTouchGroups(TI_RIGHT); // Only apply rules during play-on @@ -108,7 +108,7 @@ ClearPlayersAutomatic(TI_LEFT); // enforce standing and not overcrowding rules for left team ClearPlayersAutomatic(TI_RIGHT); // enforce standing and not overcrowding rules for right team } - + // Reset touch groups ResetTouchGroups(TI_LEFT); ResetTouchGroups(TI_RIGHT); @@ -116,18 +116,18 @@ } -void +void SoccerRuleAspect::ResetFaultCounterPlayer(int unum, TTeamIndex idx) { - playerGround[unum][idx] = 0; - playerNotStanding[unum][idx] = 0; + playerGround[unum][idx] = 0; + playerNotStanding[unum][idx] = 0; playerStanding[unum][idx] = 5/0.02; // Considers player has been standing for some time in playoff - prevPlayerInsideOwnArea[unum][idx] = 0; - playerInsideOwnArea[unum][idx] = 0; - playerFaultTime[unum][idx] = 0; + prevPlayerInsideOwnArea[unum][idx] = 0; + playerInsideOwnArea[unum][idx] = 0; + playerFaultTime[unum][idx] = 0; } -void +void SoccerRuleAspect::ResetFaultCounter(TTeamIndex idx) { for(int t=1; t<=11; t++) { @@ -136,54 +136,54 @@ } // Process agent state: standing, sitted, laying down, ... -void +void SoccerRuleAspect::ProcessAgentState(salt::Vector3f pos, int unum, TTeamIndex idx) { float groundZVal = 0.15; //bellow this player is on the ground float middleZVal = 0.25; //abovce this player is standing (or trying...) - //increase player not standing if it is not in upward position and inside of field + //increase player not standing if it is not in upward position and inside of field if (pos.z() < middleZVal && fabs(pos.y())< mFieldWidth / 2 + 0.1) - { - playerNotStanding[unum][idx]++; + { + playerNotStanding[unum][idx]++; playerStanding[unum][idx] = 0; //player not standing } //increase player near ground if it is very low and inside of field if (pos.z() < groundZVal && fabs(pos.y())< mFieldWidth / 2 + 0.1) { - playerGround[unum][idx]++; + playerGround[unum][idx]++; } //increase player standing or at least trying... Reset ground if (pos.z() >= middleZVal) { - playerStanding[unum][idx]++; + playerStanding[unum][idx]++; playerGround[unum][idx] = 0; } //Player standing for some cycles (0.5 seconds) reset not standing count - if (playerStanding[unum][idx] > 0.5 / 0.02) { - playerNotStanding[unum][idx] = 0; + if (playerStanding[unum][idx] > 0.5 / 0.02) { + playerNotStanding[unum][idx] = 0; } } // Calculates ordering on a distance vector void SoccerRuleAspect::SimpleOrder(float dArr[][3], int oArr[][3], TTeamIndex idx) { - for(int t1 = 1; t1 <= 10; t1++) - for(int t2 = t1 + 1; t2 <= 11; t2++) + for(int t1 = 1; t1 <= 10; t1++) + for(int t2 = t1 + 1; t2 <= 11; t2++) if (dArr[t1][idx] >= dArr[t2][idx]) oArr[t1][idx]++; else oArr[t2][idx]++; - + // DEBUG // if (dArr[1][idx]<1000.0) { // cout << "Team: " << idx << " --> "; -// for(int t1=1; t1<=6; t1++) +// for(int t1=1; t1<=6; t1++) // if (dArr[t1][idx]<5.0) cout << t1 << " o:" << oArr[t1][idx] << " d: " << dArr[t1][idx] << " | "; -// cout << endl; +// cout << endl; // } } @@ -202,7 +202,7 @@ ownGoalPos = Vector3f(-mFieldLength/2.0, 0.0, 0.0); else ownGoalPos = Vector3f(mFieldLength/2.0, 0.0, 0.0); - + boost::shared_ptr<oxygen::Transform> agent_aspect; SoccerBase::TAgentStateList::const_iterator i; @@ -210,45 +210,45 @@ closestPlayer[idx] = 1; closestPlayerDist[idx] = 1000.0; for(int t = 1; t <= 11; t++) - { + { distArr[t][idx]=1000.0; ordArr[t][idx]=1; distGArr[t][idx]=1000.0; - ordGArr[t][idx]=1; + ordGArr[t][idx]=1; } for (i = agent_states.begin(); i != agent_states.end(); ++i) { SoccerBase::GetTransformParent(**i, agent_aspect); Vector3f agentPos = agent_aspect->GetWorldTransform().Pos(); - int unum = (*i)->GetUniformNumber(); - distArr[unum][idx] = sqrt((agentPos.x()-ballPos.x())*(agentPos.x()-ballPos.x()) + + int unum = (*i)->GetUniformNumber(); + distArr[unum][idx] = sqrt((agentPos.x()-ballPos.x())*(agentPos.x()-ballPos.x()) + (agentPos.y()-ballPos.y())*(agentPos.y()-ballPos.y())); - distGArr[unum][idx] = sqrt((agentPos.x()-ownGoalPos.x())*(agentPos.x()-ownGoalPos.x()) + + distGArr[unum][idx] = sqrt((agentPos.x()-ownGoalPos.x())*(agentPos.x()-ownGoalPos.x()) + (agentPos.y()-ownGoalPos.y())*(agentPos.y()-ownGoalPos.y())); // determine closest player if (distArr[unum][idx] < closestPlayerDist[idx]) - { + { closestPlayerDist[idx] = distArr[unum][idx]; - closestPlayer[idx] = unum; + closestPlayer[idx] = unum; } // save player inside area state in previous cycle - prevPlayerInsideOwnArea[unum][idx] = playerInsideOwnArea[unum][idx]; + prevPlayerInsideOwnArea[unum][idx] = playerInsideOwnArea[unum][idx]; // determine number of players inside area and set inside area state of player - if (idx == TI_LEFT && mLeftPenaltyArea.Contains(Vector2f(agentPos.x(), agentPos.y())) || + if (idx == TI_LEFT && mLeftPenaltyArea.Contains(Vector2f(agentPos.x(), agentPos.y())) || idx == TI_RIGHT && mRightPenaltyArea.Contains(Vector2f(agentPos.x(), agentPos.y()))) - { + { numPlInsideOwnArea[idx]++; - playerInsideOwnArea[unum][idx] = 1; + playerInsideOwnArea[unum][idx] = 1; //goalie is not repositioned when inside own area... if (unum == 1) - { - distGArr[unum][idx] = 0.0; - } + { + distGArr[unum][idx] = 0.0; + } } else playerInsideOwnArea[unum][idx] = 0; @@ -256,7 +256,7 @@ // Process agent state: standing, sitted, laying down, ... ProcessAgentState(agentPos, unum, idx); } - + // compute rank of distance to ball SimpleOrder(distArr, ordArr, idx); // compute rank of distance to own goal @@ -290,7 +290,7 @@ SoccerBase::TAgentStateList agent_states; if (! SoccerBase::GetAgentStates(*mBallState.get(), agent_states, idx)) return; - + SoccerBase::TAgentStateList::const_iterator i; for (i = agent_states.begin(); i != agent_states.end(); i++) { @@ -307,31 +307,31 @@ idx2 = TI_RIGHT; else idx2 = TI_LEFT; //Other team - + for(int unum=1; unum<=11; unum++) { - // I am the third closest player but i am too near the ball (and not the goalie) - if (unum != 1 && closestPlayerDist[idx2] < mMinOppDistance && - (distArr[unum][idx] <= mMin3PlDistance + 0.01 && ordArr[unum][idx] == 3)) + // I am the third closest player but i am too near the ball (and not the goalie) + if (unum != 1 && closestPlayerDist[idx2] < mMinOppDistance && + (distArr[unum][idx] <= mMin3PlDistance + 0.01 && ordArr[unum][idx] == 3)) { playerFaultTime[unum][idx]++; } // I am the second closest player but i am too near the ball (and not the goalie) - else if(unum != 1 && closestPlayerDist[idx2] < mMinOppDistance && - distArr[unum][idx] <= mMin2PlDistance + 0.01 && ordArr[unum][idx] == 2 ) + else if(unum != 1 && closestPlayerDist[idx2] < mMinOppDistance && + distArr[unum][idx] <= mMin2PlDistance + 0.01 && ordArr[unum][idx] == 2 ) { playerFaultTime[unum][idx]++; } - // Too many players inside my own penalty area and Im am the last one to enter or + // Too many players inside my own penalty area and Im am the last one to enter or // the last one to enter was the goalie and I am the one further away from own goal else if((numPlInsideOwnArea[idx] > mMaxPlayersInsideOwnArea && unum != 1 && playerInsideOwnArea[unum][idx] == 1 && - (prevPlayerInsideOwnArea[unum][idx] == 0 || + (prevPlayerInsideOwnArea[unum][idx] == 0 || (prevPlayerInsideOwnArea[1][idx] == 0 && playerInsideOwnArea[1][idx] == 1 && mMaxPlayersInsideOwnArea + 1 == ordGArr[unum][idx])))) { playerFaultTime[unum][idx]++; } // I am a field player and on the ground for too much time - else if (unum != 1 && playerGround[unum][idx] > mGroundMaxTime / 0.02) + else if (unum != 1 && playerGround[unum][idx] > mGroundMaxTime / 0.02) { playerFaultTime[unum][idx]++; } @@ -346,7 +346,7 @@ playerFaultTime[unum][idx]++; } // I am the goalie and I and not standing for too much time - else if (unum == 1 && playerNotStanding[unum][idx] > mGoalieNotStandingMaxTime / 0.02) + else if (unum == 1 && playerNotStanding[unum][idx] > mGoalieNotStandingMaxTime / 0.02) { playerFaultTime[unum][idx]++; } @@ -354,11 +354,11 @@ { playerFaultTime[unum][idx]=0; } - } + } } -salt::Vector3f SoccerRuleAspect::RepositionOutsidePos(salt::Vector3f posIni, int unum, TTeamIndex idx) +salt::Vector3f SoccerRuleAspect::RepositionOutsidePos(salt::Vector3f posIni, int unum, TTeamIndex idx) { salt::Vector3f pos; // Choose x side based on team @@ -396,12 +396,12 @@ if (playerFaultTime[unum][idx] > mMaxFaultTime / 0.02) { // I am not a very good soccer player... I am violating the rules... - salt::Vector3f new_pos = RepositionOutsidePos(ballPos, unum, idx); + salt::Vector3f new_pos = RepositionOutsidePos(ballPos, unum, idx); //Calculate my Reposition pos outside of the field - SoccerBase::MoveAgent(agent_aspect, new_pos); + SoccerBase::MoveAgent(agent_aspect, new_pos); //Oh my God!! I am flying!! I am going outside of the field ResetFaultCounterPlayer(unum, idx); - //cout << "*********Player Repos Num: " << unum << " Team: " << team << " Pos: " << new_pos << endl; + //cout << "*********Player Repos Num: " << unum << " Team: " << team << " Pos: " << new_pos << endl; } } } @@ -1025,9 +1025,35 @@ { // check if the ball is in one of the goals TTeamIndex idx = mBallState->GetGoalState(); + if (idx == TI_NONE) { - return false; + const salt::Vector3f ballPos = mBallBody->GetPosition(); + const float xDist2Goal = fabs(ballPos.x()) - mGoalBallLineX; + + // check if ball is completely out of the field + if (xDist2Goal < 0) + return false; + + salt::Vector3f normBVel = mBallBody->GetVelocity(); + // ball should be inside the field recently (assumes that the simulation + // step size is smaller than 1 second) + if (ballPos.x() - normBVel.x() > mGoalBallLineX) + return false; + + normBVel.Normalize(); + double velCos = normBVel.x(); + double dist = xDist2Goal / velCos; + salt::Vector3f crossPoint = ballPos - normBVel * dist; + + if (fabs(crossPoint.y()) < mGoalWidth / 2.0 && + crossPoint.z() < mGoalHeight) + { + if (ballPos.x() < 0) + idx = TI_LEFT; + else + idx = TI_RIGHT; + } } // score the lucky team @@ -1231,7 +1257,7 @@ << playMode << "\n"; break; } - + // Simple Referee AutomaticSimpleReferee(playMode); } @@ -1281,6 +1307,7 @@ SoccerBase::GetSoccerVar(*this,"FieldLength",mFieldLength); SoccerBase::GetSoccerVar(*this,"FieldWidth",mFieldWidth); SoccerBase::GetSoccerVar(*this,"GoalWidth",mGoalWidth); + SoccerBase::GetSoccerVar(*this,"GoalHeight",mGoalHeight); SoccerBase::GetSoccerVar(*this,"FreeKickDistance",mFreeKickDist); SoccerBase::GetSoccerVar(*this,"FreeKickMoveDist",mFreeKickMoveDist); SoccerBase::GetSoccerVar(*this,"GoalKickDist",mGoalKickDist); @@ -1291,9 +1318,9 @@ float penaltyLength, penaltyWidth; SoccerBase::GetSoccerVar(*this,"PenaltyLength",penaltyLength); SoccerBase::GetSoccerVar(*this,"PenaltyWidth",penaltyWidth); - + // auto ref parameters - SoccerBase::GetSoccerVar(*this,"NotStandingMaxTime",mNotStandingMaxTime); + SoccerBase::GetSoccerVar(*this,"NotStandingMaxTime",mNotStandingMaxTime); SoccerBase::GetSoccerVar(*this,"GoalieNotStandingMaxTime",mGoalieNotStandingMaxTime); SoccerBase::GetSoccerVar(*this,"GroundMaxTime",mGroundMaxTime); SoccerBase::GetSoccerVar(*this,"GoalieGroundMaxTime",mGoalieGroundMaxTime); @@ -1324,6 +1351,8 @@ -(penaltyWidth + mGoalWidth)/2.0), Vector2f(-mFieldLength/2.0, (penaltyWidth + mGoalWidth)/2.0)); + + mGoalBallLineX = mFieldLength / 2.0 + mBallRadius; } void @@ -1753,7 +1782,7 @@ SoccerBase::TAgentStateList agent_states; if (SoccerBase::GetAgentStates(*mBallState.get(), agent_states, TI_NONE)) { - + SoccerBase::TAgentStateList::const_iterator i; for (i = agent_states.begin(); i != agent_states.end(); ++i) (*i)->UnSelect(); @@ -1768,7 +1797,7 @@ if (SoccerBase::GetAgentStates(*mBallState.get(), agent_states, TI_NONE) && agent_states.size() > 0) { boost::shared_ptr<AgentState> first = agent_states.front(); - + SoccerBase::TAgentStateList::const_iterator i; for (i = agent_states.begin(); i != agent_states.end(); ++i) { @@ -1784,7 +1813,7 @@ return; } } - + // No agent selected, select first first->Select(); } Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2011-04-20 23:14:35 UTC (rev 267) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.h 2011-04-20 23:19:27 UTC (rev 268) @@ -45,7 +45,7 @@ { public: typedef std::list<boost::shared_ptr<AgentState> > TAgentStateList; - + public: SoccerRuleAspect(); virtual ~SoccerRuleAspect(); @@ -64,13 +64,13 @@ \param pos position where the ball should be dropped- */ void DropBall(salt::Vector3f pos); - + /** Calculates the out of the field reposition pos for a given agent with unum and team idx Agents are repositioned outside of the field near the mid field line on the opposite yy side regarding the ball position */ salt::Vector3f RepositionOutsidePos(salt::Vector3f initPos, int unum, TTeamIndex idx); - + /** Calculates the inside field reposition pos for a given agent with unum and team idx Agents are repositioned at distance from the ball, that is, at: plpos + (plpos-ballpos).normalize()*dist */ @@ -80,7 +80,7 @@ */ void ClearPlayersAutomatic(TTeamIndex idx); - /** Calculates distance arrays needed for repositioning players + /** Calculates distance arrays needed for repositioning players */ void CalculateDistanceArrays(TTeamIndex idx); @@ -99,18 +99,18 @@ */ void ResetFaultCounterPlayer(int unum, TTeamIndex idx); - /**Analyse Faults from players and increase fault counter of offending players + /**Analyse Faults from players and increase fault counter of offending players */ void AnalyseFaults(TTeamIndex idx); /** Check whether too many agents are touching */ void AnalyseTouchGroups(TTeamIndex idx); - + /** Reset the touch groups */ void ResetTouchGroups(TTeamIndex idx); - + /** Automatic Referee that clears players that violate the rules */ void AutomaticSimpleReferee(TPlayMode playMode); @@ -138,19 +138,19 @@ void ClearPlayersWithException(const salt::Vector3f& pos, float radius, float min_dist, TTeamIndex idx, boost::shared_ptr<AgentState> agentState); - /** + /** * get the size of field, i.e. length and width - * - * + * + * * @return the length and width */ salt::Vector2f GetFieldSize() const; - - + + void ResetAgentSelection(); - + void SelectNextAgent(); - + void ClearSelectedPlayers(); protected: @@ -238,7 +238,7 @@ */ void ClearPlayers(const salt::AABB2& box, float min_dist, TTeamIndex idx); - /** + /** * clear the player before kick off, if the team is the kick off * side, the robots can be on his own half and the center circle, * otherwise the robots can only be on his own half except the @@ -247,7 +247,7 @@ * @param idx the team which kick off */ void ClearPlayersBeforeKickOff(TTeamIndex idx); - + protected: /** reference to the body node of the Ball */ boost::shared_ptr<oxygen::RigidBody> mBallBody; @@ -277,6 +277,10 @@ float mFieldWidth; /** the goal width (in meters) */ float mGoalWidth; + /** the goal height (in meters) */ + float mGoalHeight; + /** the absolute x coordinate of the goal which ball should pass (in meters) */ + float mGoalBallLineX; /** the point on the field where we do the kick in, free kick etc. */ salt::Vector3f mFreeKickPos; /** the distance opponents have to keep during free kicks, kick ins etc. */ @@ -295,28 +299,28 @@ //FCP 2010 - New Parameters (added by FCPortugal for Singapure 2010) /** max time player may be sitted or laying down before being repositioned */ - int mNotStandingMaxTime; + int mNotStandingMaxTime; /** max time player may be on the ground before being repositioned */ - int mGroundMaxTime; + int mGroundMaxTime; /** max time goalie may be sitted or laying down before being repositioned */ - int mGoalieNotStandingMaxTime; + int mGoalieNotStandingMaxTime; /** max time goalie (player number 1) may be on the ground before being repositioned */ int mGoalieGroundMaxTime; /** min dist for second closest of team before being repositioned */ - float mMin2PlDistance; + float mMin2PlDistance; /** min dist for third closest of team before being repositioned */ - float mMin3PlDistance; + float mMin3PlDistance; /** min dist for closest Opponent to ball in order to use repositions for the second and third player*/ - float mMinOppDistance; + float mMinOppDistance; /** maximum number of players of the defending team that may be inside own penalty area */ - int mMaxPlayersInsideOwnArea; + int mMaxPlayersInsideOwnArea; /** maximum number of players that may be in a single touch group */ int mMaxTouchGroupSize; /** maximum time allowed for a player to commit a positional fault before being repositioned */ - int mMaxFaultTime; + int mMaxFaultTime; /* Useful arrays for dealing with agent state an faults */ salt::Vector3f playerPos[12][3]; //Players Positions - not used - int playerGround[12][3]; //Time Players are on the ground + int playerGround[12][3]; //Time Players are on the ground int playerNotStanding[12][3]; //Time Players are not standing (head up for more than 0.5s) int playerInsideOwnArea[12][3]; //Player is inside own area int prevPlayerInsideOwnArea[12][3]; //Player was inside own area last cycle @@ -329,7 +333,7 @@ int numPlInsideOwnArea[3]; //Number of players inside own area int closestPlayer[3]; //Closest Player from each team float closestPlayerDist[3]; //Closest Player distance to ball from each team - /* FCP 2010 - New Parameters */ + /* FCP 2010 - New Parameters */ // areas where opponents are not allowed in certain play modes /** bounding box for the right half of the field */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2011-04-20 23:14:41
|
Revision: 267 http://simspark.svn.sourceforge.net/simspark/?rev=267&view=rev Author: hedayat Date: 2011-04-20 23:14:35 +0000 (Wed, 20 Apr 2011) Log Message: ----------- Add support for providing alternative ode-config binaries, useful when multiple version of ODE is installed on the system Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/cmake/FindODE.cmake Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2011-03-27 22:01:34 UTC (rev 266) +++ trunk/spark/ChangeLog 2011-04-20 23:14:35 UTC (rev 267) @@ -1,3 +1,9 @@ +2011-04-20 Hedayat Vatankhah <hed...@gm...> + + * cmake/FindODE.cmake: + - ODE_CONFIG_EXEC variable can be used to specify alternative ode-config + executable + 2011-03-28 Hedayat Vatankhah <hed...@gm...> * plugin/sparkmonitor/sparkmonitorlogfileserver.cpp Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2011-03-27 22:01:34 UTC (rev 266) +++ trunk/spark/cmake/FindODE.cmake 2011-04-20 23:14:35 UTC (rev 267) @@ -8,7 +8,7 @@ IF (NOT ODE_FOUND) - FIND_PROGRAM(ODE_CONFIG ode-config) + FIND_PROGRAM(ODE_CONFIG NAMES ${ODE_CONFIG_EXEC} ode-config) IF(ODE_CONFIG) # Use the newer EXECUTE_PROCESS command if it is available. IF(COMMAND EXECUTE_PROCESS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |