X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=README.md;h=7567cd62f707287c053ebce320840d724907d55b;hp=d0d9155e4986c2543d45ffc9f0ef8e31fd55e87d;hb=4af526406642ed67a61c7cae4edc673a21aec8f5;hpb=ad8d06d08e3509cc6f55266c9fcfb4287a290ffb diff --git a/README.md b/README.md index d0d9155e4..7567cd62f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,101 @@ +## Headless Builds + +Official builds and testing of the platform are done with Maven. + To build the platform, run: -mvn -s settings.xml package +mvn package or to run unit tests as well: -mvn -s settings.xml verify +mvn verify + +## Development + +### Eclipse IDE Setup + +It is generally recommended to using the latest Eclipse IDE release. + +However, use of Eclipse IDE 2020-03 (4.15) release is not recommended +because of [JDT bug 561338](https://bugs.eclipse.org/bugs/show_bug.cgi?id=561338). + +Therefore the current recommended versions are +* 2019-12 (4.14) +* 2020-06 (4.16) Milestone builds for the adventurous, which have the mentioned bug fixed. + +#### Install Eclipse IDE Plug-ins + +Two plug-ins need to be installed into the IDE from P2 repositories: + +1. Eclipse Target Platform Definition DSL and Generator from the P2 repository at http://www.simantics.org/update/cbi/tpd/3.0.0-SNAPSHOT/ + * Please read the detailed installation and basic use instructions + from [the tool's own GitHub site](https://github.com/eclipse-cbi/targetplatform-dsl) +2. Simantics Graph Compiler plug-in from http://www.simantics.org/update/utils/ + * Enables the IDE to compile `/graph/*.pgraph` files + into `/graph.tg` for installation into Simantics database. + +#### Install Required JDK + +This version of the platform requires at least JDK 11. + +It is recommended to download the Hotspot variant from [AdoptOpenJDK.net](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot). +You can also use newer JDKs but 11 as an LTS version is recommended, especially for bundling with built products. + +1. Download and install a compatible JDK version + * For Windows, download the `.msi` installer and install it +2. Open IDE preference page **Java / Installed JREs**. + If the previously installed JDK is not already in use, add it as a *Standard VM* + installation to the list and select the added JRE as the active JRE. +3. Open IDE preference page **Java / Installed JREs / Execution Environments** + and ensure that your selected JDK is selected in the *Compatible JREs* for `JavaSE-1.6` - `JavaSE-11`. +4. **Important:** Ensure that IDE preference page **Java / Compiler** has *Compiler compliance level* set to **11**. + Otherwise the IDE will use the JDTs compiler to produce the binary classes with the designated compliance level + regardless of what JRE you've installed to use for running your programs from the IDE. + +#### Clone Repository into Eclipse + +Use [Eclipse Git Integration - EGit](https://wiki.eclipse.org/EGit/User_Guide) to clone repositories. + +##### gerrit.simantics.org + +Gerrit is currently still the authoritative repository for the platform, so use the following for now + +Anonymous HTTP cloning without push rights: + + git clone "https://gerrit.simantics.org/r/simantics/platform" + +Developers with push access: + + git clone "ssh://lehtonen@gerrit.simantics.org:29418/simantics/platform" + +##### gitlab.simantics.org + +GitLab will become the authoritative repository for the platform in the future. +Until then, please do not push directly to this repository. + +Just follow GitLab's cloning instructions at https://gitlab.simantics.org/simantics/platform. +Use HTTP cloning for anonymous access and SSH for developer access. + +#### Import Projects into Workspace + +From the main menu, uncheck *Build Automatically* from the *Project* +menu to prevent unnecessary build failures from happening before the +setup is complete. + +From the *Git Repositories* view in Eclipse, choose *Import Projects* from the repository context menu. +Import all projects into their own working set. + +#### Set Target Platform + +To get the platform to compile in the IDE, you will need to use one of the custom target platforms +provided [releng/org.simantics.sdk.build.targetdefinition/](releng/org.simantics.sdk.build.targetdefinition). + +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) +using the *Target Platform DSL Editor* and press `CTRL+R` in the editor to +re-build the corresponding .target file and set it as the current platform. + +Re-enable *Build Automatically* from the *Project* main menu to start the build +which should now succeed. + +#### Test -If you're building the platform inside Eclipse IDE, remember to give -the settings.xml file to the Maven / User Settings preference page -User Settings field. +Open [releng/org.simantics.desktop.rcp.product/simantics-desktop.product](releng/org.simantics.desktop.rcp.product/simantics-desktop.product) +and press `Launch an Eclipse application in Debug mode`. The basic desktop product should start.