Index: base/applications/screensavers/logon/logon.rbuild =================================================================== --- base/applications/screensavers/logon/logon.rbuild (revision 28218) +++ base/applications/screensavers/logon/logon.rbuild (working copy) @@ -12,6 +12,8 @@ glu32 winmm + + logon.c logon.rc Index: base/applications/screensavers/starfield/starfield.rbuild =================================================================== --- base/applications/screensavers/starfield/starfield.rbuild (revision 28218) +++ base/applications/screensavers/starfield/starfield.rbuild (working copy) @@ -8,6 +8,8 @@ user32 gdi32 + + screensaver.c starfield.rc Index: dll/win32/acledit/acledit.rbuild =================================================================== --- dll/win32/acledit/acledit.rbuild (revision 28218) +++ dll/win32/acledit/acledit.rbuild (working copy) @@ -5,6 +5,9 @@ + + + ntdll kernel32 advapi32 Index: dll/win32/comctl32/comctl32.rbuild =================================================================== --- dll/win32/comctl32/comctl32.rbuild (revision 28218) +++ dll/win32/comctl32/comctl32.rbuild (working copy) @@ -9,6 +9,12 @@ 0x600 0x501 0x501 + + + wine user32 gdi32 Index: dll/win32/comdlg32/comdlg32.rbuild =================================================================== --- dll/win32/comdlg32/comdlg32.rbuild (revision 28218) +++ dll/win32/comdlg32/comdlg32.rbuild (working copy) @@ -8,6 +8,12 @@ 0x600 0x501 0x501 + + + wine shell32 shlwapi Index: dll/win32/rpcrt4/rpcrt4.rbuild =================================================================== --- dll/win32/rpcrt4/rpcrt4.rbuild (revision 28218) +++ dll/win32/rpcrt4/rpcrt4.rbuild (working copy) @@ -19,6 +19,12 @@ advapi32 iphlpapi pseh + + + cproxy.c cpsf.c cstub.c Index: Makefile =================================================================== --- Makefile (revision 28218) +++ Makefile (working copy) @@ -486,6 +486,11 @@ $(ECHO_RBUILD) $(Q)$(RBUILD_TARGET) $(RBUILD_FLAGS) $(ROS_RBUILDFLAGS) depmap +.PHONY: vreport +vreport:$(RBUILD_TARGET) + $(ECHO_RBUILD) + $(Q)$(RBUILD_TARGET) $(RBUILD_FLAGS) $(ROS_RBUILDFLAGS) vreport + .PHONY: msvc msvc: $(RBUILD_TARGET) $(ECHO_RBUILD) Index: tools/rbuild/backend/versionreport/versionreport.cpp =================================================================== --- tools/rbuild/backend/versionreport/versionreport.cpp (revision 0) +++ tools/rbuild/backend/versionreport/versionreport.cpp (revision 0) @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2007 Marc Piulachs (marc.piulachs [at] codexchange [dot] net) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifdef _MSC_VER +#pragma warning ( disable : 4786 ) +#endif//_MSC_VER + +#include +#include +#include +#include +#include + +#include + +#include "versionreport.h" +#include "../mingw/mingw.h" + +using std::string; +using std::vector; +using std::map; +using std::ifstream; + +#ifdef OUT +#undef OUT +#endif//OUT + + +static class VReportFactory : public Backend::Factory +{ + public: + + VReportFactory() : Factory("VReport", "Version Report") {} + Backend *operator() (Project &project, + Configuration& configuration) + { + return new VReportBackend(project, configuration); + } + +} factory; + + +VReportBackend::VReportBackend(Project &project, + Configuration& configuration) : Backend(project, configuration) +{ + +} + +void VReportBackend::Process() +{ + string filename_depmap ( "versionreport.xml" ); + printf ( "Creating version report: %s\n", filename_depmap.c_str() ); + + m_VReportFile = fopen ( filename_depmap.c_str(), "wb" ); + + if ( !m_VReportFile ) + { + printf ( "Could not create file '%s'.\n", filename_depmap.c_str() ); + return; + } + + GenerateReport ( m_VReportFile ); + + fclose ( m_VReportFile ); + printf ( "Done.\n" ); +} + +void +VReportBackend::CleanFiles ( void ) +{ + remove ( "versionreport.xml" ); +} + +void +VReportBackend::GenerateReport ( FILE* OUT ) +{ + fprintf ( m_VReportFile, "\r\n" ); + fprintf ( m_VReportFile, "\r\n" ); + fprintf ( m_VReportFile, "\r\n" ); + + for ( size_t i = 0; i < ProjectNode.modules.size(); i++ ) + { + Module& module = *ProjectNode.modules[i]; + if ((module.type != Iso) && + (module.type != LiveIso) && + (module.type != IsoRegTest) && + (module.type != LiveIsoRegTest)) + { + Module& module = *ProjectNode.modules[i]; + + if (module.metadata) + { + if (module.metadata->version.length() > 0) + { + fprintf ( m_VReportFile, "\t\r\n" ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.name.c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.GetBasePath().c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->version.c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->date.c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->owner.c_str () ); + fprintf ( m_VReportFile, "\t\r\n" ); + } + } + } + } + + fprintf ( m_VReportFile, "" ); +} + + +VReportConfiguration::VReportConfiguration ( const std::string &name ) +{ + /* nothing to do here */ +} + Index: tools/rbuild/backend/versionreport/versionreport.h =================================================================== --- tools/rbuild/backend/versionreport/versionreport.h (revision 0) +++ tools/rbuild/backend/versionreport/versionreport.h (revision 0) @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2007 Marc Piulachs (marc.piulachs [at] codexchange [dot] net) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef __VREPORT_H__ +#define __VREPORT_H__ + +#include +#include +#include + +#include "../backend.h" + +class VReportConfiguration +{ + public: + VReportConfiguration(const std::string &name = ""); + virtual ~VReportConfiguration() {} + std::string name; +}; + +class VReportBackend : public Backend +{ + public: + + VReportBackend(Project &project, + Configuration& configuration); + virtual ~VReportBackend() {} + + virtual void Process(); + + private: + + FILE* m_VReportFile; + + std::vector m_configurations; + + void GenerateReport ( FILE* OUT ); + void CleanFiles ( void ); + + struct module_data + { + std::vector libraries; + std::vector references; + + module_data() + {} + ~module_data() + {} + }; + +}; + + +#endif // __VREPORT_H__ + Index: tools/rbuild/backend/versionreport/versionreport.cpp =================================================================== --- tools/rbuild/backend/versionreport/versionreport.cpp (revision 0) +++ tools/rbuild/backend/versionreport/versionreport.cpp (revision 0) @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2007 Marc Piulachs (marc.piulachs [at] codexchange [dot] net) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifdef _MSC_VER +#pragma warning ( disable : 4786 ) +#endif//_MSC_VER + +#include +#include +#include +#include +#include + +#include + +#include "versionreport.h" +#include "../mingw/mingw.h" + +using std::string; +using std::vector; +using std::map; +using std::ifstream; + +#ifdef OUT +#undef OUT +#endif//OUT + + +static class VReportFactory : public Backend::Factory +{ + public: + + VReportFactory() : Factory("VReport", "Version Report") {} + Backend *operator() (Project &project, + Configuration& configuration) + { + return new VReportBackend(project, configuration); + } + +} factory; + + +VReportBackend::VReportBackend(Project &project, + Configuration& configuration) : Backend(project, configuration) +{ + +} + +void VReportBackend::Process() +{ + string filename_depmap ( "versionreport.xml" ); + printf ( "Creating version report: %s\n", filename_depmap.c_str() ); + + m_VReportFile = fopen ( filename_depmap.c_str(), "wb" ); + + if ( !m_VReportFile ) + { + printf ( "Could not create file '%s'.\n", filename_depmap.c_str() ); + return; + } + + GenerateReport ( m_VReportFile ); + + fclose ( m_VReportFile ); + printf ( "Done.\n" ); +} + +void +VReportBackend::CleanFiles ( void ) +{ + remove ( "versionreport.xml" ); +} + +void +VReportBackend::GenerateReport ( FILE* OUT ) +{ + fprintf ( m_VReportFile, "\r\n" ); + fprintf ( m_VReportFile, "\r\n" ); + fprintf ( m_VReportFile, "\r\n" ); + + for ( size_t i = 0; i < ProjectNode.modules.size(); i++ ) + { + Module& module = *ProjectNode.modules[i]; + if ((module.type != Iso) && + (module.type != LiveIso) && + (module.type != IsoRegTest) && + (module.type != LiveIsoRegTest)) + { + Module& module = *ProjectNode.modules[i]; + + if (module.metadata) + { + if (module.metadata->version.length() > 0) + { + fprintf ( m_VReportFile, "\t\r\n" ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.name.c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.GetBasePath().c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->version.c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->date.c_str () ); + fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->owner.c_str () ); + fprintf ( m_VReportFile, "\t\r\n" ); + } + } + } + } + + fprintf ( m_VReportFile, "" ); +} + + +VReportConfiguration::VReportConfiguration ( const std::string &name ) +{ + /* nothing to do here */ +} + Index: tools/rbuild/backend/versionreport/versionreport.h =================================================================== --- tools/rbuild/backend/versionreport/versionreport.h (revision 0) +++ tools/rbuild/backend/versionreport/versionreport.h (revision 0) @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2007 Marc Piulachs (marc.piulachs [at] codexchange [dot] net) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#ifndef __VREPORT_H__ +#define __VREPORT_H__ + +#include +#include +#include + +#include "../backend.h" + +class VReportConfiguration +{ + public: + VReportConfiguration(const std::string &name = ""); + virtual ~VReportConfiguration() {} + std::string name; +}; + +class VReportBackend : public Backend +{ + public: + + VReportBackend(Project &project, + Configuration& configuration); + virtual ~VReportBackend() {} + + virtual void Process(); + + private: + + FILE* m_VReportFile; + + std::vector m_configurations; + + void GenerateReport ( FILE* OUT ); + void CleanFiles ( void ); + + struct module_data + { + std::vector libraries; + std::vector references; + + module_data() + {} + ~module_data() + {} + }; + +}; + + +#endif // __VREPORT_H__ + Index: tools/rbuild/module.cpp =================================================================== --- tools/rbuild/module.cpp (revision 28218) +++ tools/rbuild/module.cpp (working copy) @@ -250,6 +250,7 @@ : project (project), node (moduleNode), importLibrary (NULL), + metadata (NULL), bootstrap (NULL), autoRegister(NULL), linkerScript (NULL), @@ -658,6 +659,17 @@ non_if_data.defines.push_back ( pDefine ); subs_invalid = true; } + else if ( e.name == "metadata" ) + { + if ( parseContext.ifData ) + { + throw XMLInvalidBuildFileException ( + e.location, + " is not a valid sub-element of " ); + } + metadata = new Metadata ( e, *this ); + subs_invalid = false; + } else if ( e.name == "invoke" ) { if ( parseContext.ifData ) @@ -1469,6 +1481,61 @@ } +Metadata::Metadata ( const XMLElement& _node, + const Module& _module ) + : node (_node), + module (_module) +{ + /* The module name */ + const XMLAttribute* att = _node.GetAttribute ( "name", false ); + if (att != NULL) + name = att->value; + else + name = module.name; + + /* The module description */ + att = _node.GetAttribute ( "description", false ); + if (att != NULL) + description = att->value; + else + description = ""; + + /* The module version */ + att = _node.GetAttribute ( "version", false ); + if (att != NULL) + version = att->value; + else + version = ""; + + /* The module copyright */ + att = _node.GetAttribute ( "copyright", false ); + if (att != NULL) + copyright = att->value; + else + copyright = ""; + + att = _node.GetAttribute ( "url", false ); + if (att != NULL) + url = att->value; + else + url = ""; + + /* When was this module updated */ + att = _node.GetAttribute ( "date", false ); + if (att != NULL) + date = att->value; + else + date = "?"; + + /* When was this module updated */ + att = _node.GetAttribute ( "owner", false ); + if (att != NULL) + owner = att->value; + else + owner = "ReactOS"; +} + + ImportLibrary::ImportLibrary ( const XMLElement& _node, const Module& _module ) : node (_node), Index: tools/rbuild/rbuild.h =================================================================== --- tools/rbuild/rbuild.h (revision 28218) +++ tools/rbuild/rbuild.h (working copy) @@ -101,8 +101,8 @@ class AutoRegister; class SourceFileTest; +class Metadata; - typedef std::map directory_map; class Directory @@ -298,6 +298,7 @@ std::string path; ModuleType type; ImportLibrary* importLibrary; + Metadata* metadata; bool mangledSymbols; bool underscoreSymbols; bool isUnicode; @@ -502,7 +503,25 @@ void ProcessXML(); }; +class Metadata +{ +public: + const XMLElement& node; + const Module& module; + std::string name; + std::string description; + std::string version; + std::string copyright; + std::string url; + std::string date; + std::string owner; + Metadata ( const XMLElement& _node, + const Module& _module ); + + void ProcessXML(); +}; + class ImportLibrary { public: Index: tools/rbuild/rbuild.mak =================================================================== --- tools/rbuild/rbuild.mak (revision 28218) +++ tools/rbuild/rbuild.mak (working copy) @@ -154,7 +154,24 @@ ${mkdir} $@ endif +RBUILD_VREPORT_BASE = $(RBUILD_BACKEND_BASE_)versionreport +RBUILD_VREPORT_BASE_ = $(RBUILD_VREPORT_BASE)$(SEP) +RBUILD_VREPORT_INT = $(INTERMEDIATE_)$(RBUILD_VREPORT_BASE) +RBUILD_VREPORT_INT_ = $(RBUILD_VREPORT_INT)$(SEP) +RBUILD_VREPORT_OUT = $(OUTPUT_)$(RBUILD_VREPORT_BASE) +RBUILD_VREPORT_OUT_ = $(RBUILD_VREPORT_OUT)$(SEP) +$(RBUILD_VREPORT_INT): | $(RBUILD_BACKEND_INT) + $(ECHO_MKDIR) + ${mkdir} $@ + +ifneq ($(INTERMEDIATE),$(OUTPUT)) +$(RBUILD_VREPORT_OUT): | $(RBUILD_BACKEND_OUT) + $(ECHO_MKDIR) + ${mkdir} $@ +endif + + RBUILD_MSVC_BASE = $(RBUILD_BACKEND_BASE_)msvc RBUILD_MSVC_BASE_ = $(RBUILD_MSVC_BASE)$(SEP) RBUILD_MSVC_INT = $(INTERMEDIATE_)$(RBUILD_MSVC_BASE) @@ -197,6 +214,10 @@ dependencymap.cpp \ ) +RBUILD_BACKEND_VREPORT_BASE_SOURCES = $(addprefix $(RBUILD_VREPORT_BASE_), \ + versionreport.cpp \ + ) + RBUILD_BACKEND_MSBUILD_BASE_SOURCES = $(addprefix $(RBUILD_MSBUILD_BASE_), \ msbuild.cpp \ ) @@ -214,6 +235,7 @@ $(RBUILD_BACKEND_MSVC_BASE_SOURCES) \ $(RBUILD_BACKEND_CODEBLOCKS_BASE_SOURCES) \ $(RBUILD_BACKEND_DEPMAP_BASE_SOURCES) \ + $(RBUILD_BACKEND_VREPORT_BASE_SOURCES) \ $(RBUILD_BACKEND_MSBUILD_BASE_SOURCES) \ $(RBUILD_BACKEND_BASE_)backend.cpp @@ -273,6 +295,9 @@ RBUILD_BACKEND_DEPMAP_HEADERS = \ dependencymap.h +RBUILD_BACKEND_VREPORT_HEADERS = \ + versionreport.h + RBUILD_BACKEND_MSBUILD_HEADERS = \ msbuild.h @@ -287,6 +312,7 @@ $(addprefix mingw$(SEP), $(RBUILD_BACKEND_MINGW_HEADERS)) \ $(addprefix codeblocks$(SEP), $(RBUILD_BACKEND_CODEBLOCKS_HEADERS)) \ $(addprefix msbuild$(SEP), $(RBUILD_BACKEND_MSBUILD_HEADERS)) \ + $(addprefix versionreport$(SEP), $(RBUILD_BACKEND_VREPORT_HEADERS)) \ $(addprefix dependencymap$(SEP), $(RBUILD_BACKEND_DEPMAP_HEADERS)) RBUILD_HEADERS = \ @@ -460,6 +486,10 @@ $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ +$(RBUILD_VREPORT_INT_)versionreport.o: $(RBUILD_VREPORT_BASE_)versionreport.cpp $(RBUILD_HEADERS) | $(RBUILD_VREPORT_INT) + $(ECHO_CC) + ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ + $(RBUILD_MSBUILD_INT_)msbuild.o: $(RBUILD_MSBUILD_BASE_)msbuild.cpp $(RBUILD_HEADERS) | $(RBUILD_MSBUILD_INT) $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ Index: vreport.xsl =================================================================== --- vreport.xsl (revision 0) +++ vreport.xsl (revision 0) @@ -0,0 +1,32 @@ + + + + + +ReactOS Component Version Report + + +

ReactOS Component Version Report

+ + + + + + + + + + + + + + + + + +
Module NameModule LocationVersionDateOwner
+ + +
+ +