mirror of
https://github.com/edubart/otclient.git
synced 2026-01-18 03:16:22 +01:00
Compilation for MSVC2013, thanks @dalkon
OTclient now compiles in "Microsoft Visual Studio 2013 Express for Windows Desktop" All the needed libraries you can download at https://www.dropbox.com/s/2yfb1c763io8efy/otclient-msvc13-libs.zip NOTE: You have to change VC++ Directories to the properly directories NOTE: Latested MSVC 2013 or greated is required
This commit is contained in:
@@ -53,8 +53,8 @@ void LuaInterface::init()
|
||||
m_globalEnv = ref();
|
||||
pop();
|
||||
|
||||
// check if demangle_type is working as expected
|
||||
assert(stdext::demangle_type<LuaObject>() == "LuaObject");
|
||||
// check if demangle_class is working as expected
|
||||
assert(stdext::demangle_class<LuaObject>() == "LuaObject");
|
||||
|
||||
// register LuaObject, the base of all other objects
|
||||
registerClass<LuaObject>();
|
||||
|
||||
@@ -64,24 +64,24 @@ public:
|
||||
// register shortcuts using templates
|
||||
template<class C, class B = LuaObject>
|
||||
void registerClass() {
|
||||
registerClass(stdext::demangle_type<C>(), stdext::demangle_type<B>());
|
||||
registerClass(stdext::demangle_class<C>(), stdext::demangle_class<B>());
|
||||
}
|
||||
|
||||
template<class C>
|
||||
void registerClassStaticFunction(const std::string& functionName, const LuaCppFunction& function) {
|
||||
registerClassStaticFunction(stdext::demangle_type<C>(), functionName, function);
|
||||
registerClassStaticFunction(stdext::demangle_class<C>(), functionName, function);
|
||||
}
|
||||
|
||||
template<class C>
|
||||
void registerClassMemberFunction(const std::string& functionName, const LuaCppFunction& function) {
|
||||
registerClassMemberFunction(stdext::demangle_type<C>(), functionName, function);
|
||||
registerClassMemberFunction(stdext::demangle_class<C>(), functionName, function);
|
||||
}
|
||||
|
||||
template<class C>
|
||||
void registerClassMemberField(const std::string& field,
|
||||
const LuaCppFunction& getFunction,
|
||||
const LuaCppFunction& setFunction) {
|
||||
registerClassMemberField(stdext::demangle_type<C>(), field, getFunction, setFunction);
|
||||
registerClassMemberField(stdext::demangle_class<C>(), field, getFunction, setFunction);
|
||||
}
|
||||
|
||||
// methods for binding functions
|
||||
|
||||
@@ -117,5 +117,9 @@ int LuaObject::getUseCount()
|
||||
std::string LuaObject::getClassName()
|
||||
{
|
||||
// TODO: this could be cached for more performance
|
||||
#ifdef _MSC_VER
|
||||
return stdext::demangle_name(typeid(*this).name()) + 6;
|
||||
#else
|
||||
return stdext::demangle_name(typeid(*this).name());
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user