Skip to content

Commit bdf2ec7

Browse files
committed
INSTALL: began to describe new setup layout
1 parent 6fe3de7 commit bdf2ec7

1 file changed

Lines changed: 39 additions & 34 deletions

File tree

INSTALL.md

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# Setup Instructions
22

3-
You may run the demo manually, or by using Nix or Docker.
4-
The manual setup enables you to use DiffDetective in any of your own Maven projects.
5-
The Nix and Docker setups just build the demo for you to run it.
6-
Windows users should _not_ use the Nix setup except if they have experience with WSL2, XServers, and Nix (see [REQUIREMENTS.md](REQUIREMENTS.md)).
3+
You may build and run the demo _either_ manually _or_ by using Docker _or_ Nix.
74

8-
In case you encounter problems, you may have a look at the _Troubleshooting_ section at the bottom of this file.
5+
**The purpose of this demo is to serve as a template project for starting to develop with DiffDetective, as well as to give examples on how to use and integrate DiffDetective in your projects.
6+
We hence recommend the manual setup because it enables you to use DiffDetective in any of your own Maven projects.**
97

10-
## Manual Setup
8+
The Nix and Docker setups build the demo to a runnable jar file.
9+
We also provide scripts for running the Demo from within Nix and Docker but we do not recommend using them because the demo launches a graphical user interface which frequently causes problems when run from within Nix or Docker (see Troubleshooting section at the bottom of this file).
10+
We hence recommend to (1) build either manually or with Nix or with Docker and (2) run the produced jar file manually.
11+
(Windows users should _not_ use the Nix setup except if they are experts on WSL2, XServers, and Nix (see [REQUIREMENTS.md](REQUIREMENTS.md)).)
12+
13+
Once you decided for a setup (Manual/Docker/Nix), check the requirements needed for the respective setup in the [REQUIREMENTS.md](REQUIREMENTS.md) file.
14+
15+
>In case you encounter problems during the setup, you may have a look at the _Troubleshooting_ section at the bottom of this file.
1116
12-
Check the requirements needed for the manual setup in the [REQUIREMENTS.md](REQUIREMENTS.md) file.
17+
18+
## Manual Setup
1319

1420
Follow the setup instructions on the [DiffDetective website](https://variantsync.github.io/DiffDetective/) for building and installing DiffDetective with Maven (and _not_ with Nix).
1521
These instructions make you clone the repo and install it.
@@ -30,6 +36,7 @@ To run the demo, invoke `java` on the jar file that includes any dependencies:
3036
java -jar target/diffdetectivedemo-1.0.0-jar-with-dependencies.jar
3137
```
3238
The expected output and behavior of the jar file is explained below in the section _Expected Output_.
39+
Make sure that you are at the top level of this repository in the terminal (i.e, the directory containing this INSTALL.md file).
3340

3441
## Docker Setup
3542

@@ -54,23 +61,27 @@ You can verify that the image was created successfully by running
5461
docker images
5562
```
5663
and checking that an image called `diffdetective-demo` is listed.
57-
You can run the image and thus the demo with the following command:
58-
```shell
59-
docker run --net=host -e DISPLAY=host.docker.internal:0 --volume="$PWD/data/output:/home/user/data/output:rw" -t diffdetective-demo
60-
```
61-
You may get some font errors, which you can ignore (see Troubleshooting below).
62-
The parameters `--net=host` and `-e DISPLAY=host.docker.internal:0` are required to launch graphical user interfaces from within Docker.
6364

64-
### Docker Setup on Linux
65+
**TODO: HOW TO PRODUCE THE JAR FILE HERE?**
66+
````shell
67+
java -jar PATH/TO/JAR
68+
````
6569

66-
> You might require elevated privileges to execute Docker commands (e.g., `sudo ./docker.sh build` or adding the user to the `docker` or `wheel` group).
67-
> See Docker's [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) for more information.
70+
> **Experimental:**
71+
> Alternatively, You can run the image and thus the demo with the following command:
72+
> ```shell
73+
> docker run --net=host -e DISPLAY=host.docker.internal:0 --volume="$PWD/data/output:/home/user/data/output:rw" -t diffdetective-demo
74+
> ```
75+
> You may get some font errors, which you can ignore (see Troubleshooting below).
76+
> The parameters `--net=host` and `-e DISPLAY=host.docker.internal:0` are required to launch graphical user interfaces from within Docker.
6877
69-
> It is best to install required software (e.g., Docker, Maven) using your distro's package manager if it is available.
78+
### Docker Setup on Linux
7079
7180
You can use the `docker.sh` script to build and execute the Demo using [Docker](https://www.docker.com/get-started) as described below.
81+
You might require elevated privileges to execute Docker commands (e.g., `sudo ./docker.sh build` or adding the user to the `docker` or `wheel` group).
82+
See Docker's [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) for more information.
83+
Also, it is best to install required software (e.g., Docker, Maven) using your distro's package manager if it is available.
7284
73-
#### Setup
7485
Clone and navigate to this repository (the directory containing this `INSTALL.md`).
7586
Then, simply build the image using the provided script:
7687
```shell
@@ -79,11 +90,16 @@ Then, simply build the image using the provided script:
7990
8091
This will automatically build the Docker container using Nix if Nix is installed on your system.
8192
82-
#### Execution
83-
Once the image has been build, you can start the demo with
84-
```shell
85-
./docker.sh demo
86-
```
93+
**TODO: HOW TO PRODUCE THE JAR FILE HERE?**
94+
````shell
95+
java -jar PATH/TO/JAR
96+
````
97+
98+
> **Experimental:**
99+
> Alternatively, once the image has been build, you can start the demo with
100+
> ```shell
101+
> ./docker.sh demo
102+
> ```
87103
88104
## Nix Setup
89105
@@ -113,17 +129,6 @@ If you have flakes enabled, you can instead just use
113129
nix run github:VariantSync/DiffDetective-Demo
114130
```
115131
116-
### Using a Docker Image
117-
118-
If you have Nix installed, the `docker.sh` script will automatically build this demo using Nix.
119-
Hence, the instructions are the same as for docker:
120-
Clone and navigate to this repository and execute the following:
121-
```shell
122-
./docker.sh build
123-
./docker.sh demo
124-
```
125-
126-
127132
## Expected Output
128133
129134
The expected output is close to the output shown at the end of the [screencast](https://www.youtube.com/watch?v=q6ight5EDQY).

0 commit comments

Comments
 (0)