macos fixes

This commit is contained in:
crschnick 2023-11-18 07:40:32 +00:00
parent bdc2dacf95
commit 087fcd4b82
8 changed files with 27 additions and 8 deletions

View file

@ -163,7 +163,7 @@ task runAttachedDebugger(type: JavaExec) {
modularity.inferModulePath = true
jvmArgs += jvmRunArgs
jvmArgs += List.of(
"-javaagent:${System.getProperty("user.home")}/.attachme/attachme-agent-1.2.1.jar=port:7857,host:localhost".toString(),
"-javaagent:${System.getProperty("user.home")}/.attachme/attachme-agent-1.2.4.jar=port:7857,host:localhost".toString(),
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0"
)
jvmArgs += '-XX:+EnableDynamicAgentLoading'

View file

@ -21,8 +21,11 @@ import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Region;
import org.kordamp.ikonli.javafx.FontIcon;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.List;
import java.util.Optional;
public class BrowserTransferComp extends SimpleComp {
@ -123,13 +126,19 @@ public class BrowserTransferComp extends SimpleComp {
var files = stage.getItems().stream()
.map(item -> {
try {
return item.getLocalFile()
var file = item.getLocalFile();
if (!Files.exists(file)) {
return Optional.<File>empty();
}
return Optional.of(file
.toRealPath()
.toFile();
.toFile());
} catch (IOException e) {
throw new RuntimeException(e);
}
})
.flatMap(Optional::stream)
.toList();
Dragboard db = struc.get().startDragAndDrop(TransferMode.MOVE);
var cc = new ClipboardContent();
@ -146,6 +155,7 @@ public class BrowserTransferComp extends SimpleComp {
event.consume();
});
struc.get().setOnDragDone(event -> {
// macOS does always report false here
if (!event.isAccepted()) {
return;
}

View file

@ -25,8 +25,10 @@ public class AppResources {
fileSystems.forEach((s, moduleFileSystem) -> {
try {
moduleFileSystem.close();
} catch (IOException e) {
ErrorEvent.fromThrowable(e).handle();
} catch (IOException ignored) {
// Usually when updating, a SIGTERM is sent to this application.
// However, it takes a while to shut down but the installer is deleting files meanwhile.
// It can happen that the jar it does not exist anymore
}
});
fileSystems.clear();

View file

@ -161,6 +161,7 @@ public class SentryErrorHandler implements ErrorHandler {
: "false");
s.setTag("terminal", Boolean.toString(ee.isTerminal()));
s.setTag("omitted", Boolean.toString(ee.isOmitted()));
s.setTag("diagnostics", Boolean.toString(ee.isShouldSendDiagnostics()));
var exMessage = ee.getThrowable() != null ? ee.getThrowable().getMessage() : null;
if (ee.getDescription() != null && !ee.getDescription().equals(exMessage) && ee.isShouldSendDiagnostics()) {

View file

@ -15,6 +15,12 @@ public class HomebrewUpdater extends GitHubUpdater {
@Override
public Region createInterface() {
var snippet = CodeSnippet.builder()
.keyword("brew")
.space()
.keyword("update")
.space()
.identifier("&&")
.space()
.keyword("brew")
.space()
.keyword("upgrade")

View file

@ -1,2 +1,2 @@
-javaagent:$HOME/.attachme/attachme-agent-1.2.1.jar=port:7857,host:localhost
-javaagent:$HOME/.attachme/attachme-agent-1.2.4.jar=port:7857,host:localhost
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0

View file

@ -1,2 +1,2 @@
-javaagent:$HOME/.attachme/attachme-agent-1.2.1.jar=port:7857,host:localhost
-javaagent:$HOME/.attachme/attachme-agent-1.2.4.jar=port:7857,host:localhost
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0

View file

@ -1,2 +1,2 @@
-javaagent:%userprofile%\\.attachme\\attachme-agent-1.2.1.jar=port:7857,host:localhost
-javaagent:%userprofile%\\.attachme\\attachme-agent-1.2.4.jar=port:7857,host:localhost
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0