mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Merge pull request #1956 from cbeams/root-scripts
Generate scripts for Bisq executables in root dir
This commit is contained in:
commit
d372a9e4b3
4 changed files with 55 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -21,7 +21,8 @@ build
|
|||
*.java.hsp
|
||||
*.~ava
|
||||
/bundles
|
||||
/bisq*
|
||||
/bisq-*
|
||||
/lib
|
||||
/xchange
|
||||
desktop.ini
|
||||
*/target/*
|
||||
|
|
48
build.gradle
48
build.gradle
|
@ -11,6 +11,14 @@ buildscript {
|
|||
}
|
||||
}
|
||||
|
||||
configure(rootProject) {
|
||||
// remove the 'bisq-*' scripts and 'lib' dir generated by the 'installDist' task
|
||||
task clean {
|
||||
doLast {
|
||||
delete fileTree(dir: rootProject.projectDir, include: 'bisq-*'), 'lib'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(subprojects) {
|
||||
apply plugin: 'java'
|
||||
|
@ -57,11 +65,51 @@ configure([project(':desktop'),
|
|||
project(':relay'),
|
||||
project(':seednode'),
|
||||
project(':statsnode')]) {
|
||||
|
||||
apply plugin: 'application'
|
||||
|
||||
build.dependsOn installDist
|
||||
installDist.destinationDir = file('build/app')
|
||||
distZip.enabled = false
|
||||
|
||||
// the 'installDist' and 'startScripts' blocks below configure bisq executables to put
|
||||
// generated shell scripts in the root project directory, such that users can easily
|
||||
// discover and invoke e.g. ./bisq-desktop, ./bisq-seednode, etc.
|
||||
// See https://stackoverflow.com/q/46327736 for details.
|
||||
|
||||
installDist {
|
||||
doLast {
|
||||
// copy generated shell scripts, e.g. `bisq-desktop` directly to the project
|
||||
// root directory for discoverability and ease of use
|
||||
copy {
|
||||
from "$destinationDir/bin"
|
||||
into rootProject.projectDir
|
||||
}
|
||||
// copy libs required for generated shell script classpaths to 'lib' dir under
|
||||
// the project root directory
|
||||
copy {
|
||||
from "$destinationDir/lib"
|
||||
into "${rootProject.projectDir}/lib"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
startScripts {
|
||||
// rename scripts from, e.g. `desktop` to `bisq-desktop`
|
||||
applicationName = "bisq-$applicationName"
|
||||
|
||||
// edit generated shell scripts such that they expect to be executed in the
|
||||
// project root dir as opposed to a 'bin' subdirectory
|
||||
doLast {
|
||||
def windowsScriptFile = file getWindowsScript()
|
||||
windowsScriptFile.text = windowsScriptFile.text.replace(
|
||||
'set APP_HOME=%DIRNAME%..', 'set APP_HOME=%DIRNAME%')
|
||||
|
||||
def unixScriptFile = file getUnixScript()
|
||||
unixScriptFile.text = unixScriptFile.text.replace(
|
||||
'cd "`dirname \\"$PRG\\"`/.." >/dev/null', 'cd "`dirname \\"$PRG\\"`" >/dev/null')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ You do _not_ need to install Gradle to complete the following command. The `grad
|
|||
|
||||
## Run
|
||||
|
||||
The Bisq executable jar is now available in the `desktop/build/libs/` directory. Run it as follows, replacing `{version}` with the actual version found in the filename:
|
||||
Bisq executables are now available in the root project directory. Run Bisq Desktop as follows:
|
||||
|
||||
java -jar desktop/build/libs/desktop-{version}-all.jar
|
||||
./bisq-desktop
|
||||
|
||||
|
||||
## See also
|
||||
|
|
|
@ -61,14 +61,14 @@ Here is an overview:
|
|||
|
||||
## Run Bisq seednode
|
||||
|
||||
For localhost/regtest mode run the `SeedNodeMain.java` class or the `seednode.jar` (inside the `seednode/build/libs` folder) with following program arguments:
|
||||
For localhost/regtest mode run the `SeedNodeMain` class or `./bisq-seednode` script in the root project dir with following program arguments:
|
||||
|
||||
--baseCurrencyNetwork=BTC_REGTEST --useLocalhostForP2P=true --useDevPrivilegeKeys=true --nodePort=2002 --myAddress=localhost:2002 --appName=bisq-BTC_REGTEST_Seed_2002
|
||||
|
||||
|
||||
### Run Bisq arbitrator instance
|
||||
|
||||
For localhost/regtest mode run the `BisqAppMain.java` class or the `desktop.jar` (inside the `desktop/build/libs` folder) with following program arguments:
|
||||
For localhost/regtest mode run the `BisqAppMain` class or `./bisq-desktop` script in the root project dir with following program arguments:
|
||||
|
||||
--baseCurrencyNetwork=BTC_REGTEST --useLocalhostForP2P=true --useDevPrivilegeKeys=true --nodePort=4444 --appName=bisq-BTC_REGTEST_arbitrator
|
||||
|
||||
|
@ -79,7 +79,7 @@ _Note: You need only register once but if you have shut down all nodes (includin
|
|||
|
||||
### Run two Bisq trade instances
|
||||
|
||||
For localhost/regtest mode run the `BisqAppMain.java` class or the `desktop.jar` (inside the `desktop/build/libs` folder) with following program arguments:
|
||||
For localhost/regtest mode run the `BisqAppMain` class or `./bisq-desktop` script in the root project dir with following program arguments:
|
||||
|
||||
--baseCurrencyNetwork=BTC_REGTEST --useLocalhostForP2P=true --useDevPrivilegeKeys=true --nodePort=5555 --appName=bisq-BTC_REGTEST_Alice
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue