[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 &quot;$(InputPath)&quot; /out &quot;$(IntDir)&quot;", src.c_str (), src.c_str () );
+						else
+							fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"midl.exe /sstub %s.c /header %s.h &quot;$(InputPath)&quot; /out &quot;$(IntDir)&quot;", src.c_str (), src.c_str () );
+
+						fprintf ( OUT, "&#x0D;&#x0A;");
+						fprintf ( OUT, "cl.exe /Od /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_WIN32_WINNT=0x502&quot; /D &quot;_UNICODE&quot; /D &quot;UNICODE&quot; /Gm /EHsc /RTC1 /MDd /Fo&quot;$(IntDir)\\%s.obj&quot; /W3 /c /Wp64 /ZI /TC &quot;$(IntDir)\\%s.c&quot; /nologo /errorReport:prompt", src.c_str (), src.c_str () ); 
+						fprintf ( OUT, "&#x0D;&#x0A;");
+						fprintf ( OUT, "lib.exe /OUT:&quot;$(OutDir)\\%s.lib&quot; &quot;$(IntDir)\\%s.obj&quot;&#x0D;&#x0A;\"\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