]> gerrit.simantics Code Review - simantics/platform.git/blob - README.md
Add missing ValueType for G2D.Color
[simantics/platform.git] / README.md
1 ## Headless Builds
2
3 Official builds and testing of the platform are done with Maven.
4
5 To build the platform, run:
6 mvn package
7
8 or to run unit tests as well:
9 mvn verify
10
11 ## Development
12
13 ### Eclipse IDE Setup
14
15 It is generally recommended to using the latest Eclipse IDE release.
16
17 However, use of Eclipse IDE 2020-03 (4.15) release is not recommended
18 because of [JDT bug 561338](https://bugs.eclipse.org/bugs/show_bug.cgi?id=561338).
19
20 Therefore the current recommended versions are
21 * 2019-12 (4.14)
22 * 2020-06 (4.16) Milestone builds for the adventurous, which have the mentioned bug fixed.
23
24 #### Install Eclipse IDE Plug-ins
25
26 Two plug-ins need to be installed into the IDE from P2 repositories:
27
28 1. Eclipse Target Platform Definition DSL and Generator from the P2 repository at http://www.simantics.org/update/cbi/tpd/3.0.0-SNAPSHOT/
29    * Please read the detailed installation and basic use instructions
30      from [the tool's own GitHub site](https://github.com/eclipse-cbi/targetplatform-dsl)
31 2. Simantics Graph Compiler plug-in from http://www.simantics.org/update/utils/
32    * Enables the IDE to compile `<bundle>/graph/*.pgraph` files
33      into `<bundle>/graph.tg` for installation into Simantics database.
34
35 #### Install Required JDK
36
37 This version of the platform requires at least JDK 11.
38
39 It is recommended to download the Hotspot variant from [AdoptOpenJDK.net](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot).
40 You can also use newer JDKs but 11 as an LTS version is recommended, especially for bundling with built products.
41
42 1. Download and install a compatible JDK version
43    * For Windows, download the `.msi` installer and install it
44 2. Open IDE preference page **Java / Installed JREs**.
45    If the previously installed JDK is not already in use, add it as a *Standard VM*
46    installation to the list and select the added JRE as the active JRE.
47 3. Open IDE preference page **Java / Installed JREs / Execution Environments**
48    and ensure that your selected JDK is selected in the *Compatible JREs* for `JavaSE-1.6` - `JavaSE-11`.
49 4. **Important:** Ensure that IDE preference page **Java / Compiler** has *Compiler compliance level* set to **11**.
50    Otherwise the IDE will use the JDTs compiler to produce the binary classes with the designated compliance level
51    regardless of what JRE you've installed to use for running your programs from the IDE.
52
53 #### Clone Repository into Eclipse
54
55 Use [Eclipse Git Integration - EGit](https://wiki.eclipse.org/EGit/User_Guide) to clone repositories.
56
57 ##### gerrit.simantics.org
58
59 Gerrit is currently still the authoritative repository for the platform, so use the following for now
60
61 Anonymous HTTP cloning without push rights:
62
63     git clone "https://gerrit.simantics.org/r/simantics/platform"
64
65 Developers with push access:
66
67     git clone "ssh://lehtonen@gerrit.simantics.org:29418/simantics/platform"
68
69 ##### gitlab.simantics.org
70
71 GitLab will become the authoritative repository for the platform in the future.
72 Until then, please do not push directly to this repository.
73
74 Just follow GitLab's cloning instructions at https://gitlab.simantics.org/simantics/platform.
75 Use HTTP cloning for anonymous access and SSH for developer access.
76
77 #### Import Projects into Workspace
78
79 From the main menu, uncheck *Build Automatically* from the *Project*
80 menu to prevent unnecessary build failures from happening before the
81 setup is complete.
82
83 From the *Git Repositories* view in Eclipse, choose *Import Projects* from the repository context menu.
84 Import all projects into their own working set.
85
86 #### Set Target Platform
87
88 To get the platform to compile in the IDE, you will need to use one of the custom target platforms
89 provided [releng/org.simantics.sdk.build.targetdefinition/](releng/org.simantics.sdk.build.targetdefinition).
90
91 To use a minimal target platform, open [releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.tpd](releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.tpd)
92 using the *Target Platform DSL Editor* and press `CTRL+R` in the editor to
93 re-build the corresponding .target file and set it as the current platform.
94
95 Re-enable *Build Automatically* from the *Project* main menu to start the build
96 which should now succeed.
97
98 #### Test
99
100 Open [releng/org.simantics.desktop.rcp.product/simantics-desktop.product](releng/org.simantics.desktop.rcp.product/simantics-desktop.product)
101 and press `Launch an Eclipse application in Debug mode`. The basic desktop product should start.