]> gerrit.simantics Code Review - simantics/platform.git/blob - releng/org.simantics.sdk.build.targetdefinition/README.md
Mirrored CBI TPD tool and eclipse collections to simantics.org
[simantics/platform.git] / releng / org.simantics.sdk.build.targetdefinition / README.md
1 # Target platform definitions\r
2 \r
3 Simantics 1.31.0 migrated to Eclipse 4.7 Oxygen platform.\r
4 \r
5 At the same time [Obeo's Target Platform Definition DSL and Generator tool](https://github.com/mbarbero/fr.obeo.releng.targetplatform)\r
6 was taken into use for target platform definition. Later on the tool was moved to Eclipse\r
7 CBI (Common Build Infrastructure) as [Target Platform Definition DSL and Generator](https://github.com/eclipse-cbi/targetplatform-dsl)\r
8 which is what we are using right now.\r
9 \r
10 Please read the detailed installation and basic use instructions from the tool's website.\r
11 \r
12 To summarize, the basic idea is that the `.tpd` files are the canonical source\r
13 files for the actual target definition `.target` files. Always modify the `.tpd`\r
14 files and use *ALT+R* in the `.tpd` file editor or *CTRL+R* to generate the new\r
15 .target file and take it into use immediately.\r
16 \r
17 ## org.simantics.sdk.build.targetdefinition.tpd\r
18 \r
19 This is the platform definition used for building the Simantics SDK itself.\r
20 It does not include any of the parts of the org.simantics.sdk feature which\r
21 defines the contents of the Simantics SDK.\r
22 \r
23 Essentially it includes all required Eclipse components and other third-party\r
24 external components required for building the Simantics SDK.\r
25 \r
26 See ../org.simantics.sdk.build.p2.site/ for how some of the external third-party\r
27 libraries are bundled for use with the Simantics SDK.\r
28 \r
29 ## simantics.tpd\r
30 \r
31 Includes *org.simantics.sdk.build.targetdefinition.tpd*\r
32 and the Simantics SDK (i.e. org.simantics.sdk.feature.group & org.simantics.sdk.source.feature.group)\r
33 which is sourced from [http://www.simantics.org/download/<branch>/sdk/](http://www.simantics.org/download/<branch>/sdk/),\r
34 where `<branch>` is `master`, `release/x.y.z`, etc.\r
35 \r
36 Each platform repository branch can have its own separate download location online, e.g:\r
37 * [http://www.simantics.org/download/master/sdk/](http://www.simantics.org/download/master/sdk/)\r
38 * [http://www.simantics.org/download/release/1.28.0/sdk/](http://www.simantics.org/download/release/1.28.0/sdk/)\r
39 * [http://www.simantics.org/download/feature/scl/sdk/](http://www.simantics.org/download/feature/scl/sdk/)\r
40 * ...\r
41 \r
42 which the simantics.target definition then references to get the SDK bundles.\r
43 \r
44 Notice that the download site root location, e.g. [http://www.simantics.org/download/master/](http://www.simantics.org/download/master/) contains these same `.tpd` and `.target` files to\r
45 enable sourcing both files directly from an HTTP URL.\r
46 \r
47 `.tpd` files can contain `include` statements that include other `.tpd` files from a URL.\r
48 This greatly simplifies target definition by removing duplication from the their definitions. This is why \r
49 publishing them online per platform branch is also highly useful.\r
50 \r
51 On the other hand legacy Buckminster builds can source `.target` files from a URL, which is why publishing them online\r
52 per platform branch is useful.\r
53 \r
54 ## Building .target files from the command line\r
55 \r
56 There is an example of how to do this with Maven at [build/pom.xml)(build/pom.xml).\r
57 Essentially it sources the TPD tool and its required Eclipse parts from public P2\r
58 repositories and uses `tycho-eclipserun-plugin` to run the *tpd converter application*\r
59 to convert the `.tpd` file given as argument via `-Dtpd=tpd-path`.\r