Skip to content

Commit

Permalink
Merge pull request #18 from Seil0/develop
Browse files Browse the repository at this point in the history
 release 0.3.0
  • Loading branch information
Seil0 authored Apr 28, 2018
2 parents e9d033f + 5758b23 commit f1bb060
Show file tree
Hide file tree
Showing 24 changed files with 404 additions and 391 deletions.
4 changes: 2 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/test/main"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry exported="true" kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=9
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.source=9
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
language: java
language: java
jdk:
- oraclejdk9
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# cemu_UI

![Total Downloads](https://img.shields.io/github/downloads/Seil0/cemu_UI/total.svg?style=flat-square)
[![](https://img.shields.io/travis/Seil0/cemu_UI/master.svg?style=flat-square)](https://travis-ci.org/Seil0/cemu_UI)
[![Build](https://img.shields.io/travis/Seil0/cemu_UI/master.svg?style=flat-square)](https://travis-ci.org/Seil0/cemu_UI)
[![Latest](https://img.shields.io/github/release/Seil0/cemu_UI/all.svg?style=flat-square)](https://github.com/Seil0/cemu_UI/releases)
[![HitCount](http://hits.dwyl.io/Seil0/cemu_UI.svg)](http://hits.dwyl.io/Seil0/cemu_UI)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0)

cemu_UI is a simple, material design graphical frontend for [cemu](http://cemu.info/), a Wii U emulator. Downloads can be found [here](https://github.com/Seil0/cemu_UI/releases).
Expand All @@ -28,7 +29,6 @@ If you want to use the cloud sync function read the [wiki](https://github.com/Se
## [planed Features](https://github.com/Seil0/cemu_UI/projects/1) (no ETA)

* Controller support
* support more rom file formats in automatic detection

### If you have another idea, make a "new issue" with the ![#f03c15](https://placehold.it/15/fbca04/000000?text=+)`idea` lable

Expand Down
75 changes: 42 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,35 @@

<groupId>com</groupId>
<artifactId>cemu_UI</artifactId>
<version>0.2.3-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>cemu_UI</name>
<description>cemu_UI is a simple, material design graphical frontend for cemu, a Wii U emulator</description>
<url>http://www.kellerkinder.xyz</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<version>4.11</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>1.11.1</version>
<version>9.0.3</version>
</dependency>

<dependency>
<groupId>com.eclipsesource.minimal-json</groupId>
<artifactId>minimal-json</artifactId>
<version>0.9.4</version>
<version>0.9.5</version>
</dependency>

<dependency>
Expand All @@ -43,22 +41,22 @@
<version>3.21.0.1</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<version>2.6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-vfs2 -->
Expand Down Expand Up @@ -109,7 +107,7 @@
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-drive</artifactId>
<version>v3-rev87-1.23.0</version>
<version>v3-rev99-1.23.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.google.http-client/google-http-client -->
Expand Down Expand Up @@ -152,14 +150,14 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.2</version>
<version>2.9.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0-b01</version>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>

Expand All @@ -180,32 +178,43 @@
</dependencies>

<build>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>9</source>
<target>9</target>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>cemu_UI</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.cemu_UI.application.Main</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.cemu_UI.application.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

</project>
61 changes: 36 additions & 25 deletions src/main/java/com/cemu_UI/application/Main.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* cemu_UI
*
* Copyright 2017 <@Seil0>
* Copyright 2017-2018 <@Seil0>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/

package com.cemu_UI.application;

import java.io.File;
Expand Down Expand Up @@ -116,7 +115,7 @@ private void mainWindow(){
}

// startup checks
// check if client_secret.jason is present
// check if client_secret.json is present
if (Main.class.getResourceAsStream("/client_secret.json") == null) {
LOGGER.error("client_secret is missing!!!!!");

Expand All @@ -142,11 +141,9 @@ private void mainWindow(){
mainWindowController.setLastLocalSync(0);
mainWindowController.setxPosHelper(0);
mainWindowController.saveSettings();
Runtime.getRuntime().exec("java -jar cemu_UI.jar"); //start again (preventing Bugs)
System.exit(0); //finishes itself
}

if (pictureCache.exists() != true) {
if (!pictureCache.exists()) {
pictureCache.mkdir();
}

Expand All @@ -168,27 +165,30 @@ private void mainWindow(){
}
}

// loading settings and initialize UI, dbController.main() loads all databases
// generate window
scene = new Scene(pane); // create new scene, append pane to scene
scene.getStylesheets().add(Main.class.getResource("/css/MainWindows.css").toExternalForm());
primaryStage.setMinWidth(265.00);
primaryStage.setMinHeight(425.00);
primaryStage.setScene(scene); // append scene to stage
primaryStage.show(); // show stage

// init here as it loads the games to the mwc and the gui, therefore the window must exist
mainWindowController.init();
mainWindowController.dbController.init();
mainWindowController.getDbController().init();

// if cloud sync is activated start sync
if(mainWindowController.isCloudSync()) {
cloudController.initializeConnection(mainWindowController.getCloudService(), mainWindowController.getCemuPath());
cloudController.sync(mainWindowController.getCloudService(), mainWindowController.getCemuPath(), directory.getPath());
}
mainWindowController.addUIData();
}

scene = new Scene(pane); // create new scene, append pane to scene
scene.getStylesheets().add(Main.class.getResource("/css/MainWindows.css").toExternalForm());
primaryStage.setScene(scene); // append scene to stage
primaryStage.show(); // show stage
} catch (IOException e) {
e.printStackTrace();
}
}

private void firstStart(){
private void firstStart() {
Alert alert = new Alert(AlertType.CONFIRMATION); // new alert with file-chooser
alert.setTitle("cemu_UI");
alert.setHeaderText("cemu installation");
Expand All @@ -212,11 +212,10 @@ private void firstStart(){
Optional<ButtonType> result2 = alert2.showAndWait();
if (result2.get() == ButtonType.OK) {
DirectoryChooser directoryChooser = new DirectoryChooser();
File selectedDirectory = directoryChooser.showDialog(primaryStage);
mainWindowController.setRomPath(selectedDirectory.getAbsolutePath());

File selectedDirectory = directoryChooser.showDialog(primaryStage);
mainWindowController.setRomDirectoryPath(selectedDirectory.getAbsolutePath());
} else {
mainWindowController.setRomPath(null);
mainWindowController.setRomDirectoryPath(null);
}
}

Expand All @@ -241,7 +240,7 @@ public void changed(ObservableValue<? extends Number> observable, Number oldValu

saveTask = new TimerTask() {
@Override
public void run() {
public void run() {
mainWindowController.saveSettings();
}
};
Expand All @@ -262,7 +261,7 @@ public void changed(ObservableValue<? extends Number> observable, Number oldValu

saveTask = new TimerTask() {
@Override
public void run() {
public void run() {
mainWindowController.saveSettings();
}
};
Expand Down Expand Up @@ -295,11 +294,11 @@ public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1

public static void main(String[] args) {
// delete old log file and create new
if(osName.equals("Linux")){
if (osName.equals("Linux")) {
System.setProperty("logFilename", userHome + "/cemu_UI/app.log");
File logFile = new File(userHome + "/cemu_UI/app.log");
logFile.delete();
}else{
} else {
System.setProperty("logFilename", userHome + "/Documents/cemu_UI/app.log");
File logFile = new File(userHome + "/Documents/cemu_UI/app.log");
logFile.delete();
Expand Down Expand Up @@ -341,7 +340,19 @@ public File getDirectory() {
return directory;
}

public void setDirectory(File directory) {
this.directory = directory;
public File getConfigFile() {
return configFile;
}

public File getGamesDBFile() {
return gamesDBFile;
}

public File getReference_gamesFile() {
return reference_gamesFile;
}

public File getPictureCache() {
return pictureCache;
}
}
Loading

0 comments on commit f1bb060

Please sign in to comment.