pch.h can be used as pre-compiled header
[reactos.git] / reactos / tools / rbuild / rbuild.cpp
1 // rbuild.cpp
2
3 #include "pch.h"
4
5 #include <stdio.h>
6 #include <io.h>
7 #include <assert.h>
8
9 #include "rbuild.h"
10
11 using std::string;
12 using std::vector;
13
14 int
15 main ( int argc, char** argv )
16 {
17 try
18 {
19 string projectFilename ( "ReactOS.xml" );
20 Project* project = new Project( projectFilename );
21
22 Path path;
23 // REM TODO FIXME actually do something with Project object...
24 printf ( "Found %d modules:\n", project->modules.size() );
25 for ( size_t i = 0; i < project->modules.size(); i++ )
26 {
27 Module& m = *project->modules[i];
28 printf ( "\t%s in folder: %s\n",
29 m.name.c_str(),
30 m.path.c_str() );
31 printf ( "\txml dependencies:\n\t\t%s\n",
32 projectFilename.c_str() );
33 const XMLElement* e = &m.node;
34 while ( e )
35 {
36 if ( e->name == "xi:include" )
37 {
38 const XMLAttribute* att = e->GetAttribute("top_href",false);
39 if ( att )
40 {
41 printf ( "\t\t%s\n", att->value.c_str() );
42 }
43 }
44 e = e->parentElement;
45 }
46 printf ( "\tfiles:\n" );
47 for ( size_t j = 0; j < m.files.size(); j++ )
48 {
49 printf ( "\t\t%s\n", m.files[j]->name.c_str() );
50 }
51 }
52
53 delete project;
54
55 return 0;
56 }
57 catch (Exception& ex)
58 {
59 printf ( "%s\n",
60 ex.Message.c_str() );
61 return 1;
62 }
63 }