more lib updates and cloud sync fixes
* added a fallback if something went wrong with cloud sync init * removed old libs
This commit is contained in:
parent
5b46a0b58c
commit
eb127282ad
24
.classpath
24
.classpath
|
@ -4,7 +4,6 @@
|
|||
<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.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="src/libraries/minimal-json-0.9.4.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/commons-logging-api-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/commons-vfs2-2.1.1744488.2.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/flow-8.0.1.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/zip4j-1.3.2.jar"/>
|
||||
|
@ -14,16 +13,17 @@
|
|||
<classpathentry kind="lib" path="src/libraries/jfoenix-1.9.1.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/commons-codec-1.11.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/commons-io-2.6.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/google-api-client-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/google-api-services-drive-v3-rev87-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/google-http-client-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/google-http-client-jackson2-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/google-oauth-client-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/google-oauth-client-java6-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/google-oauth-client-jetty-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/jackson-core-2.9.2.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/javax.servlet-api-4.0.0.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/jetty-6.1.26.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jannik/eclipse-workspace/cemu_UI/src/libraries/google_api_libraries/jetty-util-6.1.26.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-api-client-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-api-services-drive-v3-rev87-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-http-client-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-http-client-jackson2-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-oauth-client-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-oauth-client-java6-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-oauth-client-jetty-1.23.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/jackson-core-2.9.2.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/javax.servlet-api-4.0.0.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/jetty-6.1.26.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/google_api_libraries/jetty-util-6.1.26.jar"/>
|
||||
<classpathentry kind="lib" path="src/libraries/commons-logging-1.1.1.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
/cloudControllerInstances/
|
||||
/libraries/
|
||||
/resources/
|
||||
/application/
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -40,20 +40,26 @@ public class CloudController {
|
|||
private GoogleDriveController googleDriveController = new GoogleDriveController();
|
||||
private static final Logger LOGGER = LogManager.getLogger(CloudController.class.getName());
|
||||
|
||||
void initializeConnection(String cloudService, String cemuDirectory) {
|
||||
boolean initializeConnection(String cloudService, String cemuDirectory) {
|
||||
boolean success = false;
|
||||
LOGGER.info("sartting cloud initialisation ...");
|
||||
|
||||
if(cloudService.equals("GoogleDrive")) {
|
||||
LOGGER.info("selected service is Google Drive");
|
||||
try {
|
||||
googleDriveController.main(cemuDirectory);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("error while initialize connection", e);
|
||||
return success;
|
||||
}
|
||||
success = true;
|
||||
}
|
||||
|
||||
if(cloudService.equals("Dropbox")) {
|
||||
LOGGER.info("selected service is Dropbox");
|
||||
}
|
||||
LOGGER.info("cloud initialisation done!");
|
||||
return success;
|
||||
}
|
||||
|
||||
void stratupCheck(String cloudService, String cemuDirectory) {
|
||||
|
|
|
@ -858,9 +858,15 @@ public class MainWindowController {
|
|||
cloudSync = true;
|
||||
//TODO rework for other cloud services
|
||||
cloudService = "GoogleDrive";
|
||||
main.cloudController.initializeConnection(getCloudService(), getCemuPath());
|
||||
main.cloudController.sync(getCloudService(), getCemuPath());
|
||||
saveSettings();
|
||||
if (main.cloudController.initializeConnection(getCloudService(), getCemuPath())) {
|
||||
main.cloudController.sync(getCloudService(), getCemuPath());
|
||||
saveSettings();
|
||||
} else {
|
||||
cloudSyncToggleBtn.setSelected(false);
|
||||
// TODO show error message
|
||||
}
|
||||
|
||||
// saveSettings();
|
||||
dialog.close();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -104,11 +104,10 @@ public class GoogleDriveController {
|
|||
InputStream in = getClass().getClassLoader().getResourceAsStream("resources/client_secret.json");
|
||||
GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));
|
||||
|
||||
//FIXME Linux fails to open a new browser window, application crashes
|
||||
//FIXME Linux fails to open a new browser window, application crashes, maybe a kde only bug
|
||||
// Build flow and trigger user authorization request.
|
||||
GoogleAuthorizationCodeFlow flow =
|
||||
new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
|
||||
.setDataStoreFactory(DATA_STORE_FACTORY)
|
||||
GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
|
||||
.setDataStoreFactory(DATA_STORE_FACTORY)
|
||||
.setAccessType("offline")
|
||||
.build();
|
||||
Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("user");
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue