Skip to content

Commit bff5eb7

Browse files
committed
Minor message updates
1 parent 92b6068 commit bff5eb7

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

src/main/java/airsquared/blobsaver/app/Controller.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,12 @@ public void readInfo() {
509509
e.showErrorAlert();
510510
} catch (Throwable e) {
511511
e.printStackTrace();
512-
Utils.showReportableError("Error: unable to register native methods", Utils.exceptionToString(e));
512+
if (e instanceof Error && Platform.isLinux()) {
513+
Utils.showUnreportableError("Unable to load native libraries. Ensure you have libimobiledevice installed and as libimobiledevice.so. If it is installed under a different name, try creating a symlink.");
514+
System.exit(-1);
515+
} else {
516+
Utils.showReportableError("An unknown error occurred.", Utils.exceptionToString(e));
517+
}
513518
}
514519
}
515520

@@ -528,7 +533,7 @@ public void readApnonce() {
528533
alert2.setHeaderText("Reading APNonce from connected device...");
529534
Utils.forEachButton(alert2, button -> button.setDisable(true));
530535

531-
LibimobiledeviceUtil.GetApnonceTask task = LibimobiledeviceUtil.createApnonceTask(jailbroken);
536+
var task = new LibimobiledeviceUtil.GetApnonceTask(jailbroken);
532537
task.setOnSucceeded(event -> {
533538
apnonceField.setText(task.getApnonceResult());
534539
generatorField.setText(task.getGeneratorResult());

src/main/java/airsquared/blobsaver/app/LibimobiledeviceUtil.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ public static void exitRecovery(Pointer irecvClient) throws LibimobiledeviceExce
6262
throwIfNeeded(Libirecovery.close(irecvClient), ErrorCodeType.irecv_error);
6363
}
6464

65-
public static GetApnonceTask createApnonceTask(boolean jailbroken) {
66-
return new GetApnonceTask(jailbroken);
67-
}
68-
6965
public static final class GetApnonceTask extends Task<Void> {
7066
private String apnonceResult, generatorResult;
7167
/**
@@ -82,7 +78,7 @@ public String getGeneratorResult() {
8278
return generatorResult;
8379
}
8480

85-
private GetApnonceTask(boolean jailbroken) {
81+
public GetApnonceTask(boolean jailbroken) {
8682
this.jailbroken = jailbroken;
8783
}
8884

@@ -185,10 +181,9 @@ private static PointerByReference waitForRecovery() throws LibimobiledeviceExcep
185181
}
186182
try {
187183
errorCode = Libirecovery.open(irecvClient);
188-
} catch (UnsatisfiedLinkError e) {
184+
} catch (Error e) {
189185
if (Platform.isLinux()) {
190-
throw new LibimobiledeviceException("Error: libirecovery not found.\n\n" +
191-
"Please ensure you have libirecovery installed as libirecovery.so, and not as libirecovery-1.0.so.", null, 0, false);
186+
throw new LibimobiledeviceException("Unable to load native libraries. Ensure you have libirecovery installed and as libirecovery.so. If it is installed under a different name, try creating a symlink.", null, 0, false);
192187
} else {
193188
throw e;
194189
}

src/main/java/airsquared/blobsaver/app/natives/NativeUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
final class NativeUtils {
3434

35-
3635
private static final Map<String, ?> libraryOptions = Map.of(Library.OPTION_CLASSLOADER, NativeUtils.class.getClassLoader(),
3736
Library.OPTION_FUNCTION_MAPPER, (FunctionMapper) (lib, method) ->
3837
method.isAnnotationPresent(CFunctionName.class) ?

src/main/resources/airsquared/blobsaver/app/blobsaver.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
</VBox.margin>
300300
</Button>
301301
<ToggleButton fx:id="backgroundSettingsButton" prefWidth="Infinity" maxWidth="Infinity"
302-
mnemonicParsing="false" onAction="#backgroundSettingsHandler" text="Background Settings">
302+
mnemonicParsing="false" onAction="#backgroundSettingsHandler" text="Auto-Save Settings">
303303
<VBox.margin>
304304
<Insets bottom="10.0"/>
305305
</VBox.margin>

0 commit comments

Comments
 (0)