Upgrade to Java 12 & Fix Wayland/KDE GUI

Signed-off-by: Eduardo Alonso <edu@error404software.com>
This commit is contained in:
Eduardo Alonso 2019-10-06 20:53:06 +02:00 committed by sirjonasxx
parent 3ef47c91e3
commit 11f4f8e456
6 changed files with 54 additions and 17 deletions

View File

@ -10,6 +10,10 @@
<version>1.0</version>
<properties>
<javafx.version>12</javafx.version>
</properties>
<parent>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId>
@ -24,7 +28,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<version>3.1.2</version>
<configuration>
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive>
@ -32,7 +36,7 @@
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>gearth.Main</mainClass>
<mainClass>gearth.J12Main</mainClass>
<useUniqueVersions>false</useUniqueVersions>
</manifest>
</archive>
@ -41,7 +45,7 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5</version>
<version>3.1.1</version>
<executions>
<execution>
<phase>package</phase>
@ -54,7 +58,7 @@
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive>
<manifest>
<mainClass>gearth.Main</mainClass>
<mainClass>gearth.J12Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
@ -69,20 +73,35 @@
</build>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-web</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
<version>20190722</version>
</dependency>
<dependency>
<groupId>org.fxmisc.richtext</groupId>
<artifactId>richtextfx</artifactId>
<version>0.9.1</version>
<version>0.10.2</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.2</version>
<version>1.12.1</version>
</dependency>
<dependency>
<groupId>com.github.tulskiy</groupId>
@ -92,7 +111,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.13</version>
<version>2.0.0-alpha0</version>
</dependency>
</dependencies>

View File

@ -0,0 +1,7 @@
package gearth;
public class J12Main {
public static void main(String[] args) {
Main.main(args);
}
}

View File

@ -37,10 +37,13 @@ public class Main extends Application {
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/gearth/G-EarthLogoSmaller.png")));
primaryStage.setResizable(false);
primaryStage.setResizable(true);
primaryStage.onShownProperty().addListener(e -> {
Platform.runLater(() -> primaryStage.setResizable(false));
});
//primaryStage.initStyle(StageStyle.UNDECORATED);
primaryStage.setTitle("G-Earth " + version);
primaryStage.setScene(new Scene(root, 620, 295));
primaryStage.setScene(new Scene(root, 650, 295));
primaryStage.show();
primaryStage.getScene().getStylesheets().add(getClass().getResource("/gearth/ui/bootstrap3.css").toExternalForm());
@ -57,6 +60,10 @@ public class Main extends Application {
Platform.runLater(() -> {
Alert alert = new Alert(Alert.AlertType.ERROR, "G-Earth needs admin privileges in order to work properly, please restart G-Earth with admin permissions unless you know what you're doing", ButtonType.OK);
alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
alert.setResizable(true);
alert.onShownProperty().addListener(e -> {
Platform.runLater(() -> alert.setResizable(false));
});
alert.show();
});
@ -90,6 +97,12 @@ public class Main extends Application {
WebView webView = new WebView();
webView.getEngine().loadContent("<html>A new version of G-Earth has been found ("+gitv+")<br><br>Update to the latest version:<br><a href=\"https://github.com/sirjonasxx/G-Earth/releases\">https://github.com/sirjonasxx/G-Earth/releases</a></html>");
webView.setPrefSize(500, 200);
alert.setResizable(true);
alert.onShownProperty().addListener(e -> {
Platform.runLater(() -> alert.setResizable(false));
});
alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
alert.getDialogPane().setContent(fp);
if (isForcedUpdate) {

View File

@ -8,7 +8,6 @@ import org.json.JSONArray;
import org.json.JSONObject;
import javax.xml.bind.DatatypeConverter;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;

View File

@ -2,7 +2,6 @@ package gearth.ui.extensions.executer;
import gearth.Main;
import gearth.ui.extensions.authentication.Authenticator;
import org.omg.CORBA.Environment;
import java.io.BufferedReader;
import java.io.File;

10
pom.xml
View File

@ -10,8 +10,8 @@
<version>1.0</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>12</maven.compiler.source>
<maven.compiler.target>12</maven.compiler.target>
</properties>
<name>G-Earth-Parent</name>
@ -35,8 +35,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>12</source>
<target>12</target>
</configuration>
</plugin>
@ -58,7 +58,7 @@
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-resources</id>