Author: mjansen
Date: Sun Jul 30 13:37:35 2017
New Revision: 75457
URL:
http://svn.reactos.org/svn/reactos?rev=75457&view=rev
Log:
[SDK][XML2SDB] Simplify include / exclude node specification.
Modified:
trunk/reactos/media/sdb/sysmain.xml
trunk/reactos/sdk/tools/xml2sdb/main.cpp
trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp
trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h
Modified: trunk/reactos/media/sdb/sysmain.xml
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/sdb/sysmain.xml?rev=…
==============================================================================
--- trunk/reactos/media/sdb/sysmain.xml [iso-8859-1] (original)
+++ trunk/reactos/media/sdb/sysmain.xml [iso-8859-1] Sun Jul 30 13:37:35 2017
@@ -8,57 +8,147 @@
<!-- Version lie shims -->
<SHIM NAME="Win95VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win98VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="WinNT4SP5VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win2000VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win2000SP1VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win2000SP2VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win2000SP3VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="WinXPVersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="WinXPSP1VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="WinXPSP2VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="WinXPSP3VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win2k3RTMVersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win2k3SP1VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win2k3SP2VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="VistaRTMVersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="VistaSP1VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="VistaSP2VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<SHIM NAME="Win7RTMVersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
Modified: trunk/reactos/sdk/tools/xml2sdb/main.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/xml2sdb/main.cpp…
==============================================================================
--- trunk/reactos/sdk/tools/xml2sdb/main.cpp [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/xml2sdb/main.cpp [iso-8859-1] Sun Jul 30 13:37:35 2017
@@ -1,9 +1,9 @@
/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS xml to sdb converter
- * FILE: sdk/tools/xml2sdb/main.cpp
- * PURPOSE: Implement platform agnostic read / write / allocation functions, parse
commandline
- * PROGRAMMERS: Mark Jansen
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS xml to sdb converter
+ * FILE: sdk/tools/xml2sdb/main.cpp
+ * PURPOSE: Implement platform agnostic read / write / allocation functions,
parse commandline
+ * PROGRAMMERS: Mark Jansen (mark.jansen(a)reactos.org)
*
*/
@@ -201,7 +201,6 @@
g_ShimDebugLevel = strtoul(value.c_str(), NULL, 10);
}
-// -i R:\src\apphelp\reactos\media\sdb\sysmain.xml
-oR:\build\apphelp\devenv_msvc\media\sdb\ros2.sdb
int main(int argc, char * argv[])
{
std::string input, output;
Modified: trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/xml2sdb/xml2sdb.…
==============================================================================
--- trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp [iso-8859-1] Sun Jul 30 13:37:35 2017
@@ -1,9 +1,9 @@
/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS xml to sdb converter
- * FILE: sdk/tools/xml2sdb/xml2sdb.cpp
- * PURPOSE: Conversion functions from xml -> db
- * PROGRAMMERS: Mark Jansen
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS xml to sdb converter
+ * FILE: sdk/tools/xml2sdb/xml2sdb.cpp
+ * PURPOSE: Conversion functions from xml -> db
+ * PROGRAMMERS: Mark Jansen (mark.jansen(a)reactos.org)
*
*/
@@ -16,7 +16,7 @@
using tinyxml2::XMLText;
static const GUID GUID_NULL = { 0 };
-static const char szCompilerVersion[] = "1.5.0.0";
+static const char szCompilerVersion[] = "1.6.0.0";
#if !defined(C_ASSERT)
#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
@@ -241,19 +241,10 @@
bool InExclude::fromXml(XMLHandle dbNode)
{
Module = ReadStringNode(dbNode, "MODULE");
+ // Special module names: '$' and '*'
if (!Module.empty())
{
- Include = dbNode.FirstChildElement("INCLUDE").ToNode() != NULL;
- if (!Include)
- {
- tinyxml2::XMLElement* elem = dbNode.ToElement();
- if (elem)
- {
- Include |= (elem->Attribute("INCLUDE") != NULL);
- }
- }
- // $ = ??
- // *
+ Include = ToNodeName(dbNode) == "INCLUDE";
return true;
}
return false;
@@ -303,7 +294,8 @@
{
Name = ReadStringNode(dbNode, "NAME");
CommandLine = ReadStringNode(dbNode, "COMMAND_LINE");
- ReadGeneric(dbNode, InExcludes, "INEXCLUDE");
+ ReadGeneric(dbNode, InExcludes, "INCLUDE");
+ ReadGeneric(dbNode, InExcludes, "EXCLUDE");
return !Name.empty();
}
@@ -331,7 +323,8 @@
ReadGuidNode(dbNode, "FIX_ID", FixID);
// GENERAL ?
// DESCRIPTION_RC_ID
- ReadGeneric(dbNode, InExcludes, "INEXCLUDE");
+ ReadGeneric(dbNode, InExcludes, "INCLUDE");
+ ReadGeneric(dbNode, InExcludes, "EXCLUDE");
return !Name.empty() && !DllFile.empty();
}
@@ -527,6 +520,12 @@
{
SHIM_ERR("Unhanled FLAG type\n");
}
+ else if (NodeName == "INCLUDE" || NodeName == "EXCLUDE")
+ {
+ InExclude inex;
+ if (inex.fromXml(libChild))
+ Library.InExcludes.push_back(inex);
+ }
libChild = libChild.NextSibling();
}
@@ -560,6 +559,8 @@
}
WriteBinary(pdb, TAG_DATABASE_ID, ID);
TAGID tidLibrary = BeginWriteListTag(pdb, TAG_LIBRARY);
+ if (!WriteGeneric(pdb, Library.InExcludes, *this))
+ return false;
if (!WriteGeneric(pdb, Library.Shims, *this))
return false;
EndWriteListTag(pdb, tidLibrary);
Modified: trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/xml2sdb/xml2sdb.…
==============================================================================
--- trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h [iso-8859-1] Sun Jul 30 13:37:35 2017
@@ -112,6 +112,7 @@
struct Library
{
+ std::list<InExclude> InExcludes;
std::list<Shim> Shims;
};