]> gerrit.simantics Code Review - simantics/platform.git/blob - README.md
Fixed multiple issues causing dangling references to discarded queries
[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
50 #### Clone Repository into Eclipse
51
52 Use [Eclipse Git Integration - EGit](https://wiki.eclipse.org/EGit/User_Guide) to clone repositories.
53
54 ##### gerrit.simantics.org
55
56 Gerrit is currently still the authoritative repository for the platform, so use the following for now
57
58 Anonymous HTTP cloning without push rights:
59
60     git clone "https://gerrit.simantics.org/r/simantics/platform"
61
62 Developers with push access:
63
64     git clone "ssh://lehtonen@gerrit.simantics.org:29418/simantics/platform"
65
66 ##### gitlab.simantics.org
67
68 GitLab will become the authoritative repository for the platform in the future.
69 Until then, please do not push directly to this repository.
70
71 Just follow GitLab's cloning instructions at https://gitlab.simantics.org/simantics/platform.
72 Use HTTP cloning for anonymous access and SSH for developer access.
73
74 #### Import Projects into Workspace
75
76 From the main menu, uncheck *Build Automatically* from the *Project*
77 menu to prevent unnecessary build failures from happening before the
78 setup is complete.
79
80 From the *Git Repositories* view in Eclipse, choose *Import Projects* from the repository context menu.
81 Import all projects into their own working set.
82
83 #### Set Target Platform
84
85 To get the platform to compile in the IDE, you will need to use one of the custom target platforms
86 provided [releng/org.simantics.sdk.build.targetdefinition/](releng/org.simantics.sdk.build.targetdefinition).
87
88 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)
89 using the *Target Platform DSL Editor* and press `CTRL+R` in the editor to
90 re-build the corresponding .target file and set it as the current platform.
91
92 Re-enable *Build Automatically* from the *Project* main menu to start the build
93 which should now succeed.
94
95 #### Test
96
97 Open [releng/org.simantics.desktop.rcp.product/simantics-desktop.product](releng/org.simantics.desktop.rcp.product/simantics-desktop.product)
98 and press `Launch an Eclipse application in Debug mode`. The basic desktop product should start.