@@ -851,10 +851,11 @@ public void aboutMenuHandler() {
851851 ButtonType githubRepo = new ButtonType ("Github Repo" );
852852 ButtonType viewLicense = new ButtonType ("View License" );
853853 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 );
855856 alert .setTitle ("About" );
856857 alert .setHeaderText ("blobsaver " + Main .appVersion );
857- alert .setContentText ("blobsaver Copyright (c) 2018 airsquared\n " +
858+ alert .setContentText ("blobsaver Copyright (c) 2018 airsquared\n \n " +
858859 "This program is licensed under GNU GPL v3.0-only" );
859860 resizeAlertButtons (alert );
860861 alert .showAndWait ();
@@ -914,6 +915,9 @@ public void aboutMenuHandler() {
914915 e .printStackTrace ();
915916 }
916917 break ;
918+ case "Donate!" :
919+ donate ();
920+ break ;
917921 }
918922 }
919923
@@ -977,6 +981,7 @@ private void useMacOSMenuBar() {
977981 MenuItem checkForValidBlobsMenuItem = new MenuItem ("Check for Valid Blobs..." );
978982 checkForValidBlobsMenuItem .setOnAction (event -> checkBlobs ());
979983 helpMenu .getItems ().set (5 , checkForValidBlobsMenuItem );
984+ helpMenu .getItems ().add (6 , new SeparatorMenuItem ());
980985
981986 macOSMenuBar .getMenus ().add (helpMenu );
982987
@@ -1242,11 +1247,17 @@ public void readInfo() {
12421247 }
12431248 // validate pairing status
12441249 try {
1245- String idevicepairResult = executeProgram (idevicepairPath , "pair" );
1250+ String idevicepairResult = executeProgram (idevicepairPath , "pair" ). trim () ;
12461251 log ("idevicepair: " + idevicepairResult );
12471252 //noinspection StatementWithEmptyBody
12481253 if (idevicepairResult .contains ("Paired with device" )) {
12491254 // 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 ;
12501261 } else if (idevicepairResult .contains ("Please accept the trust dialog" )) {
12511262 newUnreportableError ("Please accept the trust dialog on the device" );
12521263 return ;
@@ -1288,6 +1299,12 @@ public void readInfo() {
12881299 if (ideviceinfoResult .contains ("ERROR: Could not connect to lockdownd" )) {
12891300 newReportableError ("ideviceinfo:" + ideviceinfoResult , ideviceinfoResult );
12901301 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 ;
12911308 } else if (ideviceinfoResult .contains ("No device found" )) {
12921309 newUnreportableError ("No device found, is it plugged in?" );
12931310 return ;
@@ -1314,6 +1331,12 @@ public void readInfo() {
13141331 if (ideviceinfoResult .contains ("ERROR: Could not connect to lockdownd" )) {
13151332 newReportableError ("ideviceinfo:" + ideviceinfoResult , ideviceinfoResult );
13161333 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 ;
13171340 } else if (ideviceinfoResult .contains ("No device found" )) {
13181341 newUnreportableError ("No device found, is it plugged in?" );
13191342 return ;
@@ -1347,6 +1370,12 @@ public void readInfo() {
13471370 if (ideviceinfoResult .contains ("ERROR: Could not connect to lockdownd" )) {
13481371 newReportableError ("ideviceinfo:" + ideviceinfoResult , ideviceinfoResult );
13491372 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 ;
13501379 } else if (ideviceinfoResult .contains ("No device found" )) {
13511380 newUnreportableError ("No device found, is it plugged in?" );
13521381 return ;
@@ -1381,6 +1410,14 @@ private String executeProgram(String... command) throws IOException {
13811410 }
13821411 }
13831412
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+
13841421 private void log (String msg ) {
13851422 System .out .println (msg );
13861423 }
0 commit comments