added xi:fallback support
[reactos.git] / reactos / tools / rbuild / rbuild.cpp
1 // rbuild.cpp
2
3 #include "pch.h"
4 #include <typeinfo>
5
6 #include <stdio.h>
7 #include <io.h>
8 #include <assert.h>
9
10 #include "rbuild.h"
11 #include "backend/backend.h"
12 #include "backend/mingw/mingw.h"
13
14 using std::string;
15 using std::vector;
16
17 int
18 main ( int argc, char** argv )
19 {
20 if ( argc != 2 )
21 {
22 printf ( "syntax: rbuild {buildtarget}\n" );
23 return 1;
24 }
25 string buildtarget ( argv[1] );
26 strlwr ( &buildtarget[0] );
27 try
28 {
29 string projectFilename ( "ReactOS.xml" );
30 Project project ( projectFilename );
31 Backend* backend = Backend::Factory::Create ( buildtarget, project );
32 backend->Process ();
33 delete backend;
34
35 return 0;
36 }
37 catch (Exception& ex)
38 {
39 printf ( "%s: %s\n",
40 typeid(ex).name(), ex.Message.c_str() );
41 return 1;
42 }
43 }