@@ -851,10 +851,11 @@ public void aboutMenuHandler() {
851
851
ButtonType githubRepo = new ButtonType ("Github Repo" );
852
852
ButtonType viewLicense = new ButtonType ("View License" );
853
853
ButtonType librariesUsed = new ButtonType ("Libraries Used" );
854
- Alert alert = new Alert (Alert .AlertType .INFORMATION , "About text here" , librariesUsed , viewLicense , githubRepo , ButtonType .OK );
854
+ ButtonType donate = new ButtonType ("Donate!" );
855
+ Alert alert = new Alert (Alert .AlertType .INFORMATION , "About text here" , librariesUsed , viewLicense , donate , githubRepo , ButtonType .OK );
855
856
alert .setTitle ("About" );
856
857
alert .setHeaderText ("blobsaver " + Main .appVersion );
857
- alert .setContentText ("blobsaver Copyright (c) 2018 airsquared\n " +
858
+ alert .setContentText ("blobsaver Copyright (c) 2018 airsquared\n \n " +
858
859
"This program is licensed under GNU GPL v3.0-only" );
859
860
resizeAlertButtons (alert );
860
861
alert .showAndWait ();
@@ -914,6 +915,9 @@ public void aboutMenuHandler() {
914
915
e .printStackTrace ();
915
916
}
916
917
break ;
918
+ case "Donate!" :
919
+ donate ();
920
+ break ;
917
921
}
918
922
}
919
923
@@ -977,6 +981,7 @@ private void useMacOSMenuBar() {
977
981
MenuItem checkForValidBlobsMenuItem = new MenuItem ("Check for Valid Blobs..." );
978
982
checkForValidBlobsMenuItem .setOnAction (event -> checkBlobs ());
979
983
helpMenu .getItems ().set (5 , checkForValidBlobsMenuItem );
984
+ helpMenu .getItems ().add (6 , new SeparatorMenuItem ());
980
985
981
986
macOSMenuBar .getMenus ().add (helpMenu );
982
987
@@ -1242,11 +1247,17 @@ public void readInfo() {
1242
1247
}
1243
1248
// validate pairing status
1244
1249
try {
1245
- String idevicepairResult = executeProgram (idevicepairPath , "pair" );
1250
+ String idevicepairResult = executeProgram (idevicepairPath , "pair" ). trim () ;
1246
1251
log ("idevicepair: " + idevicepairResult );
1247
1252
//noinspection StatementWithEmptyBody
1248
1253
if (idevicepairResult .contains ("Paired with device" )) {
1249
1254
// continue
1255
+ } else if (idevicepairResult .contains ("dyld: Library not loaded:" )) {
1256
+ deleteFolder (new File (System .getProperty ("user.home" , ".blobsaver_bin" )));
1257
+ newUnreportableError ("This error will happen if you have used version v2.2 before. This error will automatically be fixed after restarting the application." );
1258
+ Platform .exit ();
1259
+ System .exit (-1 );
1260
+ return ;
1250
1261
} else if (idevicepairResult .contains ("Please accept the trust dialog" )) {
1251
1262
newUnreportableError ("Please accept the trust dialog on the device" );
1252
1263
return ;
@@ -1288,6 +1299,12 @@ public void readInfo() {
1288
1299
if (ideviceinfoResult .contains ("ERROR: Could not connect to lockdownd" )) {
1289
1300
newReportableError ("ideviceinfo:" + ideviceinfoResult , ideviceinfoResult );
1290
1301
return ;
1302
+ } else if (ideviceinfoResult .contains ("dyld: Library not loaded:" )) {
1303
+ deleteFolder (new File (System .getProperty ("user.home" , ".blobsaver_bin" )));
1304
+ newUnreportableError ("This error will happen if you have used version v2.2 before. This error will automatically be fixed after restarting the application." );
1305
+ Platform .exit ();
1306
+ System .exit (-1 );
1307
+ return ;
1291
1308
} else if (ideviceinfoResult .contains ("No device found" )) {
1292
1309
newUnreportableError ("No device found, is it plugged in?" );
1293
1310
return ;
@@ -1314,6 +1331,12 @@ public void readInfo() {
1314
1331
if (ideviceinfoResult .contains ("ERROR: Could not connect to lockdownd" )) {
1315
1332
newReportableError ("ideviceinfo:" + ideviceinfoResult , ideviceinfoResult );
1316
1333
return ;
1334
+ } else if (ideviceinfoResult .contains ("dyld: Library not loaded:" )) {
1335
+ deleteFolder (new File (System .getProperty ("user.home" , ".blobsaver_bin" )));
1336
+ newUnreportableError ("This error will happen if you have used version v2.2 before. This error will automatically be fixed after restarting the application." );
1337
+ Platform .exit ();
1338
+ System .exit (-1 );
1339
+ return ;
1317
1340
} else if (ideviceinfoResult .contains ("No device found" )) {
1318
1341
newUnreportableError ("No device found, is it plugged in?" );
1319
1342
return ;
@@ -1347,6 +1370,12 @@ public void readInfo() {
1347
1370
if (ideviceinfoResult .contains ("ERROR: Could not connect to lockdownd" )) {
1348
1371
newReportableError ("ideviceinfo:" + ideviceinfoResult , ideviceinfoResult );
1349
1372
return ;
1373
+ } else if (ideviceinfoResult .contains ("dyld: Library not loaded:" )) {
1374
+ deleteFolder (new File (System .getProperty ("user.home" , ".blobsaver_bin" )));
1375
+ newUnreportableError ("This error will happen if you have used version v2.2 before. This error will automatically be fixed after restarting the application." );
1376
+ Platform .exit ();
1377
+ System .exit (-1 );
1378
+ return ;
1350
1379
} else if (ideviceinfoResult .contains ("No device found" )) {
1351
1380
newUnreportableError ("No device found, is it plugged in?" );
1352
1381
return ;
@@ -1381,6 +1410,14 @@ private String executeProgram(String... command) throws IOException {
1381
1410
}
1382
1411
}
1383
1412
1413
+ public void donate () {
1414
+ try {
1415
+ Desktop .getDesktop ().browse (new URI ("https://www.paypal.me/airsqrd" ));
1416
+ } catch (IOException | URISyntaxException e ) {
1417
+ e .printStackTrace ();
1418
+ }
1419
+ }
1420
+
1384
1421
private void log (String msg ) {
1385
1422
System .out .println (msg );
1386
1423
}
0 commit comments