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:
Eduardo Bart
2013-11-12 16:31:51 -02:00
parent c9597d6682
commit 1060c6f78c
17 changed files with 1514 additions and 34 deletions

View File

@@ -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>();

View File

@@ -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

View File

@@ -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
}