Skip to content

Commit

Permalink
Merge pull request #12 from Seil0/develop
Browse files Browse the repository at this point in the history
 updat version to 0.2.2 build 061
  • Loading branch information
Seil0 authored Dec 11, 2017
2 parents b975a63 + 45c36aa commit 1aab6fd
Show file tree
Hide file tree
Showing 18 changed files with 1,350 additions and 174 deletions.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<attribute name="maven.pomderived" value="true"/>
</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">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you want to use the cloud sync function read the [wiki](https://github.com/Se
* launch Games
* Time played in total
* last time played
* easyer way to add updates & DLCs (only adding not downloading!)
* add updates and dlcs easier (only adding not downloading!)
* automatic rom detection (only .rpx files with a app.xml)
* customisable UI
* [sync savegames via google drive](https://github.com/Seil0/cemu_UI/wiki)
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>1.10.0</version>
<version>1.11.1</version>
</dependency>

<dependency>
Expand All @@ -40,7 +40,7 @@
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.21.0</version>
<version>3.21.0.1</version>
</dependency>

<dependency>
Expand Down
37 changes: 21 additions & 16 deletions src/main/java/com/cemu_UI/application/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,16 @@ public class Main extends Application {
CloudController cloudController;
AnchorPane pane;
Scene scene; // TODO make private
private String dirWin = System.getProperty("user.home") + "/Documents/cemu_UI"; // Windows: C:/Users/"User"/Documents/cemu_UI
private String dirLinux = System.getProperty("user.home") + "/cemu_UI"; // Linux: /home/"User"/cemu_UI
private static String userHome = System.getProperty("user.home");
private static String userName = System.getProperty("user.name");
private static String osName = System.getProperty("os.name");
private static String osArch = System.getProperty("os.arch");
private static String osVers = System.getProperty("os.version");
private static String javaVers = System.getProperty("java.version");
private static String javaVend= System.getProperty("java.vendor");
private String gamesDBdownloadURL = "https://github.com/Seil0/cemu_UI/raw/master/downloadContent/games.db";
public String dirWin = userHome + "/Documents/cemu_UI"; // Windows: C:/Users/"User"/Documents/cemu_UI
public String dirLinux = userHome + "/cemu_UI"; // Linux: /home/"User"/cemu_UI
private File directory;
private File configFile;
private File gamesDBFile;
Expand All @@ -70,8 +77,10 @@ public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
LOGGER.info("OS: " + osName + " " + osVers + " " + osArch);
LOGGER.info("Java: " + javaVend + " " + javaVers);
LOGGER.info("User: " + userName + " " + userHome);
this.primaryStage = primaryStage;
cloudController = new CloudController(mainWindowController);
mainWindow();
initActions();
} catch (Exception e) {
Expand All @@ -85,15 +94,15 @@ private void mainWindow(){
FXMLLoader loader = new FXMLLoader();
loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml"));
pane = (AnchorPane) loader.load();
// primaryStage.setResizable(false);
primaryStage.setTitle("cemu_UI");
// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/resources/Homeflix_Icon_64x64.png"))); //adds application icon

mainWindowController = loader.getController(); // Link of FXMLController and controller class
mainWindowController.setMain(this); // call setMain
cloudController = new CloudController(mainWindowController); // call cloudController constructor

// get OS and the specific paths
if (System.getProperty("os.name").equals("Linux")) {
if (osName.equals("Linux")) {
directory = new File(dirLinux);
configFile = new File(dirLinux + "/config.xml");
gamesDBFile = new File(dirLinux + "/games.db");
Expand All @@ -119,8 +128,6 @@ private void mainWindow(){
alert.showAndWait();
}

LOGGER.info("Directory: " + directory.exists());
LOGGER.info("Configfile: " + configFile.exists());
if (!directory.exists()) {
LOGGER.info("creating cemu_UI directory");
directory.mkdir();
Expand Down Expand Up @@ -157,11 +164,9 @@ private void mainWindow(){
}

// loading settings and initialize UI, dbController.main() loads all databases
mainWindowController.loadSettings();
mainWindowController.checkAutoUpdate();
mainWindowController.initActions();
mainWindowController.initUI();
mainWindowController.init();
mainWindowController.dbController.main();
// if cloud sync is activated start sync
if(mainWindowController.isCloudSync()) {
cloudController.initializeConnection(mainWindowController.getCloudService(), mainWindowController.getCemuPath());
cloudController.stratupCheck(mainWindowController.getCloudService(), mainWindowController.getCemuPath());
Expand Down Expand Up @@ -286,13 +291,13 @@ 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(System.getProperty("os.name").equals("Linux")){
System.setProperty("logFilename", System.getProperty("user.home") + "/cemu_UI/app.log");
File logFile = new File(System.getProperty("user.home") + "/cemu_UI/app.log");
if(osName.equals("Linux")){
System.setProperty("logFilename", userHome + "/cemu_UI/app.log");
File logFile = new File(userHome + "/cemu_UI/app.log");
logFile.delete();
}else{
System.setProperty("logFilename", System.getProperty("user.home") + "/Documents/cemu_UI/app.log");
File logFile = new File(System.getProperty("user.home") + "/Documents/cemu_UI/app.log");
System.setProperty("logFilename", userHome + "/Documents/cemu_UI/app.log");
File logFile = new File(userHome + "/Documents/cemu_UI/app.log");
logFile.delete();
}
LOGGER = LogManager.getLogger(Main.class.getName());
Expand Down
Loading

0 comments on commit 1aab6fd

Please sign in to comment.