Removed the SquirrelVM.
It has been crashing the server. http://forum.mc-server.org/showthread.php?tid=610 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1024 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
99a6252d6a
commit
f7ef93611c
15
GNUmakefile
15
GNUmakefile
@ -97,10 +97,13 @@ INCLUDE = -I.\
|
||||
-IiniFile\
|
||||
-Itolua++-1.0.93/include\
|
||||
-Ijsoncpp-src-0.5.0/include\
|
||||
-Ijsoncpp-src-0.5.0/src/lib_json\
|
||||
-Isquirrel_3_0_1_stable/include\
|
||||
-Isquirrel_3_0_1_stable\
|
||||
-Isquirrel_3_0_1_stable/sqrat
|
||||
-Ijsoncpp-src-0.5.0/src/lib_json
|
||||
|
||||
|
||||
# 2012_11_08 _X: Removed, see Globals.h
|
||||
# -Isquirrel_3_0_1_stable/include\
|
||||
# -Isquirrel_3_0_1_stable\
|
||||
# -Isquirrel_3_0_1_stable/sqrat
|
||||
|
||||
|
||||
|
||||
@ -110,7 +113,9 @@ INCLUDE = -I.\
|
||||
# Build MCServer
|
||||
#
|
||||
|
||||
SOURCES := $(shell find CryptoPP lua-5.1.4 jsoncpp-src-0.5.0 zlib-1.2.7 source squirrel_3_0_1_stable tolua++-1.0.93 iniFile WebServer '(' -name '*.cpp' -o -name '*.c' ')')
|
||||
# 2012_11_08 _X: Removed: squirrel_3_0_1_stable
|
||||
|
||||
SOURCES := $(shell find CryptoPP lua-5.1.4 jsoncpp-src-0.5.0 zlib-1.2.7 source tolua++-1.0.93 iniFile WebServer '(' -name '*.cpp' -o -name '*.c' ')')
|
||||
SOURCES := $(filter-out %minigzip.c %lua.c %tolua.c %toluabind.c %LeakFinder.cpp %StackWalker.cpp %example.c,$(SOURCES))
|
||||
OBJECTS := $(patsubst %.c,$(BUILDDIR)%.o,$(SOURCES))
|
||||
OBJECTS := $(patsubst %.cpp,$(BUILDDIR)%.o,$(OBJECTS))
|
||||
|
@ -5,10 +5,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MCServer", "MCServer.vcproj
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9A476537-42C0-4848-AB40-15CFE83D17A8} = {9A476537-42C0-4848-AB40-15CFE83D17A8}
|
||||
{082E8185-7B3A-4945-8C82-9132341A329D} = {082E8185-7B3A-4945-8C82-9132341A329D}
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
|
||||
{EEAB54AD-114C-4AB8-8482-0A52D502BD35} = {EEAB54AD-114C-4AB8-8482-0A52D502BD35}
|
||||
{5AAA90B9-946D-4034-83F3-676B06A6E326} = {5AAA90B9-946D-4034-83F3-676B06A6E326}
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF} = {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}
|
||||
{54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C} = {54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C}
|
||||
{EA9D50FD-937A-4EF5-8C37-5F4175AF4FEA} = {EA9D50FD-937A-4EF5-8C37-5F4175AF4FEA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@ -70,11 +69,8 @@ Global
|
||||
{9A476537-42C0-4848-AB40-15CFE83D17A8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9A476537-42C0-4848-AB40-15CFE83D17A8}.Release|Win32.Build.0 = Release|Win32
|
||||
{54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C}.Release profiled|Win32.ActiveCfg = Release profiled|Win32
|
||||
{54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C}.Release profiled|Win32.Build.0 = Release profiled|Win32
|
||||
{54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{54DBF6CE-D1A8-4CCB-A249-4BF1CA9B7E4C}.Release|Win32.Build.0 = Release|Win32
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release profiled|Win32.ActiveCfg = Release|Win32
|
||||
|
@ -128,7 +128,9 @@ typedef unsigned short UInt16;
|
||||
#endif
|
||||
|
||||
#if !defined(ANDROID_NDK)
|
||||
#define USE_SQUIRREL
|
||||
// 2012_11_08 _X: Disabled SquirrelVM, because it would crash the server from time to time.
|
||||
// For details see: http://forum.mc-server.org/showthread.php?tid=610
|
||||
// #define USE_SQUIRREL
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID_NDK)
|
||||
|
@ -5,7 +5,11 @@
|
||||
|
||||
struct lua_State;
|
||||
class cLuaCommandBinder;
|
||||
class cSquirrelCommandBinder;
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
class cSquirrelCommandBinder;
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
class cPlugin;
|
||||
|
||||
// fwd: cWorld.h
|
||||
@ -124,11 +128,16 @@ public: //tolua_export
|
||||
|
||||
cLuaCommandBinder* GetLuaCommandBinder() const { return m_LuaCommandBinder; }
|
||||
|
||||
cSquirrelCommandBinder* GetSquirrelCommandBinder() { return m_SquirrelCommandBinder; }
|
||||
#ifdef USE_SQUIRREL
|
||||
cSquirrelCommandBinder * GetSquirrelCommandBinder() { return m_SquirrelCommandBinder; }
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
bool HasPlugin( cPlugin* a_Plugin ) const;
|
||||
|
||||
private:
|
||||
|
||||
friend class cRoot;
|
||||
|
||||
cPluginManager();
|
||||
~cPluginManager();
|
||||
|
||||
@ -142,8 +151,15 @@ private:
|
||||
void ReloadPluginsNow();
|
||||
void UnloadPluginsNow();
|
||||
|
||||
cLuaCommandBinder* m_LuaCommandBinder;
|
||||
cSquirrelCommandBinder* m_SquirrelCommandBinder;
|
||||
cLuaCommandBinder * m_LuaCommandBinder;
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
cSquirrelCommandBinder * m_SquirrelCommandBinder;
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
bool m_bReloadPlugins;
|
||||
}; //tolua_export
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,15 @@
|
||||
|
||||
#include "Globals.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "Plugin_Squirrel.h"
|
||||
#include "squirrelbindings/SquirrelFunctions.h"
|
||||
#include "squirrelbindings/SquirrelBindings.h"
|
||||
@ -386,3 +397,13 @@ bool cPlugin_Squirrel::OnUpdatedSign(
|
||||
a_Player
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "Plugin.h"
|
||||
#include <sqrat.h>
|
||||
#include "squirrelbindings/SquirrelObject.h"
|
||||
@ -51,3 +61,9 @@ protected:
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,16 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "SquirrelCommandBinder.h"
|
||||
#include "Player.h"
|
||||
#include "Plugin.h"
|
||||
@ -96,3 +106,13 @@ bool cSquirrelCommandBinder::HandleCommand( const std::string & a_Command, cPlay
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,16 @@
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include <sqrat.h>
|
||||
|
||||
class cPlugin;
|
||||
@ -33,3 +44,8 @@ private:
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,15 @@
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename T>
|
||||
class SquirrelArray
|
||||
@ -33,4 +43,14 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
class SquirrelStringArray : public SquirrelArray<std::string> { };
|
||||
class SquirrelStringArray : public SquirrelArray<std::string> { };
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,11 +1,26 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "SquirrelBindings.h"
|
||||
#include "../Plugin_Squirrel.h"
|
||||
#include "../PluginManager.h"
|
||||
#include "../Root.h"
|
||||
#include "../SquirrelCommandBinder.h"
|
||||
|
||||
//The baseclass for squirrel plugins
|
||||
|
||||
|
||||
|
||||
|
||||
// The baseclass for squirrel plugins
|
||||
class cSquirrelBaseClass
|
||||
{
|
||||
public:
|
||||
@ -38,4 +53,14 @@ public:
|
||||
|
||||
protected:
|
||||
cPlugin_Squirrel *m_Instance;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,15 @@
|
||||
|
||||
#include "Globals.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
#include "SquirrelBindings.h"
|
||||
#include "SquirrelFunctions.h"
|
||||
|
||||
@ -7,9 +18,16 @@
|
||||
|
||||
#include "../Player.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
using namespace Sqrat;
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
void BindSquirrel(HSQUIRRELVM vm)
|
||||
{
|
||||
RootTable()
|
||||
@ -166,4 +184,12 @@ void BindSquirrel(HSQUIRRELVM vm)
|
||||
.Const("UpdatedSign", cPluginManager::HOOK_UPDATED_SIGN));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,11 +1,32 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include <squirrel.h>
|
||||
#include <sqrat.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void BindSquirrel(HSQUIRRELVM vm);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,13 +1,29 @@
|
||||
|
||||
#include "Globals.h"
|
||||
#include "SquirrelFunctions.h"
|
||||
#include "SquirrelBindings.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "SquirrelFunctions.h"
|
||||
#include "SquirrelBindings.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static HSQUIRRELVM squirrelvm = NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SQInteger runtimeErrorHandler(HSQUIRRELVM a_VM)
|
||||
{
|
||||
const SQChar *sErr = 0;
|
||||
@ -67,4 +83,12 @@ void sqPrint(SQChar * text)
|
||||
LOGINFO("%s", text);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,28 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
#include <sqrat.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
HSQUIRRELVM OpenSquirrelVM();
|
||||
void CloseSquirrelVM();
|
||||
|
||||
void sqPrint(SQChar * text);
|
||||
void sqPrint(SQChar * text);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include <sqrat.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class SquirrelObject
|
||||
{
|
||||
public:
|
||||
@ -26,4 +42,14 @@ public:
|
||||
protected:
|
||||
Sqrat::Object m_SquirrelObject;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // USE_SQUIRREL
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user