Feel free to join the next Helmholtz Hacky Hour #26 on Wednesday, April 21, 2021 from 2PM to 3PM!

Commit 0b719bbd authored by Martin Lange's avatar Martin Lange

added howto for using/building the project

parent 0466b6d4
Pipeline #12098 passed with stage
in 12 seconds
......@@ -8,6 +8,10 @@ The model description is structured following the ODD protocol (Grimm et al. 200
*Screenshot of the model*
## How to use this project?
See the **[How to](md/howto.md)** for details on the possible ways to use this project, from simply running downloaded binaries to cloning and building on your machine.
## What is an ECS?
## Purpose
......@@ -688,7 +692,7 @@ public class Point {
### Dependencies with Gradle
Gradle is used as build tool and for dependency management.
[Gradle](https://gradle.org/) is used as build tool and for dependency management.
```groovy
/// file:build.gradle
......@@ -717,7 +721,7 @@ rootProject.name = 'Grassing'
### Git ignore file
Regarding VCS/Git, we ignore Gradle files and build output.
Regarding VCS/Git, we ignore files generated by Gradle, as well as build output.
```
/// file:.gitignore
......
# How to use this project
This projected is written via Literate Programming. Code is weaved into the Markdown documentation, and is extracted to a usable Java [Gradle](https://gradle.org/) project using the command line tool [Yarner](https://github.com/mlange-42/yarner).
There are several ways to use this projects or it's [downloadable outputs](https://git.ufz.de/oesa/ecs-tutorial/-/jobs/artifacts/master/download?job=build). We start from simply running downloaded executables, over building the downloaded Java project, to cloning the repository and running the complete chain from Yarner to execution.
After following any of the following sections, you should see a window with grassers bustling around.
## Running from download
The [downloads](https://git.ufz.de/oesa/ecs-tutorial/-/jobs/artifacts/master/download?job=build) contain a file `Grassing.zip`. Extract it and navigate into folder `Grassing/bin`. Double-click or run file `Grassing`, or `Grassing.bat` if you are on Windows.
> This required Java 11 or newer to be installed on your machine. Simply try running the model, and install Java in case you get a respective error.
## Building from download
The [downloads](https://git.ufz.de/oesa/ecs-tutorial/-/jobs/artifacts/master/download?job=build) contain a folder `code`. This folder contains the project's Java code and a [Gradle](https://gradle.org/) project.
You can build and run the project by the following command from inside folder `code`:
```
gradle run
```
> This requires Gradle and Java 11 or newer to be installed on your machine.
To work on the code, you can import the folder (potentially after renaming it) into your favourite Java-supporting IDE. If your IDE supports Gradle, you can import it as a Gradle project.
## Cloning, Yarner, building
Clone the repository using the following command:
```
git clone https://git.ufz.de/oesa/ecs-tutorial.git
```
> This required [Git](https://git-scm.com/) to be installed on your machine.
Navigate into the project and run [Yarner](https://github.com/mlange-42/yarner):
```
cd ecs-tutorial
yarner
```
> This requires [Yarner](https://github.com/mlange-42/yarner) to be installed on your machine. Yarner needs to be on the PATH, or you need use the full path to Yarner:
>
> ```
> C:/path/to/yarner/yarner
> ```
This will generate Java sources and a [Gradle](https://gradle.org/) project in sub-folder `code`. Navigate into it and run the project:
```
cd code
gradle run
```
> This requires Gradle and Java 11 or newer to be installed on your machine.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment