Commit graph

6932 commits

Author SHA1 Message Date
Devin Bileck
500da13d33
Add testing guide 2018-11-28 00:40:45 -08:00
Chris Beams
aecfd2231d
Merge pull request #1979 from freimair/fixBrokenExecutables
Fix broken startScripts in $destinationDir/bin dirs
2018-11-27 10:36:28 +01:00
Chris Beams
2026da0b59
Fix applicationName variable interpolation error
Prior to this fix, the build failed with the following error:

    FAILURE: Build failed with an exception.

    * Where:
    Build file '/Users/cbeams/Work/bisq-network/bisq/build.gradle' line: 109

    * What went wrong:
    Execution failed for task ':desktop:installDist'.
    > No such property: bat for class: java.lang.String
2018-11-27 10:31:44 +01:00
Christoph Atteneder
ca5ce59e8e
Merge pull request #1974 from ManfredKarrer/update-store-db-files
Update store db files
2018-11-27 10:22:18 +01:00
Florian Reimair
00f01748dd Fix broken executables in /bin dirs 2018-11-27 02:52:39 +01:00
Manfred Karrer
ef794b3a82
Update store db files 2018-11-26 20:01:31 +01:00
Manfred Karrer
926744c962
Remove script files conflicting in copy task
@cbeams
The copy task below fails because the copied files are conflicting
with the project folder name.
I temporarily delete those files as I think they are duplicated
anyway (bisq-* are probably the one to use). Would be good if those
files don't get created in the first place.
The related *.bat files are also deleted.

I push that change directly as currently both master and release
branch fail to build.
2018-11-26 15:24:06 +01:00
Manfred Karrer
1859511fe9
Merge pull request #1966 from freimair/externalTorRollingBackup
Rolling backup for external Tor feature
2018-11-25 21:59:19 +01:00
Florian Reimair
e4568a3b3b Use lombok log API 2018-11-25 16:58:19 +01:00
Manfred Karrer
f8b633d8eb
Merge pull request #1963 from devinbileck/resolve-BisqHelpFormatterTest-failure-on-Windows
Resolve BisqHelpFormatterTest failure on Windows
2018-11-25 13:38:14 +01:00
Manfred Karrer
61deb05a0d
Merge pull request #1964 from devinbileck/remove-nix-scripts
Remove *nix scripts on Windows
2018-11-25 13:35:50 +01:00
Florian Reimair
3a44b36118 Rolling backup for external Tor 2018-11-25 10:40:18 +01:00
Florian Reimair
6eeda23f31 Refactored TorMode classes 2018-11-25 10:40:18 +01:00
Florian Reimair
18cfc1a138 Corrected JavaDoc 2018-11-25 10:39:44 +01:00
Florian Reimair
f3f7625fa4 Corrected log message 2018-11-25 10:04:17 +01:00
Devin Bileck
8cede5c25d
Remove *nix scripts on Windows
Related to https://github.com/bisq-network/bisq/pull/1959 which
removed .bat files on a non-Windows OS to prevent a cluttered root
directory, this change will delete *nix scripts on a Windows OS.
2018-11-25 00:35:04 -08:00
Devin Bileck
054f293622
Resolve BisqHelpFormatterTest failure on Windows
The expected content for the CLI help output needs different path
separators on Windows.
2018-11-24 23:45:43 -08:00
Manfred Karrer
feb6e64b75
Merge pull request #1960 from rex4539/http-to-https
http -> https
2018-11-24 22:44:49 +01:00
Manfred Karrer
086fe32e8f
Merge pull request #1961 from cbeams/redesign-cli-help
Redesign CLI help output
2018-11-24 22:43:57 +01:00
Dimitris Apostolou
4de530e5af
http -> https 2018-11-24 14:28:43 +02:00
Chris Beams
931f369fb6
Include executable name and version in help output 2018-11-24 13:24:03 +01:00
Chris Beams
83e1dd37f9
Refactor option parsing configuration
This change eliminates the BisqExecutable.description method and
replaces it with proper use of the `describedAs` and `defaultsTo`
methods in the JOptSimple API. This removes the concern of formatting
option argument descriptions and default values from the BisqExecutable
class, and delegates it to the new BisqHelpFormatter (see previous
commit), which is designed for the purpose.

For example, prior to this commit, the help text for the --banList
option read as follows:

    --banList=<value>
            Nodes to exclude from network connections. (default: )

Now it reads as follows:

    --banList=<host:port[,...]>
            Nodes to exclude from network connections.

Likewise, previous to this commit, the --logLevel option read as
follows:

    --logLevel=<value>
            Log level [OFF, ALL, ERROR, WARN, INFO, DEBUG, TRACE]
            (default: INFO)

And now it reads like this:

    --logLevel=<OFF|ALL|ERROR|WARN|INFO|DEBUG|TRACE> (default: INFO)
            Log level

There are a number of further improvements that can and should be made
to the description text of the various options, the types specified for
their arguments, etc, but these will be handled in subsequent commits.
This commit is strictly about refactoring existing parser configuration
to take advantage of the new BisqHelpFormatter.
2018-11-24 13:24:03 +01:00
Chris Beams
2a537a601b
Introduce BisqHelpFormatter
Prior to this commit, help output for Bisq executables, e.g. Bisq
Desktop itself used JOptSimple's default HelpFormatter implementation,
which creates a quite cramped and hard-to-read output.

This commit introduces a custom HelpFormatter implementation modeled
after bitcoind's own help output. It maximizes readability while making
full use of an 80-character width.
2018-11-24 13:19:56 +01:00
Manfred Karrer
def47b6a48
Merge pull request #1959 from cbeams/remove-bat-scripts
Remove .bat scripts unless user OS is Windows
2018-11-24 12:09:53 +01:00
Chris Beams
46ee12dd62
Remove .bat scripts unless user OS is Windows
Previously, start scripts were generated for both *nix and Windows
platforms, resulting in an unnecessarily cluttered root directory.

With this change, both types of script are still generated, but Windows
.bat scripts are deleted immediately afterward if the user is running a
non-Windows OS (unfortunately, there was no clean way to suppress the
generation of these scripts in the Gradle StartScripts API).

See #1956
2018-11-24 10:12:23 +01:00
Manfred Karrer
d372a9e4b3
Merge pull request #1956 from cbeams/root-scripts
Generate scripts for Bisq executables in root dir
2018-11-23 20:04:07 +01:00
Chris Beams
fc0491d8da
Generate scripts for Bisq executables in root dir
This change configures the Gradle build to generate "start scripts" for
each Bisq executable (e.g. Bisq Desktop, Bisq Seednode, etc) in the root
project directory, such that after invoking `./gradle build`, the
following executable scripts become available:

    ~/Work/bisq-network/bisq
    $ ls -1 | egrep '(bisq*|lib)'
    bisq-desktop
    bisq-desktop.bat
    bisq-monitor
    bisq-monitor.bat
    bisq-relay
    bisq-relay.bat
    bisq-seednode
    bisq-seednode.bat
    bisq-statsnode
    bisq-statsnode.bat
    lib

This makes it possible for users (developers) to easily discover and use
these scripts in an idiomatic and platform-agnostic way as opposed to
the previous situation where we would advise users to run e.g.

    java -jar desktop/build/libs/desktop-0.8.0-SNAPSHOT-all.jar

This approach works, but is cumbersome and focuses unnecessarily on the
Java-based nature of the project. Now, with the changes in this commit,
the user would simply run:

    ./bisq-desktop

The 'lib' directory shown above contains all the jar files necessary to
construct classpaths for these various scripts. The 'cleanInstallDist'
task deletes the 'bisq-*' files and the 'lib' directory, and the default
'clean' task has been configured to depend on the 'cleanInstallDist'
task to ensure this cleanup happens automatically when most users would
expect it.

In the future, these same scripts can be used when installing Bisq
executables properly on users' systems via package managers like Brew
and Apt. The goal is to have the user experience around running
`bisq-desktop` (and more importantly, the forthcoming `bisqd`) be
similar in every way to installing and using `bitcoind`, `lnd` and other
idiomatic *nix-style utilities, be they Bitcoin-related or not.

See the changes in docs/build.md and docs/dev-setup.md for a further
sense of the how this change impacts the developer experience.
2018-11-23 15:00:47 +01:00
Chris Beams
a57a4a71c0
Remove unused Utilities import
This change should have been included in 63cec4252 (#1955).
2018-11-23 11:28:58 +01:00
Manfred Karrer
63cec42523
Merge pull request #1955 from cbeams/quell-help-on-error
Quell help output on option parsing error
2018-11-23 11:21:56 +01:00
Manfred Karrer
13aacc3c38
Merge pull request #1954 from cbeams/remove-core-logback-config
Remove Logback config xml from core module
2018-11-23 11:20:50 +01:00
Manfred Karrer
c0729f1f0e
Merge pull request #1953 from cbeams/remove-crypto-restrictions
Remove Utilities.removeCryptographyRestrictions
2018-11-23 10:54:36 +01:00
Chris Beams
2b883c838a
Quell help output on option parsing error
This change suppresses help output when option parsing fails, e.g. due
to an unrecognized option being specified. This is in keeping with *nix
utility idioms; for example, notice what happens when running `git
--bogus` or `ls --bogus`: they output an error message, and in some
cases a usage message, but they do not print complete help text.
This approach is especially important in the case of an application like
Bisq, where there are many options and the help text is longer than a
typical screen, making it easy to miss the error message altogether, as
it is printed at the top of the screen.

This change also prints the error message to stderr vs stdout, which is
again in keeping with *nix utility idoms.
2018-11-23 09:11:35 +01:00
Chris Beams
b864a843ce
Remove Logback config xml from core module
Usually Bisq is run from its 'shadow jar', i.e. the executable fat jar
that collapses all dependencies and resources into a single file. In that
scenario, only a single 'logback.xml' is included in the fat jar and all
is well.

However, when Bisq is run with a normal external classpath, e.g. from
within IDEA, when using `gradle :desktop:run` or when running one of the
Gradle-generated shell scripts under desktop/build/scripts, multiple
'logback.xml' files are present on the classpath, which causes Logback
to complain with messages like the following:

    Found resource [logback.xml] at [file:.../desktop/build/resources/main/logback.xml]
    Resource [logback.xml] occurs multiple times on the classpath.
    Resource [logback.xml] occurs at [file:.../desktop/build/resources/main/logback.xml]
    Resource [logback.xml] occurs at [jar:file:.../core/build/libs/core.jar!/logback.xml]

Note the last line above. The presence of 'logback.xml' in the bisq-core
jar is the 'duplicate'. This is Logback's way of warning the user that
it doesn't know which file should be considered canonical. The only way
to avoid this error message (and the many other lines that get output
along with it) is to remove the offending duplicate file.

This commit removes logback.xml from core to solve the problem described
above. The file is unnecessary in the context of running bisq-desktop,
bisq-seednode, etc, and the only context in which it would actually be
used is when running BisqHeadlessAppMain in core. With that said, the
configuration in the core logback.xml file is identical to the default
Logback configuration, so removing the file has no effect on the logging
output from BisqHeadlessAppMain, and furthermore, it appears that
BisqHeadlessAppMain is not actually in use anywhere right now (it was
added some months ago in anticipation of integrating the new HTTP API,
but this has yet to occur).

In a future change, we should probably return the core module to being a
pure library, without any main methods, and introduce a different
module, e.g. 'daemon' that contains the equivalent of
BisqHeadlessAppMain and whatever logback.xml configuration is
appropriate for it. Doing things this way will avoid the 'duplicate'
errors shown above, because desktop, seednode, etc will not depend on
core module, but will not depend on the daemon module.
2018-11-23 06:42:02 +01:00
Chris Beams
b3d20b5b5f
Remove Utilities.removeCryptographyRestrictions
This code is no longer necessary after the recent move to JDK10, and
removing it entirely avoids spending unnecessary cycles and eliminates
the confusing "Cryptography restrictions removal not needed" message in
console output.
2018-11-23 06:09:59 +01:00
Manfred Karrer
d31fb45ae6
Merge pull request #1945 from devinbileck/limit-initial-window-size
Limit initial window size on application launch
2018-11-22 07:18:14 -05:00
Chris Beams
cd616ffaf3
Merge pull request #1944 from henryBTR/list-bitcoinrhodium-asset
List Bitcoin Rhodium (XRC)
2018-11-20 14:29:44 +01:00
Chris Beams
956e77710e
Update core/src/test/java/bisq/core/user/PreferencesTest.java
Co-Authored-By: henryBTR <42034896+henryBTR@users.noreply.github.com>
2018-11-20 14:22:36 +01:00
Chris Beams
e7f2fd4104
Update core/src/main/java/bisq/core/locale/CurrencyUtil.java
Co-Authored-By: henryBTR <42034896+henryBTR@users.noreply.github.com>
2018-11-20 14:22:23 +01:00
Chris Beams
666a888ad1
Merge pull request #1927 from devinbileck/add-gitattributes
Add gitattributes
2018-11-20 14:20:47 +01:00
Chris Beams
9f4f5c48e1
Preserve CRLF line endings in .bat files
This is specifically for the gradlew.bat file generated by the `gradle
wrapper` command. Typically, this file should never be edited, but just
in case it is, this configuration will preserve its original CRLF line
endings.
2018-11-20 14:18:30 +01:00
henryBTR
9fd26676af List Bitcoin Rhodium (XRC) 2018-11-19 19:32:49 +01:00
Devin Bileck
27c41a080c
Limit initial window size on application launch
When launching the application, prevent the initial window size from
exceeding the maximum available bounds.
2018-11-18 22:35:35 -08:00
Manfred Karrer
e37813c658
Merge pull request #1935 from freimair/externalTor
Bisq can now use an external Tor service
2018-11-17 14:02:11 -05:00
Manfred Karrer
c8416019f3
Merge pull request #1933 from ManfredKarrer/fix-temp-file-issue
Don't use a temp file for the sound file
2018-11-17 13:50:51 -05:00
Manfred Karrer
108ce1d72c
Merge pull request #1936 from ManfredKarrer/fix-formatting-issue
Convert long dash to short dash for minus values
2018-11-17 13:48:09 -05:00
Florian Reimair
717796103d Fixed tests as in: commit of shame 2018-11-17 18:44:10 +01:00
Florian Reimair
f0bfb3825a Declutter TorNetworkNode some more 2018-11-17 18:42:18 +01:00
Manfred Karrer
5f766b4cd5
Convert long dash to short dash for minus values
Fixes https://github.com/bisq-network/bisq/issues/1925
2018-11-17 12:32:42 -05:00
Florian Reimair
f493b5f619 Added hashes and Netlayer release 0.6 2018-11-17 18:14:18 +01:00
Manfred Karrer
43ace0b659
Don't use a temp file for the sound file
We play a silent sound to prevent app nap and network disconnections.
Instead of a temp file which got deleted on exit and recreated each
startup we store it once in the data directory root.
Fixes https://github.com/bisq-network/bisq/issues/1931
2018-11-17 12:06:59 -05:00