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.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="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/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/commons-vfs2-2.1.1744488.2.jar"/>
|
||||||
<classpathentry kind="lib" path="src/libraries/flow-8.0.1.jar"/>
|
<classpathentry kind="lib" path="src/libraries/flow-8.0.1.jar"/>
|
||||||
<classpathentry kind="lib" path="src/libraries/zip4j-1.3.2.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/jfoenix-1.9.1.jar"/>
|
||||||
<classpathentry kind="lib" path="src/libraries/commons-codec-1.11.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="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="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="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="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="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="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="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="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="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="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="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/jetty-util-6.1.26.jar"/>
|
||||||
|
<classpathentry kind="lib" path="src/libraries/commons-logging-1.1.1.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</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 GoogleDriveController googleDriveController = new GoogleDriveController();
|
||||||
private static final Logger LOGGER = LogManager.getLogger(CloudController.class.getName());
|
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 ...");
|
LOGGER.info("sartting cloud initialisation ...");
|
||||||
|
|
||||||
if(cloudService.equals("GoogleDrive")) {
|
if(cloudService.equals("GoogleDrive")) {
|
||||||
LOGGER.info("selected service is Google Drive");
|
LOGGER.info("selected service is Google Drive");
|
||||||
try {
|
try {
|
||||||
googleDriveController.main(cemuDirectory);
|
googleDriveController.main(cemuDirectory);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error("error while initialize connection", e);
|
LOGGER.error("error while initialize connection", e);
|
||||||
|
return success;
|
||||||
}
|
}
|
||||||
|
success = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cloudService.equals("Dropbox")) {
|
if(cloudService.equals("Dropbox")) {
|
||||||
LOGGER.info("selected service is Dropbox");
|
LOGGER.info("selected service is Dropbox");
|
||||||
}
|
}
|
||||||
LOGGER.info("cloud initialisation done!");
|
LOGGER.info("cloud initialisation done!");
|
||||||
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
void stratupCheck(String cloudService, String cemuDirectory) {
|
void stratupCheck(String cloudService, String cemuDirectory) {
|
||||||
|
|
|
@ -858,9 +858,15 @@ public class MainWindowController {
|
||||||
cloudSync = true;
|
cloudSync = true;
|
||||||
//TODO rework for other cloud services
|
//TODO rework for other cloud services
|
||||||
cloudService = "GoogleDrive";
|
cloudService = "GoogleDrive";
|
||||||
main.cloudController.initializeConnection(getCloudService(), getCemuPath());
|
if (main.cloudController.initializeConnection(getCloudService(), getCemuPath())) {
|
||||||
main.cloudController.sync(getCloudService(), getCemuPath());
|
main.cloudController.sync(getCloudService(), getCemuPath());
|
||||||
saveSettings();
|
saveSettings();
|
||||||
|
} else {
|
||||||
|
cloudSyncToggleBtn.setSelected(false);
|
||||||
|
// TODO show error message
|
||||||
|
}
|
||||||
|
|
||||||
|
// saveSettings();
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -104,11 +104,10 @@ public class GoogleDriveController {
|
||||||
InputStream in = getClass().getClassLoader().getResourceAsStream("resources/client_secret.json");
|
InputStream in = getClass().getClassLoader().getResourceAsStream("resources/client_secret.json");
|
||||||
GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));
|
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.
|
// Build flow and trigger user authorization request.
|
||||||
GoogleAuthorizationCodeFlow flow =
|
GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
|
||||||
new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
|
.setDataStoreFactory(DATA_STORE_FACTORY)
|
||||||
.setDataStoreFactory(DATA_STORE_FACTORY)
|
|
||||||
.setAccessType("offline")
|
.setAccessType("offline")
|
||||||
.build();
|
.build();
|
||||||
Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("user");
|
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