[ros-diffs] [janderwald] 22508: implement IDL compilation, generation of client/server stubs and creating import library of it hurray :-)
janderwald at svn.reactos.org
janderwald at svn.reactos.org
Thu Jun 22 22:49:18 CEST 2006
Author: janderwald
Date: Fri Jun 23 00:49:18 2006
New Revision: 22508
URL: http://svn.reactos.ru/svn/reactos?rev=22508&view=rev
Log:
implement IDL compilation, generation of client/server stubs and creating import library of it
hurray :-)
Modified:
trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp?rev=22508&r1=22507&r2=22508&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp (original)
+++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp Fri Jun 23 00:49:18 2006
@@ -75,7 +75,7 @@
vector<string> imports;
string module_type = GetExtension(module.GetTargetName());
- bool lib = (module.type == ObjectLibrary) || (module_type == ".lib") || (module_type == ".a");
+ bool lib = (module.type == ObjectLibrary) || (module.type == RpcClient) ||(module.type == RpcServer) || (module_type == ".lib") || (module_type == ".a");
bool dll = (module_type == ".dll") || (module_type == ".cpl");
bool exe = (module_type == ".exe") || (module_type == ".scr");
bool sys = (module_type == ".sys");
@@ -532,9 +532,23 @@
fprintf ( OUT, "\t\t\t\t\t<Tool\r\n" );
if (source_file.find(".idl") != string::npos)
{
- fprintf ( OUT, "\t\t\t\t\t\tName=\"VCMIDLTool\"\r\n" );
- fprintf ( OUT, "\t\t\t\t\t\tHeaderFileName=\"$(InputName).h\"\r\n" );
- fprintf ( OUT, "\t\t\t\t\t\tOutputDirectory=\"$(IntDir)\"/>\r\n" );
+ string src = source_file.substr (0, source_file.find(".idl"));
+
+ if ( src.find (".\\") != string::npos )
+ src.erase (0, 2);
+
+ fprintf ( OUT, "\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n" );
+
+ if ( module.type == RpcClient )
+ fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"midl.exe /cstub %s.c /header %s.h "$(InputPath)" /out "$(IntDir)"", src.c_str (), src.c_str () );
+ else
+ fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"midl.exe /sstub %s.c /header %s.h "$(InputPath)" /out "$(IntDir)"", src.c_str (), src.c_str () );
+
+ fprintf ( OUT, "
");
+ fprintf ( OUT, "cl.exe /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WIN32_WINNT=0x502" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"$(IntDir)\\%s.obj" /W3 /c /Wp64 /ZI /TC "$(IntDir)\\%s.c" /nologo /errorReport:prompt", src.c_str (), src.c_str () );
+ fprintf ( OUT, "
");
+ fprintf ( OUT, "lib.exe /OUT:"$(OutDir)\\%s.lib" "$(IntDir)\\%s.obj"
\"\r\n", module.name.c_str (), src.c_str () );
+ fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(IntDir)\\$(InputName).obj\"/>\r\n" );
}
else if ((source_file.find(".asm") != string::npos || tolower(source_file.at(source_file.size() - 1)) == 's'))
{
More information about the Ros-diffs
mailing list