mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-07 22:22:24 -04:00
Add check for os arch
This commit is contained in:
parent
a10c5bb25c
commit
c98a08b7cf
2 changed files with 18 additions and 4 deletions
|
@ -118,6 +118,15 @@ public class Utilities {
|
||||||
return System.getProperty("os.name").toLowerCase();
|
return System.getProperty("os.name").toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isCorrectOSArchitecture() {
|
||||||
|
String osArch = System.getProperty("os.arch");
|
||||||
|
String jvmArch = System.getProperty("sun.arch.data.model");
|
||||||
|
//TODO remove log
|
||||||
|
log.warn("osArch " + osArch);
|
||||||
|
log.warn("jvmArch " + jvmArch);
|
||||||
|
return osArch.endsWith(jvmArch);
|
||||||
|
}
|
||||||
|
|
||||||
public static void openURI(URI uri) throws IOException {
|
public static void openURI(URI uri) throws IOException {
|
||||||
if (!isLinux()
|
if (!isLinux()
|
||||||
&& Desktop.isDesktopSupported()
|
&& Desktop.isDesktopSupported()
|
||||||
|
|
|
@ -54,7 +54,6 @@ import javafx.scene.input.KeyCombination;
|
||||||
import javafx.scene.input.KeyEvent;
|
import javafx.scene.input.KeyEvent;
|
||||||
import javafx.scene.layout.Pane;
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
import javafx.scene.text.Font;
|
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.StageStyle;
|
import javafx.stage.StageStyle;
|
||||||
|
@ -208,10 +207,16 @@ public class BitsquareApp extends Application {
|
||||||
// make the UI visible
|
// make the UI visible
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
|
||||||
Font fon = Font.getDefault();
|
|
||||||
Font fonds = Font.getDefault();
|
|
||||||
|
|
||||||
//showDebugWindow();
|
if (!Utilities.isCorrectOSArchitecture())
|
||||||
|
new Popup<>().warning("You have the wrong version installed for the architecture of your computer.\n" +
|
||||||
|
"Your computers architecture is: " + System.getProperty("os.arch") + ".\n" +
|
||||||
|
"The Bitsquare binary you installed is: " + System.getProperty("sun.arch.data.model") + ".\n" +
|
||||||
|
"Please shut down and re-install the correct version (" + System.getProperty("os.arch") + ").")
|
||||||
|
.closeButtonText("Shut down")
|
||||||
|
.onClose(shutDownHandler::run)
|
||||||
|
.show();
|
||||||
|
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
showErrorPopup(throwable, false);
|
showErrorPopup(throwable, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue