Merge pull request #166 from DOCGroup/elliottc/combined-custom
[MPC.git] / docs / html / WB26.html
blobb2b05d36f3bcf3ee0a2052a6e4fdce5b885b6c51
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
6 <meta http-equiv="Content-Style-Type" content="text/css">
7 <link rel="STYLESHEET" href="MakeProjectCreator.css" charset="ISO-8859-1"
8 type="text/css">
10 <title>MPC: WB26 Project Type</title>
11 </head>
13 <body>
14 <div>
15 <h1 class="Head1">WB26 Project Type documentation</h1>
17 <div>
18 <p>
19 Starting with ACE/TAO x.6.3 it is possible to generate project files
20 for the WindRiver Workbench version 2.6 (VxWorks 6.4). We have validated
21 the MPC support for the ACE lib, TAO libs and the TAO tests.
22 </p>
23 <p>With VxWorks we have to do a cross build. The first step is to setup a host
24 build, from this host build we use the gperf and TAO_IDL tools
25 in the cross build.
26 </p>
27 <p>The Workbench is using eclipse as framework and then has several
28 WindRiver specific extensions. Part of the generation done by
29 MPC is then specifically for the WindRiver tools, part is for the
30 eclipse environment. The Workbench uses the fixed project filenames
31 <code>.project</code>, <code>.wrproject</code>, and <code>.wrmakefile</code>.
32 In the <code>.project</code> file the files in the project are listed,
33 in the <code>.wrproject</code> the compiler and linker flags are
34 defined, and in the <code>.wrmakefile</code> the custom build rules
35 are defined, like triggering the IDL compiler.</p>
36 <p>By default the files are generated in the same directory as the MPC file.
37 When you have multiple projects in one directory you have to add
38 <code>-make_coexistence</code> to the invocation of <code>mwc.pl</code>
39 Then for each project a new subdirectory will be created to
40 store the files the workbench needs. If you run <code>mwc.pl -make_coexistence</code> from the
41 ACE_wrappers directory you will get a lot of subdirectories in your tree.
42 </p>
43 By default we generate for the flexible build support, when you want to use
44 standard build use <code>-value_template standard_build=1</code>.
45 </p>
46 <p>
47 To get a project with all dependencies create a new workspace file, f.e. vxworks.mwc
48 <pre>
49 workspace(vxworks) {
50 ace
51 TAO/tao
52 TAO/tests/Hello
54 </pre>
55 </p>
56 <p>
57 You should generate the project files
58 from a VxWorks development shell or should have executed the wrenv script. With x.6.4 or newer
59 you do execute:
60 <pre>
61 set ACE_ROOT=your_path
62 cd %ACE_ROOT%
63 perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -make_coexistence
64 </pre>
65 </p>
66 <p>
67 After you have generated the project files you have to import them
68 into your current Workbench workspace with the following steps
69 <itemize>
70 <item>Open the workbench</item>
71 <item>Select File, Import, General, Existing Projects into Workspace</item>
72 <item>Select your ACE_ROOT directory and let the Workbench search for projects</item>
73 <item>Select now the projects you want to import in the Projects list and select Finish</item>
74 <item>After importing close the workbench</item>
75 <item>Copy the prefs file to its location, see below</item>
76 <item>Start the workbench again</item>
77 </itemize>
78 </p>
79 <p>The build order of the projects is stored in an eclipse file that
80 is generated as workspace by the <code>wb26</code> generator. After
81 you have imported the projects into the Workbench close it and then
82 copy the generated <code>org.eclipse.core.resources.prefs</code> file to
83 the <code>.metadata\.plugins\org.eclipse.core.runtime\.settings</code>
84 directory of the Workbench and then restart the workbench again. Do note
85 that the build order can only be generated for the projects that are listed
86 in the MPC workspace. The other option is to use subprojects to which
87 you can enable with <code>-value_template enable_subprojects=1</code>. There is a bug
88 in Workbench 2.6/3.0 related to the build order, it is ignored if you use
89 <code>wrws_update</code> to build the workspace from the commandline.</p>
90 <p>When compiling TAO you need to have tao_idl and gperf available. You can copy tao_idl and
91 gperf manually to the ACE_wrappers\bin directory of your target build or you can specify an
92 alternative tao_idl when generating the workspace like below.
93 <pre>
94 perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -value_template tao_idl=$(HOST_TAO_IDL)
95 perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -value_template tao_idl=c:\tmp\tao_idl
96 </pre>
97 </p>
98 <p>When using the <code>-expand_vars</code> by default only the environment variables which match
99 the wildcard <code>*_ROOT</code> are expanded. If you want to get other environment variables expanded (like <code>WIND_BASE</code>)
100 you can specify these through the <code>-relative</code> argument or use a file that you specify with <code>
101 -relative_file</code>. For example you can use the following relative_file which expands the environment variables
102 listed.
103 <pre>
104 *_ROOT
105 TAO_ROOT, $ACE_ROOT/TAO
106 CIAO_ROOT, $TAO_ROOT/CIAO
107 *_BASE
108 </pre>
109 </p>
111 We do have some limitations at this moment because of restrictions in MPC or the Workbench. We are working
112 on resolving the MPC restrictions, the Workbench restrictions have been reported to WindRiver and are already
113 converted to enhancement requests. It is important to get these enhancement requests implemented by
114 WindRiver. As user you can have impact on the importancy of these enhancement requests, create a new TSR
115 for WindRiver and ask WindRiver to implement these enhancement requests. Pleas let us know that you have
116 done this so that we can inform our local WindRiver contacts. We also have a large list of POSIX enhancement
117 requests, if you are interested in more POSIX compliance contact us to get this list.
118 <itemize>
119 <item>You need to close the workbench when generating the project files. The WB doesn't detect that the .project/.wrproject/org.eclipse.core.resources.prefs files got changed on disk (WIND00116553)</item>
120 <item>You need to import, close, and then change the build order file (WIND00116553)</item>
121 <item>When using includes/recursive_includes do not use . as path, but an environment variable which can be expanded to a full path (combined WB/MPC restriction)</item>
122 <item>We need to generate full paths in the .project file because WB doesn't support relative files like ../MyHeader.h (WIND00116641)</item>
123 <item>There is no dependency between the IDL file and the resulting *C.{h,cpp,inl} and *S.{h,cpp,inl} files. This is because the IDL compiler
124 can't be integrated a real build tool because a custom clean step can't be defined (WIND00117037)</item>
125 </itemize>
126 </p>
128 </div>
129 <hr>
131 </body> </html>