Officially drop support for Visual Studio 2013, which stopped working after 3a839517ce
, fixes #5379.
This was SVN commit r23382.
This commit is contained in:
parent
ae6c6bdbeb
commit
601892a2bb
@ -560,10 +560,6 @@ extern_lib_defs = {
|
||||
pkgconfig.add_links("mozjs-45")
|
||||
end
|
||||
else
|
||||
filter { "Debug", "action:vs2013" }
|
||||
links { "mozjs45-ps-debug-vc120" }
|
||||
filter { "Release", "action:vs2013" }
|
||||
links { "mozjs45-ps-release-vc120" }
|
||||
filter { "Debug", "action:vs2015" }
|
||||
links { "mozjs45-ps-debug-vc140" }
|
||||
filter { "Release", "action:vs2015" }
|
||||
|
@ -381,8 +381,6 @@ function project_create(project_name, target_type)
|
||||
language "C++"
|
||||
kind(target_type)
|
||||
|
||||
filter "action:vs2013"
|
||||
toolset "v120_xp"
|
||||
filter "action:vs2015"
|
||||
toolset "v140_xp"
|
||||
filter {}
|
||||
@ -854,7 +852,7 @@ function setup_all_libs ()
|
||||
end
|
||||
|
||||
-- runtime-library-specific
|
||||
if _ACTION == "vs2013" or _ACTION == "vs2015" then
|
||||
if _ACTION == "vs2015" then
|
||||
table.insert(source_dirs, "lib/sysdep/rtl/msc");
|
||||
else
|
||||
table.insert(source_dirs, "lib/sysdep/rtl/gcc");
|
||||
|
@ -2,6 +2,5 @@
|
||||
rem ** Create Visual Studio Workspaces on Windows **
|
||||
|
||||
cd ..\premake
|
||||
if not exist ..\workspaces\vc2013\SKIP_PREMAKE_HERE premake5\bin\release\premake5 --outpath="../workspaces/vc2013" --use-shared-glooxwrapper %* vs2013
|
||||
if not exist ..\workspaces\vc2015\SKIP_PREMAKE_HERE premake5\bin\release\premake5 --outpath="../workspaces/vc2015" --use-shared-glooxwrapper %* vs2015
|
||||
cd ..\workspaces
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -29,9 +29,9 @@ different compiler versions (or the same version with different build flags):
|
||||
the STL types have different layouts, and new/delete can use different heaps.
|
||||
|
||||
We want to let people build the game on Windows with any compiler version
|
||||
(VC2008, 2010, 2012, 2013, and debug vs release), without requiring them to
|
||||
rebuild the gloox library themselves. And we don't want to provide ~8 different
|
||||
prebuilt versions of the library.
|
||||
(any supported Visual Studio version, and debug vs release), without requiring
|
||||
them to rebuild the gloox library themselves. And we don't want to provide ~8
|
||||
different prebuilt versions of the library.
|
||||
|
||||
glooxwrapper replaces the gloox API with a version that is safe to use across
|
||||
compiler versions. glooxwrapper and gloox must be compiled together with the
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -45,13 +45,13 @@ PASS_BY_VALUE_IN_NATIVE_WRAPPER(double)
|
||||
|
||||
#undef PASS_BY_VALUE_IN_NATIVE_WRAPPER
|
||||
|
||||
// This works around a bug in Visual Studio 2013 (error C2244 if ScriptInterface:: is included in the
|
||||
// This works around a bug in Visual Studio (error C2244 if ScriptInterface:: is included in the
|
||||
// type specifier of MaybeRef<T>::Type for parameters inside the member function declaration).
|
||||
// It's probably the bug described here, but I'm not quite sure (at least the example there still
|
||||
// cause error C2244):
|
||||
// https://connect.microsoft.com/VisualStudio/feedback/details/611863/vs2010-c-fails-with-error-c2244-gcc-4-3-4-compiles-ok
|
||||
//
|
||||
// TODO: When dropping support for VS 2013, check if this bug is still present in the supported
|
||||
// TODO: When dropping support for VS 2015, check if this bug is still present in the supported
|
||||
// Visual Studio versions (replace the macro definitions in NativeWrapperDecls.h with these ones,
|
||||
// remove them from here and check if this causes error C2244 when compiling.
|
||||
#undef NUMBERED_LIST_TAIL_MAYBE_REF
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -427,25 +427,6 @@ private:
|
||||
|
||||
struct CustomType
|
||||
{
|
||||
// TODO: Move assignment operator and move constructor only have to be
|
||||
// explicitly defined for Visual Studio. VS2013 is still behind on C++11 support
|
||||
// What's missing is what they call "Rvalue references v3.0", see
|
||||
// https://msdn.microsoft.com/en-us/library/hh567368.aspx#rvref
|
||||
CustomType() {}
|
||||
CustomType& operator=(CustomType&& other)
|
||||
{
|
||||
m_Prototype = std::move(other.m_Prototype);
|
||||
m_Class = std::move(other.m_Class);
|
||||
m_Constructor = std::move(other.m_Constructor);
|
||||
return *this;
|
||||
}
|
||||
CustomType(CustomType&& other)
|
||||
{
|
||||
m_Prototype = std::move(other.m_Prototype);
|
||||
m_Class = std::move(other.m_Class);
|
||||
m_Constructor = std::move(other.m_Constructor);
|
||||
}
|
||||
|
||||
JS::PersistentRootedObject m_Prototype;
|
||||
JSClass* m_Class;
|
||||
JSNative m_Constructor;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -78,21 +78,6 @@ public:
|
||||
m_Val.reset(new JS::PersistentRooted<T>(cx, val));
|
||||
}
|
||||
|
||||
// TODO: Move assignment operator and move constructor only have to be
|
||||
// explicitly defined for Visual Studio. VS2013 is still behind on C++11 support
|
||||
// What's missing is what they call "Rvalue references v3.0", see
|
||||
// https://msdn.microsoft.com/en-us/library/hh567368.aspx#rvref
|
||||
DefPersistentRooted<T>& operator=(DefPersistentRooted<T>&& other)
|
||||
{
|
||||
m_Val = std::move(other.m_Val);
|
||||
return *this;
|
||||
}
|
||||
|
||||
DefPersistentRooted<T>(DefPersistentRooted<T>&& other)
|
||||
{
|
||||
m_Val = std::move(other.m_Val);
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<JS::PersistentRooted<T> > m_Val;
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -248,7 +248,7 @@ void CComponentManager::Script_RegisterComponentType_Common(ScriptInterface::CxP
|
||||
componentManager->m_ScriptInterface.GetProperty(protoVal, "Schema", schema);
|
||||
|
||||
// Construct a new ComponentType, using the wrapper's alloc functions
|
||||
ComponentType ct(
|
||||
ComponentType ct{
|
||||
CT_Script,
|
||||
iid,
|
||||
ctWrapper.alloc,
|
||||
@ -256,7 +256,7 @@ void CComponentManager::Script_RegisterComponentType_Common(ScriptInterface::CxP
|
||||
cname,
|
||||
schema,
|
||||
DefPersistentRooted<JS::Value>(cx, ctor)
|
||||
);
|
||||
};
|
||||
componentManager->m_ComponentTypesById[cid] = std::move(ct);
|
||||
|
||||
componentManager->m_CurrentComponent = cid; // needed by Subscribe
|
||||
@ -533,7 +533,7 @@ void CComponentManager::SetRNGSeed(u32 seed)
|
||||
void CComponentManager::RegisterComponentType(InterfaceId iid, ComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc,
|
||||
const char* name, const std::string& schema)
|
||||
{
|
||||
ComponentType c(CT_Native, iid, alloc, dealloc, name, schema, DefPersistentRooted<JS::Value>());
|
||||
ComponentType c{ CT_Native, iid, alloc, dealloc, name, schema, DefPersistentRooted<JS::Value>() };
|
||||
m_ComponentTypesById.insert(std::make_pair(cid, std::move(c)));
|
||||
m_ComponentTypeIdsByName[name] = cid;
|
||||
}
|
||||
@ -541,7 +541,7 @@ void CComponentManager::RegisterComponentType(InterfaceId iid, ComponentTypeId c
|
||||
void CComponentManager::RegisterComponentTypeScriptWrapper(InterfaceId iid, ComponentTypeId cid, AllocFunc alloc,
|
||||
DeallocFunc dealloc, const char* name, const std::string& schema)
|
||||
{
|
||||
ComponentType c(CT_ScriptWrapper, iid, alloc, dealloc, name, schema, DefPersistentRooted<JS::Value>());
|
||||
ComponentType c{ CT_ScriptWrapper, iid, alloc, dealloc, name, schema, DefPersistentRooted<JS::Value>() };
|
||||
m_ComponentTypesById.insert(std::make_pair(cid, std::move(c)));
|
||||
m_ComponentTypeIdsByName[name] = cid;
|
||||
// TODO: merge with RegisterComponentType
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -72,46 +72,6 @@ private:
|
||||
std::string name;
|
||||
std::string schema; // RelaxNG fragment
|
||||
DefPersistentRooted<JS::Value> ctor; // only valid if type == CT_Script
|
||||
|
||||
// TODO: Constructor, move assignment operator and move constructor only have to be
|
||||
// explicitly defined for Visual Studio. VS2013 is still behind on C++11 support
|
||||
// What's missing is what they call "Rvalue references v3.0", see
|
||||
// https://msdn.microsoft.com/en-us/library/hh567368.aspx#rvref
|
||||
ComponentType() {}
|
||||
ComponentType (EComponentTypeType type, InterfaceId iid, AllocFunc alloc,
|
||||
DeallocFunc dealloc, std::string name, std::string schema, DefPersistentRooted<JS::Value> ctor) :
|
||||
type(type),
|
||||
iid(iid),
|
||||
alloc(alloc),
|
||||
dealloc(dealloc),
|
||||
name(name),
|
||||
schema(schema),
|
||||
ctor(std::move(ctor))
|
||||
{
|
||||
}
|
||||
|
||||
ComponentType& operator= (ComponentType&& other)
|
||||
{
|
||||
type = std::move(other.type);
|
||||
iid = std::move(other.iid);
|
||||
alloc = std::move(other.alloc);
|
||||
dealloc = std::move(other.dealloc);
|
||||
name = std::move(other.name);
|
||||
schema = std::move(other.schema);
|
||||
ctor = std::move(other.ctor);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComponentType(ComponentType&& other)
|
||||
{
|
||||
type = std::move(other.type);
|
||||
iid = std::move(other.iid);
|
||||
alloc = std::move(other.alloc);
|
||||
dealloc = std::move(other.dealloc);
|
||||
name = std::move(other.name);
|
||||
schema = std::move(other.schema);
|
||||
ctor = std::move(other.ctor);
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user