ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
669 discussions
Start a n
N
ew thread
[navaraf] 17509: Remove bogus and unneeded cast.
by navaraf@svn.reactos.com
Remove bogus and unneeded cast. Modified: trunk/reactos/drivers/net/ndis/ndis/miniport.c _____ Modified: trunk/reactos/drivers/net/ndis/ndis/miniport.c --- trunk/reactos/drivers/net/ndis/ndis/miniport.c 2005-08-24 06:03:34 UTC (rev 17508) +++ trunk/reactos/drivers/net/ndis/ndis/miniport.c 2005-08-24 09:50:18 UTC (rev 17509) @@ -80,7 +80,7 @@ UCHAR Buffer[64]; if ((DebugTraceLevel & DEBUG_PACKET) > 0) { Length = CopyPacketToBuffer( - (PUCHAR)&Buffer, + Buffer, Packet, 0, 64);
19 years, 4 months
1
0
0
0
[royce] 17508: Replace() bugfix #2 - forgot to insert replacement text ( yes yes I suck you can stop throwing tomatoes now )
by royce@svn.reactos.com
Replace() bugfix #2 - forgot to insert replacement text ( yes yes I suck you can stop throwing tomatoes now ) Modified: trunk/reactos/tools/rbuild/module.cpp _____ Modified: trunk/reactos/tools/rbuild/module.cpp --- trunk/reactos/tools/rbuild/module.cpp 2005-08-24 06:01:02 UTC (rev 17507) +++ trunk/reactos/tools/rbuild/module.cpp 2005-08-24 06:03:34 UTC (rev 17508) @@ -35,6 +35,7 @@ break; if ( p2 > p ) ret += string ( p, p2-p ); + ret += with; p = p2 + find.size(); } if ( *p )
19 years, 4 months
1
0
0
0
[royce] 17507: bugfix - Replace() was truncating the string
by royce@svn.reactos.com
bugfix - Replace() was truncating the string Modified: trunk/reactos/tools/rbuild/module.cpp _____ Modified: trunk/reactos/tools/rbuild/module.cpp --- trunk/reactos/tools/rbuild/module.cpp 2005-08-24 05:58:14 UTC (rev 17506) +++ trunk/reactos/tools/rbuild/module.cpp 2005-08-24 06:01:02 UTC (rev 17507) @@ -38,7 +38,7 @@ p = p2 + find.size(); } if ( *p ) - ret += *p; + ret += p; return ret; }
19 years, 4 months
1
0
0
0
[royce] 17506: almost done converting _generate_dsp(), but have to quit for the night, so commiting what's done so far.
by royce@svn.reactos.com
almost done converting _generate_dsp(), but have to quit for the night, so commiting what's done so far. Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.h Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.h --- trunk/reactos/tools/rbuild/backend/msvc/msvc.h 2005-08-24 05:50:21 UTC (rev 17505) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.h 2005-08-24 05:58:14 UTC (rev 17506) @@ -64,6 +64,8 @@ // functions in msvcmaker.cpp: + void _generate_dsp ( FILE* OUT, const std::string& moduleName ); + void _generate_dsw_header ( FILE* OUT ); void _generate_dsw_project ( _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 05:50:21 UTC (rev 17505) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 05:58:14 UTC (rev 17506) @@ -9,248 +9,334 @@ #include "msvc.h" +using std::string; +using std::vector; + #if 0 - -void _generate_dsp ( FILE* OUT, const string& module ) +void +MSVCBackend::_generate_dsp ( FILE* OUT, const std::string& moduleName ) { - my $dsp_file = modules[module]->{dsp_file}; - my $project = modules[module]->{project}; - my @imports = @{modules[module]->{imports}}; + size_t i; - my $lib = (modules[module]->{type} eq "lib"); - my $dll = (modules[module]->{type} eq "dll"); - my $exe = (modules[module]->{type} eq "exe"); + Module& module = *ProjectNode.LocateModule ( moduleName ); - my $console = $exe; # FIXME: Not always correct + std::string dsp_file = DspFileName(module); + my @imports = @{module->{imports}}; - my $msvc_wine_dir = do + bool lib = (module->{type} eq "lib"); + my $dll = (module->{type} eq "dll"); + my $exe = (module->{type} eq "exe"); + + my $console = $exe; # FIXME: Not always correct + + // TODO FIXME - not sure if the count here is right... + int parts = 1; + const char* p = strchr ( dsp_file.c_str(), '/' ); + while ( p ) { - my @parts = split(m%/%, $dsp_file); - if($#parts == 1) { - ".." ); - } elsif($#parts == 2) { - "..\\.." ); - } else { - "..\\..\\.." ); - } - }; - my $wine_include_dir = "$msvc_wine_dir\\include" ); + ++parts; + p = strchr ( p+1, '/' ); + } + std::string msvc_wine_dir = ".."; + while ( parts-- ) + msvc_wine_dir += "\\.."; - $progress_current++; - $output->progress("$dsp_file (file $progress_current of $progress_max)"); + std::string wine_include_dir = msvc_wine_dir + "\\include"; - my @c_srcs = @{modules[module]->{c_srcs}}; - my @source_files = @{modules[module]->{source_files}}; - my @header_files = @{modules[module]->{header_files}}; - my @resource_files = @{modules[module]->{resource_files}}; + //$progress_current++; + //$output->progress("$dsp_file (file $progress_current of $progress_max)"); - if ($project !~ /^wine(?:_unicode|build|runtests|test)?$/ && - $project !~ /^(?:gdi32)_.+?$/ && - $project !~ /_test$/) - { + my @c_srcs = @{module->{c_srcs}}; + my @source_files = @{module->{source_files}}; + // TODO FIXME - we don't include header files in our build system + //my @header_files = @{module->{header_files}}; + vector<string> header_files; + my @resource_files = @{module->{resource_files}}; + + if (module.name !~ /^wine(?:_unicode|build|runtests|test)?$/ && + module.name !~ /^(?:gdi32)_.+?$/ && + module.name !~ /_test$/) + { push @source_files, "$project.spec" ); - # push @source_files, "$project.spec.c" ); @source_files = sort(@source_files); - } + } - my $no_cpp = 1; - my $no_msvc_headers = 1; - if ($project =~ /^wine(?:runtests|test)$/ || $project =~ /_test$/) { - $no_msvc_headers = 0; - } + bool no_cpp = true; + bool no_msvc_headers = true; + if (module.name =~ /^wine(?:runtests|test)$/ + || module.name =~ /_test$/) + { + no_msvc_headers = false; + } - my @cfgs; + std::vector<std::string> cfgs; - push @cfgs, "$project - Win32" ); + cfgs.push_back ( module.name + " - Win32" ); - if (!$no_cpp) { - my @_cfgs; - foreach my $cfg (@cfgs) { - push @_cfgs, "$cfg C" ); - push @_cfgs, "$cfg C++" ); + if (!no_cpp) + { + std::vector<std::string> _cfgs; + for ( i = 0; i < cfgs.size(); i++ ) + { + _cfgs.push_back ( cfgs[i] + " C" ); + _cfgs.push_back ( cfgs[i] + " C++" ); } - @cfgs = @_cfgs; - } + cfgs.resize(0); + cfgs = _cfgs; + } - if (!$no_release) { - my @_cfgs; - foreach my $cfg (@cfgs) { - push @_cfgs, "$cfg Debug" ); - push @_cfgs, "$cfg Release" ); + if (!no_release) + { + std::vector<std::string> _cfgs; + for ( i = 0; i < cfgs.size(); i++ ) + { + _cfgs.push_back ( cfgs[i] + " Debug" ); + _cfgs.push_back ( cfgs[i] + " Release" ); } - @cfgs = @_cfgs; - } + cfgs.resize(0); + cfgs = _cfgs; + } - if (!$no_msvc_headers) { - my @_cfgs; - foreach my $cfg (@cfgs) { - push @_cfgs, "$cfg MSVC Headers" ); - push @_cfgs, "$cfg Wine Headers" ); + if (!no_msvc_headers) + { + std::vector<std::string> _cfgs; + for ( i = 0; i < cfgs.size(); i++ ) + { + _cfgs.push_back ( cfgs[i] + " MSVC Headers" ); + _cfgs.push_back ( cfgs[i] + " Wine Headers" ); } - @cfgs = @_cfgs; - } + cfgs.resize(0); + cfgs = _cfgs; + } - my $default_cfg = $cfgs[$#cfgs]; + string default_cfg = cfgs.back(); - fprintf ( OUT, "# Microsoft Developer Studio Project File - Name=\"$project\" - Package Owner=<4>\n" ); - fprintf ( OUT, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\n" ); - fprintf ( OUT, "# ** DO NOT EDIT **\n" ); - fprintf ( OUT, "\n" ); + fprintf ( OUT, "# Microsoft Developer Studio Project File - Name=\"%s\" - Package Owner=<4>\n", module.name.c_str() ); + fprintf ( OUT, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\n" ); + fprintf ( OUT, "# ** DO NOT EDIT **\n" ); + fprintf ( OUT, "\n" ); - if ($lib) { + if ( lib ) + { fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Static Library\" 0x0104\n" ); - } elsif ($dll) { + } + else if ( dll ) + { fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\n" ); - } else { + } + else + { fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Console Application\" 0x0103\n" ); - } - fprintf ( OUT, "\n" ); + } + fprintf ( OUT, "\n" ); - fprintf ( OUT, "CFG=$default_cfg\n" ); - fprintf ( OUT, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\n" ); - fprintf ( OUT, "!MESSAGE use the Export Makefile command and run\n" ); - fprintf ( OUT, "!MESSAGE \n" ); - fprintf ( OUT, "!MESSAGE NMAKE /f \"$project.mak\".\n" ); - fprintf ( OUT, "!MESSAGE \n" ); - fprintf ( OUT, "!MESSAGE You can specify a configuration when running NMAKE\n" ); - fprintf ( OUT, "!MESSAGE by defining the macro CFG on the command line. For example:\n" ); - fprintf ( OUT, "!MESSAGE \n" ); - fprintf ( OUT, "!MESSAGE NMAKE /f \"$project.mak\" CFG=\"$default_cfg\"\n" ); - fprintf ( OUT, "!MESSAGE \n" ); - fprintf ( OUT, "!MESSAGE Possible choices for configuration are:\n" ); - fprintf ( OUT, "!MESSAGE \n" ); - foreach my $cfg (@cfgs) { - if ($lib) { - fprintf ( OUT, "!MESSAGE \"$cfg\" (based on \"Win32 (x86) Static Library\")\n" ); - } elsif ($dll) { - fprintf ( OUT, "!MESSAGE \"$cfg\" (based on \"Win32 (x86) Dynamic-Link Library\")\n" ); - } else { - fprintf ( OUT, "!MESSAGE \"$cfg\" (based on \"Win32 (x86) Console Application\")\n" ); + fprintf ( OUT, "CFG=$default_cfg\n" ); + fprintf ( OUT, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\n" ); + fprintf ( OUT, "!MESSAGE use the Export Makefile command and run\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE NMAKE /f \"%s.mak\".\n", module.name.c_str() ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE You can specify a configuration when running NMAKE\n" ); + fprintf ( OUT, "!MESSAGE by defining the macro CFG on the command line. For example:\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE NMAKE /f \"%s.mak\" CFG=\"%s\"\n", module.name.c_str(), default_cfg.c_str() ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE Possible choices for configuration are:\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + for ( i = 0; i < cfgs.size(); i++ ) + { + string& cfg = cfgs[i]; + if ( lib ) + { + fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Static Library\")\n", cfg.c_str() ); } - } - fprintf ( OUT, "!MESSAGE \n" ); - fprintf ( OUT, "\n" ); + else if ( dll ) + { + fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Dynamic-Link Library\")\n", cfg.c_str() ); + } + else + { + fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Console Application\")\n", cfg.c_str() ); + } + } + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "\n" ); - fprintf ( OUT, "# Begin Project\n" ); - fprintf ( OUT, "# PROP AllowPerConfigDependencies 0\n" ); - fprintf ( OUT, "# PROP Scc_ProjName \"\"\n" ); - fprintf ( OUT, "# PROP Scc_LocalPath \"\"\n" ); - fprintf ( OUT, "CPP=cl.exe\n" ); - fprintf ( OUT, "MTL=midl.exe\n" if !$lib && !$exe; - fprintf ( OUT, "RSC=rc.exe\n" ); + fprintf ( OUT, "# Begin Project\n" ); + fprintf ( OUT, "# PROP AllowPerConfigDependencies 0\n" ); + fprintf ( OUT, "# PROP Scc_ProjName \"\"\n" ); + fprintf ( OUT, "# PROP Scc_LocalPath \"\"\n" ); + fprintf ( OUT, "CPP=cl.exe\n" ); + if ( !lib && !exe ) fprintf ( OUT, "MTL=midl.exe\n" ); + fprintf ( OUT, "RSC=rc.exe\n" ); - my $n = 0; + int n = 0; - my $output_dir; - foreach my $cfg (@cfgs) { - if($#cfgs == 0) { - # Nothing - } elsif($n == 0) { - fprintf ( OUT, "!IF \"\$(CFG)\" == \"$cfg\"\n" ); - fprintf ( OUT, "\n" ); - } else { - fprintf ( OUT, "\n" ); - fprintf ( OUT, "!ELSEIF \"\$(CFG)\" == \"$cfg\"\n" ); - fprintf ( OUT, "\n" ); + std::string output_dir; + for ( size_t icfg = 0; icfg < cfgs.size(); icfg++ ) + { + std::string& cfg = cfgs[icfg]; + if ( icfg ) + { + if ( n == 0 ) + { + fprintf ( OUT, "!IF \"\$(CFG)\" == \"%s\"\n", cfg.c_str() ); + fprintf ( OUT, "\n" ); + } + else + { + fprintf ( OUT, "\n" ); + fprintf ( OUT, "!ELSEIF \"\$(CFG)\" == \"%s\"\n", cfg.c_str() ); + fprintf ( OUT, "\n" ); + } } - my $debug = ($cfg !~ /Release/); - my $msvc_headers = ($cfg =~ /MSVC Headers/); + bool debug = !strstr ( cfg.c_str(), "Release" ); + bool msvc_headers = ( 0 != strstr ( cfg.c_str(), "MSVC Headers" ) ); fprintf ( OUT, "# PROP BASE Use_MFC 0\n" ); - if($debug) { + if ( debug ) + { fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 1\n" ); - } else { + } + else + { fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 0\n" ); } - $output_dir = $cfg; - $output_dir =~ s/^$project - //; - $output_dir =~ s/ /_/g; - $output_dir =~ s/C\+\+/Cxx/g; - if($output_prefix_dir) { - $output_dir = "$output_prefix_dir\\$output_dir" ); - } + output_dir = Replace(cfg,module.name + " - ",""); + output_dir = Replace(output_dir," ","_"); + output_dir = Replace(output_dir,"C++","Cxx"); + if ( output_prefix_dir.size() ) + output_dir = output_prefix_dir + "\\" + output_dir; - fprintf ( OUT, "# PROP BASE Output_Dir \"$output_dir\"\n" ); - fprintf ( OUT, "# PROP BASE Intermediate_Dir \"$output_dir\"\n" ); + fprintf ( OUT, "# PROP BASE Output_Dir \"%s\"\n", output_dir.c_str() ); + fprintf ( OUT, "# PROP BASE Intermediate_Dir \"%s\"\n", output_dir.c_str() ); fprintf ( OUT, "# PROP BASE Target_Dir \"\"\n" ); fprintf ( OUT, "# PROP Use_MFC 0\n" ); - if($debug) { + if ( debug ) + { fprintf ( OUT, "# PROP Use_Debug_Libraries 1\n" ); - } else { + } + else + { fprintf ( OUT, "# PROP Use_Debug_Libraries 0\n" ); } - fprintf ( OUT, "# PROP Output_Dir \"$output_dir\"\n" ); - fprintf ( OUT, "# PROP Intermediate_Dir \"$output_dir\"\n" ); + fprintf ( OUT, "# PROP Output_Dir \"%s\"\n", output_dir.c_str() ); + fprintf ( OUT, "# PROP Intermediate_Dir \"%s\"\n", output_dir.c_str() ); fprintf ( OUT, "# PROP Ignore_Export_Lib 0\n" if $dll; fprintf ( OUT, "# PROP Target_Dir \"\"\n" ); - my @defines; - if($debug) { - if($lib || $exe) { + vector<string> defines; + defines.push_back ( "WINVER=0x0501" ); + defines.push_back ( "_WIN32_WINNT=0x0501" ); + defines.push_back ( "_WIN32_IE=0x0600" ); + defines.push_back ( "WIN32" ); + defines.push_back ( "_WINDOWS" ); + defines.push_back ( "WIN32" ); + defines.push_back ( "_MBCS" ); + if ( debug ) + { + defines.push_back ( "_DEBUG" ); + if ( lib || exe ) + { fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od" ); - @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 _DEBUG _MBCS _LIB)); - } else { + defines.push_back ( "_LIB" ); + } + else + { fprintf ( OUT, "# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 _DEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); + defines.push_back ( "_WINDOWS" ); + defines.push_back ( "_USRDLL" ); + defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); } - } else { - if($lib || $exe) { + } + else + { + defines.push_back ( "NDEBUG" ); + if ( lib || exe ) + { fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /GX /O2" ); - @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 NDEBUG _MBCS _LIB)); - } else { + defines.push_back ( "_LIB" ); + } + else + { fprintf ( OUT, "# ADD BASE CPP /nologo /MT /W3 /GX /O2" ); - @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 NDEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); + defines.push_back ( "_WINDOWS" ); + defines.push_back ( "_USRDLL" ); + defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); } } - foreach my $define (@defines) { - fprintf ( OUT, " /D \"$define\"" ); + for ( i = 0; i < defines.size(); i++ ) + { + fprintf ( OUT, " /D \"%s\"", defines[i].c_str() ); } - fprintf ( OUT, " /YX" if $lib || $exe; + if ( lib || exe ) fprintf ( OUT, " /YX" ); fprintf ( OUT, " /FD" ); - fprintf ( OUT, " /GZ" if $debug; - fprintf ( OUT, " " if $debug && ($lib || $exe); + if ( debug ) + { + fprintf ( OUT, " /GZ" ); + if ( lib || exe ) fprintf ( OUT, " " ); + } fprintf ( OUT, " /c" ); fprintf ( OUT, "\n" ); - my @defines2; - if($debug) { - if($lib) { + vector<string> defines2; + defines2.push_back ( "WINVER=0x0501" ); + defines2.push_back ( "_WIN32_WINNT=0x0501" ); + defines2.push_back ( "_WIN32_IE=0x0600" ); + defines2.push_back ( "WIN32" ); + defines2.push_back ( "_WINDOWS" ); + defines2.push_back ( "_MBCS" ); + if(debug) + { + defines2.push_back ( "_DEBUG" ); + if(lib) + { fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 _DEBUG _WINDOWS _MBCS _LIB); - } else { + defines2.push_back ( "_LIB" ); + } + else + { fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 _DEBUG WIN32 _WINDOWS _MBCS _USRDLL); + defines2.push_back ( "_USRDLL" ); } - } else { - if($lib) { + } + else + { + defines2.push_back ( "NDEBUG" ); + if(lib) + { fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); - @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 NDEBUG _WINDOWS _MBCS _LIB); - } else { + defines2.push_back ( "_LIB" ); + } + else + { fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); - @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 NDEBUG WIN32 _WINDOWS _MBCS _USRDLL); + defines2.push_back ( "_USRDLL" ); } } - my @includes = (); - if($wine) { - push @defines2, "_\U${project}\E_" ); - push @defines2, qw(__WINESRC__) if $project !~ /^(?:wine(?:build|test)|.*?_test)$/; - if ($msvc_headers) { - push @defines2, qw(__WINE_USE_NATIVE_HEADERS); - } - my $output_dir2 = $output_dir; - $output_dir =~ s/\\/\\\\/g; - push @defines2, "__WINETEST_OUTPUT_DIR=\\\"$output_dir\\\"" ); - push @defines2, qw(__i386__ _X86_); + std::vector<std::string> includes; + if ( wine ) + { + defines2.push_back ( string("_\U") + module.name + "\E_" ); + if ( module.name !~ /^(?:wine(?:build|test)|.*?_test)$/ ) + defines2.push_back ( "__WINESRC__" ); + if ( msvc_headers ) + defines2.push_back ( "__WINE_USE_NATIVE_HEADERS" ); + string output_dir2 = Replace(output_dir,"\\","\\\\"); + defines2.push_back ( ssprintf("__WINETEST_OUTPUT_DIR=\\\"%s\\\"",output_dir.c_str()) ); + defines2.push_back ( "__i386__" ); + defines2.push_back ( "_X86_" ); - if($project =~ /^gdi32_(?:enhmfdrv|mfdrv)$/) { + // TODO FIXME - wine hacks? + /*if($project =~ /^gdi32_(?:enhmfdrv|mfdrv)$/) { push @includes, ".." ); } @@ -260,59 +346,78 @@ if (!$msvc_headers || $project eq "winetest") { push @includes, $wine_include_dir; - } + }*/ } - if($wine) { - foreach my $include (@includes) { - if ($include !~ /[\\\"]/) { - fprintf ( OUT, " /I \"$include\"" ); - } else { - fprintf ( OUT, " /I $include" ); + if ( wine ) + { + for ( i = 0; i < includes.size(); i++ ); + { + string& include = includes[i]; + if ( strpbrk ( include.c_str(), "[\\\"]" ) ) + { + fprintf ( OUT, " /I \"%s\"", include.c_str() ); } + else + { + fprintf ( OUT, " /I %s", include.c_str() ); + } } } - foreach my $define (@defines2) { - if ($define !~ /[\\\"]/) { - fprintf ( OUT, " /D \"$define\"" ); - } else { - fprintf ( OUT, " /D $define" ); + for ( i = 0; i < defines2.size(); i++ ) + { + string& define = defines2[i]; + if ( strpbrk ( define.c_str(), "[\\\"]" ) ) + { + fprintf ( OUT, " /D \"%s\"", define.c_str() ); } + else + { + fprintf ( OUT, " /D %s", define.c_str() ); + } } - fprintf ( OUT, " /D inline=__inline" if $wine; - fprintf ( OUT, " /D \"__STDC__\"" if 0 && $wine; + if ( wine ) fprintf ( OUT, " /D inline=__inline" ); + //fprintf ( OUT, " /D \"__STDC__\"" if 0 && $wine; - fprintf ( OUT, " /YX" if $lib; - fprintf ( OUT, " /FR" if !$lib; + fprintf ( OUT, lib ? " /YX" : " /FR" ); fprintf ( OUT, " /FD" ); - fprintf ( OUT, " /GZ" if $debug; - fprintf ( OUT, " " if $debug && $lib; + if ( debug ) fprintf ( OUT, " /GZ" ); + if ( debug && lib ) fprintf ( OUT, " " ); fprintf ( OUT, " /c" ); - fprintf ( OUT, " /TP" if !$no_cpp; + if ( !no_cpp ) fprintf ( OUT, " /TP" ); fprintf ( OUT, "\n" ); - if($debug) { + if ( debug ) + { fprintf ( OUT, "# SUBTRACT CPP /X /YX\n" if $dll; fprintf ( OUT, "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" if $dll; fprintf ( OUT, "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" if $dll; fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"_DEBUG\"\n" ); fprintf ( OUT, "# ADD RSC /l 0x41d" ); - if($wine) { - foreach my $include (@includes) { - fprintf ( OUT, " /i \"$include\"" ); + if ( wine ) + { + for ( i = 0; i < includes.size(); i++ ) + { + fprintf ( OUT, " /i \"%s\"", includes[i].c_str() ); } } fprintf ( OUT, " /d \"_DEBUG\"\n" ); - } else { - fprintf ( OUT, "# SUBTRACT CPP /YX\n" if $dll; - fprintf ( OUT, "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n" if $dll; - fprintf ( OUT, "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n" if $dll; + } + else + { + if ( dll ) + { + fprintf ( OUT, "# SUBTRACT CPP /YX\n" ); + fprintf ( OUT, "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n" ); + fprintf ( OUT, "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n" ); + } fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"NDEBUG\"\n" ); fprintf ( OUT, "# ADD RSC /l 0x41d" ); - if($wine) { - foreach my $include (@includes) { - fprintf ( OUT, " /i \"$include\"" ); + if ( wine ) + { + for ( i = 0; i < includes.size(); i++ ) + fprintf ( OUT, " /i \"%s\"", includes[i].c_str() ); } } fprintf ( OUT, "/d \"NDEBUG\"\n" ); @@ -321,139 +426,187 @@ fprintf ( OUT, "# ADD BASE BSC32 /nologo\n" ); fprintf ( OUT, "# ADD BSC32 /nologo\n" ); - if($exe || $dll) { + if ( exe || dll ) + { fprintf ( OUT, "LINK32=link.exe\n" ); fprintf ( OUT, "# ADD BASE LINK32 " ); my @libraries = qw(kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib); - foreach my $library (@libraries) { - fprintf ( OUT, "$library " ); + for ( i = 0; i < libraries.size(); i++ ) + { + fprintf ( OUT, "%s ", libraries[i].c_str() ); } fprintf ( OUT, " /nologo" ); - fprintf ( OUT, " /dll" if $dll; - fprintf ( OUT, " /subsystem:console" if $console; - fprintf ( OUT, " /debug" if $debug; + if ( dll ) fprintf ( OUT, " /dll" ); + if ( console ) fprintf ( OUT, " /subsystem:console" ); + if ( debug ) fprintf ( OUT, " /debug" ); fprintf ( OUT, " /machine:I386" ); - fprintf ( OUT, " /pdbtype:sept" if $debug; + if ( debug ) fprintf ( OUT, " /pdbtype:sept" ); fprintf ( OUT, "\n" ); fprintf ( OUT, "# ADD LINK32" ); fprintf ( OUT, " /nologo" ); - fprintf ( OUT, " libcmt.lib" if $project =~ /^ntdll$/; # FIXME: Kludge - foreach my $import (@imports) { - fprintf ( OUT, " $import.lib" if ($import ne "msvcrt"); + // TODO FIXME - do we need their kludge? + //fprintf ( OUT, " libcmt.lib" if $project =~ /^ntdll$/; # FIXME: Kludge + for ( i = 0; i < imports.size(); i++ ) + { + const string& import = imports[i]; + if ( import != "msvcrt" ) + fprintf ( OUT, " %s.lib", import.c_str() ); } - fprintf ( OUT, " /dll" if $dll; - fprintf ( OUT, " /subsystem:console" if $console; - fprintf ( OUT, " /debug" if $debug; + if ( dll ) fprintf ( OUT, " /dll" ); + if ( console ) fprintf ( OUT, " /subsystem:console" ); + if ( debug ) fprintf ( OUT, " /debug" ); fprintf ( OUT, " /machine:I386" ); - fprintf ( OUT, " /nodefaultlib" if $project =~ /^ntdll$/; # FIXME: Kludge - fprintf ( OUT, " /def:\"$project.def\"" if $dll; - fprintf ( OUT, " /pdbtype:sept" if $debug; + // TODO FIXME - do we need their kludge? + //fprintf ( OUT, " /nodefaultlib" if $project =~ /^ntdll$/; # FIXME: Kludge + if ( dll ) fprintf ( OUT, " /def:\"%s.def\"", module.name.c_str() ) + if ( debug ) fprintf ( OUT, " /pdbtype:sept" ); fprintf ( OUT, "\n" ); - } else { + } + else + { fprintf ( OUT, "LIB32=link.exe -lib\n" ); fprintf ( OUT, "# ADD BASE LIB32 /nologo\n" ); fprintf ( OUT, "# ADD LIB32 /nologo\n" ); } - $n++; - } + n++; + } - if($#cfgs != 0) { + if ( cfgs.size() != 0 ) + { fprintf ( OUT, "\n" ); fprintf ( OUT, "!ENDIF \n" ); fprintf ( OUT, "\n" ); - } + } - if ($project eq "winebuild") { + if ( module.name == "winebuild" ) + { fprintf ( OUT, "# Begin Special Build Tool\n" ); fprintf ( OUT, "SOURCE=\"\$(InputPath)\"\n" ); - fprintf ( OUT, "PostBuild_Desc=Copying wine.dll and wine_unicode.dll ...\n" ); + fprintf ( OUT, "PostBuild_Desc=Copying wine.dll and wine_unicode.dll ...\n" ); fprintf ( OUT, "PostBuild_Cmds=" ); fprintf ( OUT, "copy ..\\..\\library\\$output_dir\\wine.dll \$(OutDir)\t" ); fprintf ( OUT, "copy ..\\..\\unicode\\$output_dir\\wine_unicode.dll \$(OutDir)\n" ); fprintf ( OUT, "# End Special Build Tool\n" ); - } - fprintf ( OUT, "# Begin Target\n" ); - fprintf ( OUT, "\n" ); - foreach my $cfg (@cfgs) { - fprintf ( OUT, "# Name \"$cfg\"\n" ); - } + } + fprintf ( OUT, "# Begin Target\n" ); + fprintf ( OUT, "\n" ); + for ( i = 0; i < cfgs.size(); i++ ) + { + fprintf ( OUT, "# Name \"%s\"\n", cfgs[i].c_str() ); + } - fprintf ( OUT, "# Begin Group \"Source Files\"\n" ); - fprintf ( OUT, "\n" ); - fprintf ( OUT, "# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\n" ); + fprintf ( OUT, "# Begin Group \"Source Files\"\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\n" ); - foreach my $source_file (@source_files) { - $source_file =~ s%/%\\%g; - if($source_file !~ /^\./) { - $source_file = ".\\$source_file" ); + for ( i = 0; i < source_files.size(); i++ ) + { + string source_file = DosSeparators(source_files[i]); + + if ( strncmp ( source_file.c_str(), ".\\", 2 ) ) + { + source_file = string(".\\") + source_file ); } - if($source_file =~ /^(.*?)\.spec$/) { - my $basename = $1; + if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) + { + string basename = string ( source_file, source_file.size() - 5 ); - $basename = "$basename.dll" if $basename !~ /\..{1,3}$/; - my $dbg_c_file = "$basename.dbg.c" ); + if ( $basename !~ /\..{1,3}$/; ) basename += string(".dll"); + string dbg_c_file = basename + ".dbg.c"; fprintf ( OUT, "# Begin Source File\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "SOURCE=$dbg_c_file\n" ); + fprintf ( OUT, "SOURCE=%s\n", dbg_c_file.c_str() ); fprintf ( OUT, "# End Source File\n" ); } fprintf ( OUT, "# Begin Source File\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "SOURCE=$source_file\n" ); + fprintf ( OUT, "SOURCE=%s\n", source_file.c_str() ); - if($source_file =~ /^(.*?)\.spec$/) { - my $basename = $1; + if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) + { + string basename = string ( source_file, source_file.size() - 5 ); - my $spec_file = $source_file; - my $def_file = "$basename.def" ); + string spec_file = source_file; + string def_file = basename + ".def"; - $basename = "$basename.dll" if $basename !~ /\..{1,3}$/; - my $dbg_file = "$basename.dbg" ); - my $dbg_c_file = "$basename.dbg.c" ); + if ( $basename !~ /\..{1,3}$/; ) basename += ".dll"; + string dbg_file = basename + ".dbg"; + string dbg_c_file = basename + ".dbg.c"; - my $srcdir = "." ); # FIXME: Is this really always correct? + string srcdir = "."; // FIXME: Is this really always correct? fprintf ( OUT, "# Begin Custom Build\n" ); - fprintf ( OUT, "InputPath=$spec_file\n" ); + fprintf ( OUT, "InputPath=%s\n", spec_file.c_str() ); fprintf ( OUT, "\n" ); fprintf ( OUT, "BuildCmds= \\\n" ); - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe --def $spec_file > $def_file \\\n" ); + fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe --def %s > %s \\\n", + output_dir.c_str(), + spec_file.c_str(), + def_file.c_str() ); - if($project =~ /^ntdll$/) { - my $n = 0; - foreach my $c_src (@c_srcs) { - if($n++ > 0) { - fprintf ( OUT, "\techo $c_src >> $dbg_file \\\n" ); - } else { - fprintf ( OUT, "\techo $c_src > $dbg_file \\\n" ); + if ( module.name =~ /^ntdll$/ ) + { + int n = 0; + for ( i = 0; i < c_srcs.size(); i++ ) + { + const string& c_src = c_srcs[i]; + if(n++ > 0) + { + fprintf ( OUT, "\techo %s >> %s \\\n", c_src.c_str(), dbg_file.c_str() ); } + else + { + fprintf ( OUT, "\techo %s > %s \\\n", c_src.c_str(), dbg_file.c_str() ); + } } - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe" ); - fprintf ( OUT, " -o $dbg_c_file --debug -C$srcdir $dbg_file \\\n" ); - } else { - my $c_srcs = join(" ", grep(/\.c$/, @c_srcs)); + fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe", + output_dir.c_str() ); + fprintf ( OUT, " -o %s --debug -C%s %s \\\n", + dbg_c_file.c_str(), + srcdir.c_str(), + dbg_file.c_str() ); + } + else + { + string sc_srcs; + for ( i = 0; i < c_srcs.size(); i++ ) + { + const string& c_src = c_srcs[i]; + if ( !strcmp ( &c_src[c_src.size()-2], ".c" ) ) + { + if ( sc_srcs.size() ) + sc_srcs += " "; + sc_srcs += c_src; + } + } - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe" ); - fprintf ( OUT, " -o $dbg_c_file --debug -C$srcdir $c_srcs \\\n" ); + fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe", + output_dir.c_str() ); + fprintf ( OUT, " -o %s --debug -C%s %s \\\n", + dbg_c_file.c_str(), + srcdir.c_str(), + sc_srcs.c_str() ); } fprintf ( OUT, "\t\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "\"$def_file\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n" ); + fprintf ( OUT, "\"%s\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n", def_file.c_str() ); fprintf ( OUT, " \$(BuildCmds)\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "\"$dbg_c_file\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n" ); + fprintf ( OUT, "\"%s\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n", dbg_c_file.c_str() ); fprintf ( OUT, " \$(BuildCmds)\n" ); fprintf ( OUT, "# End Custom Build\n" ); - } elsif($source_file =~ /([^\\]*?\.h)$/) { + } + /*else if ( source_file =~ /([^\\]*?\.h)$/ ) + { my $h_file = $1; foreach my $cfg (@cfgs) { @@ -477,54 +630,59 @@ } fprintf ( OUT, "# Begin Custom Build\n" ); - fprintf ( OUT, "OutDir=$output_dir\n" ); - fprintf ( OUT, "InputPath=$source_file\n" ); + fprintf ( OUT, "OutDir=%s\n", output_dir.c_str() ); + fprintf ( OUT, "InputPath=%s\n", source_file.c_str() ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "\"\$(OutDir)\\wine\\$h_file\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n" ); + fprintf ( OUT, "\"\$(OutDir)\\wine\\%s\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n", h_file.c_str() ); fprintf ( OUT, "\tcopy \"\$(InputPath)\" \"\$(OutDir)\\wine\"\n" ); fprintf ( OUT, "\n" ); fprintf ( OUT, "# End Custom Build\n" ); } - if($#cfgs != 0) { + if ( cfgs.size() != 0) + { fprintf ( OUT, "\n" ); fprintf ( OUT, "!ENDIF \n" ); fprintf ( OUT, "\n" ); } - } + }*/ fprintf ( OUT, "# End Source File\n" ); - } - fprintf ( OUT, "# End Group\n" ); + } + fprintf ( OUT, "# End Group\n" ); - fprintf ( OUT, "# Begin Group \"Header Files\"\n" ); - fprintf ( OUT, "\n" ); - fprintf ( OUT, "# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\n" ); - foreach my $header_file (@header_files) { + fprintf ( OUT, "# Begin Group \"Header Files\"\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\n" ); + for ( i = 0; i < header_files.size(); i++ ) + { + const string& header_file = header_files[i]; fprintf ( OUT, "# Begin Source File\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "SOURCE=.\\$header_file\n" ); + fprintf ( OUT, "SOURCE=.\\%s\n", header_file.c_str() ); fprintf ( OUT, "# End Source File\n" ); - } - fprintf ( OUT, "# End Group\n" ); + } + fprintf ( OUT, "# End Group\n" ); - fprintf ( OUT, "# Begin Group \"Resource Files\"\n" ); - fprintf ( OUT, "\n" ); - fprintf ( OUT, "# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\n" ); - foreach my $resource_file (@resource_files) { + fprintf ( OUT, "# Begin Group \"Resource Files\"\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\n" ); + for ( i = 0; i < resource_files.size(); i++ ) + { + const string& resource_file = resource_files[i]; fprintf ( OUT, "# Begin Source File\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "SOURCE=.\\$resource_file\n" ); + fprintf ( OUT, "SOURCE=.\\%s\n", resource_file.c_str() ); fprintf ( OUT, "# End Source File\n" ); - } - fprintf ( OUT, "# End Group\n" ); + } + fprintf ( OUT, "# End Group\n" ); - fprintf ( OUT, "# End Target\n" ); - fprintf ( OUT, "# End Project\n" ); + fprintf ( OUT, "# End Target\n" ); + fprintf ( OUT, "# End Project\n" ); - close(OUT); + fclose(OUT); } #endif void @@ -599,7 +757,7 @@ { Module& module = *ProjectNode.modules[i]; - //my $project = modules[module]->{project}; + //my $project = module->{project}; std::string dsp_file = DspFileName ( module ); // TODO FIXME - more wine hacks?
19 years, 4 months
1
0
0
0
[royce] 17505: new helper function Replace()
by royce@svn.reactos.com
new helper function Replace() Modified: trunk/reactos/tools/rbuild/module.cpp Modified: trunk/reactos/tools/rbuild/rbuild.h _____ Modified: trunk/reactos/tools/rbuild/module.cpp --- trunk/reactos/tools/rbuild/module.cpp 2005-08-24 04:00:37 UTC (rev 17504) +++ trunk/reactos/tools/rbuild/module.cpp 2005-08-24 05:50:21 UTC (rev 17505) @@ -24,6 +24,25 @@ using std::vector; string +Replace ( const string& s, const string& find, const string& with ) +{ + string ret; + const char* p = s.c_str(); + while ( p ) + { + const char* p2 = strstr ( p, find.c_str() ); + if ( !p2 ) + break; + if ( p2 > p ) + ret += string ( p, p2-p ); + p = p2 + find.size(); + } + if ( *p ) + ret += *p; + return ret; +} + +string FixSeparator ( const string& s ) { string s2(s); _____ Modified: trunk/reactos/tools/rbuild/rbuild.h --- trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 04:00:37 UTC (rev 17504) +++ trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 05:50:21 UTC (rev 17505) @@ -739,6 +739,8 @@ std::string StripSymbol ( std::string symbol ); }; +extern std::string +Replace ( const std::string& s, const std::string& find, const std::string& with ); extern std::string FixSeparator ( const std::string& s );
19 years, 4 months
1
0
0
0
[royce] 17504: vc6 build files - just in case somebody else wants to use them
by royce@svn.reactos.com
vc6 build files - just in case somebody else wants to use them Added: trunk/reactos/tools/rbuild/rbuild.dsp Added: trunk/reactos/tools/rbuild/rbuild.dsw _____ Added: trunk/reactos/tools/rbuild/rbuild.dsp --- trunk/reactos/tools/rbuild/rbuild.dsp 2005-08-24 03:56:25 UTC (rev 17503) +++ trunk/reactos/tools/rbuild/rbuild.dsp 2005-08-24 04:00:37 UTC (rev 17504) @@ -0,0 +1,272 @@ +# Microsoft Developer Studio Project File - Name="rbuild" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=rbuild - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "rbuild.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "rbuild.mak" CFG="rbuild - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "rbuild - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "rbuild - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "rbuild - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "rbuild - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "rbuild - Win32 Release" +# Name "rbuild - Win32 Debug" +# Begin Group "backends" + +# PROP Default_Filter "" +# Begin Group "devcpp" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\backend\devcpp\devcpp.cpp +# End Source File +# Begin Source File + +SOURCE=.\backend\devcpp\devcpp.h +# End Source File +# End Group +# Begin Group "msvc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\backend\msvc\genguid.cpp +# End Source File +# Begin Source File + +SOURCE=.\backend\msvc\msvc.cpp +# End Source File +# Begin Source File + +SOURCE=.\backend\msvc\msvc.h +# End Source File +# Begin Source File + +SOURCE=.\backend\msvc\msvcmaker.cpp +# End Source File +# End Group +# Begin Group "mingw" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\backend\mingw\mingw.cpp +# End Source File +# Begin Source File + +SOURCE=.\backend\mingw\mingw.h +# End Source File +# Begin Source File + +SOURCE=.\backend\mingw\modulehandler.cpp +# End Source File +# Begin Source File + +SOURCE=.\backend\mingw\modulehandler.h +# End Source File +# Begin Source File + +SOURCE=.\backend\mingw\pch_detection.h +# End Source File +# Begin Source File + +SOURCE=.\backend\mingw\proxymakefile.cpp +# End Source File +# End Group +# Begin Group "backend_sources" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\backend\backend.cpp +# End Source File +# End Group +# Begin Group "backend_headers" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\backend\backend.h +# End Source File +# End Group +# End Group +# Begin Group "rbuild_sources" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\automaticdependency.cpp +# End Source File +# Begin Source File + +SOURCE=.\bootstrap.cpp +# End Source File +# Begin Source File + +SOURCE=.\cdfile.cpp +# End Source File +# Begin Source File + +SOURCE=.\compilerflag.cpp +# End Source File +# Begin Source File + +SOURCE=.\configuration.cpp +# End Source File +# Begin Source File + +SOURCE=.\define.cpp +# End Source File +# Begin Source File + +SOURCE=.\exception.cpp +# End Source File +# Begin Source File + +SOURCE=.\filesupportcode.cpp +# End Source File +# Begin Source File + +SOURCE=.\include.cpp +# End Source File +# Begin Source File + +SOURCE=.\installfile.cpp +# End Source File +# Begin Source File + +SOURCE=.\linkerflag.cpp +# End Source File +# Begin Source File + +SOURCE=.\module.cpp +# End Source File +# Begin Source File + +SOURCE=.\project.cpp +# End Source File +# Begin Source File + +SOURCE=.\rbuild.cpp +# End Source File +# Begin Source File + +SOURCE=.\ssprintf.cpp +# End Source File +# Begin Source File + +SOURCE=.\stubbedcomponent.cpp +# End Source File +# Begin Source File + +SOURCE=.\testsupportcode.cpp +# End Source File +# Begin Source File + +SOURCE=.\wineresource.cpp +# End Source File +# Begin Source File + +SOURCE=.\XML.cpp +# End Source File +# End Group +# Begin Group "rbuild_headers" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\exception.h +# End Source File +# Begin Source File + +SOURCE=.\pch.h +# End Source File +# Begin Source File + +SOURCE=.\rbuild.h +# End Source File +# Begin Source File + +SOURCE=.\ssprintf.h +# End Source File +# Begin Source File + +SOURCE=.\test.h +# End Source File +# Begin Source File + +SOURCE=.\XML.h +# End Source File +# End Group +# End Target +# End Project Property changes on: trunk/reactos/tools/rbuild/rbuild.dsp ___________________________________________________________________ Name: svn:eol-style + CRLF _____ Added: trunk/reactos/tools/rbuild/rbuild.dsw --- trunk/reactos/tools/rbuild/rbuild.dsw 2005-08-24 03:56:25 UTC (rev 17503) +++ trunk/reactos/tools/rbuild/rbuild.dsw 2005-08-24 04:00:37 UTC (rev 17504) @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +####################################################################### ######## + +Project: "rbuild"=.\rbuild.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +####################################################################### ######## + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +####################################################################### ######## + Property changes on: trunk/reactos/tools/rbuild/rbuild.dsw ___________________________________________________________________ Name: svn:eol-style + CRLF
19 years, 4 months
1
0
0
0
[sedwards] 17503: remove a few of the Wine hacks
by sedwards@svn.reactos.com
remove a few of the Wine hacks Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 03:39:10 UTC (rev 17502) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 03:56:25 UTC (rev 17503) @@ -599,24 +599,9 @@ { Module& module = *ProjectNode.modules[i]; - // TODO FIXME - convert next line - I'm no perl/regex expert... - //next if $module =~ /(?:winetest\.lib|wineruntests\.exe|_test\.exe)$/; - //my $project = modules[module]->{project}; std::string dsp_file = DspFileName ( module ); - // TODO FIXME - the following look like wine-specific hacks - /*my @dependencies; - if($project =~ /^wine(?:_unicode)?$/) { - @dependencies = (); - } elsif($project =~ /^winebuild$/) { - @dependencies = ("wine", "wine_unicode"); - } elsif($project =~ /^(?:gdi32)_.+?$/) { - @dependencies = (); - } else { - @dependencies = ("wine", "wine_unicode", "winebuild"); - }*/ - // TODO FIXME - more wine hacks? /*if($project =~ /^gdi32$/) { foreach my $dir (@gdi32_dirs) {
19 years, 4 months
1
0
0
0
[royce] 17502: new top-level target 'msvc' to create msvc build files
by royce@svn.reactos.com
new top-level target 'msvc' to create msvc build files Modified: trunk/reactos/Makefile _____ Modified: trunk/reactos/Makefile --- trunk/reactos/Makefile 2005-08-24 03:38:20 UTC (rev 17501) +++ trunk/reactos/Makefile 2005-08-24 03:39:10 UTC (rev 17502) @@ -308,6 +308,10 @@ $(ECHO_RBUILD) $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) mingw +.PHONY: msvc +msvc: $(RBUILD_TARGET) + $(ECHO_RBUILD) + $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) msvc $(BUGCODES_H) $(BUGCODES_RC): $(WMC_TARGET) $(NTOSKRNL_MC) $(ECHO_WMC)
19 years, 4 months
1
0
0
0
[royce] 17501: import wine's "msvcmaker" perl script and begin converting it to C++ - so far it creates the DSW file.
by royce@svn.reactos.com
import wine's "msvcmaker" perl script and begin converting it to C++ - so far it creates the DSW file. Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.h Added: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp Modified: trunk/reactos/tools/rbuild/module.cpp Modified: trunk/reactos/tools/rbuild/rbuild.h Modified: trunk/reactos/tools/rbuild/rbuild.mak _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp 2005-08-24 03:18:13 UTC (rev 17500) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp 2005-08-24 03:38:20 UTC (rev 17501) @@ -56,22 +56,24 @@ void MSVCBackend::Process() { - bool exec = false; - const char rbuild_mingw[] = "output-i386\\tools\\rbuild\\rbuild.exe mingw"; + //bool exec = false; + //const char rbuild_mingw[] = "output-i386\\tools\\rbuild\\rbuild.exe mingw"; - string filename = ProjectNode.name + ".sln"; + string filename = ProjectNode.name + ".dsw"; cout << "Creating MSVC project: " << filename << endl; ProcessModules(); - m_devFile.open(filename.c_str()); + m_dswFile = fopen ( filename.c_str(), "w" ); - if(!m_devFile.is_open()) + if ( !m_dswFile ) { cout << "Could not open file." << endl; return; } + _generate_wine_dsw ( m_dswFile ); +#if 0 m_devFile << "Microsoft Visual Studio Solution File, Format Version 9.00" << endl; m_devFile << "# Visual C++ Express 2005" << endl; @@ -91,24 +93,24 @@ m_devFile << "EndGlobal" << endl; m_devFile << endl << endl; +#endif + fclose ( m_dswFile ); - m_devFile.close(); - gen_guid(); // The MSVC build still needs the mingw backend. - ProcessModules(); + //ProcessModules(); cout << "Done." << endl << endl; - cout << "Don't expect the MSVC backend to work yet. "<< endl << endl; + /*cout << "Don't expect the MSVC backend to work yet. "<< endl << endl; if(get_key("yn","Would you like to configure for a Mingw build as well? (y/n)") == 'y') { exec = spawn_new(rbuild_mingw); if (!exec) printf("\nError invoking rbuild\n"); - } + }*/ } void MSVCBackend::ProcessModules() @@ -140,7 +142,8 @@ void MSVCBackend::ProcessFile(string &filepath) { // Remove the .\ at the start of the filenames - filepath.erase(0, 2); + if ( filepath[0] == '.' && strchr ( "/\\", filepath[1] ) ) + filepath.erase(0, 2); if(!FileExists(filepath)) return; @@ -205,6 +208,7 @@ void MSVCBackend::OutputFolders() { +#if 0 m_devFile << "Folders="; for(size_t i = 0; i < m_folders.size(); i++) @@ -214,6 +218,7 @@ m_devFile << m_folders[i]; } +#endif } @@ -244,3 +249,11 @@ int exitcode = system ( command.c_str () ); return (exitcode == 0); } + +std::string +MSVCBackend::DspFileName ( const Module& module ) const +{ + return DosSeparator( + ReplaceExtension ( module.GetPath(), ".dsp" ) + ); +} _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.h --- trunk/reactos/tools/rbuild/backend/msvc/msvc.h 2005-08-24 03:18:13 UTC (rev 17500) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.h 2005-08-24 03:38:20 UTC (rev 17501) @@ -52,13 +52,29 @@ void OutputFolders(); void OutputFileUnits(); + + std::string DspFileName ( const Module& module ) const; std::vector<FileUnit> m_fileUnits; std::vector<std::string> m_folders; int m_unitCount; - std::ofstream m_devFile; + FILE* m_dswFile; + + // functions in msvcmaker.cpp: + + void _generate_dsw_header ( FILE* OUT ); + + void _generate_dsw_project ( + FILE* OUT, + const Module& module, + std::string dsp_file, + const std::vector<Dependency*>& dependencies ); + + void _generate_dsw_footer ( FILE* OUT ); + + void _generate_wine_dsw ( FILE* OUT ); }; #endif // __DEVCPP_H__ _____ Added: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 03:18:13 UTC (rev 17500) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 03:38:20 UTC (rev 17501) @@ -0,0 +1,635 @@ +#ifdef _MSC_VER +#pragma warning ( disable : 4786 ) +#endif//_MSC_VER + +#include <string> +#include <vector> + +#include <stdio.h> + +#include "msvc.h" + +#if 0 + +void _generate_dsp ( FILE* OUT, const string& module ) +{ + my $dsp_file = modules[module]->{dsp_file}; + my $project = modules[module]->{project}; + my @imports = @{modules[module]->{imports}}; + + my $lib = (modules[module]->{type} eq "lib"); + my $dll = (modules[module]->{type} eq "dll"); + my $exe = (modules[module]->{type} eq "exe"); + + my $console = $exe; # FIXME: Not always correct + + my $msvc_wine_dir = do + { + my @parts = split(m%/%, $dsp_file); + if($#parts == 1) { + ".." ); + } elsif($#parts == 2) { + "..\\.." ); + } else { + "..\\..\\.." ); + } + }; + my $wine_include_dir = "$msvc_wine_dir\\include" ); + + $progress_current++; + $output->progress("$dsp_file (file $progress_current of $progress_max)"); + + my @c_srcs = @{modules[module]->{c_srcs}}; + my @source_files = @{modules[module]->{source_files}}; + my @header_files = @{modules[module]->{header_files}}; + my @resource_files = @{modules[module]->{resource_files}}; + + if ($project !~ /^wine(?:_unicode|build|runtests|test)?$/ && + $project !~ /^(?:gdi32)_.+?$/ && + $project !~ /_test$/) + { + push @source_files, "$project.spec" ); + # push @source_files, "$project.spec.c" ); + @source_files = sort(@source_files); + } + + my $no_cpp = 1; + my $no_msvc_headers = 1; + if ($project =~ /^wine(?:runtests|test)$/ || $project =~ /_test$/) { + $no_msvc_headers = 0; + } + + my @cfgs; + + push @cfgs, "$project - Win32" ); + + if (!$no_cpp) { + my @_cfgs; + foreach my $cfg (@cfgs) { + push @_cfgs, "$cfg C" ); + push @_cfgs, "$cfg C++" ); + } + @cfgs = @_cfgs; + } + + if (!$no_release) { + my @_cfgs; + foreach my $cfg (@cfgs) { + push @_cfgs, "$cfg Debug" ); + push @_cfgs, "$cfg Release" ); + } + @cfgs = @_cfgs; + } + + if (!$no_msvc_headers) { + my @_cfgs; + foreach my $cfg (@cfgs) { + push @_cfgs, "$cfg MSVC Headers" ); + push @_cfgs, "$cfg Wine Headers" ); + } + @cfgs = @_cfgs; + } + + my $default_cfg = $cfgs[$#cfgs]; + + fprintf ( OUT, "# Microsoft Developer Studio Project File - Name=\"$project\" - Package Owner=<4>\n" ); + fprintf ( OUT, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\n" ); + fprintf ( OUT, "# ** DO NOT EDIT **\n" ); + fprintf ( OUT, "\n" ); + + if ($lib) { + fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Static Library\" 0x0104\n" ); + } elsif ($dll) { + fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\n" ); + } else { + fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Console Application\" 0x0103\n" ); + } + fprintf ( OUT, "\n" ); + + fprintf ( OUT, "CFG=$default_cfg\n" ); + fprintf ( OUT, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\n" ); + fprintf ( OUT, "!MESSAGE use the Export Makefile command and run\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE NMAKE /f \"$project.mak\".\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE You can specify a configuration when running NMAKE\n" ); + fprintf ( OUT, "!MESSAGE by defining the macro CFG on the command line. For example:\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE NMAKE /f \"$project.mak\" CFG=\"$default_cfg\"\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "!MESSAGE Possible choices for configuration are:\n" ); + fprintf ( OUT, "!MESSAGE \n" ); + foreach my $cfg (@cfgs) { + if ($lib) { + fprintf ( OUT, "!MESSAGE \"$cfg\" (based on \"Win32 (x86) Static Library\")\n" ); + } elsif ($dll) { + fprintf ( OUT, "!MESSAGE \"$cfg\" (based on \"Win32 (x86) Dynamic-Link Library\")\n" ); + } else { + fprintf ( OUT, "!MESSAGE \"$cfg\" (based on \"Win32 (x86) Console Application\")\n" ); + } + } + fprintf ( OUT, "!MESSAGE \n" ); + fprintf ( OUT, "\n" ); + + fprintf ( OUT, "# Begin Project\n" ); + fprintf ( OUT, "# PROP AllowPerConfigDependencies 0\n" ); + fprintf ( OUT, "# PROP Scc_ProjName \"\"\n" ); + fprintf ( OUT, "# PROP Scc_LocalPath \"\"\n" ); + fprintf ( OUT, "CPP=cl.exe\n" ); + fprintf ( OUT, "MTL=midl.exe\n" if !$lib && !$exe; + fprintf ( OUT, "RSC=rc.exe\n" ); + + my $n = 0; + + my $output_dir; + foreach my $cfg (@cfgs) { + if($#cfgs == 0) { + # Nothing + } elsif($n == 0) { + fprintf ( OUT, "!IF \"\$(CFG)\" == \"$cfg\"\n" ); + fprintf ( OUT, "\n" ); + } else { + fprintf ( OUT, "\n" ); + fprintf ( OUT, "!ELSEIF \"\$(CFG)\" == \"$cfg\"\n" ); + fprintf ( OUT, "\n" ); + } + + my $debug = ($cfg !~ /Release/); + my $msvc_headers = ($cfg =~ /MSVC Headers/); + + fprintf ( OUT, "# PROP BASE Use_MFC 0\n" ); + + if($debug) { + fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 1\n" ); + } else { + fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 0\n" ); + } + + $output_dir = $cfg; + $output_dir =~ s/^$project - //; + $output_dir =~ s/ /_/g; + $output_dir =~ s/C\+\+/Cxx/g; + if($output_prefix_dir) { + $output_dir = "$output_prefix_dir\\$output_dir" ); + } + + fprintf ( OUT, "# PROP BASE Output_Dir \"$output_dir\"\n" ); + fprintf ( OUT, "# PROP BASE Intermediate_Dir \"$output_dir\"\n" ); + + fprintf ( OUT, "# PROP BASE Target_Dir \"\"\n" ); + + fprintf ( OUT, "# PROP Use_MFC 0\n" ); + if($debug) { + fprintf ( OUT, "# PROP Use_Debug_Libraries 1\n" ); + } else { + fprintf ( OUT, "# PROP Use_Debug_Libraries 0\n" ); + } + fprintf ( OUT, "# PROP Output_Dir \"$output_dir\"\n" ); + fprintf ( OUT, "# PROP Intermediate_Dir \"$output_dir\"\n" ); + + fprintf ( OUT, "# PROP Ignore_Export_Lib 0\n" if $dll; + fprintf ( OUT, "# PROP Target_Dir \"\"\n" ); + + my @defines; + if($debug) { + if($lib || $exe) { + fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od" ); + @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 _DEBUG _MBCS _LIB)); + } else { + fprintf ( OUT, "# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); + @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 _DEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); + } + } else { + if($lib || $exe) { + fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /GX /O2" ); + @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 NDEBUG _MBCS _LIB)); + } else { + fprintf ( OUT, "# ADD BASE CPP /nologo /MT /W3 /GX /O2" ); + @defines = (qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 NDEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); + } + } + + foreach my $define (@defines) { + fprintf ( OUT, " /D \"$define\"" ); + } + fprintf ( OUT, " /YX" if $lib || $exe; + fprintf ( OUT, " /FD" ); + fprintf ( OUT, " /GZ" if $debug; + fprintf ( OUT, " " if $debug && ($lib || $exe); + fprintf ( OUT, " /c" ); + fprintf ( OUT, "\n" ); + + my @defines2; + if($debug) { + if($lib) { + fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); + @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 _DEBUG _WINDOWS _MBCS _LIB); + } else { + fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); + @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 _DEBUG WIN32 _WINDOWS _MBCS _USRDLL); + } + } else { + if($lib) { + fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); + @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 WIN32 NDEBUG _WINDOWS _MBCS _LIB); + } else { + fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); + @defines2 = qw(WINVER=0x0501 _WIN32_WINNT=0x0501 _WIN32_IE=0x0600 NDEBUG WIN32 _WINDOWS _MBCS _USRDLL); + } + } + + my @includes = (); + if($wine) { + push @defines2, "_\U${project}\E_" ); + push @defines2, qw(__WINESRC__) if $project !~ /^(?:wine(?:build|test)|.*?_test)$/; + if ($msvc_headers) { + push @defines2, qw(__WINE_USE_NATIVE_HEADERS); + } + my $output_dir2 = $output_dir; + $output_dir =~ s/\\/\\\\/g; + push @defines2, "__WINETEST_OUTPUT_DIR=\\\"$output_dir\\\"" ); + push @defines2, qw(__i386__ _X86_); + + if($project =~ /^gdi32_(?:enhmfdrv|mfdrv)$/) { + push @includes, ".." ); + } + + if ($project =~ /_test$/) { + push @includes, "$msvc_wine_dir\\$output_dir" ); + } + + if (!$msvc_headers || $project eq "winetest") { + push @includes, $wine_include_dir; + } + } + + if($wine) { + foreach my $include (@includes) { + if ($include !~ /[\\\"]/) { + fprintf ( OUT, " /I \"$include\"" ); + } else { + fprintf ( OUT, " /I $include" ); + } + } + } + + foreach my $define (@defines2) { + if ($define !~ /[\\\"]/) { + fprintf ( OUT, " /D \"$define\"" ); + } else { + fprintf ( OUT, " /D $define" ); + } + } + fprintf ( OUT, " /D inline=__inline" if $wine; + fprintf ( OUT, " /D \"__STDC__\"" if 0 && $wine; + + fprintf ( OUT, " /YX" if $lib; + fprintf ( OUT, " /FR" if !$lib; + fprintf ( OUT, " /FD" ); + fprintf ( OUT, " /GZ" if $debug; + fprintf ( OUT, " " if $debug && $lib; + fprintf ( OUT, " /c" ); + fprintf ( OUT, " /TP" if !$no_cpp; + fprintf ( OUT, "\n" ); + + if($debug) { + fprintf ( OUT, "# SUBTRACT CPP /X /YX\n" if $dll; + fprintf ( OUT, "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" if $dll; + fprintf ( OUT, "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" if $dll; + fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"_DEBUG\"\n" ); + fprintf ( OUT, "# ADD RSC /l 0x41d" ); + if($wine) { + foreach my $include (@includes) { + fprintf ( OUT, " /i \"$include\"" ); + } + } + fprintf ( OUT, " /d \"_DEBUG\"\n" ); + } else { + fprintf ( OUT, "# SUBTRACT CPP /YX\n" if $dll; + fprintf ( OUT, "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n" if $dll; + fprintf ( OUT, "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\n" if $dll; + fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"NDEBUG\"\n" ); + fprintf ( OUT, "# ADD RSC /l 0x41d" ); + if($wine) { + foreach my $include (@includes) { + fprintf ( OUT, " /i \"$include\"" ); + } + } + fprintf ( OUT, "/d \"NDEBUG\"\n" ); + } + fprintf ( OUT, "BSC32=bscmake.exe\n" ); + fprintf ( OUT, "# ADD BASE BSC32 /nologo\n" ); + fprintf ( OUT, "# ADD BSC32 /nologo\n" ); + + if($exe || $dll) { + fprintf ( OUT, "LINK32=link.exe\n" ); + fprintf ( OUT, "# ADD BASE LINK32 " ); + my @libraries = qw(kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg32.lib advapi32.lib shell32.lib ole32.lib + oleaut32.lib uuid.lib odbc32.lib odbccp32.lib); + foreach my $library (@libraries) { + fprintf ( OUT, "$library " ); + } + fprintf ( OUT, " /nologo" ); + fprintf ( OUT, " /dll" if $dll; + fprintf ( OUT, " /subsystem:console" if $console; + fprintf ( OUT, " /debug" if $debug; + fprintf ( OUT, " /machine:I386" ); + fprintf ( OUT, " /pdbtype:sept" if $debug; + fprintf ( OUT, "\n" ); + + fprintf ( OUT, "# ADD LINK32" ); + fprintf ( OUT, " /nologo" ); + fprintf ( OUT, " libcmt.lib" if $project =~ /^ntdll$/; # FIXME: Kludge + foreach my $import (@imports) { + fprintf ( OUT, " $import.lib" if ($import ne "msvcrt"); + } + fprintf ( OUT, " /dll" if $dll; + fprintf ( OUT, " /subsystem:console" if $console; + fprintf ( OUT, " /debug" if $debug; + fprintf ( OUT, " /machine:I386" ); + fprintf ( OUT, " /nodefaultlib" if $project =~ /^ntdll$/; # FIXME: Kludge + fprintf ( OUT, " /def:\"$project.def\"" if $dll; + fprintf ( OUT, " /pdbtype:sept" if $debug; + fprintf ( OUT, "\n" ); + } else { + fprintf ( OUT, "LIB32=link.exe -lib\n" ); + fprintf ( OUT, "# ADD BASE LIB32 /nologo\n" ); + fprintf ( OUT, "# ADD LIB32 /nologo\n" ); + } + + $n++; + } + + if($#cfgs != 0) { + fprintf ( OUT, "\n" ); + fprintf ( OUT, "!ENDIF \n" ); + fprintf ( OUT, "\n" ); + } + + if ($project eq "winebuild") { + fprintf ( OUT, "# Begin Special Build Tool\n" ); + fprintf ( OUT, "SOURCE=\"\$(InputPath)\"\n" ); + fprintf ( OUT, "PostBuild_Desc=Copying wine.dll and wine_unicode.dll ...\n" ); + fprintf ( OUT, "PostBuild_Cmds=" ); + fprintf ( OUT, "copy ..\\..\\library\\$output_dir\\wine.dll \$(OutDir)\t" ); + fprintf ( OUT, "copy ..\\..\\unicode\\$output_dir\\wine_unicode.dll \$(OutDir)\n" ); + fprintf ( OUT, "# End Special Build Tool\n" ); + } + fprintf ( OUT, "# Begin Target\n" ); + fprintf ( OUT, "\n" ); + foreach my $cfg (@cfgs) { + fprintf ( OUT, "# Name \"$cfg\"\n" ); + } + + fprintf ( OUT, "# Begin Group \"Source Files\"\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\n" ); + + foreach my $source_file (@source_files) { + $source_file =~ s%/%\\%g; + if($source_file !~ /^\./) { + $source_file = ".\\$source_file" ); + } + + if($source_file =~ /^(.*?)\.spec$/) { + my $basename = $1; + + $basename = "$basename.dll" if $basename !~ /\..{1,3}$/; + my $dbg_c_file = "$basename.dbg.c" ); + + fprintf ( OUT, "# Begin Source File\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "SOURCE=$dbg_c_file\n" ); + fprintf ( OUT, "# End Source File\n" ); + } + + fprintf ( OUT, "# Begin Source File\n" ); + fprintf ( OUT, "\n" ); + + fprintf ( OUT, "SOURCE=$source_file\n" ); + + if($source_file =~ /^(.*?)\.spec$/) { + my $basename = $1; + + my $spec_file = $source_file; + my $def_file = "$basename.def" ); + + $basename = "$basename.dll" if $basename !~ /\..{1,3}$/; + my $dbg_file = "$basename.dbg" ); + my $dbg_c_file = "$basename.dbg.c" ); + + my $srcdir = "." ); # FIXME: Is this really always correct? + + fprintf ( OUT, "# Begin Custom Build\n" ); + fprintf ( OUT, "InputPath=$spec_file\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "BuildCmds= \\\n" ); + fprintf ( OUT, "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe --def $spec_file > $def_file \\\n" ); + + if($project =~ /^ntdll$/) { + my $n = 0; + foreach my $c_src (@c_srcs) { + if($n++ > 0) { + fprintf ( OUT, "\techo $c_src >> $dbg_file \\\n" ); + } else { + fprintf ( OUT, "\techo $c_src > $dbg_file \\\n" ); + } + } + fprintf ( OUT, "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe" ); + fprintf ( OUT, " -o $dbg_c_file --debug -C$srcdir $dbg_file \\\n" ); + } else { + my $c_srcs = join(" ", grep(/\.c$/, @c_srcs)); + + fprintf ( OUT, "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe" ); + fprintf ( OUT, " -o $dbg_c_file --debug -C$srcdir $c_srcs \\\n" ); + } + + fprintf ( OUT, "\t\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "\"$def_file\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n" ); + fprintf ( OUT, " \$(BuildCmds)\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "\"$dbg_c_file\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n" ); + fprintf ( OUT, " \$(BuildCmds)\n" ); + fprintf ( OUT, "# End Custom Build\n" ); + } elsif($source_file =~ /([^\\]*?\.h)$/) { + my $h_file = $1; + + foreach my $cfg (@cfgs) { + if($#cfgs == 0) { + # Nothing + } elsif($n == 0) { + fprintf ( OUT, "!IF \"\$(CFG)\" == \"$cfg\"\n" ); + fprintf ( OUT, "\n" ); + } else { + fprintf ( OUT, "\n" ); + fprintf ( OUT, "!ELSEIF \"\$(CFG)\" == \"$cfg\"\n" ); + fprintf ( OUT, "\n" ); + } + + $output_dir = $cfg; + $output_dir =~ s/^$project - //; + $output_dir =~ s/ /_/g; + $output_dir =~ s/C\+\+/Cxx/g; + if($output_prefix_dir) { + $output_dir = "$output_prefix_dir\\$output_dir" ); + } + + fprintf ( OUT, "# Begin Custom Build\n" ); + fprintf ( OUT, "OutDir=$output_dir\n" ); + fprintf ( OUT, "InputPath=$source_file\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "\"\$(OutDir)\\wine\\$h_file\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n" ); + fprintf ( OUT, "\tcopy \"\$(InputPath)\" \"\$(OutDir)\\wine\"\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "# End Custom Build\n" ); + } + + if($#cfgs != 0) { + fprintf ( OUT, "\n" ); + fprintf ( OUT, "!ENDIF \n" ); + fprintf ( OUT, "\n" ); + } + } + + fprintf ( OUT, "# End Source File\n" ); + } + fprintf ( OUT, "# End Group\n" ); + + fprintf ( OUT, "# Begin Group \"Header Files\"\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\n" ); + foreach my $header_file (@header_files) { + fprintf ( OUT, "# Begin Source File\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "SOURCE=.\\$header_file\n" ); + fprintf ( OUT, "# End Source File\n" ); + } + fprintf ( OUT, "# End Group\n" ); + + + + fprintf ( OUT, "# Begin Group \"Resource Files\"\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\n" ); + foreach my $resource_file (@resource_files) { + fprintf ( OUT, "# Begin Source File\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "SOURCE=.\\$resource_file\n" ); + fprintf ( OUT, "# End Source File\n" ); + } + fprintf ( OUT, "# End Group\n" ); + + fprintf ( OUT, "# End Target\n" ); + fprintf ( OUT, "# End Project\n" ); + + close(OUT); +} +#endif +void +MSVCBackend::_generate_dsw_header ( FILE* OUT ) +{ + fprintf ( OUT, "Microsoft Developer Studio Workspace File, Format Version 6.00\n" ); + fprintf ( OUT, "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n" ); + fprintf ( OUT, "\n" ); +} + +void +MSVCBackend::_generate_dsw_project ( + FILE* OUT, + const Module& module, + std::string dsp_file, + const std::vector<Dependency*>& dependencies ) +{ + dsp_file = std::string(".\\") + dsp_file; + // TODO FIXME - what does next line do? + //$dsp_file =~ y%/%\\%; + + // TODO FIXME - must they be sorted? + //@dependencies = sort(@dependencies); + + fprintf ( OUT, "####################################################################### ########\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "Project: \"%s\"=%s - Package Owner=<4>\n", module.name.c_str(), dsp_file.c_str() ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "Package=<5>\n" ); + fprintf ( OUT, "{{{\n" ); + fprintf ( OUT, "}}}\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "Package=<4>\n" ); + fprintf ( OUT, "{{{\n" ); + for ( size_t i = 0; i < dependencies.size(); i++ ) + { + Dependency& dependency = *dependencies[i]; + fprintf ( OUT, " Begin Project Dependency\n" ); + fprintf ( OUT, " Project_Dep_Name %s\n", dependency.module.name.c_str() ); + fprintf ( OUT, " End Project Dependency\n" ); + } + fprintf ( OUT, "}}}\n" ); + fprintf ( OUT, "\n" ); +} + +void +MSVCBackend::_generate_dsw_footer ( FILE* OUT ) +{ + fprintf ( OUT, "####################################################################### ########\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "Global:\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "Package=<5>\n" ); + fprintf ( OUT, "{{{\n" ); + fprintf ( OUT, "}}}\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "Package=<3>\n" ); + fprintf ( OUT, "{{{\n" ); + fprintf ( OUT, "}}}\n" ); + fprintf ( OUT, "\n" ); + fprintf ( OUT, "####################################################################### ########\n" ); + fprintf ( OUT, "\n" ); +} + +void +MSVCBackend::_generate_wine_dsw ( FILE* OUT ) +{ + _generate_dsw_header(OUT); + // TODO FIXME - is it necessary to sort them? + for ( size_t i = 0; i < ProjectNode.modules.size(); i++ ) + //foreach my $module (sort(keys(%modules))) + { + Module& module = *ProjectNode.modules[i]; + + // TODO FIXME - convert next line - I'm no perl/regex expert... + //next if $module =~ /(?:winetest\.lib|wineruntests\.exe|_test\.exe)$/; + + //my $project = modules[module]->{project}; + std::string dsp_file = DspFileName ( module ); + + // TODO FIXME - the following look like wine-specific hacks + /*my @dependencies; + if($project =~ /^wine(?:_unicode)?$/) { + @dependencies = (); + } elsif($project =~ /^winebuild$/) { + @dependencies = ("wine", "wine_unicode"); + } elsif($project =~ /^(?:gdi32)_.+?$/) { + @dependencies = (); + } else { + @dependencies = ("wine", "wine_unicode", "winebuild"); + }*/ + + // TODO FIXME - more wine hacks? + /*if($project =~ /^gdi32$/) { + foreach my $dir (@gdi32_dirs) { + my $dir2 = $dir; + $dir2 =~ s%^.*?/([^/]+)$%$1%; + + my $module = "gdi32_$dir2"; + $module =~ s%/%_%g; + push @dependencies, $module; + } + }*/ + + _generate_dsw_project ( OUT, module, dsp_file, module.dependencies ); + } + _generate_dsw_footer ( OUT ); +} Property changes on: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native _____ Modified: trunk/reactos/tools/rbuild/module.cpp --- trunk/reactos/tools/rbuild/module.cpp 2005-08-24 03:18:13 UTC (rev 17500) +++ trunk/reactos/tools/rbuild/module.cpp 2005-08-24 03:38:20 UTC (rev 17501) @@ -37,6 +37,19 @@ } string +DosSeparator ( const string& s ) +{ + string s2(s); + char* p = strchr ( &s2[0], '/' ); + while ( p ) + { + *p++ = '\\'; + p = strchr ( p, '/' ); + } + return s2; +} + +string ReplaceExtension ( const string& filename, const string& newExtension ) _____ Modified: trunk/reactos/tools/rbuild/rbuild.h --- trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 03:18:13 UTC (rev 17500) +++ trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 03:38:20 UTC (rev 17501) @@ -744,6 +744,9 @@ FixSeparator ( const std::string& s ); extern std::string +DosSeparator ( const std::string& s ); + +extern std::string ReplaceExtension ( const std::string& filename, const std::string& newExtension ); _____ Modified: trunk/reactos/tools/rbuild/rbuild.mak --- trunk/reactos/tools/rbuild/rbuild.mak 2005-08-24 03:18:13 UTC (rev 17500) +++ trunk/reactos/tools/rbuild/rbuild.mak 2005-08-24 03:38:20 UTC (rev 17501) @@ -139,6 +139,7 @@ RBUILD_BACKEND_MSVC_BASE_SOURCES = $(addprefix $(RBUILD_MSVC_BASE_), \ genguid.cpp \ msvc.cpp \ + msvcmaker.cpp \ ) RBUILD_BACKEND_SOURCES = \ @@ -357,6 +358,10 @@ $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ +$(RBUILD_MSVC_INT_)msvcmaker.o: $(RBUILD_MSVC_BASE_)msvcmaker.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) + $(ECHO_CC) + ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ + $(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS) $(RBUILD_HEADERS) | $(RBUILD_OUT) $(ECHO_LD) ${host_gpp} $(RBUILD_TEST_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $@
19 years, 4 months
1
0
0
0
[royce] 17500: added some comments to illustrate the output of several path-related functions
by royce@svn.reactos.com
added some comments to illustrate the output of several path-related functions Modified: trunk/reactos/tools/rbuild/rbuild.h _____ Modified: trunk/reactos/tools/rbuild/rbuild.h --- trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 02:55:08 UTC (rev 17499) +++ trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 03:18:13 UTC (rev 17500) @@ -245,11 +245,11 @@ bool HasImportLibrary () const; bool IsDLL () const; bool GenerateInOutputTree () const; - std::string GetTargetName () const; - std::string GetDependencyPath () const; - std::string GetBasePath () const; - std::string GetPath () const; - std::string GetPathWithPrefix ( const std::string& prefix ) const; + std::string GetTargetName () const; // "foo.exe" + std::string GetDependencyPath () const; // "path/foo.exe" or "path/libfoo.a" + std::string GetBasePath () const; // "path" + std::string GetPath () const; // "path/foo.exe" + std::string GetPathWithPrefix ( const std::string& prefix ) const; // "path/prefixfoo.exe" void GetTargets ( string_list& ) const; std::string GetInvocationTarget ( const int index ) const; bool HasFileWithExtension ( const IfableData&, const std::string& extension ) const;
19 years, 4 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
67
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200