google drive integration part 1.1
This commit is contained in:
parent
cdf9496d02
commit
d0360931fe
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/**
|
||||
* cemu_UI
|
||||
*
|
||||
* Copyright 2017 <@Seil0>
|
||||
|
@ -19,30 +19,31 @@
|
|||
* MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
package application;
|
||||
package application;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.util.Optional;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.stage.DirectoryChooser;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.Alert.AlertType;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.util.Optional;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.stage.DirectoryChooser;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.Alert.AlertType;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
|
||||
|
||||
public class Main extends Application {
|
||||
public class Main extends Application {
|
||||
|
||||
Stage primaryStage;
|
||||
private MainWindowController mainWindowController;
|
||||
CloudController cloudController;
|
||||
private String dirWin = System.getProperty("user.home") + "/Documents/cemu_UI"; //Windows: C:/Users/"User"/Documents/HomeFlix
|
||||
private String dirLinux = System.getProperty("user.home") + "/cemu_UI"; //Linux: /home/"User"/HomeFlix
|
||||
private String gamesDBdownloadURL = "https://github.com/Seil0/cemu_UI/raw/master/downloadContent/games.db";
|
||||
|
@ -57,6 +58,7 @@
|
|||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
this.primaryStage = primaryStage;
|
||||
cloudController = new CloudController(this);
|
||||
mainWindow();
|
||||
}
|
||||
|
||||
|
@ -66,12 +68,12 @@
|
|||
AnchorPane pane = loader.load();
|
||||
primaryStage.setResizable(false);
|
||||
primaryStage.setTitle("cemu_UI");
|
||||
// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/recources/Homeflix_Icon_64x64.png"))); //adds application icon
|
||||
// primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/recources/Homeflix_Icon_64x64.png"))); //adds application icon
|
||||
|
||||
mainWindowController = loader.getController(); //Link of FXMLController and controller class
|
||||
mainWindowController.setMain(this); //call setMain
|
||||
|
||||
//get OS and the right paths
|
||||
//get os and the right paths
|
||||
if(System.getProperty("os.name").equals("Linux")){
|
||||
directory = new File(dirLinux);
|
||||
configFile = new File(dirLinux + "/config.xml");
|
||||
|
@ -123,8 +125,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
//loading settings and initialize UI
|
||||
//loading settings and initialize UI, dbController.main() loads all databases
|
||||
mainWindowController.loadSettings();
|
||||
if(mainWindowController.isCloudSync()) {
|
||||
cloudController.initializeConnection(mainWindowController.getCloudService(), mainWindowController.getCemuPath());
|
||||
cloudController.sync(mainWindowController.getCloudService(), mainWindowController.getCemuPath());
|
||||
mainWindowController.saveSettings();//TODO find a better way
|
||||
}
|
||||
mainWindowController.dbController.main();
|
||||
mainWindowController.addUIData();
|
||||
mainWindowController.initActions();
|
||||
|
|
Loading…
Reference in New Issue