From 390a7cbacc19e39d8726f1893aae214ea68bf3b5 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Mon, 28 Dec 2015 19:42:25 +0100 Subject: [PATCH] Fixed unlimed crypto key issues --- doc/build.md | 10 ++++--- .../io/bitsquare/app/BitsquareAppMain.java | 1 - .../io/bitsquare/gui/main/MainViewModel.java | 26 +++++++++++++------ .../java/io/bitsquare/gui/util/ImageUtil.java | 5 +--- package/linux/create_app.sh | 3 --- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/doc/build.md b/doc/build.md index 218022e5af..a17ab90f2c 100644 --- a/doc/build.md +++ b/doc/build.md @@ -12,7 +12,7 @@ For the impatient What follows is explained in detail in the sections below, but for those who know their way around Java, git and Maven, here are the instructions in a nutshell: $ javac -version - javac 1.8.0_20 # must be 1.8.0_20 or better + javac 1.8.0_40 # must be 1.8.0_40 or better $ git clone https://github.com/bitsquare/bitsquare.git $ cd bitsquare @@ -27,14 +27,14 @@ To build the binary check out the build scripts under the package directory. Prerequisites ------------- -The only prerequisite for building Bitsquare is installing the Java Development Kit (JDK), version 8u20 or better (as well as maven and git). +The only prerequisite for building Bitsquare is installing the Java Development Kit (JDK), version 8u40 or better (as well as maven and git). To check the version of Java you currently have installed: $ javac -version - javac 1.8.0_20 + javac 1.8.0_40 -If `javac` is not found, or your version is anything less than `1.8.0_20`, then you'll need to [download and install the latest JDK]( http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) for your platform. +If `javac` is not found, or your version is anything less than `1.8.0_40`, then you'll need to [download and install the latest JDK]( http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) for your platform. > _**TIP:** Here are [instructions](http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html) for installing the JDK via `apt` on Debian/Ubuntu systems._ @@ -111,6 +111,8 @@ Here are example program arguments for using regtest and using the Tor network: Bitsquare uses 256 bit length keys which are still not permitted by default. Get around that ridiculous fact by adding the missing [jars from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html). +Copy the BountyCastle provider jar file (bcprov-jdk15on-1.53.jar) from you local maven repository (/home/.m2) to $JavaHome/jre/lib/ext (to avoid getting +a "JCE cannot authenticate the provider BC" exception). Problems? diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareAppMain.java b/gui/src/main/java/io/bitsquare/app/BitsquareAppMain.java index 31eb2e19bb..9609cbdabf 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareAppMain.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareAppMain.java @@ -35,7 +35,6 @@ import java.nio.file.Paths; import static io.bitsquare.app.BitsquareEnvironment.*; import static java.util.Arrays.asList; -//TODO clean up public class BitsquareAppMain extends BitsquareExecutable { private static final Logger log = LoggerFactory.getLogger(BitsquareAppMain.class); diff --git a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java index 5f8c17f9f9..8d888177e4 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java @@ -91,7 +91,7 @@ class MainViewModel implements ViewModel { final StringProperty blockchainSyncIconId = new SimpleStringProperty(); final StringProperty availableBalance = new SimpleStringProperty(); final StringProperty lockedBalance = new SimpleStringProperty(); - private final StringProperty numBTCPeers = new SimpleStringProperty(); + private final StringProperty numBTCPeersAsString = new SimpleStringProperty(); // P2P network final StringProperty splashP2PNetworkInfo = new SimpleStringProperty(); @@ -116,6 +116,7 @@ class MainViewModel implements ViewModel { private Timer lostP2PConnectionTimeoutTimer; private MonadicBinding allServicesDone; private User user; + private int numBTCPeers = 0; //private Timer lostBTCConnectionTimeoutTimer; @@ -249,7 +250,11 @@ class MainViewModel implements ViewModel { walletService.numPeersProperty().addListener((observable, oldValue, newValue) -> { log.debug("Bitcoin peers " + newValue); - numBTCPeers.set(String.valueOf(newValue) + " peers"); + numBTCPeers = (int) newValue; + numBTCPeersAsString.set(String.valueOf(newValue) + " peers"); + if (blockchainSyncProgress.get() >= 1 && numBTCPeers > 1) + blockchainSyncInfoFooter.set("Bitcoin network: Peers: " + numBTCPeers); + /* if ((int) newValue < 1) { if (lostBTCConnectionTimeoutTimer != null) lostBTCConnectionTimeoutTimer.cancel(); @@ -364,7 +369,7 @@ class MainViewModel implements ViewModel { new Popup().headLine("USER AGREEMENT") .message(text) .actionButtonText("I agree") - .closeButtonText("Quit") + .closeButtonText("I disagree and quit") .onAction(() -> preferences.setTacAccepted(true)) .onClose(() -> BitsquareApp.shutDownHandler.run()) .show(); @@ -577,20 +582,25 @@ class MainViewModel implements ViewModel { private void setBitcoinNetworkSyncProgress(double value) { blockchainSyncProgress.set(value); + String nrOfPeers = ""; + if (numBTCPeers > 1) + nrOfPeers = ", Peers: " + numBTCPeers; + if (value >= 1) { stopBlockchainSyncTimeout(); - blockchainSyncInfo.set("Blockchain synchronization complete."); + blockchainSyncInfo.set("Blockchain synchronization complete." + nrOfPeers); blockchainSyncIconId.set("image-connection-synced"); } else if (value > 0.0) { // We stop as soon the download started the timeout stopBlockchainSyncTimeout(); - blockchainSyncInfo.set("Synchronizing blockchain: " + formatter.formatToPercent(value)); - blockchainSyncInfoFooter.set("Synchronizing: " + formatter.formatToPercent(value)); + blockchainSyncInfo.set("Synchronizing blockchain: " + formatter.formatToPercent(value) + nrOfPeers); + blockchainSyncInfoFooter.set("Synchronizing: " + formatter.formatToPercent(value) + nrOfPeers); + } else { - blockchainSyncInfo.set("Connecting to the bitcoin network..."); - blockchainSyncInfoFooter.set("Connecting..."); + blockchainSyncInfo.set("Connecting to the bitcoin network..." + nrOfPeers); + blockchainSyncInfoFooter.set("Connecting..." + nrOfPeers); } } diff --git a/gui/src/main/java/io/bitsquare/gui/util/ImageUtil.java b/gui/src/main/java/io/bitsquare/gui/util/ImageUtil.java index 9d5ff14ba6..1469fbdfbd 100644 --- a/gui/src/main/java/io/bitsquare/gui/util/ImageUtil.java +++ b/gui/src/main/java/io/bitsquare/gui/util/ImageUtil.java @@ -55,9 +55,6 @@ public class ImageUtil { } public static boolean isRetina() { - // Latest JDK renamed getMaxPixelScale to getMaxRenderScale - // return ((QuantumToolkit) QuantumToolkit.getToolkit()).getMaxRenderScale() > 1.9f; - return ((QuantumToolkit) QuantumToolkit.getToolkit()).getMaxPixelScale() > 1.9f; + return ((QuantumToolkit) QuantumToolkit.getToolkit()).getMaxRenderScale() > 1.9f; } - } diff --git a/package/linux/create_app.sh b/package/linux/create_app.sh index ce22450d42..9cdfe9fb86 100644 --- a/package/linux/create_app.sh +++ b/package/linux/create_app.sh @@ -8,9 +8,6 @@ set -e # Edit versions fullVersion=0.3.2.2 -mvn clean package -DskipTests -Dmaven.javadoc.skip=true -cp gui/target/shaded.jar gui/deploy/Bitsquare.jar - # Copy jar file from mac build (1.jar from processed folder) to linux box # Note: fakeroot needs to be installed on linux $JAVA_HOME/bin/javapackager \