Author: janderwald
Date: Thu Jun 22 22:50:00 2006
New Revision: 22503
URL:
http://svn.reactos.ru/svn/reactos?rev=22503&view=rev
Log:
* make intermediate / outpath optional
* if u want to continue using vc specific path / configuration add flag
-vo{version|configuration}
Modified:
trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
trunk/reactos/tools/rbuild/configuration.cpp
trunk/reactos/tools/rbuild/rbuild.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/v…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp Thu Jun 22 22:50:00 2006
@@ -85,7 +85,9 @@
string outenv = Environment::GetOutputPath ();
string outdir;
string intdir;
-
+ string vcdir;
+
+
if ( intenv == "obj-i386" )
intdir = path_basedir + "obj-i386"; /* append relative dir from project dir
*/
else
@@ -96,6 +98,10 @@
else
outdir = outenv;
+ if ( configuration.UseVSVersionInPath )
+ {
+ vcdir = "\\" + _get_vc_dir();
+ }
// TODO FIXME - need more checks here for 'sys' and possibly 'drv'?
bool console = exe && (module.type == Win32CUI);
@@ -220,8 +226,18 @@
fprintf ( OUT, "\t\t<Configuration\r\n" );
fprintf ( OUT, "\t\t\tName=\"%s|Win32\"\r\n", cfg.name.c_str() );
- fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s\\%s\\%s\"\r\n",
outdir.c_str (), module.GetBasePath ().c_str (), _get_vc_dir().c_str (), cfg.name.c_str()
);
- fprintf ( OUT,
"\t\t\tIntermediateDirectory=\"%s\\%s\\%s\\%s\"\r\n", intdir.c_str (),
module.GetBasePath ().c_str (), _get_vc_dir().c_str (), cfg.name.c_str() );
+
+ if ( configuration.UseVSConfigurationInPath )
+ {
+ fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s%s\\%s\"\r\n",
outdir.c_str (), module.GetBasePath ().c_str (), vcdir.c_str (), cfg.name.c_str() );
+ fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s%s\\%s\"\r\n",
intdir.c_str (), module.GetBasePath ().c_str (), vcdir.c_str (), cfg.name.c_str() );
+ }
+ else
+ {
+ fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s%s\"\r\n",
outdir.c_str (), module.GetBasePath ().c_str (), vcdir.c_str () );
+ fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s%s\"\r\n",
intdir.c_str (), module.GetBasePath ().c_str (), vcdir.c_str () );
+ }
+
fprintf ( OUT, "\t\t\tConfigurationType=\"%d\"\r\n", exe ? 1 : dll
? 2 : lib ? 4 : -1 );
fprintf ( OUT, "\t\t\tCharacterSet=\"2\">\r\n" );
Modified: trunk/reactos/tools/rbuild/configuration.cpp
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/tools/rbuild/configuration.…
==============================================================================
--- trunk/reactos/tools/rbuild/configuration.cpp (original)
+++ trunk/reactos/tools/rbuild/configuration.cpp Thu Jun 22 22:50:00 2006
@@ -30,6 +30,8 @@
MakeHandlesInstallDirectories = false;
GenerateProxyMakefilesInSourceTree = false;
InstallFiles = false;
+ UseVSConfigurationInPath = false;
+ UseVSVersionInPath = false;
}
Configuration::~Configuration ()
Modified: trunk/reactos/tools/rbuild/rbuild.cpp
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/tools/rbuild/rbuild.cpp?rev…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.cpp (original)
+++ trunk/reactos/tools/rbuild/rbuild.cpp Thu Jun 22 22:50:00 2006
@@ -86,6 +86,8 @@
char switchChar2,
char* switchStart )
{
+ string temp;
+
switch ( switchChar2 )
{
case 's':
@@ -111,6 +113,19 @@
case 'c':
configuration.VSConfigurationType = string (&switchStart[3]);
configuration.InstallFiles = true;
+ break;
+ case 'o':
+ if ( strlen ( switchStart ) <= 3 )
+ {
+ printf ( "Invalid switch\n" );
+ return false;
+ }
+ temp = string (&switchStart[3]);
+ if ( temp.find ("configuration") != string::npos )
+ configuration.UseVSConfigurationInPath = true;
+
+ if ( temp.find ("version") != string::npos )
+ configuration.UseVSVersionInPath = true;
break;
default:
printf ( "Unknown switch -d%c\n",
@@ -238,6 +253,7 @@
printf ( " -ps Generate proxy makefiles in source tree instead of the
output.\n" );
printf ( " tree.\n" );
printf ( " -vs{version} Version of MS VS project files. Default is %s.\n",
MS_VS_DEF_VERSION );
+ printf ( " -vo{version|configuration} Adds subdirectory path to the default
Intermediate-Outputdirectory.\n" );
printf ( "\n" );
printf ( " buildsystem Target build system. Can be one of:\n" );
Modified: trunk/reactos/tools/rbuild/rbuild.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=2…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.h (original)
+++ trunk/reactos/tools/rbuild/rbuild.h Thu Jun 22 22:50:00 2006
@@ -142,6 +142,8 @@
std::string CheckDependenciesForModuleOnlyModule;
std::string VSProjectVersion;
std::string VSConfigurationType;
+ bool UseVSVersionInPath;
+ bool UseVSConfigurationInPath;
bool MakeHandlesInstallDirectories;
bool GenerateProxyMakefilesInSourceTree;
bool InstallFiles;