yake-svn Mailing List for Yake Engine (Page 20)
Status: Beta
Brought to you by:
psyclonist
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(51) |
Oct
(2) |
Nov
(18) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(44) |
Feb
(13) |
Mar
(73) |
Apr
(61) |
May
|
Jun
(4) |
Jul
(19) |
Aug
(50) |
Sep
(47) |
Oct
(7) |
Nov
(7) |
Dec
(14) |
2008 |
Jan
(2) |
Feb
|
Mar
(4) |
Apr
(4) |
May
(5) |
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(4) |
2009 |
Jan
|
Feb
(22) |
Mar
(12) |
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
(4) |
Aug
|
Sep
|
Oct
(17) |
Nov
(3) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(12) |
Apr
(11) |
May
|
Jun
(5) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <psy...@us...> - 2006-12-19 20:17:55
|
Revision: 1562 http://svn.sourceforge.net/yake/?rev=1562&view=rev Author: psyclonist Date: 2006-12-19 12:17:53 -0800 (Tue, 19 Dec 2006) Log Message: ----------- refacted logging interface, added sampleLog, removed deprecated code, added native::getCurrentThreadId() Modified Paths: -------------- trunk/yake/scripts/premake/samples.lua trunk/yake/src/base/yakeLog.cpp trunk/yake/yake/base/native/yakeNative.h trunk/yake/yake/base/prerequisites/yakePrerequisitesVC71Warnings.h trunk/yake/yake/base/prerequisites/yakePrerequisitesVC8Warnings.h trunk/yake/yake/base/yakeLog.h Added Paths: ----------- trunk/yake/samples/sampleLog/ trunk/yake/samples/sampleLog/demo.cpp trunk/yake/src/base/native/win32/yakeThreads.cpp Removed Paths: ------------- trunk/yake/src/base/yakeDebugLogAppender.cpp trunk/yake/yake/base/yakeDebugLogAppender.h Added: trunk/yake/samples/sampleLog/demo.cpp =================================================================== --- trunk/yake/samples/sampleLog/demo.cpp (rev 0) +++ trunk/yake/samples/sampleLog/demo.cpp 2006-12-19 20:17:53 UTC (rev 1562) @@ -0,0 +1,25 @@ +#include "yake/base/yake.h" + +using namespace yake; + +int main(int argc, char* argv[]) +{ + try + { + yake::logging::setProcessId("demo"); + YAKE_LOG_INFORMATION("aloha"); + YAKE_LOG_WARNING("aloha"); + yake::logging::log( yake::logging::S_ERROR, "Batman, help! ", 42 ); + } + catch (yake::Exception& ex) + { + std::cout << "Demo caught exception: \n" << ex.what(); + } +#if defined(YAKE_DEBUG) + { + std::cout << "\nPress ENTER...\n"; + std::cin.get(); + } +#endif +} + Modified: trunk/yake/scripts/premake/samples.lua =================================================================== --- trunk/yake/scripts/premake/samples.lua 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/scripts/premake/samples.lua 2006-12-19 20:17:53 UTC (rev 1562) @@ -33,6 +33,10 @@ -------------------------------------- -------------------------------------- +makeSample("sampleLog","samples/sampleLog") +useComponent("base") + +-------------------------------------- makeSample("sampleEntFsm","samples/ent/sampleEntFsm") useComponent("base") useComponent("scripting") Added: trunk/yake/src/base/native/win32/yakeThreads.cpp =================================================================== --- trunk/yake/src/base/native/win32/yakeThreads.cpp (rev 0) +++ trunk/yake/src/base/native/win32/yakeThreads.cpp 2006-12-19 20:17:53 UTC (rev 1562) @@ -0,0 +1,49 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright \xA9 2004 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + + 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place - Suite 330, Boston, MA 02111-1307, USA, or go to + http://www.gnu.org/copyleft/lesser.txt. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ + +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// stl +#include <cassert> +#include <locale> +// yake +#include <yake/base/yakePCH.h> +#include <yake/base/native/win32/yakeConfig.h> +#include <yake/base/templates/yakeSmartAssert.h> +#include <yake/base/yakeException.h> + +namespace yake { +namespace native { + + threadid_t getCurrentThreadId() + { + return ::GetCurrentThreadId(); + } + +} // native +} // yake Deleted: trunk/yake/src/base/yakeDebugLogAppender.cpp =================================================================== --- trunk/yake/src/base/yakeDebugLogAppender.cpp 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/src/base/yakeDebugLogAppender.cpp 2006-12-19 20:17:53 UTC (rev 1562) @@ -1,55 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright 2004 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. - - 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ - -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -#include <yake/base/yakePCH.h> -#include <yake/base/yakeDebugLogAppender.h> -#include <yake/base/native/yakeNative.h> - -//============================================================================ -// INTERFACE STRUCTURES / UTILITY CLASSES -//============================================================================ -namespace yake -{ -namespace base -{ - void DebugLogAppender::onLog( const Log::Message& message ) - { - static native::DebugLog::Severity severityTranslationTable[] = - { - native::DebugLog::INFORMATIONS, - native::DebugLog::WARNINGS, - native::DebugLog::ERRORS - }; - - native::debug_Log( message.text.c_str(), severityTranslationTable[ message.severity ], message.source.c_str() ); - } -} // base -} // yake - Modified: trunk/yake/src/base/yakeLog.cpp =================================================================== --- trunk/yake/src/base/yakeLog.cpp 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/src/base/yakeLog.cpp 2006-12-19 20:17:53 UTC (rev 1562) @@ -24,64 +24,96 @@ source code distribution. ------------------------------------------------------------------------------------ */ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ #include <yake/base/yakePCH.h> #include <yake/base/yakeLog.h> -#include <yake/base/yakeDebugLogAppender.h> -//============================================================================ -// INTERFACE STRUCTURES / UTILITY CLASSES -//============================================================================ -namespace yake -{ -namespace base -{ +namespace yake { +namespace logging { + void toStdErr(const severity_t sev, const char* procId, threadid_t threadId, const char* msg) + { + std::ostringstream ss; + ss << "[" << (procId ? procId : "") << "]"; -Log::Log() -{ -#ifdef YAKE_DEBUG_BUILD - mOnLog.connect( &DebugLogAppender::onLog ); -#endif -} + ss << "[thread:"; + ss << std::hex << threadId; + ss << "] "; -Log::~Log() -{ -} + ss << "["; + ss << toString(Severity(sev)); + if (sev >= S_LAST) + ss << "(" << severity_t(sev) << ")"; + ss << "]"; + ss << "\t" << msg << "\n"; -void Log::onLog( const OnLog::slot_type& rSlot ) -{ - mOnLog.connect( rSlot ); -} + std::cerr << ss.str(); + } -void Log::log( const String& rWhat, - Severity severity, - const String& rSource, - const String& rAdditionalInfo ) -{ - mOnLog( Message( rWhat, severity, rSource, rAdditionalInfo ) ); -} + const char* toString(const Severity sev) + { + static char* severity_names[S_LAST+1] = + { + "emergency", + "alert", + "critical", + "error", + "warning", + "notice", + "information", + "debug", + "custom" + }; + return (sev <= S_DEBUG) ? severity_names[sev] : severity_names[S_LAST]; + } + logger::scoped_lock::scoped_lock() : lck_(instance_.mtx_) + { + } + logger logger::instance_; + logger& logger::instance() + { + return instance_; + } + void logger::enableSeverity(const severity_t sev, const bool on) + { + scoped_lock lock; + instance().enabledSeverities_[ sev ] = on; + } + int logger::addTarget(const LogFn fn) + { + scoped_lock lock; + instance().targets_.push_back( fn ); + return 1; + } + void logger::log(const severity_t sev, const char *tid, const char *msg) + { + instance().doLog(sev, tid, msg); + } + void logger::doLog(const severity_t sev, const char *tid, const char *msg) + { + scoped_lock lock; -void log_information( const String& what, const String& source, const String& where ) -{ - Log::instance().log( what, Log::INFORMATIONS, source, where ); -} + EnableMap::const_iterator itEnabled = instance_.enabledSeverities_.find( sev ); + if (itEnabled != instance_.enabledSeverities_.end() && !itEnabled->second) + return; -void log_warning( const String& what, const String& source, const String& where ) -{ - Log::instance().log( what, Log::WARNINGS, source, where ); -} + TargetFnList::const_iterator itEnd = targets_.end(); + for (TargetFnList::const_iterator it = targets_.begin(); it != itEnd; ++it) + { + const threadid_t threadId = native::getCurrentThreadId(); + (**it)(sev,instance().procId_.c_str(),threadId,msg); + } + } + void logger::setProcessId(const String& pId) + { + scoped_lock lock; + instance().procId_ = pId; + } + logger::logger() + { + scoped_lock lock; + for (severity_t i=0; i<S_LAST; ++i) + enableSeverity( i, true ); + addTarget(&toStdErr); + } -void log_error( const String& what, const String& source, const String& where ) -{ - Log::instance().log( what, Log::ERRORS, source, where ); -} - -void log( const String& what ) -{ - Log::instance().log( what ); -} - -} // base +} // logging } // yake Modified: trunk/yake/yake/base/native/yakeNative.h =================================================================== --- trunk/yake/yake/base/native/yakeNative.h 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/yake/base/native/yakeNative.h 2006-12-19 20:17:53 UTC (rev 1562) @@ -34,6 +34,7 @@ //============================================================================ namespace yake { + typedef uint32 threadid_t; namespace native { // Library Interface. @@ -72,6 +73,8 @@ // Application Information Interface. YAKE_BASE_API const char* getApplicationDir(); + YAKE_BASE_API threadid_t getCurrentThreadId(); + } // native } // yake Modified: trunk/yake/yake/base/prerequisites/yakePrerequisitesVC71Warnings.h =================================================================== --- trunk/yake/yake/base/prerequisites/yakePrerequisitesVC71Warnings.h 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/yake/base/prerequisites/yakePrerequisitesVC71Warnings.h 2006-12-19 20:17:53 UTC (rev 1562) @@ -44,6 +44,9 @@ // A base class or structure must be declared with the __declspec(dllexport) keyword for a function in a derived class to be exported #pragma warning( disable : 4251 ) +// C4275: non dll-interface class 'X' used as base for dll-interface 'Y' +#pragma warning(disable: 4275) + // Turn off 'warning C4355: 'this' : used in base member initializer list' #pragma warning( disable : 4355 ) Modified: trunk/yake/yake/base/prerequisites/yakePrerequisitesVC8Warnings.h =================================================================== --- trunk/yake/yake/base/prerequisites/yakePrerequisitesVC8Warnings.h 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/yake/base/prerequisites/yakePrerequisitesVC8Warnings.h 2006-12-19 20:17:53 UTC (rev 1562) @@ -44,6 +44,9 @@ // A base class or structure must be declared with the __declspec(dllexport) keyword for a function in a derived class to be exported #pragma warning( disable : 4251 ) +// C4275: non dll-interface class 'X' used as base for dll-interface 'Y' +#pragma warning(disable: 4275) + // Turn off 'warning C4355: 'this' : used in base member initializer list' #pragma warning( disable : 4355 ) Deleted: trunk/yake/yake/base/yakeDebugLogAppender.h =================================================================== --- trunk/yake/yake/base/yakeDebugLogAppender.h 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/yake/base/yakeDebugLogAppender.h 2006-12-19 20:17:53 UTC (rev 1562) @@ -1,60 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright 2004 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. - - 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place - Suite 330, Boston, MA 02111-1307, USA, or go to - http://www.gnu.org/copyleft/lesser.txt. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -#ifndef YAKE_BASE_DEBUGLOGTARGET_H -#define YAKE_BASE_DEBUGLOGTARGET_H - -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// Standard headers -#ifndef YAKE_BASE_PREREQUISITES_H -# include "yake/base/yakePrerequisites.h" -#endif -// Yake -#include <yake/base/yakeString.h> -#include <yake/base/yakeLog.h> - -//============================================================================ -// INTERFACE STRUCTURES / UTILITY CLASSES -//============================================================================ -namespace yake -{ -namespace base -{ - -class YAKE_BASE_API DebugLogAppender -{ -// Methods -public: - static void onLog( const Log::Message& ); -}; - -} // base -} // yake - -#endif // YAKE_BASE_DEBUGLOGTARGET_H - Modified: trunk/yake/yake/base/yakeLog.h =================================================================== --- trunk/yake/yake/base/yakeLog.h 2006-12-19 00:31:15 UTC (rev 1561) +++ trunk/yake/yake/base/yakeLog.h 2006-12-19 20:17:53 UTC (rev 1562) @@ -24,126 +24,152 @@ source code distribution. ------------------------------------------------------------------------------------ */ -#ifndef YAKE_BASE_LOG_H -#define YAKE_BASE_LOG_H +#ifndef YAKE_LOGGING_LOG_H +#define YAKE_LOGGING_LOG_H -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// Standard headers #ifndef YAKE_BASE_PREREQUISITES_H # include "yake/base/yakePrerequisites.h" #endif -// Yake +#include <yake/base/yakeNoncopyable.h> #include <yake/base/yakeString.h> #include <yake/base/templates/yakeSingleton.h> -#include <yake/base/templates/yakeSignals.h> -//============================================================================ -// INTERFACE STRUCTURES / UTILITY CLASSES -//============================================================================ -namespace yake -{ -namespace base -{ +#include <yake/base/native/yakeNative.h> +#include <boost/thread/mutex.hpp> -class YAKE_BASE_API Log -{ -// Types -public: - enum Severity { INFORMATIONS, WARNINGS, ERRORS }; - - /** - * Class representing log message. - */ - struct Message +namespace yake { +namespace logging { + + // syslog inspired + enum Severity { - /// Log message text. - String text; - - /// Message severity. - Severity severity; - - /// Message source, like "kernel" or "module X". - String source; - - /// Any additional info, like "file foo.cpp, line 666". - String additionalInfo; - - Message( - const String& msgText, - Severity msgSeverity, - const String& msgSrc, - const String& msgInfo ): text( msgText ), - severity( msgSeverity ), - source( msgSrc ), - additionalInfo( msgInfo ) - { - } + S_EMERGENCY = 0, + S_ALERT, + S_CRITICAL, + S_ERROR, + S_WARNING, + S_NOTICE, + S_INFORMATION, + S_DEBUG, + S_LAST // Do not use directly. }; - - /// Log signal type. - typedef Signal3< void (const Message&) > OnLog; + typedef uint32 severity_t; -// Class -public: - Log(); - virtual ~Log(); + //helper: + YAKE_BASE_API const char* toString(const Severity sev); -// Methods -public: - /// Subscribe to log messages. - void onLog( const OnLog::slot_type& rSlot ); - - /// Log message. - void log( const String& rWhat, - Severity severity = INFORMATIONS, - const String& rSource = "yake", - const String& rAdditionalInfo = "" ); -//deprecated method: for rich typesafe formatting use boost::format library -//void logPrintf(char *fmt, ...); // todo: remove this <= Er.. no! + /** severity, processId, threadId, message */ + typedef void(*LogFn)(const severity_t, const char*, threadid_t, const char*); + struct YAKE_BASE_API logger : public boost::noncopyable + { + //YAKE_BUILD_PHOENIX_SINGLETON(logger) //public + private: //Make it private if PHOENIX is not used! + logger(); + static logger& instance(); + static logger instance_; + public: + static void log(const severity_t, const char* tid, const char* msg); + static void setProcessId(const String&); + static int addTarget(const LogFn); + static void enableSeverity(const severity_t, const bool); + private: + void doLog(const severity_t, const char* tid, const char* msg); + private: + String procId_; + typedef std::vector<LogFn> TargetFnList; + TargetFnList targets_; + typedef std::map<severity_t,bool> EnableMap; + EnableMap enabledSeverities_; + boost::mutex mtx_; + struct scoped_lock; + friend struct scoped_lock; + struct scoped_lock : public boost::noncopyable + { + scoped_lock(); + private: + boost::mutex::scoped_lock lck_; + }; + }; -// Data -private: - /// Log signal itself. - OnLog mOnLog; + //////////////// +#if defined(LOG_WITH_TYPE) +# define LOG_TYPE(X) typeid(X).name() << "(" << X << ")" +#else +# define LOG_TYPE(X) X +#endif - YAKE_BUILD_PHOENIX_SINGLETON(Log) -}; + template<typename T1> + inline void log(const severity_t sev, const T1& rhs) + { + std::stringstream ss; + ss << LOG_TYPE(rhs); + logger::log(sev, "[threadid]", ss.str().c_str()); + } + template<typename T1, typename T2> + inline void log(const severity_t sev, const T1& rhs1, const T2& rhs2) + { + std::stringstream ss; + ss << LOG_TYPE(rhs1); + ss << LOG_TYPE(rhs2); + logger::log(sev, "[threadid]", ss.str().c_str()); + } + template<typename T1, typename T2, typename T3> + inline void log(const severity_t sev, const T1& rhs1, const T2& rhs2, const T3& rhs3) + { + std::stringstream ss; + ss << LOG_TYPE(rhs1); + ss << LOG_TYPE(rhs2); + ss << LOG_TYPE(rhs3); + logger::log(sev, "[threadid]", ss.str().c_str()); + } -void YAKE_BASE_API log_information( const String& what, const String& source, const String& where ); -void YAKE_BASE_API log_warning( const String& what, const String& source, const String& where ); -void YAKE_BASE_API log_error( const String& what, const String& source, const String& where ); + // short cuts + inline void setProcessId(const String& procId) + { + logger::setProcessId(procId); + } + inline void enableSeverity(const severity_t sev, const bool on) + { + logger::enableSeverity(sev,on); + } + inline void addTarget(const LogFn fn) + { + logger::addTarget(fn); + } -// the simplest form of logging. Adds nothing to "what". -// Useful in scripts where you just want to log something without "where" -void YAKE_BASE_API log( const String& what ); - -// todo: printf sucks <= no it doesn't! <= IT DOES, use boost::format for -// typesafe string formatting - -// some preprocessor magic for __LINE__ stringification -// Unfortunately it doesn't produce correct results on VC7.1. -#define STRINGIFY(x) #x -#if YAKE_PLATFORM == PLATFORM_WIN32 - inline String TOSTRING2FN(int i) + // helper stream operators + inline std::ostream& operator << (std::ostream& out, const std::exception& rhs) { - std::stringstream ss; - ss << i; - return String( ss.str().c_str() ); + out << "std::exception('" << rhs.what() << "')"; + return out; } -# define TOSTRING(x) +::yake::base::TOSTRING2FN(x) -#else -# define TOSTRING(x) STRINGIFY (x) -#endif -#define YAKE_LOG_INFORMATION( what ) yake::base::log_information( what, "yake", "File: "__FILE__"@"TOSTRING(__LINE__) ); -#define YAKE_LOG_WARNING( what ) yake::base::log_warning( what, "yake", "File: "__FILE__"@"TOSTRING(__LINE__) ); -#define YAKE_LOG_ERROR( what ) yake::base::log_error( what, "yake", "File: "__FILE__"@"TOSTRING(__LINE__) ); -#define YAKE_LOG( what ) yake::base::log_information( what, "yake", "File: "__FILE__"@"TOSTRING(__LINE__) ); + ///////////////// + // Compatibility + // @todo remove in 0.7.x -} // base -} // yake + // some preprocessor magic for __LINE__ stringification + // Unfortunately it doesn't produce correct results on VC7.1. + #define STRINGIFY(x) #x + #if YAKE_PLATFORM == PLATFORM_WIN32 + inline String TOSTRING2FN(int i) + { + std::stringstream ss; + ss << i; + return String( ss.str().c_str() ); + } + # define TOSTRING(x) +::yake::logging::TOSTRING2FN(x) + #else + # define TOSTRING(x) STRINGIFY (x) + #endif -#endif // YAKE_BASE_LOG_H + #define YAKE_LOG_INFORMATION( what ) yake::logging::log( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG_WARNING( what ) yake::logging::log( yake::logging::S_WARNING, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG_ERROR( what ) yake::logging::log( yake::logging::S_ERROR, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); + #define YAKE_LOG( what ) yake::logging::log::log_information( yake::logging::S_INFORMATION, "[File: "__FILE__"@"TOSTRING(__LINE__)+"] ", what ); +} // namespace logging +} // namespace yake + +#endif // YAKE_LOGGING_LOG_H + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 00:31:15
|
Revision: 1561 http://svn.sourceforge.net/yake/?rev=1561&view=rev Author: psyclonist Date: 2006-12-18 16:31:15 -0800 (Mon, 18 Dec 2006) Log Message: ----------- wait for key Modified Paths: -------------- trunk/yake/samples/ent/sampleEntFsm/demo.cpp Modified: trunk/yake/samples/ent/sampleEntFsm/demo.cpp =================================================================== --- trunk/yake/samples/ent/sampleEntFsm/demo.cpp 2006-12-19 00:29:37 UTC (rev 1560) +++ trunk/yake/samples/ent/sampleEntFsm/demo.cpp 2006-12-19 00:31:15 UTC (rev 1561) @@ -252,5 +252,11 @@ { std::cout << "Demo caught exception: \n" << ex.what(); } +#if defined(YAKE_DEBUG) + { + std::cout << "\nPress ENTER...\n"; + std::cin.get(); + } +#endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 00:29:37
|
Revision: 1560 http://svn.sourceforge.net/yake/?rev=1560&view=rev Author: psyclonist Date: 2006-12-18 16:29:37 -0800 (Mon, 18 Dec 2006) Log Message: ----------- added section on library naming scheme Modified Paths: -------------- trunk/yake/BUILD Modified: trunk/yake/BUILD =================================================================== --- trunk/yake/BUILD 2006-12-19 00:19:38 UTC (rev 1559) +++ trunk/yake/BUILD 2006-12-19 00:29:37 UTC (rev 1560) @@ -16,6 +16,7 @@ 2.1 Building Yake with SCons 2.1 Building Yake with premake 3 BUILD INSTRUCTIONS FOR CUSTOM PROJECTS +4 LIBRARY NAMING SCHEME 0. Prologue ----------- @@ -179,3 +180,28 @@ dependencies for each library/component you use (e.g. yake_ent_d.lib for the yake_ent_d.dll on Windows). +4 LIBRARY NAMING SCHEME +----------------------- + + Library file endings vary depending on platform and compiler settings. + On PC/Windows with Microsoft Visual C++ the endings are ".lib" and ".dll". + On PC/Windows with Code::Blocks and GCC the endings are ".a" and ".dll". + On PC/Linux with GCC the endings are ".a" and ".so". + + The general naming scheme is: + + yake_[name][[_s][_d]|[_sym]].[[lib|dll]|[a|so]] + + _s indicates a static library + _d indicates a debug build, the absence of _d indicates a release build + _sym indicates a release dynamic link library with debug symbols + + For each library there are 5 build targets (at least, on Windows): + Release, Debug, ReleaseLib, DebugLib, ReleaseWithSymbols + + Release: dynamic link library, e.g. yake_base.* (where * can be .lib/.dll/.a/.so) + Debug: dynamic link library, e.g. yake_base_d.* (where * can be .lib/.dll/.a/.so) + ReleaseLib: static library, e.g. yake_base_s.* (where * can be lib/.a) + DebugLib: static library, e.g. yake_base_s_d.* (where * can be lib/.a) + ReleaseWithSymbols: dynamic link library, e.g. yake_base_sym.* (where * can be .lib/.dll/.a/.so) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 00:19:37
|
Revision: 1559 http://svn.sourceforge.net/yake/?rev=1559&view=rev Author: psyclonist Date: 2006-12-18 16:19:38 -0800 (Mon, 18 Dec 2006) Log Message: ----------- improved build instructions Modified Paths: -------------- trunk/yake/BUILD Modified: trunk/yake/BUILD =================================================================== --- trunk/yake/BUILD 2006-12-19 00:14:03 UTC (rev 1558) +++ trunk/yake/BUILD 2006-12-19 00:19:38 UTC (rev 1559) @@ -15,6 +15,7 @@ 2 BUILD INSTRUCTIONS FOR YAKE ON PC/LINUX 2.1 Building Yake with SCons 2.1 Building Yake with premake +3 BUILD INSTRUCTIONS FOR CUSTOM PROJECTS 0. Prologue ----------- @@ -46,13 +47,15 @@ 1.2 Building with Microsoft Visual C++ 2003/2005 (7.1/8.0) ---------------------------------------------------------- -* Run build_vs2005.cmd or build_vs2003.cmd - build solutions for MSVC 2005 or MSVC 2003. +To build the libraries: +* Run build.cmd in /yake/scripts/msvc71/ or /yake/scripts/msvc80/ + in order to build solutions for MSVC 2003 or MSVC 2005. +* Solution and project files can be found in the same directory. * Open yake.sln in MSVC and start 'Build All' * Find the libs in /yake/common/lib and the DLLs in /yake/common/bin To build the samples: -* Run build_samples_vs2005.cmd or build_samples_vs2003.cmd +* Run build_samples.cmd in /yake/scripts/msvc71/ or /yake/scripts/msvc80/ * Open yake_samples.sln and start 'Build All' * Find the executables in /yake/samples/bin @@ -163,3 +166,16 @@ ------------------------------------------ >> Instructions to come << + +3 BUILD INSTRUCTIONS FOR CUSTOM PROJECTS +---------------------------------------- + +For using Yake in your project do the following: + + Add /yake/yake to the include paths. + Add /yake/common/lib to the library search paths. + +If the auto-link feature is not available add the propery linker +dependencies for each library/component you use (e.g. yake_ent_d.lib +for the yake_ent_d.dll on Windows). + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-19 00:14:06
|
Revision: 1558 http://svn.sourceforge.net/yake/?rev=1558&view=rev Author: psyclonist Date: 2006-12-18 16:14:03 -0800 (Mon, 18 Dec 2006) Log Message: ----------- moved build scripts (msvc80,msvc71,code::blocks/gcc/win) Added Paths: ----------- trunk/yake/scripts/cb_gnu_win/ trunk/yake/scripts/cb_gnu_win/build.cmd trunk/yake/scripts/cb_gnu_win/build_samples.cmd trunk/yake/scripts/cb_gnu_win/clean.cmd trunk/yake/scripts/cb_gnu_win/clean_samples.cmd trunk/yake/scripts/msvc71/ trunk/yake/scripts/msvc71/build.cmd trunk/yake/scripts/msvc71/build_samples.cmd trunk/yake/scripts/msvc71/clean.cmd trunk/yake/scripts/msvc71/clean_samples.cmd trunk/yake/scripts/msvc80/ trunk/yake/scripts/msvc80/build.cmd trunk/yake/scripts/msvc80/build_samples.cmd trunk/yake/scripts/msvc80/clean.cmd trunk/yake/scripts/msvc80/clean_samples.cmd Removed Paths: ------------- trunk/yake/scripts/premake/build_cb.cmd trunk/yake/scripts/premake/build_samples_vs2003.cmd trunk/yake/scripts/premake/build_samples_vs2005.cmd trunk/yake/scripts/premake/build_vs2003.cmd trunk/yake/scripts/premake/build_vs2005.cmd trunk/yake/scripts/premake/clean.cmd trunk/yake/scripts/premake/clean_samples.cmd trunk/yake/scripts/premake/clean_vs2003.cmd trunk/yake/scripts/premake/clean_vs2005.cmd Added: trunk/yake/scripts/cb_gnu_win/build.cmd =================================================================== --- trunk/yake/scripts/cb_gnu_win/build.cmd (rev 0) +++ trunk/yake/scripts/cb_gnu_win/build.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=cb_gnu_win +premake --file yake.lua --target cb-gcc --os windows +popd +pause Added: trunk/yake/scripts/cb_gnu_win/build_samples.cmd =================================================================== --- trunk/yake/scripts/cb_gnu_win/build_samples.cmd (rev 0) +++ trunk/yake/scripts/cb_gnu_win/build_samples.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=cb_gnu_win +premake --file samples.lua --target cb-gcc --os windows +popd +pause Added: trunk/yake/scripts/cb_gnu_win/clean.cmd =================================================================== --- trunk/yake/scripts/cb_gnu_win/clean.cmd (rev 0) +++ trunk/yake/scripts/cb_gnu_win/clean.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=cb_gnu_win +premake --file yake.lua --clean +popd +pause Added: trunk/yake/scripts/cb_gnu_win/clean_samples.cmd =================================================================== --- trunk/yake/scripts/cb_gnu_win/clean_samples.cmd (rev 0) +++ trunk/yake/scripts/cb_gnu_win/clean_samples.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=cb_gnu_win +premake --file samples.lua --clean +popd +pause Added: trunk/yake/scripts/msvc71/build.cmd =================================================================== --- trunk/yake/scripts/msvc71/build.cmd (rev 0) +++ trunk/yake/scripts/msvc71/build.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc71 +premake --file yake.lua --target vs2003 +popd +pause Added: trunk/yake/scripts/msvc71/build_samples.cmd =================================================================== --- trunk/yake/scripts/msvc71/build_samples.cmd (rev 0) +++ trunk/yake/scripts/msvc71/build_samples.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc71 +premake --file samples.lua --target vs2003 +popd +pause Added: trunk/yake/scripts/msvc71/clean.cmd =================================================================== --- trunk/yake/scripts/msvc71/clean.cmd (rev 0) +++ trunk/yake/scripts/msvc71/clean.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc71 +premake --file yake.lua --clean +popd +pause Added: trunk/yake/scripts/msvc71/clean_samples.cmd =================================================================== --- trunk/yake/scripts/msvc71/clean_samples.cmd (rev 0) +++ trunk/yake/scripts/msvc71/clean_samples.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc71 +premake --file samples.lua --clean +popd +pause Added: trunk/yake/scripts/msvc80/build.cmd =================================================================== --- trunk/yake/scripts/msvc80/build.cmd (rev 0) +++ trunk/yake/scripts/msvc80/build.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc80 +premake --file yake.lua --target vs2005 +popd +pause Added: trunk/yake/scripts/msvc80/build_samples.cmd =================================================================== --- trunk/yake/scripts/msvc80/build_samples.cmd (rev 0) +++ trunk/yake/scripts/msvc80/build_samples.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc80 +premake --file samples.lua --target vs2005 +popd +pause Added: trunk/yake/scripts/msvc80/clean.cmd =================================================================== --- trunk/yake/scripts/msvc80/clean.cmd (rev 0) +++ trunk/yake/scripts/msvc80/clean.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc80 +premake --file yake.lua --clean +popd +pause Added: trunk/yake/scripts/msvc80/clean_samples.cmd =================================================================== --- trunk/yake/scripts/msvc80/clean_samples.cmd (rev 0) +++ trunk/yake/scripts/msvc80/clean_samples.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -0,0 +1,7 @@ +@echo off +pushd ..\premake +setlocal +set SOLUTION_TARGET_DIR=msvc80 +premake --file samples.lua --clean +popd +pause Deleted: trunk/yake/scripts/premake/build_cb.cmd =================================================================== --- trunk/yake/scripts/premake/build_cb.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/build_cb.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,5 +0,0 @@ -@echo off -setlocal -set SOLUTION_TARGET_DIR=cb -premake --file yake.lua --target cb-gcc -pause Deleted: trunk/yake/scripts/premake/build_samples_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/build_samples_vs2003.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/build_samples_vs2003.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,5 +0,0 @@ -@echo off -setlocal -set SOLUTION_TARGET_DIR=msvc71 -premake --file samples.lua --target vs2003 -pause Deleted: trunk/yake/scripts/premake/build_samples_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/build_samples_vs2005.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/build_samples_vs2005.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,5 +0,0 @@ -@echo off -setlocal -set SOLUTION_TARGET_DIR=msvc80 -premake --file samples.lua --target vs2005 -pause Deleted: trunk/yake/scripts/premake/build_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/build_vs2003.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/build_vs2003.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,5 +0,0 @@ -@echo off -setlocal -set SOLUTION_TARGET_DIR=msvc71 -premake --file yake.lua --target vs2003 -pause Deleted: trunk/yake/scripts/premake/build_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/build_vs2005.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/build_vs2005.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,5 +0,0 @@ -@echo off -setlocal -set SOLUTION_TARGET_DIR=msvc80 -premake --file yake.lua --target vs2005 -pause Deleted: trunk/yake/scripts/premake/clean.cmd =================================================================== --- trunk/yake/scripts/premake/clean.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/clean.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,2 +0,0 @@ -premake --file yake.lua --clean -pause Deleted: trunk/yake/scripts/premake/clean_samples.cmd =================================================================== --- trunk/yake/scripts/premake/clean_samples.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/clean_samples.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,2 +0,0 @@ -premake --file samples.lua --clean -pause Deleted: trunk/yake/scripts/premake/clean_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/clean_vs2003.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/clean_vs2003.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,5 +0,0 @@ -@echo off -setlocal -set SOLUTION_TARGET_DIR=msvc71 -premake --file yake.lua --clean -pause Deleted: trunk/yake/scripts/premake/clean_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/clean_vs2005.cmd 2006-12-18 23:59:24 UTC (rev 1557) +++ trunk/yake/scripts/premake/clean_vs2005.cmd 2006-12-19 00:14:03 UTC (rev 1558) @@ -1,5 +0,0 @@ -@echo off -setlocal -set SOLUTION_TARGET_DIR=msvc80 -premake --file yake.lua --clean -pause This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:59:23
|
Revision: 1557 http://svn.sourceforge.net/yake/?rev=1557&view=rev Author: psyclonist Date: 2006-12-18 15:59:24 -0800 (Mon, 18 Dec 2006) Log Message: ----------- added linux gnu build scripts Added Paths: ----------- trunk/yake/scripts/premake/build_linux_gnu.sh Added: trunk/yake/scripts/premake/build_linux_gnu.sh =================================================================== --- trunk/yake/scripts/premake/build_linux_gnu.sh (rev 0) +++ trunk/yake/scripts/premake/build_linux_gnu.sh 2006-12-18 23:59:24 UTC (rev 1557) @@ -0,0 +1 @@ +./premake --file yake.lua --target gnu --os linux This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:57:57
|
Revision: 1556 http://svn.sourceforge.net/yake/?rev=1556&view=rev Author: psyclonist Date: 2006-12-18 15:57:58 -0800 (Mon, 18 Dec 2006) Log Message: ----------- updated build files ('clean' target) Modified Paths: -------------- trunk/yake/scripts/premake/build_cb.cmd trunk/yake/scripts/premake/build_samples_vs2003.cmd trunk/yake/scripts/premake/build_samples_vs2005.cmd trunk/yake/scripts/premake/build_vs2003.cmd trunk/yake/scripts/premake/build_vs2005.cmd Added Paths: ----------- trunk/yake/scripts/premake/clean_vs2003.cmd trunk/yake/scripts/premake/clean_vs2005.cmd Modified: trunk/yake/scripts/premake/build_cb.cmd =================================================================== --- trunk/yake/scripts/premake/build_cb.cmd 2006-12-18 23:53:44 UTC (rev 1555) +++ trunk/yake/scripts/premake/build_cb.cmd 2006-12-18 23:57:58 UTC (rev 1556) @@ -1,3 +1,4 @@ +@echo off setlocal set SOLUTION_TARGET_DIR=cb premake --file yake.lua --target cb-gcc Modified: trunk/yake/scripts/premake/build_samples_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/build_samples_vs2003.cmd 2006-12-18 23:53:44 UTC (rev 1555) +++ trunk/yake/scripts/premake/build_samples_vs2003.cmd 2006-12-18 23:57:58 UTC (rev 1556) @@ -1,3 +1,4 @@ +@echo off setlocal set SOLUTION_TARGET_DIR=msvc71 premake --file samples.lua --target vs2003 Modified: trunk/yake/scripts/premake/build_samples_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/build_samples_vs2005.cmd 2006-12-18 23:53:44 UTC (rev 1555) +++ trunk/yake/scripts/premake/build_samples_vs2005.cmd 2006-12-18 23:57:58 UTC (rev 1556) @@ -1,3 +1,4 @@ +@echo off setlocal set SOLUTION_TARGET_DIR=msvc80 premake --file samples.lua --target vs2005 Modified: trunk/yake/scripts/premake/build_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/build_vs2003.cmd 2006-12-18 23:53:44 UTC (rev 1555) +++ trunk/yake/scripts/premake/build_vs2003.cmd 2006-12-18 23:57:58 UTC (rev 1556) @@ -1,3 +1,4 @@ +@echo off setlocal set SOLUTION_TARGET_DIR=msvc71 premake --file yake.lua --target vs2003 Modified: trunk/yake/scripts/premake/build_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/build_vs2005.cmd 2006-12-18 23:53:44 UTC (rev 1555) +++ trunk/yake/scripts/premake/build_vs2005.cmd 2006-12-18 23:57:58 UTC (rev 1556) @@ -1,3 +1,4 @@ +@echo off setlocal set SOLUTION_TARGET_DIR=msvc80 premake --file yake.lua --target vs2005 Added: trunk/yake/scripts/premake/clean_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/clean_vs2003.cmd (rev 0) +++ trunk/yake/scripts/premake/clean_vs2003.cmd 2006-12-18 23:57:58 UTC (rev 1556) @@ -0,0 +1,5 @@ +@echo off +setlocal +set SOLUTION_TARGET_DIR=msvc71 +premake --file yake.lua --clean +pause Added: trunk/yake/scripts/premake/clean_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/clean_vs2005.cmd (rev 0) +++ trunk/yake/scripts/premake/clean_vs2005.cmd 2006-12-18 23:57:58 UTC (rev 1556) @@ -0,0 +1,5 @@ +@echo off +setlocal +set SOLUTION_TARGET_DIR=msvc80 +premake --file yake.lua --clean +pause This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:53:43
|
Revision: 1555 http://svn.sourceforge.net/yake/?rev=1555&view=rev Author: psyclonist Date: 2006-12-18 15:53:44 -0800 (Mon, 18 Dec 2006) Log Message: ----------- added windows build platforms (code::blocks with gcc, and vs2003) Modified Paths: -------------- trunk/yake/scripts/premake/build_samples_vs2005.cmd trunk/yake/scripts/premake/build_vs2005.cmd trunk/yake/scripts/premake/config.lua trunk/yake/scripts/premake/help.cmd trunk/yake/scripts/premake/tools.lua Added Paths: ----------- trunk/yake/scripts/premake/build_cb.cmd trunk/yake/scripts/premake/build_samples_vs2003.cmd trunk/yake/scripts/premake/build_vs2003.cmd Added: trunk/yake/scripts/premake/build_cb.cmd =================================================================== --- trunk/yake/scripts/premake/build_cb.cmd (rev 0) +++ trunk/yake/scripts/premake/build_cb.cmd 2006-12-18 23:53:44 UTC (rev 1555) @@ -0,0 +1,4 @@ +setlocal +set SOLUTION_TARGET_DIR=cb +premake --file yake.lua --target cb-gcc +pause Added: trunk/yake/scripts/premake/build_samples_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/build_samples_vs2003.cmd (rev 0) +++ trunk/yake/scripts/premake/build_samples_vs2003.cmd 2006-12-18 23:53:44 UTC (rev 1555) @@ -0,0 +1,4 @@ +setlocal +set SOLUTION_TARGET_DIR=msvc71 +premake --file samples.lua --target vs2003 +pause Modified: trunk/yake/scripts/premake/build_samples_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/build_samples_vs2005.cmd 2006-12-18 23:52:43 UTC (rev 1554) +++ trunk/yake/scripts/premake/build_samples_vs2005.cmd 2006-12-18 23:53:44 UTC (rev 1555) @@ -1,2 +1,4 @@ +setlocal +set SOLUTION_TARGET_DIR=msvc80 premake --file samples.lua --target vs2005 pause Added: trunk/yake/scripts/premake/build_vs2003.cmd =================================================================== --- trunk/yake/scripts/premake/build_vs2003.cmd (rev 0) +++ trunk/yake/scripts/premake/build_vs2003.cmd 2006-12-18 23:53:44 UTC (rev 1555) @@ -0,0 +1,4 @@ +setlocal +set SOLUTION_TARGET_DIR=msvc71 +premake --file yake.lua --target vs2003 +pause Modified: trunk/yake/scripts/premake/build_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/build_vs2005.cmd 2006-12-18 23:52:43 UTC (rev 1554) +++ trunk/yake/scripts/premake/build_vs2005.cmd 2006-12-18 23:53:44 UTC (rev 1555) @@ -1,2 +1,4 @@ +setlocal +set SOLUTION_TARGET_DIR=msvc80 premake --file yake.lua --target vs2005 pause Modified: trunk/yake/scripts/premake/config.lua =================================================================== --- trunk/yake/scripts/premake/config.lua 2006-12-18 23:52:43 UTC (rev 1554) +++ trunk/yake/scripts/premake/config.lua 2006-12-18 23:53:44 UTC (rev 1555) @@ -5,6 +5,9 @@ rootdir = "../../" +-- set via environment variable: +solutionTargetDir = os.getenv("SOLUTION_TARGET_DIR") or "" + -------------------------------------- -- Common settings -------------------------------------- Modified: trunk/yake/scripts/premake/help.cmd =================================================================== --- trunk/yake/scripts/premake/help.cmd 2006-12-18 23:52:43 UTC (rev 1554) +++ trunk/yake/scripts/premake/help.cmd 2006-12-18 23:53:44 UTC (rev 1555) @@ -1,2 +1,5 @@ +@echo off premake --file yake.lua --help +echo. +echo Set SOLUTION_TARGET_DIR to control the target solution directory. pause Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2006-12-18 23:52:43 UTC (rev 1554) +++ trunk/yake/scripts/premake/tools.lua 2006-12-18 23:53:44 UTC (rev 1555) @@ -46,7 +46,7 @@ "DebugLib", "ReleaseLib" } - project.path = rootdir.."scripts/msvc8" + project.path = rootdir.."scripts/"..solutionTargetDir end function makeExeProject(name) @@ -59,7 +59,7 @@ "ReleaseWithSymbols", "Release", } - project.path = rootdir.."scripts/msvc8" + project.path = rootdir.."scripts/"..solutionTargetDir end function makePackage(name) @@ -68,7 +68,7 @@ package.kind = "dll" package.language = "c++" - package.path = rootdir.."scripts/msvc8" + package.path = rootdir.."scripts/"..solutionTargetDir package.objdir = rootdir.."common/obj/"..name @@ -241,7 +241,7 @@ package.kind = "exe" package.language = "c++" - package.path = rootdir.."scripts/msvc8" + package.path = rootdir.."scripts/"..solutionTargetDir package.objdir = rootdir.."common/obj/"..name package.bindir = rootdir.."samples/bin" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:52:43
|
Revision: 1554 http://svn.sourceforge.net/yake/?rev=1554&view=rev Author: psyclonist Date: 2006-12-18 15:52:43 -0800 (Mon, 18 Dec 2006) Log Message: ----------- replaced by premake scripts Removed Paths: ------------- trunk/yake/scripts/cb/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:39:56
|
Revision: 1553 http://svn.sourceforge.net/yake/?rev=1553&view=rev Author: psyclonist Date: 2006-12-18 15:39:56 -0800 (Mon, 18 Dec 2006) Log Message: ----------- replaced by premake scripts Removed Paths: ------------- trunk/yake/scripts/linux/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:38:44
|
Revision: 1552 http://svn.sourceforge.net/yake/?rev=1552&view=rev Author: psyclonist Date: 2006-12-18 15:38:43 -0800 (Mon, 18 Dec 2006) Log Message: ----------- use /samples/bin for demo binaries, added script files Modified Paths: -------------- trunk/yake/scripts/premake/tools.lua Added Paths: ----------- trunk/yake/scripts/premake/clean_samples.cmd trunk/yake/scripts/premake/copy_bin_to_samples.cmd Added: trunk/yake/scripts/premake/clean_samples.cmd =================================================================== --- trunk/yake/scripts/premake/clean_samples.cmd (rev 0) +++ trunk/yake/scripts/premake/clean_samples.cmd 2006-12-18 23:38:43 UTC (rev 1552) @@ -0,0 +1,2 @@ +premake --file samples.lua --clean +pause Added: trunk/yake/scripts/premake/copy_bin_to_samples.cmd =================================================================== --- trunk/yake/scripts/premake/copy_bin_to_samples.cmd (rev 0) +++ trunk/yake/scripts/premake/copy_bin_to_samples.cmd 2006-12-18 23:38:43 UTC (rev 1552) @@ -0,0 +1,4 @@ +@echo off +xcopy /y ..\..\common\bin\*.dll ..\..\samples\bin\ +xcopy /y ..\..\common\bin\*_d.dll ..\..\samples\bin\debug\ +pause Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2006-12-18 23:37:13 UTC (rev 1551) +++ trunk/yake/scripts/premake/tools.lua 2006-12-18 23:38:43 UTC (rev 1552) @@ -51,7 +51,7 @@ function makeExeProject(name) project.name = name - project.bindir = rootdir.."common/bin" + project.bindir = rootdir.."samples/bin" project.libdir = rootdir.."common/lib" project.configs = { @@ -243,7 +243,8 @@ package.path = rootdir.."scripts/msvc8" - package.objdir = rootdir.."common/obj/"..name + package.objdir = rootdir.."common/obj/"..name + package.bindir = rootdir.."samples/bin" package.buildflags = {} package.includepaths = {rootdir} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:37:14
|
Revision: 1551 http://svn.sourceforge.net/yake/?rev=1551&view=rev Author: psyclonist Date: 2006-12-18 15:37:13 -0800 (Mon, 18 Dec 2006) Log Message: ----------- updated script path Modified Paths: -------------- trunk/yake/src/plugins/entLua/entLua.cpp Modified: trunk/yake/src/plugins/entLua/entLua.cpp =================================================================== --- trunk/yake/src/plugins/entLua/entLua.cpp 2006-12-18 23:32:32 UTC (rev 1550) +++ trunk/yake/src/plugins/entLua/entLua.cpp 2006-12-18 23:37:13 UTC (rev 1551) @@ -74,7 +74,7 @@ LuaFsmObjectListener::LuaFsmObjectListener(scripting::IScriptingSystem& scriptingSystem) : scriptingSystem_(scriptingSystem) { - startScript_.reset( scriptingSystem_.createScriptFromFile("../media/scripts/o_fsm_test.lua") ); + startScript_.reset( scriptingSystem_.createScriptFromFile("../../common/media/scripts/o_fsm_test.lua") ); YAKE_ASSERT( startScript_.get() ); } void LuaFsmObjectListener::onInit(Object& obj) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:32:37
|
Revision: 1550 http://svn.sourceforge.net/yake/?rev=1550&view=rev Author: psyclonist Date: 2006-12-18 15:32:32 -0800 (Mon, 18 Dec 2006) Log Message: ----------- updated build instructions Modified Paths: -------------- trunk/yake/BUILD Modified: trunk/yake/BUILD =================================================================== --- trunk/yake/BUILD 2006-12-18 23:03:23 UTC (rev 1549) +++ trunk/yake/BUILD 2006-12-18 23:32:32 UTC (rev 1550) @@ -8,7 +8,13 @@ 0. Prologue 1. BUILD INSTRUCTIONS FOR YAKE ON PC/WINDOWS -2. BUILD INSTRUCTIONS FOR YAKE ON PC/LINUX +1.1 Configuration +1.2 Building with Microsoft Visual C++ 2003/2005 (7.1/8.0) +1.3 Building with Code::Blocks +1.4 Building with GCC +2 BUILD INSTRUCTIONS FOR YAKE ON PC/LINUX +2.1 Building Yake with SCons +2.1 Building Yake with premake 0. Prologue ----------- @@ -43,7 +49,13 @@ * Run build_vs2005.cmd or build_vs2003.cmd build solutions for MSVC 2005 or MSVC 2003. * Open yake.sln in MSVC and start 'Build All' +* Find the libs in /yake/common/lib and the DLLs in /yake/common/bin +To build the samples: +* Run build_samples_vs2005.cmd or build_samples_vs2003.cmd +* Open yake_samples.sln and start 'Build All' +* Find the executables in /yake/samples/bin + For stable releases of Yake prebuilt dependencies packages are available. If you don't have or don't want to use the dependencies package @@ -59,10 +71,19 @@ * Run build_cb.cmd * Open resulting cb solution and build it from the IDE +1.4 Building with GCC +--------------------- + >> Instructions to come << + + + 2. BUILD INSTRUCTIONS FOR YAKE ON PC/LINUX ------------------------------------------ +2.1 Building Yake with SCons +------------------------------------------ + Last modified: 30/9/2005 by Stephan Kaiser (psy) Last modified: 22/9/2004 by Nikita Buida (mj) @@ -138,4 +159,7 @@ # From now on you're able to run the demos. You will need to set up working dir for demo, e.g. create config files and have Ogre's media. +2.2 Building Yake with premake +------------------------------------------ + >> Instructions to come << This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:03:31
|
Revision: 1549 http://svn.sourceforge.net/yake/?rev=1549&view=rev Author: psyclonist Date: 2006-12-18 15:03:23 -0800 (Mon, 18 Dec 2006) Log Message: ----------- updated script path Modified Paths: -------------- trunk/yake/src/plugins/entLua/entLua.cpp Modified: trunk/yake/src/plugins/entLua/entLua.cpp =================================================================== --- trunk/yake/src/plugins/entLua/entLua.cpp 2006-12-18 23:02:20 UTC (rev 1548) +++ trunk/yake/src/plugins/entLua/entLua.cpp 2006-12-18 23:03:23 UTC (rev 1549) @@ -74,7 +74,7 @@ LuaFsmObjectListener::LuaFsmObjectListener(scripting::IScriptingSystem& scriptingSystem) : scriptingSystem_(scriptingSystem) { - startScript_.reset( scriptingSystem_.createScriptFromFile("../../media/scripts/o_fsm_test.lua") ); + startScript_.reset( scriptingSystem_.createScriptFromFile("../media/scripts/o_fsm_test.lua") ); YAKE_ASSERT( startScript_.get() ); } void LuaFsmObjectListener::onInit(Object& obj) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:03:03
|
Revision: 1548 http://svn.sourceforge.net/yake/?rev=1548&view=rev Author: psyclonist Date: 2006-12-18 15:02:20 -0800 (Mon, 18 Dec 2006) Log Message: ----------- throw exception if script file cannot be executed Modified Paths: -------------- trunk/yake/yake/scripting/yakeScriptingSystem.h Modified: trunk/yake/yake/scripting/yakeScriptingSystem.h =================================================================== --- trunk/yake/yake/scripting/yakeScriptingSystem.h 2006-12-18 23:01:34 UTC (rev 1547) +++ trunk/yake/yake/scripting/yakeScriptingSystem.h 2006-12-18 23:02:20 UTC (rev 1548) @@ -113,6 +113,7 @@ /** Execute the script data contained in pScript. \param pScript script object + \remarks May throw an exception if the script could not be executed. */ virtual void execute( IScript* pScript ) = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:01:56
|
Revision: 1547 http://svn.sourceforge.net/yake/?rev=1547&view=rev Author: psyclonist Date: 2006-12-18 15:01:34 -0800 (Mon, 18 Dec 2006) Log Message: ----------- throw exception if script file cannot be executed Modified Paths: -------------- trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp Modified: trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp =================================================================== --- trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp 2006-12-18 23:00:23 UTC (rev 1546) +++ trunk/yake/src/plugins/scriptingLua/ScriptingSystemLua.cpp 2006-12-18 23:01:34 UTC (rev 1547) @@ -102,7 +102,9 @@ const String& rFileName = pLuaScript->getData(); - luaL_dofile( mLuaState, rFileName.c_str() ); + const int err = luaL_dofile( mLuaState, rFileName.c_str() ); + if (err) + YAKE_EXCEPT("Failed to execute script! (Does file exist?)"); } //------------------------------------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 23:01:10
|
Revision: 1546 http://svn.sourceforge.net/yake/?rev=1546&view=rev Author: psyclonist Date: 2006-12-18 15:00:23 -0800 (Mon, 18 Dec 2006) Log Message: ----------- moved and improved sampleEntFsm Modified Paths: -------------- trunk/yake/samples/ent/sampleEntFsm/demo.cpp Added Paths: ----------- trunk/yake/samples/ent/ Removed Paths: ------------- trunk/yake/samples/base/ent/ Copied: trunk/yake/samples/ent (from rev 1535, trunk/yake/samples/base/ent) Modified: trunk/yake/samples/ent/sampleEntFsm/demo.cpp =================================================================== --- trunk/yake/samples/base/ent/sampleEntFsm/demo.cpp 2006-12-10 21:39:08 UTC (rev 1535) +++ trunk/yake/samples/ent/sampleEntFsm/demo.cpp 2006-12-18 23:00:23 UTC (rev 1546) @@ -180,72 +180,77 @@ #endif int main(int argc, char* argv[]) { - //test(); + try + { + // Create the scripting system we want to use (Lua). + SharedPtr<scripting::IScriptingSystem> luaSys = templates::create<scripting::IScriptingSystem>("lua"); + YAKE_ASSERT( luaSys.get() ); - // Create the scripting system we want to use (Lua). - SharedPtr<scripting::IScriptingSystem> luaSys = templates::create<scripting::IScriptingSystem>("lua"); - YAKE_ASSERT( luaSys.get() ); + // Create an object manager which manages creation, initialization and destruction of objects. + ent::ObjectManager objMgr; - // Create an object manager which manages creation, initialization and destruction of objects. - ent::ObjectManager objMgr; + // Create & attach the listener which handles the connection to the Lua VM and the bindings. + ent::LuaObjectManagerListener luaFmsObjListener(*luaSys); + objMgr.attachListener( &luaFmsObjListener, "luaFsm", ent::ObjectManager::kKeepOwnership ); - // Create & attach the listener which handles the connection to the Lua VM and the bindings. - ent::LuaObjectManagerListener luaFmsObjListener(*luaSys); - objMgr.attachListener( &luaFmsObjListener, "luaFsm", ent::ObjectManager::kKeepOwnership ); + // Example listener which sets the objects up for our example application :) + // The listener adds default states and transitions to the object's state machine, for example. + SharedPtr<exapp::ExampleAppObjectMgrListener> exappObjInitializer( new exapp::ExampleAppObjectMgrListener(*luaSys) ); + objMgr.attachListener( exappObjInitializer.get(), "exapp_listener", ent::ObjectManager::kKeepOwnership ); - // Example listener which sets the objects up for our example application :) - // The listener adds default states and transitions to the object's state machine, for example. - SharedPtr<exapp::ExampleAppObjectMgrListener> exappObjInitializer( new exapp::ExampleAppObjectMgrListener(*luaSys) ); - objMgr.attachListener( exappObjInitializer.get(), "exapp_listener", ent::ObjectManager::kKeepOwnership ); + // Register object class + ent::RegistrationResult ret = objMgr.registerClass<ent::Entity>("Entity"); + YAKE_ASSERT( ret.first == object::RC_OK ); - // Register object class - ent::RegistrationResult ret = objMgr.registerClass<ent::Entity>("Entity"); - YAKE_ASSERT( ret.first == object::RC_OK ); + // Let's create an object. + //ent::Object* o = objMgr.makeObject(ret.second); // create by ClassId + ent::Object* o = objMgr.makeObject("Entity"); // create by class name + YAKE_ASSERT( o ); + ent::Entity* e = ent::Entity::cast(o); // cast to Entity* + YAKE_ASSERT( e ); - // Let's create an object. - //ent::Object* o = objMgr.makeObject(ret.second); // create by ClassId - ent::Object* o = objMgr.makeObject("Entity"); // create by class name - YAKE_ASSERT( o ); - ent::Entity* e = ent::Entity::cast(o); // cast to Entity* - YAKE_ASSERT( e ); + // NB At this point the FSM has been set up by the exapp listener! + // Also the scripting VM has been initialized and is ready for use. - // NB At this point the FSM has been set up by the exapp listener! - // Also the scripting VM has been initialized and is ready for use. + // Do some message/event processing + objMgr.makeAndPostMessage( o, int(1) ); // to specific target + objMgr.makeAndBroadcastMessage( int(2) ); // to all objects - // Do some message/event processing - objMgr.makeAndPostMessage( o, int(1) ); // to specific target - objMgr.makeAndBroadcastMessage( int(2) ); // to all objects + // Do some FSM event processing: + e->processFsmEvent("spawn"); + objMgr.tick(); // triggers o->tick(), also triggers message handling! + objMgr.tick(); + e->processFsmEvent("die"); - // Do some FSM event processing: - e->processFsmEvent("spawn"); - objMgr.tick(); // triggers o->tick(), also triggers message handling! - objMgr.tick(); - e->processFsmEvent("die"); + //@todo use scheduler for yield/resume functionality. (code in prototype is in fsm2_lua.cpp) + //e->getVM().resume(); - //@todo use scheduler for yield/resume functionality. (code in prototype is in fsm2_lua.cpp) - //e->getVM().resume(); + // Let's have some fun with components + /* + RttiClassMgr clsMgr; + clsMgr.insert( ent::Object::cls() ); + clsMgr.insert( ent::Component::cls() ); + exapp::SimpleGraphicsCo::cls()->add( PropDef("position","position",Vector3(0,0,0)) ); + clsMgr.insert( exapp::SimpleGraphicsCo::cls() ); - // Let's have some fun with components - /* - RttiClassMgr clsMgr; - clsMgr.insert( ent::Object::cls() ); - clsMgr.insert( ent::Component::cls() ); - exapp::SimpleGraphicsCo::cls()->add( PropDef("position","position",Vector3(0,0,0)) ); - clsMgr.insert( exapp::SimpleGraphicsCo::cls() ); + e->addComponent("gfx",new exapp::SimpleGraphicsCo()); + e->getComponent("gfx")->init(); + if (!e->getComponent("gfx")->setValue("position",Vector3(10,0,0))) + std::cerr << "could not set position\n"; + Vector3 pos(0,0,0); + if (e->getComponent("gfx")->getValue<Vector3>("position",pos)) + std::cout << "position=" << pos << "\n"; + else + std::cerr << "could not get position\n"; + */ + // clean up - e->addComponent("gfx",new exapp::SimpleGraphicsCo()); - e->getComponent("gfx")->init(); - if (!e->getComponent("gfx")->setValue("position",Vector3(10,0,0))) - std::cerr << "could not set position\n"; - Vector3 pos(0,0,0); - if (e->getComponent("gfx")->getValue<Vector3>("position",pos)) - std::cout << "position=" << pos << "\n"; - else - std::cerr << "could not get position\n"; - */ - // clean up - - exappObjInitializer.reset(); - luaSys.reset(); + exappObjInitializer.reset(); + luaSys.reset(); + } + catch (yake::Exception& ex) + { + std::cout << "Demo caught exception: \n" << ex.what(); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-18 22:59:30
|
Revision: 1545 http://svn.sourceforge.net/yake/?rev=1545&view=rev Author: psyclonist Date: 2006-12-18 14:59:10 -0800 (Mon, 18 Dec 2006) Log Message: ----------- added premake script(s) for samples Modified Paths: -------------- trunk/yake/scripts/premake/config.lua trunk/yake/scripts/premake/tools.lua trunk/yake/scripts/premake/yake.lua Added Paths: ----------- trunk/yake/scripts/premake/build_samples_vs2005.cmd trunk/yake/scripts/premake/plugins.lua trunk/yake/scripts/premake/samples.lua Added: trunk/yake/scripts/premake/build_samples_vs2005.cmd =================================================================== --- trunk/yake/scripts/premake/build_samples_vs2005.cmd (rev 0) +++ trunk/yake/scripts/premake/build_samples_vs2005.cmd 2006-12-18 22:59:10 UTC (rev 1545) @@ -0,0 +1,2 @@ +premake --file samples.lua --target vs2005 +pause Modified: trunk/yake/scripts/premake/config.lua =================================================================== --- trunk/yake/scripts/premake/config.lua 2006-12-15 18:31:07 UTC (rev 1544) +++ trunk/yake/scripts/premake/config.lua 2006-12-18 22:59:10 UTC (rev 1545) @@ -3,12 +3,19 @@ -- the YAKE build file make script -------------------------------------- +rootdir = "../../" + +-------------------------------------- -- Common settings +-------------------------------------- DEBUG_DLL_SUFFIX = "_d" LIBFILE_PREFIX = "yake_" +EXEFILE_SUFFIX = "" +-------------------------------------- -- Plugins +-------------------------------------- -- !! UNUSED FOR NOW !! PLUGIN_AUDIO_OPENAL = true @@ -18,12 +25,23 @@ --GRAPHICSOGRE_USES_OSM = true +-------------------------------------- -- Samples +-------------------------------------- +-- Three targets are available: Debug, Release, ReleaseWithSymbols. +-- NB Debug and Release are available for dynamic and static linking. +-- ReleaseWithSymbols is only available when dynamic linking is used. +-------------------------------------- -- If set to true the sample makefiles are included the core solution. -- !! UNUSED FOR NOW !! -SAMPLES_INCLUDED = false +SAMPLES_INCLUDED_IN_CORE_SOLUTION = false +-- Set to true to force the samples to use static linking. +-- Supported targets for static linking: Release, Debug +-- Target(s)) only available when using dynamic linking: ReleaseWithSymbols +SAMPLES_USE_STATIC_LINKING = false + -- !! UNUSED FOR NOW !! SAMPLES_BASE = true SAMPLES_RAF = true Added: trunk/yake/scripts/premake/plugins.lua =================================================================== --- trunk/yake/scripts/premake/plugins.lua (rev 0) +++ trunk/yake/scripts/premake/plugins.lua 2006-12-18 22:59:10 UTC (rev 1545) @@ -0,0 +1,73 @@ +-------------------------------------- +-- YAKE build file make script +-------------------------------------- + +-------------------------------------- +makeComponentPlugin("audioOpenAL","YAKE_AUDIO_OPENAL_EXPORTS") +addDependency("base") +addDependency("audio") + +useDep("oalpp") +addIncludePath("dependencies/openalpp/include") + +-------------------------------------- +makeComponentPlugin("scriptingLua","YAKE_SCRIPTINGLUA_EXPORTS") +addDependency("base") +addDependency("scripting") + +useDep("lua") +useDep("luabind") + +-------------------------------------- +makeComponentPlugin("physicsODE","YAKEPHYSICSODE_EXPORTS") +addDependency("base") +addDependency("physics") + +useDep("ode") + +-------------------------------------- +makeComponentPlugin("entLua","YAKE_ENTLUA_EXPORTS") +addDependency("base") +addDependency("ent") +addDependency("scripting") +addDependency("scriptingLua") + +useDep("lua") +useDep("luabind") + +-------------------------------------- +makeComponentPlugin("modelLua","YAKE_MODELLUA_EXPORTS") +addDependency("base") +addDependency("model") +addDependency("scripting") +addDependency("scriptingLua") + +useDep("lua") +useDep("luabind") + +-------------------------------------- +makeComponentPlugin("ceguiOgreRendererAdapter","YAKE_CEGUIRENDERERADAPTER_OGRE_EXPORTS") +addDependency("base") +addDependency("graphics") + +useDep("ogre") +useDep("cegui") + +-------------------------------------- +makeComponentPlugin("inputOgre") +addDependency("base") +addDependency("input") + +useDep("ogre") + +-------------------------------------- +makeComponentPlugin("graphicsOgre","YAKE_GRAPHICSCONCRETEAPI_EXPORTS") +addDependency("base") +addDependency("graphics") +addMatching("dependencies/oSceneLoaderLib/src/*.cpp") +addMatching("dependencies/oSceneLoaderLib/TinyXML/*.cpp") +addMatching("dependencies/oSceneLoaderLib/TinyXML/*.h") + +useDep("osm") +useDep("ogre") + Added: trunk/yake/scripts/premake/samples.lua =================================================================== --- trunk/yake/scripts/premake/samples.lua (rev 0) +++ trunk/yake/scripts/premake/samples.lua 2006-12-18 22:59:10 UTC (rev 1545) @@ -0,0 +1,40 @@ +-------------------------------------- +-- YAKE build file make script +-------------------------------------- + +-------------------------------------- +dofile("tools.lua") +dofile("config.lua") + +-------------------------------------- +-- project setup +-------------------------------------- + +makeExeProject("yake_samples") + +-------------------------------------- +-- create dependency packages +-------------------------------------- + +dofile("deps.lua") + +function useComponent(name) + local STATIC_LINKING_STR = "" + if (SAMPLES_USE_STATIC_LINKING) then + STATIC_LINKING_STR = "_s" + end + addDependency(LIBFILE_PREFIX..name..STATIC_LINKING_STR..DEBUG_DLL_SUFFIX,"Debug") + addDependency(LIBFILE_PREFIX..name..STATIC_LINKING_STR,"Release") + addDependency(LIBFILE_PREFIX..name.."_sym","ReleaseWithSymbols") -- dynamic linking only +end + +-------------------------------------- +-- create samples/demos +-------------------------------------- + +-------------------------------------- +makeSample("sampleEntFsm","samples/ent/sampleEntFsm") +useComponent("base") +useComponent("scripting") +useComponent("ent") +useComponent("entLua") Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2006-12-15 18:31:07 UTC (rev 1544) +++ trunk/yake/scripts/premake/tools.lua 2006-12-18 22:59:10 UTC (rev 1545) @@ -34,7 +34,7 @@ end end -function makeProject(name) +function makeLibProject(name) project.name = name project.bindir = rootdir.."common/bin" project.libdir = rootdir.."common/lib" @@ -46,16 +46,30 @@ "DebugLib", "ReleaseLib" } - -- project.path = rootdir.."scripts/msvc8" + project.path = rootdir.."scripts/msvc8" end +function makeExeProject(name) + project.name = name + project.bindir = rootdir.."common/bin" + project.libdir = rootdir.."common/lib" + project.configs = + { + "Debug", + "ReleaseWithSymbols", + "Release", + } + project.path = rootdir.."scripts/msvc8" +end + function makePackage(name) package = newpackage() package.name = name package.kind = "dll" package.language = "c++" - -- package.path = rootdir.."scripts/msvc8" + package.path = rootdir.."scripts/msvc8" + package.objdir = rootdir.."common/obj/"..name package.buildflags = {} @@ -147,7 +161,7 @@ end if not cfg then tinsert(deps[name].libdir,path) - else + elseif project.configs[cfg] then tinsert(deps[name].configs[cfg].libdir,path) end end @@ -216,3 +230,57 @@ function makeComponentPlugin(name,exportDefine) doMakeComponent(name,exportDefine,"plugins/") end + + +-------------------------------------- +-- PUBLIC +-------------------------------------- +function makeSample(name,path) + package = newpackage() + package.name = name + package.kind = "exe" + package.language = "c++" + + package.path = rootdir.."scripts/msvc8" + + package.objdir = rootdir.."common/obj/"..name + + package.buildflags = {} + package.includepaths = {rootdir} + package.defines = {} + + if (windows) then + addDefine("_CRT_SECURE_NO_DEPRECATE") + addDefine("WIN32") + end + + + package.config.DebugLib = nil + package.config.ReleaseLib = nil + + debug = package.config.Debug + debug.target = name.."_d"..(EXEFILE_SUFFIX) + debug.defines = {"_DEBUG"} + debug.buildflags = {} + + releaseWithSym = package.config.ReleaseWithSymbols + releaseWithSym.target = name.."_sym"..(EXEFILE_SUFFIX) + releaseWithSym.defines = {} + releaseWithSym.buildflags = { + "optimize-speed" + } + + release = package.config.Release + release.target = name..(EXEFILE_SUFFIX) + release.defines = {} + release.buildflags = { + "no-symbols", + "optimize-speed", + "no-frame-pointer" + } + + -- add sources + addMatching(path.."/*.cpp") + addMatching(path.."/*.h") + addMatching(path.."/*.inl") +end Modified: trunk/yake/scripts/premake/yake.lua =================================================================== --- trunk/yake/scripts/premake/yake.lua 2006-12-15 18:31:07 UTC (rev 1544) +++ trunk/yake/scripts/premake/yake.lua 2006-12-18 22:59:10 UTC (rev 1545) @@ -6,8 +6,6 @@ -------------------------------------- -rootdir = "../../" - dofile("tools.lua") dofile("config.lua") @@ -15,9 +13,8 @@ -- project setup -------------------------------------- -makeProject("yake") +makeLibProject("yake") - -------------------------------------- -- create dependency packages -------------------------------------- @@ -56,25 +53,6 @@ addDependency("base") -------------------------------------- -makeComponentPlugin("audioOpenAL","YAKE_AUDIO_OPENAL_EXPORTS") -addDependency("base") -addDependency("audio") -addIncludePath("dependencies/openalpp/include") -addIncludePath("dependencies/freealut/include") -addIncludePath("dependencies/OpenAL/Include") -addIncludePath("dependencies/OpenAL/Include/AL") -addIncludePath("dependencies/OpenThreads/Include") -if (windows) then - addLibraryPath("dependencies/OpenThreads/lib/win32") ---else - --exit "no library path defined for openthreads" -end -addLibraryPath("dependencies/openalpp/lib") -addDependency("oalpp","Release") -addDependency("oalpp","ReleaseWithSymbols") -addDependency("oalppd","Debug") - --------------------------------------- makeComponent("input","YAKE_INPUT_EXPORTS") addDependency("base") @@ -86,14 +64,7 @@ makeComponent("scripting","YAKE_SCRIPTING_EXPORTS") addDependency("base") --------------------------------------- -makeComponentPlugin("scriptingLua","YAKE_SCRIPTINGLUA_EXPORTS") -addDependency("base") -addDependency("scripting") -useDep("lua") -useDep("luabind") - -------------------------------------- makeComponent("data","YAKE_DATA_EXPORTS") addDependency("base") @@ -159,60 +130,12 @@ useDep("cegui") -------------------------------------- -makeComponentPlugin("physicsODE","YAKEPHYSICSODE_EXPORTS") -addDependency("base") -addDependency("physics") +--makeComponent("yappbase","YAKE_YAPP_EXPORTS") +--addDependency("base") -useDep("ode") - -------------------------------------- -makeComponentPlugin("entLua","YAKE_ENTLUA_EXPORTS") -addDependency("base") -addDependency("ent") -addDependency("scripting") -addDependency("scriptingLua") - -useDep("lua") -useDep("luabind") - +-- create plugins -------------------------------------- -makeComponentPlugin("modelLua","YAKE_MODELLUA_EXPORTS") -addDependency("base") -addDependency("model") -addDependency("scripting") -addDependency("scriptingLua") +dofile("plugins.lua") -useDep("lua") -useDep("luabind") - --------------------------------------- -makeComponentPlugin("ceguiOgreRendererAdapter","YAKE_CEGUIRENDERERADAPTER_OGRE_EXPORTS") -addDependency("base") -addDependency("graphics") - -useDep("ogre") -useDep("cegui") - --------------------------------------- -makeComponentPlugin("inputOgre") -addDependency("base") -addDependency("input") - -useDep("ogre") - --------------------------------------- -makeComponentPlugin("graphicsOgre","YAKE_GRAPHICSCONCRETEAPI_EXPORTS") -addDependency("base") -addDependency("graphics") -addMatching("dependencies/oSceneLoaderLib/src/*.cpp") -addMatching("dependencies/oSceneLoaderLib/TinyXML/*.cpp") -addMatching("dependencies/oSceneLoaderLib/TinyXML/*.h") - -useDep("osm") -useDep("ogre") - --------------------------------------- ---makeComponent("yappbase","YAKE_YAPP_EXPORTS") ---addDependency("base") - -- the end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-15 18:31:14
|
Revision: 1544 http://svn.sourceforge.net/yake/?rev=1544&view=rev Author: psyclonist Date: 2006-12-15 10:31:07 -0800 (Fri, 15 Dec 2006) Log Message: ----------- replaced manually maintained build files with automatically generated ones Removed Paths: ------------- trunk/yake/scripts/msvc8/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-12 22:22:46
|
Revision: 1543 http://svn.sourceforge.net/yake/?rev=1543&view=rev Author: psyclonist Date: 2006-12-12 14:22:46 -0800 (Tue, 12 Dec 2006) Log Message: ----------- define _CRT_SECURE_NO_DEPRECATE only necessary on windows/msvc8 Modified Paths: -------------- trunk/yake/scripts/premake/tools.lua Modified: trunk/yake/scripts/premake/tools.lua =================================================================== --- trunk/yake/scripts/premake/tools.lua 2006-12-12 22:16:54 UTC (rev 1542) +++ trunk/yake/scripts/premake/tools.lua 2006-12-12 22:22:46 UTC (rev 1543) @@ -60,11 +60,10 @@ package.buildflags = {} package.includepaths = {rootdir} - package.defines = { - "_CRT_SECURE_NO_DEPRECATE" - } - + package.defines = {} + if (windows) then + addDefine("_CRT_SECURE_NO_DEPRECATE") addDefine("WIN32") addDefine("_USRDLL") end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-12 22:16:54
|
Revision: 1542 http://svn.sourceforge.net/yake/?rev=1542&view=rev Author: psyclonist Date: 2006-12-12 14:16:54 -0800 (Tue, 12 Dec 2006) Log Message: ----------- added premake script dependency: OSM, updated premake script package: graphicsOgre, added premake script configuration option Modified Paths: -------------- trunk/yake/scripts/premake/config.lua trunk/yake/scripts/premake/deps.lua trunk/yake/scripts/premake/yake.lua Modified: trunk/yake/scripts/premake/config.lua =================================================================== --- trunk/yake/scripts/premake/config.lua 2006-12-12 22:12:12 UTC (rev 1541) +++ trunk/yake/scripts/premake/config.lua 2006-12-12 22:16:54 UTC (rev 1542) @@ -16,6 +16,8 @@ PLUGIN_PHYSICS_ODE = true PLUGIN_PHYSICS_NX = false +--GRAPHICSOGRE_USES_OSM = true + -- Samples -- If set to true the sample makefiles are included the core solution. Modified: trunk/yake/scripts/premake/deps.lua =================================================================== --- trunk/yake/scripts/premake/deps.lua 2006-12-12 22:12:12 UTC (rev 1541) +++ trunk/yake/scripts/premake/deps.lua 2006-12-12 22:16:54 UTC (rev 1542) @@ -17,6 +17,13 @@ defDepLibrary("ogre","OgreGUIRenderer_d","Debug") -------------------------------------- +-- Dependency package OSM +-- NB Gets compiled into graphicsOGRE. +-------------------------------------- +defDep("osm") +defDepIncludePath("osm", "dependencies/oSceneLoaderLib/include") + +-------------------------------------- -- Dependency package ODE -------------------------------------- defDep("ode") Modified: trunk/yake/scripts/premake/yake.lua =================================================================== --- trunk/yake/scripts/premake/yake.lua 2006-12-12 22:12:12 UTC (rev 1541) +++ trunk/yake/scripts/premake/yake.lua 2006-12-12 22:16:54 UTC (rev 1542) @@ -204,7 +204,11 @@ makeComponentPlugin("graphicsOgre","YAKE_GRAPHICSCONCRETEAPI_EXPORTS") addDependency("base") addDependency("graphics") +addMatching("dependencies/oSceneLoaderLib/src/*.cpp") +addMatching("dependencies/oSceneLoaderLib/TinyXML/*.cpp") +addMatching("dependencies/oSceneLoaderLib/TinyXML/*.h") +useDep("osm") useDep("ogre") -------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-12 22:12:15
|
Revision: 1541 http://svn.sourceforge.net/yake/?rev=1541&view=rev Author: psyclonist Date: 2006-12-12 14:12:12 -0800 (Tue, 12 Dec 2006) Log Message: ----------- updated include paths Modified Paths: -------------- trunk/yake/src/plugins/ceguiOgreRendererAdapter/pch.cpp trunk/yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp Modified: trunk/yake/src/plugins/ceguiOgreRendererAdapter/pch.cpp =================================================================== --- trunk/yake/src/plugins/ceguiOgreRendererAdapter/pch.cpp 2006-12-12 22:11:51 UTC (rev 1540) +++ trunk/yake/src/plugins/ceguiOgreRendererAdapter/pch.cpp 2006-12-12 22:12:12 UTC (rev 1541) @@ -1 +1 @@ -#include <yapp/plugins/ceguiOgreRendererAdapter/pch.h> +#include <yake/plugins/ceguiOgreRendererAdapter/pch.h> Modified: trunk/yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp =================================================================== --- trunk/yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp 2006-12-12 22:11:51 UTC (rev 1540) +++ trunk/yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp 2006-12-12 22:12:12 UTC (rev 1541) @@ -24,13 +24,13 @@ source code distribution. ------------------------------------------------------------------------------------ */ -#include <yapp/plugins/ceguiOgreRendererAdapter/pch.h> +#include <yake/plugins/ceguiOgreRendererAdapter/pch.h> #include "OgreNoMemoryMacros.h" #include <CEGUI.h> #include <Ogre.h> #include "OgreCEGUIRenderer.h" -#include <yapp/common/yakeCEGUIRendererAdapter.h> -#include <yapp/plugins/ceguiOgreRendererAdapter/plugin.h> +#include <yake/common/yakeCEGUIRendererAdapter.h> +#include <yake/plugins/ceguiOgreRendererAdapter/plugin.h> //--------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-12 22:11:51
|
Revision: 1540 http://svn.sourceforge.net/yake/?rev=1540&view=rev Author: psyclonist Date: 2006-12-12 14:11:51 -0800 (Tue, 12 Dec 2006) Log Message: ----------- added new packages to premake script: ceguiOgreRendererAdapter, inputOgre and graphics Modified Paths: -------------- trunk/yake/scripts/premake/yake.lua Modified: trunk/yake/scripts/premake/yake.lua =================================================================== --- trunk/yake/scripts/premake/yake.lua 2006-12-12 22:11:11 UTC (rev 1539) +++ trunk/yake/scripts/premake/yake.lua 2006-12-12 22:11:51 UTC (rev 1540) @@ -184,6 +184,28 @@ useDep("lua") useDep("luabind") + +-------------------------------------- +makeComponentPlugin("ceguiOgreRendererAdapter","YAKE_CEGUIRENDERERADAPTER_OGRE_EXPORTS") +addDependency("base") +addDependency("graphics") + +useDep("ogre") +useDep("cegui") + +-------------------------------------- +makeComponentPlugin("inputOgre") +addDependency("base") +addDependency("input") + +useDep("ogre") + +-------------------------------------- +makeComponentPlugin("graphicsOgre","YAKE_GRAPHICSCONCRETEAPI_EXPORTS") +addDependency("base") +addDependency("graphics") + +useDep("ogre") -------------------------------------- --makeComponent("yappbase","YAKE_YAPP_EXPORTS") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-12 22:11:14
|
Revision: 1539 http://svn.sourceforge.net/yake/?rev=1539&view=rev Author: psyclonist Date: 2006-12-12 14:11:11 -0800 (Tue, 12 Dec 2006) Log Message: ----------- added premake dependency OGRE Modified Paths: -------------- trunk/yake/scripts/premake/deps.lua Modified: trunk/yake/scripts/premake/deps.lua =================================================================== --- trunk/yake/scripts/premake/deps.lua 2006-12-12 22:02:15 UTC (rev 1538) +++ trunk/yake/scripts/premake/deps.lua 2006-12-12 22:11:11 UTC (rev 1539) @@ -1,4 +1,22 @@ -------------------------------------- +-- Dependency package OGRE +-------------------------------------- +defDep("ogre") +defDepIncludePath("ogre", "dependencies/ogrenew/OgreMain/include") +defDepIncludePath("ogre", "dependencies/ogrenew/CEGUIRenderer/include") +defDepLibraryPath("ogre","dependencies/ode/lib/debugdll","Debug") +defDepLibraryPath("ogre","dependencies/ode/lib/debugdll","DebugLib") +defDepLibraryPath("ogre","dependencies/ode/lib/releasedll","Release") +defDepLibraryPath("ogre","dependencies/ode/lib/releasedll","ReleaseLib") +defDepLibraryPath("ogre","dependencies/ode/lib/releasedll","ReleaseWithSymbols") +defDepLibrary("ogre","OgreMain","Release") +defDepLibrary("ogre","OgreMain","ReleaseWithSymbols") +defDepLibrary("ogre","OgreMain_d","Debug") +defDepLibrary("ogre","OgreGUIRenderer","Release") +defDepLibrary("ogre","OgreGUIRenderer","ReleaseWithSymbols") +defDepLibrary("ogre","OgreGUIRenderer_d","Debug") + +-------------------------------------- -- Dependency package ODE -------------------------------------- defDep("ode") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <psy...@us...> - 2006-12-12 22:02:20
|
Revision: 1538 http://svn.sourceforge.net/yake/?rev=1538&view=rev Author: psyclonist Date: 2006-12-12 14:02:15 -0800 (Tue, 12 Dec 2006) Log Message: ----------- updated include paths Modified Paths: -------------- trunk/yake/src/plugins/modelLua/pch.cpp trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp trunk/yake/yake/plugins/modelLua/pch.h Modified: trunk/yake/src/plugins/modelLua/pch.cpp =================================================================== --- trunk/yake/src/plugins/modelLua/pch.cpp 2006-12-12 22:01:09 UTC (rev 1537) +++ trunk/yake/src/plugins/modelLua/pch.cpp 2006-12-12 22:02:15 UTC (rev 1538) @@ -24,4 +24,4 @@ source code distribution. ------------------------------------------------------------------------------------ */ -#include <yapp/plugins/modelLua/pch.h> +#include <yake/plugins/modelLua/pch.h> Modified: trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp =================================================================== --- trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp 2006-12-12 22:01:09 UTC (rev 1537) +++ trunk/yake/src/plugins/modelLua/yakeLuaBinder.cpp 2006-12-12 22:02:15 UTC (rev 1538) @@ -18,8 +18,8 @@ http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------------ */ -#include <yapp/plugins/modelLua/pch.h> -#include <yapp/plugins/modelLua/yakeLuaBinder.h> +#include <yake/plugins/modelLua/pch.h> +#include <yake/plugins/modelLua/yakeLuaBinder.h> #include <luabind/luabind.hpp> #include <yake/model/model.h> Modified: trunk/yake/yake/plugins/modelLua/pch.h =================================================================== --- trunk/yake/yake/plugins/modelLua/pch.h 2006-12-12 22:01:09 UTC (rev 1537) +++ trunk/yake/yake/plugins/modelLua/pch.h 2006-12-12 22:02:15 UTC (rev 1538) @@ -25,7 +25,7 @@ ------------------------------------------------------------------------------------ */ #include <yake/base/yake.h> -#include <yapp/base/yapp.h> +#include <yake/yappbase/yapp.h> #include <yake/scripting/yakeScriptingSystem.h> #include <yake/plugins/scriptingLua/ScriptingSystemLua.h> //#include <luabind/luabind.hpp> <= doesn't behave to well in a precompiled header! problems: objects in luabind namespace cannot be found! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |