You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: INSTALL.md
+39-34Lines changed: 39 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,21 @@
1
1
# Setup Instructions
2
2
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.
7
4
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.**
9
7
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.
11
16
12
-
Check the requirements needed for the manual setup in the [REQUIREMENTS.md](REQUIREMENTS.md) file.
17
+
18
+
## Manual Setup
13
19
14
20
Follow the setup instructions on the [DiffDetective website](https://variantsync.github.io/DiffDetective/) for building and installing DiffDetective with Maven (and _not_ with Nix).
15
21
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:
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).
33
40
34
41
## Docker Setup
35
42
@@ -54,23 +61,27 @@ You can verify that the image was created successfully by running
54
61
docker images
55
62
```
56
63
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.
63
64
64
-
### Docker Setup on Linux
65
+
**TODO: HOW TO PRODUCE THE JAR FILE HERE?**
66
+
````shell
67
+
java -jar PATH/TO/JAR
68
+
````
65
69
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.
68
77
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
70
79
71
80
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.
72
84
73
-
#### Setup
74
85
Clone and navigate to this repository (the directory containing this `INSTALL.md`).
75
86
Then, simply build the image using the provided script:
76
87
```shell
@@ -79,11 +90,16 @@ Then, simply build the image using the provided script:
79
90
80
91
This will automatically build the Docker container using Nix if Nix is installed on your system.
81
92
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
+
>```
87
103
88
104
## Nix Setup
89
105
@@ -113,17 +129,6 @@ If you have flakes enabled, you can instead just use
113
129
nix run github:VariantSync/DiffDetective-Demo
114
130
```
115
131
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
-
127
132
## Expected Output
128
133
129
134
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