mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
Upgrade to Java 12 & Fix Wayland/KDE GUI
Signed-off-by: Eduardo Alonso <edu@error404software.com>
This commit is contained in:
parent
3ef47c91e3
commit
11f4f8e456
@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<javafx.version>12</javafx.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>G-Earth</groupId>
|
<groupId>G-Earth</groupId>
|
||||||
<artifactId>G-Earth-Parent</artifactId>
|
<artifactId>G-Earth-Parent</artifactId>
|
||||||
@ -24,7 +28,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>2.5</version>
|
<version>3.1.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>${project.build.directory}/bin</outputDirectory>
|
<outputDirectory>${project.build.directory}/bin</outputDirectory>
|
||||||
<archive>
|
<archive>
|
||||||
@ -32,7 +36,7 @@
|
|||||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||||
<addClasspath>true</addClasspath>
|
<addClasspath>true</addClasspath>
|
||||||
<classpathPrefix>lib/</classpathPrefix>
|
<classpathPrefix>lib/</classpathPrefix>
|
||||||
<mainClass>gearth.Main</mainClass>
|
<mainClass>gearth.J12Main</mainClass>
|
||||||
<useUniqueVersions>false</useUniqueVersions>
|
<useUniqueVersions>false</useUniqueVersions>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
@ -41,7 +45,7 @@
|
|||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>2.5</version>
|
<version>3.1.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
@ -54,7 +58,7 @@
|
|||||||
<outputDirectory>${project.build.directory}/bin</outputDirectory>
|
<outputDirectory>${project.build.directory}/bin</outputDirectory>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<mainClass>gearth.Main</mainClass>
|
<mainClass>gearth.J12Main</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
<descriptorRefs>
|
<descriptorRefs>
|
||||||
@ -69,20 +73,35 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<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>
|
<dependency>
|
||||||
<groupId>org.json</groupId>
|
<groupId>org.json</groupId>
|
||||||
<artifactId>json</artifactId>
|
<artifactId>json</artifactId>
|
||||||
<version>20180813</version>
|
<version>20190722</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.fxmisc.richtext</groupId>
|
<groupId>org.fxmisc.richtext</groupId>
|
||||||
<artifactId>richtextfx</artifactId>
|
<artifactId>richtextfx</artifactId>
|
||||||
<version>0.9.1</version>
|
<version>0.10.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jsoup</groupId>
|
<groupId>org.jsoup</groupId>
|
||||||
<artifactId>jsoup</artifactId>
|
<artifactId>jsoup</artifactId>
|
||||||
<version>1.11.2</version>
|
<version>1.12.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.tulskiy</groupId>
|
<groupId>com.github.tulskiy</groupId>
|
||||||
@ -92,7 +111,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-jdk14</artifactId>
|
<artifactId>slf4j-jdk14</artifactId>
|
||||||
<version>1.7.13</version>
|
<version>2.0.0-alpha0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
7
G-Earth/src/main/java/gearth/J12Main.java
Normal file
7
G-Earth/src/main/java/gearth/J12Main.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package gearth;
|
||||||
|
|
||||||
|
public class J12Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Main.main(args);
|
||||||
|
}
|
||||||
|
}
|
@ -37,10 +37,13 @@ public class Main extends Application {
|
|||||||
|
|
||||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/gearth/G-EarthLogoSmaller.png")));
|
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.initStyle(StageStyle.UNDECORATED);
|
||||||
primaryStage.setTitle("G-Earth " + version);
|
primaryStage.setTitle("G-Earth " + version);
|
||||||
primaryStage.setScene(new Scene(root, 620, 295));
|
primaryStage.setScene(new Scene(root, 650, 295));
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
primaryStage.getScene().getStylesheets().add(getClass().getResource("/gearth/ui/bootstrap3.css").toExternalForm());
|
primaryStage.getScene().getStylesheets().add(getClass().getResource("/gearth/ui/bootstrap3.css").toExternalForm());
|
||||||
|
|
||||||
@ -57,6 +60,10 @@ public class Main extends Application {
|
|||||||
Platform.runLater(() -> {
|
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 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.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);
|
||||||
|
alert.setResizable(true);
|
||||||
|
alert.onShownProperty().addListener(e -> {
|
||||||
|
Platform.runLater(() -> alert.setResizable(false));
|
||||||
|
});
|
||||||
alert.show();
|
alert.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -90,6 +97,12 @@ public class Main extends Application {
|
|||||||
WebView webView = new WebView();
|
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.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);
|
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().setMinHeight(Region.USE_PREF_SIZE);
|
||||||
alert.getDialogPane().setContent(fp);
|
alert.getDialogPane().setContent(fp);
|
||||||
if (isForcedUpdate) {
|
if (isForcedUpdate) {
|
||||||
|
@ -8,7 +8,6 @@ import org.json.JSONArray;
|
|||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
|
||||||
import javax.xml.bind.DatatypeConverter;
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -2,7 +2,6 @@ package gearth.ui.extensions.executer;
|
|||||||
|
|
||||||
import gearth.Main;
|
import gearth.Main;
|
||||||
import gearth.ui.extensions.authentication.Authenticator;
|
import gearth.ui.extensions.authentication.Authenticator;
|
||||||
import org.omg.CORBA.Environment;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
10
pom.xml
10
pom.xml
@ -10,8 +10,8 @@
|
|||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>12</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>12</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<name>G-Earth-Parent</name>
|
<name>G-Earth-Parent</name>
|
||||||
@ -35,8 +35,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.7.0</version>
|
<version>3.7.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>12</source>
|
||||||
<target>1.8</target>
|
<target>12</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>2.6</version>
|
<version>3.1.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-resources</id>
|
<id>copy-resources</id>
|
||||||
|
Loading…
Reference in New Issue
Block a user