|
1100 | 1100 | sources |
1101 | 1101 | </a> |
1102 | 1102 |
|
| 1103 | +</li> |
| 1104 | + |
| 1105 | + <li class="md-nav__item"> |
| 1106 | + <a href="#sourcesubdirectory" class="md-nav__link"> |
| 1107 | + sourceSubdirectory |
| 1108 | + </a> |
| 1109 | + |
1103 | 1110 | </li> |
1104 | 1111 |
|
1105 | 1112 | <li class="md-nav__item"> |
|
1149 | 1156 | unitName |
1150 | 1157 | </a> |
1151 | 1158 |
|
| 1159 | +</li> |
| 1160 | + |
| 1161 | + <li class="md-nav__item"> |
| 1162 | + <a href="#unitsubdirectory" class="md-nav__link"> |
| 1163 | + unitSubdirectory |
| 1164 | + </a> |
| 1165 | + |
1152 | 1166 | </li> |
1153 | 1167 |
|
1154 | 1168 | <li class="md-nav__item"> |
|
1765 | 1779 | sources |
1766 | 1780 | </a> |
1767 | 1781 |
|
| 1782 | +</li> |
| 1783 | + |
| 1784 | + <li class="md-nav__item"> |
| 1785 | + <a href="#sourcesubdirectory" class="md-nav__link"> |
| 1786 | + sourceSubdirectory |
| 1787 | + </a> |
| 1788 | + |
1768 | 1789 | </li> |
1769 | 1790 |
|
1770 | 1791 | <li class="md-nav__item"> |
|
1814 | 1835 | unitName |
1815 | 1836 | </a> |
1816 | 1837 |
|
| 1838 | +</li> |
| 1839 | + |
| 1840 | + <li class="md-nav__item"> |
| 1841 | + <a href="#unitsubdirectory" class="md-nav__link"> |
| 1842 | + unitSubdirectory |
| 1843 | + </a> |
| 1844 | + |
1817 | 1845 | </li> |
1818 | 1846 |
|
1819 | 1847 | <li class="md-nav__item"> |
@@ -1858,7 +1886,7 @@ <h1>Transformation Configurations</h1> |
1858 | 1886 | <p>A transformation configuration (or TC for short) contains all properties needed for transforming Art files into C++ code and for building the generated code into an application or a library. It is a text file in JavaScript format with the file extension .tcjs. Using JavaScript for defining build properties has many advantages. For example, it allows for <a href="../build-variants/#dynamic-transformation-configurations">dynamic properties</a> where the value is not a static value but computed dynamically by JavaScript code when the TC is built.</p> |
1859 | 1887 | <p>Code RealTime provides a dedicated language server for TCs to make them just as easy to work with as Art files. A <a href="#form-based-tc-editor">form-based editor</a> is also provided as an alternative.</p> |
1860 | 1888 | <h2 id="creating-transformation-configurations">Creating Transformation Configurations</h2> |
1861 | | -<p>To create a new TC select a file in the workspace folder that contains the Art files you want to transform to C++. Then invoke the command <strong>File - New File - Transformation Configuration</strong>. In the popup that appears specify the name of the TC or keep the suggested default name.</p> |
| 1889 | +<p>To create a new TC select a file in the workspace folder that contains the Art files you want to transform to C++. Then invoke the command <strong>File - New File - New Transformation Configuration</strong>. In the popup that appears specify the name of the TC or keep the suggested default name.</p> |
1862 | 1890 | <p><img alt="" src="../images/default-tc-name.png" /></p> |
1863 | 1891 | <p>A .tcjs file will be created with the minimal contents. Specify the mandatory <a href="#topcapsule">topCapsule</a> property (if you are building an executable) and any other <a href="#properties">properties</a> needed.</p> |
1864 | 1892 | <h2 id="setting-a-transformation-configuration-as-active">Setting a Transformation Configuration as Active</h2> |
@@ -2061,6 +2089,11 @@ <h2 id="properties">Properties</h2> |
2061 | 2089 | <td align="left">["*.art"]</td> |
2062 | 2090 | </tr> |
2063 | 2091 | <tr> |
| 2092 | +<td><a href="#sourcesubdirectory">sourceSubdirectory</a></td> |
| 2093 | +<td align="left">String</td> |
| 2094 | +<td align="left">N/A</td> |
| 2095 | +</tr> |
| 2096 | +<tr> |
2064 | 2097 | <td><a href="#targetconfiguration">targetConfiguration</a></td> |
2065 | 2098 | <td align="left">String</td> |
2066 | 2099 | <td align="left">Depends on current operating system</td> |
@@ -2096,6 +2129,11 @@ <h2 id="properties">Properties</h2> |
2096 | 2129 | <td align="left">"UnitName"</td> |
2097 | 2130 | </tr> |
2098 | 2131 | <tr> |
| 2132 | +<td><a href="#unitsubdirectory">unitSubdirectory</a></td> |
| 2133 | +<td align="left">String</td> |
| 2134 | +<td align="left">N/A</td> |
| 2135 | +</tr> |
| 2136 | +<tr> |
2099 | 2137 | <td><a href="#userlibraries">userLibraries</a></td> |
2100 | 2138 | <td align="left">List of strings</td> |
2101 | 2139 | <td align="left">[]</td> |
@@ -2197,6 +2235,10 @@ <h3 id="sources">sources</h3> |
2197 | 2235 | <p>You can find a sample application that has a TC with the "sources" property set <a href="https://github.com/secure-dev-ops/code-realtime/tree/main/art-comp-test/tests/tc_sources">here</a>.</p> |
2198 | 2236 | </div> |
2199 | 2237 | <p>The <code>sources</code> property can also be used to specify which regular (i.e. non-generated) C++ files that should be included in the build. See <a href="../build-cpp-files/#excluding-source-files">this chapter</a> for more information.</p> |
| 2238 | +<h3 id="sourcesubdirectory">sourceSubdirectory</h3> |
| 2239 | +<p>This property can be set to place generated source files into a sub folder within the <a href="#targetfolder">target folder</a>. It should be a string that is valid as the name of a folder.</p> |
| 2240 | +<pre><code class="language-js">tc.sourceSubdirectory = 'subdir'; |
| 2241 | +</code></pre> |
2200 | 2242 | <h3 id="targetconfiguration">targetConfiguration</h3> |
2201 | 2243 | <p>Specifies which <a href="../../target-rts/#target-configurations">TargetRTS configuration</a> to use. The TargetRTS location specified in the <a href="#targetrtslocation">targetRTSLocation</a> property defines valid values for this property. If this property is not specified, and the default TargetRTS location from the Code RealTime installation is used, then it will get a default value according to the operating system that is used. For Windows a MinGw-based configuration will be used, while for Linux a GCC-based configuration will be used.</p> |
2202 | 2244 | <pre><code class="language-js">tc.targetConfiguration = "WinT.x64-VisualC++-17.0"; |
@@ -2261,6 +2303,10 @@ <h3 id="topcapsule">topCapsule</h3> |
2261 | 2303 | <p>If you don't specify a value for this property, the TC will build a library instead of an executable.</p> |
2262 | 2304 | <h3 id="unitname">unitName</h3> |
2263 | 2305 | <p>Specifies the base name of the so called unit header and implementation files that are generated from the TC. By default the value of this property is <code>UnitName</code> which means that these unit files will be called <code>UnitName.cpp</code> and <code>UnitName.h</code>. The unit files contain certain information that applies to the whole unit of code that is generated from a TC. The header unit file is included by all files that are generated from the TC.</p> |
| 2306 | +<h3 id="unitsubdirectory">unitSubdirectory</h3> |
| 2307 | +<p>This property can be set to place the generated unit files (see <a href="#unitname">unitName</a>) into a sub folder within the <a href="#targetfolder">target folder</a>. It should be a string that is valid as the name of a folder.</p> |
| 2308 | +<pre><code class="language-js">tc.unitSubdirectory = 'unitSubDir'; |
| 2309 | +</code></pre> |
2264 | 2310 | <h3 id="userlibraries">userLibraries</h3> |
2265 | 2311 | <p>This property is a list of user libraries that should be linked with the application. The property is only applicable for TCs that build executables.</p> |
2266 | 2312 | <pre><code class="language-js">tc.userLibraries = ["../../libs/libMyLib.a"]; |
|
0 commit comments