Support for non-standard module base addresses
[reactos.git] / reactos / tools / rbuild / rbuild.h
index 19e587b..99d624f 100644 (file)
@@ -13,6 +13,7 @@
 #include <sys/utime.h>\r
 #else\r
 #include <utime.h>\r
+#include <process.h>\r
 #endif\r
 \r
 #include "ssprintf.h"\r
 #include "XML.h"\r
 \r
 #ifdef WIN32\r
+#define EXEPREFIX ""\r
 #define EXEPOSTFIX ".exe"\r
 #define CSEP '\\'\r
 #define CBAD_SEP '/'\r
 #define SSEP "\\"\r
 #define SBAD_SEP "/"\r
 #else\r
+#define EXEPREFIX "./"\r
 #define EXEPOSTFIX ""\r
 #define CSEP '/'\r
 #define CBAD_SEP '\\'\r
@@ -67,10 +70,20 @@ public:
 \r
        Project ( const std::string& filename );\r
        ~Project ();\r
+       void WriteConfigurationFile ();\r
+       void ExecuteInvocations ();\r
        void ProcessXML ( const std::string& path );\r
        Module* LocateModule ( const std::string& name );\r
        const Module* LocateModule ( const std::string& name ) const;\r
 private:\r
+       const Property* LookupProperty ( const std::string& name ) const;\r
+       void SetConfigurationOption ( char* s,\r
+                                     std::string name,\r
+                                     std::string* alternativeName );\r
+       void SetConfigurationOption ( char* s,\r
+                                     std::string name );\r
+       void WriteIfChanged ( char* outbuf,\r
+                             std::string filename );\r
        void ReadXml ();\r
        void ProcessXMLSubElement ( const XMLElement& e,\r
                                    const std::string& path,\r
@@ -109,6 +122,7 @@ public:
        std::string name;\r
        std::string extension;\r
        std::string entrypoint;\r
+       std::string baseaddress;\r
        std::string path;\r
        ModuleType type;\r
        ImportLibrary* importLibrary;\r
@@ -139,10 +153,12 @@ public:
        std::string GetInvocationTarget ( const int index ) const;\r
        bool HasFileWithExtensions ( const std::string& extension1,\r
                                     const std::string& extension2 ) const;\r
-       void ProcessXML();\r
+       void InvokeModule () const;\r
+       void ProcessXML ();\r
 private:\r
        std::string GetDefaultModuleExtension () const;\r
        std::string GetDefaultModuleEntrypoint () const;\r
+       std::string GetDefaultModuleBaseaddress () const;\r
        void ProcessXMLSubElement ( const XMLElement& e,\r
                                    const std::string& path,\r
                                    If* pIf = NULL );\r
@@ -232,6 +248,7 @@ public:
 \r
        void ProcessXML();\r
        std::string GetTargets () const;\r
+       std::string GetParameters () const;\r
 private:\r
        void ProcessXMLSubElement ( const XMLElement& e );\r
        void ProcessXMLSubElementInput ( const XMLElement& e );\r
@@ -439,6 +456,9 @@ FixSeparator ( const std::string& s );
 extern std::string\r
 GetExtension ( const std::string& filename );\r
 \r
+extern std::string\r
+GetDirectory ( const std::string& filename );\r
+\r
 extern std::string\r
 NormalizeFilename ( const std::string& filename );\r
 \r