Skip to content

Commit

Permalink
Merge pull request #1742 from djing-chan/update-build.md-and-readme
Browse files Browse the repository at this point in the history
Update readme and build.md for running gradle scripts with JVM arguments
  • Loading branch information
alvasw authored Mar 6, 2024
2 parents aaa9769 + 1c6b823 commit cc879ab
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,7 @@ in [the Bisq wiki](https://bisq.wiki/Bisq_Easy).
2. **Install Dependencies:**
See our [Installation Guide](./docs/dev/build.md) for detailed instructions.

3. **Run seed node:**
```bash
./gradlew apps:seed-node-app:run \
-Dapplication.appName=bisq2_seed1 \
-Dapplication.network.configByTransportType.clear.defaultNodePort=8000 \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001
```
4. **Run desktop client:**
3. **Run desktop client:**
```bash
./gradlew desktop:desktop-app:run
```
Expand Down
36 changes: 24 additions & 12 deletions docs/dev/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,51 @@ In that configuration the desktop app connects to the public seed nodes via the
The default data directory is: `Bisq2`

For development, you might want to customize the options and use localhost instead of Tor. In that case you need to run
your own seed node as well.
your own seed node as well. Bisq 2 use **JVM arguments** and has only limited support for **program arguments** (see
below).

For running a development seed node on localhost use:
### Running a development seed node with *JVM arguments*

First create the gradle installer script for the seed-node-app:
`./gradlew :apps:seed-node-app:installDist`

Pass the JVM arguments to the installer script:
```sh
./gradlew apps:seed-node-app:run \
-Dapplication.appName=bisq2_seed1 \
JAVA_OPTS="-Dapplication.appName=bisq2_seed1 \
-Dapplication.network.configByTransportType.clear.defaultNodePort=8000 \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001" \
apps/seed-node-app/build/install/seed-node-app/bin/seed-node-app
```

Optionally you can run a second seed node at port 8001:

```sh
./gradlew apps:seed-node-app:run \
-Dapplication.appName=bisq2_seed1 \
JAVA_OPTS="-Dapplication.appName=bisq2_seed1 \
-Dapplication.network.configByTransportType.clear.defaultNodePort=8001 \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001" \
apps/seed-node-app/build/install/seed-node-app/bin/seed-node-app
```

For running a development desktop application on localhost use:
### Running a development desktop application with *JVM arguments*:

First create the gradle installer script for the desktop-app:
`./gradlew :desktop:desktop-app:installDist`

Pass the JVM arguments to the installer script:
```sh
./gradlew desktop:desktop-app:run \
-Dapplication.appName=bisq2_Alice_clear \
JAVA_OPTS="-Dapplication.appName=bisq2_Alice_clear \
-Dapplication.network.supportedTransportTypes.0=CLEAR \
-Dapplication.network.seedAddressByTransportType.clear.0=127.0.0.1:8000 \
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001
-Dapplication.network.seedAddressByTransportType.clear.1=127.0.0.1:8001" \
apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-app
```

Optionally you can pass that data directory as *program argument* as follows:
`apps/desktop/desktop-app/build/install/desktop-app/bin/desktop-app --data-dir=<data_dir>`

You likely want to run a second desktop application for testing the trade use case with 2 traders (e.g. Alice and Bob).
Just change the `-Dapplication.appName` to something like `bisq2_Bob_clear` in the above configuration.

0 comments on commit cc879ab

Please sign in to comment.