Skip to content

Commit

Permalink
Merge pull request #6765 from bisq-network/revert-6760-move_bisq_scri…
Browse files Browse the repository at this point in the history
…pts_to_scripts_directory

Revert "Move bisq-* scripts from root directory to scripts directory"
  • Loading branch information
gabernard authored Jul 12, 2023
2 parents ca86bbd + e5aef09 commit 979db26
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ build
*.~ava
/bundles
/bisq-*
/scripts/bisq-*
/lib
/scripts/lib
/xchange
desktop.ini
*/target/*
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ bitcoind: .localnet
-blocknotify='.localnet/bitcoind/blocknotify %s'

seednode: seednode/build
./scripts/bisq-seednode \
./bisq-seednode \
--baseCurrencyNetwork=BTC_REGTEST \
--useLocalhostForP2P=true \
--useDevPrivilegeKeys=true \
Expand All @@ -203,7 +203,7 @@ seednode: seednode/build
--appName=seednode

seednode2: seednode/build
./scripts/bisq-seednode \
./bisq-seednode \
--baseCurrencyNetwork=BTC_REGTEST \
--useLocalhostForP2P=true \
--useDevPrivilegeKeys=true \
Expand All @@ -216,7 +216,7 @@ seednode2: seednode/build
--appName=seednode2

mediator: desktop/build
./scripts/bisq-desktop \
./bisq-desktop \
--baseCurrencyNetwork=BTC_REGTEST \
--useLocalhostForP2P=true \
--useDevPrivilegeKeys=true \
Expand All @@ -225,7 +225,7 @@ mediator: desktop/build
--appName=Mediator

alice: setup
./scripts/bisq-desktop \
./bisq-desktop \
--baseCurrencyNetwork=BTC_REGTEST \
--useLocalhostForP2P=true \
--useDevPrivilegeKeys=true \
Expand All @@ -240,7 +240,7 @@ alice: setup
--appName=Alice

bob: setup
./scripts/bisq-desktop \
./bisq-desktop \
--baseCurrencyNetwork=BTC_REGTEST \
--useLocalhostForP2P=true \
--useDevPrivilegeKeys=true \
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ configure(rootProject) {
// remove the 'bisq-*' scripts and 'lib' dir generated by the 'installDist' task
task clean {
doLast {
delete fileTree(dir: "$rootProject.projectDir/scripts", include: 'bisq-*'), "$rootProject.projectDir/scripts/lib"
delete fileTree(dir: rootProject.projectDir, include: 'bisq-*'), 'lib'
}
}
}
Expand Down Expand Up @@ -59,27 +59,27 @@ configure([project(':cli'),

copy {
from "$destinationDir/bin"
into "$rootProject.projectDir/scripts"
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}/scripts/lib"
into "${rootProject.projectDir}/lib"
}

// edit generated shell scripts such that they expect to be executed in the
// project root dir as opposed to a 'bin' subdirectory
def windowsScriptFile = file("${rootProject.projectDir}/scripts/bisq-${applicationName}.bat")
def windowsScriptFile = file("${rootProject.projectDir}/bisq-${applicationName}.bat")
windowsScriptFile.text = windowsScriptFile.text.replace(
'set APP_HOME=%DIRNAME%..', 'set APP_HOME=%DIRNAME%')

def unixScriptFile = file("${rootProject.projectDir}/scripts/bisq-$applicationName")
def unixScriptFile = file("${rootProject.projectDir}/bisq-$applicationName")
unixScriptFile.text = unixScriptFile.text.replace(
'APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit', 'APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit')

if (applicationName == 'desktop') {
def script = file("${rootProject.projectDir}/scripts/bisq-$applicationName")
def script = file("${rootProject.projectDir}/bisq-$applicationName")
script.text = script.text.replace(
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=8g -Xss1280k -XX:+UseG1GC ' +
'-XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5 -XX:+UseStringDeduplication ' +
Expand All @@ -90,7 +90,7 @@ configure([project(':cli'),
// Pass the logback config file as a system property to avoid chatty
// logback startup due to multiple logback.xml files in the classpath
// (:daemon & :cli).
def script = file("${rootProject.projectDir}/scripts/bisq-$applicationName")
def script = file("${rootProject.projectDir}/bisq-$applicationName")
script.text = script.text.replace(
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="' +
'-Dlogback.configurationFile=apitest/build/resources/main/logback.xml"')
Expand Down

0 comments on commit 979db26

Please sign in to comment.