mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
macos fixes
This commit is contained in:
parent
bdc2dacf95
commit
087fcd4b82
8 changed files with 27 additions and 8 deletions
|
@ -163,7 +163,7 @@ task runAttachedDebugger(type: JavaExec) {
|
||||||
modularity.inferModulePath = true
|
modularity.inferModulePath = true
|
||||||
jvmArgs += jvmRunArgs
|
jvmArgs += jvmRunArgs
|
||||||
jvmArgs += List.of(
|
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"
|
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0"
|
||||||
)
|
)
|
||||||
jvmArgs += '-XX:+EnableDynamicAgentLoading'
|
jvmArgs += '-XX:+EnableDynamicAgentLoading'
|
||||||
|
|
|
@ -21,8 +21,11 @@ import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.scene.layout.Region;
|
import javafx.scene.layout.Region;
|
||||||
import org.kordamp.ikonli.javafx.FontIcon;
|
import org.kordamp.ikonli.javafx.FontIcon;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public class BrowserTransferComp extends SimpleComp {
|
public class BrowserTransferComp extends SimpleComp {
|
||||||
|
|
||||||
|
@ -123,13 +126,19 @@ public class BrowserTransferComp extends SimpleComp {
|
||||||
var files = stage.getItems().stream()
|
var files = stage.getItems().stream()
|
||||||
.map(item -> {
|
.map(item -> {
|
||||||
try {
|
try {
|
||||||
return item.getLocalFile()
|
var file = item.getLocalFile();
|
||||||
|
if (!Files.exists(file)) {
|
||||||
|
return Optional.<File>empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Optional.of(file
|
||||||
.toRealPath()
|
.toRealPath()
|
||||||
.toFile();
|
.toFile());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.flatMap(Optional::stream)
|
||||||
.toList();
|
.toList();
|
||||||
Dragboard db = struc.get().startDragAndDrop(TransferMode.MOVE);
|
Dragboard db = struc.get().startDragAndDrop(TransferMode.MOVE);
|
||||||
var cc = new ClipboardContent();
|
var cc = new ClipboardContent();
|
||||||
|
@ -146,6 +155,7 @@ public class BrowserTransferComp extends SimpleComp {
|
||||||
event.consume();
|
event.consume();
|
||||||
});
|
});
|
||||||
struc.get().setOnDragDone(event -> {
|
struc.get().setOnDragDone(event -> {
|
||||||
|
// macOS does always report false here
|
||||||
if (!event.isAccepted()) {
|
if (!event.isAccepted()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,10 @@ public class AppResources {
|
||||||
fileSystems.forEach((s, moduleFileSystem) -> {
|
fileSystems.forEach((s, moduleFileSystem) -> {
|
||||||
try {
|
try {
|
||||||
moduleFileSystem.close();
|
moduleFileSystem.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException ignored) {
|
||||||
ErrorEvent.fromThrowable(e).handle();
|
// 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();
|
fileSystems.clear();
|
||||||
|
|
|
@ -161,6 +161,7 @@ public class SentryErrorHandler implements ErrorHandler {
|
||||||
: "false");
|
: "false");
|
||||||
s.setTag("terminal", Boolean.toString(ee.isTerminal()));
|
s.setTag("terminal", Boolean.toString(ee.isTerminal()));
|
||||||
s.setTag("omitted", Boolean.toString(ee.isOmitted()));
|
s.setTag("omitted", Boolean.toString(ee.isOmitted()));
|
||||||
|
s.setTag("diagnostics", Boolean.toString(ee.isShouldSendDiagnostics()));
|
||||||
|
|
||||||
var exMessage = ee.getThrowable() != null ? ee.getThrowable().getMessage() : null;
|
var exMessage = ee.getThrowable() != null ? ee.getThrowable().getMessage() : null;
|
||||||
if (ee.getDescription() != null && !ee.getDescription().equals(exMessage) && ee.isShouldSendDiagnostics()) {
|
if (ee.getDescription() != null && !ee.getDescription().equals(exMessage) && ee.isShouldSendDiagnostics()) {
|
||||||
|
|
|
@ -15,6 +15,12 @@ public class HomebrewUpdater extends GitHubUpdater {
|
||||||
@Override
|
@Override
|
||||||
public Region createInterface() {
|
public Region createInterface() {
|
||||||
var snippet = CodeSnippet.builder()
|
var snippet = CodeSnippet.builder()
|
||||||
|
.keyword("brew")
|
||||||
|
.space()
|
||||||
|
.keyword("update")
|
||||||
|
.space()
|
||||||
|
.identifier("&&")
|
||||||
|
.space()
|
||||||
.keyword("brew")
|
.keyword("brew")
|
||||||
.space()
|
.space()
|
||||||
.keyword("upgrade")
|
.keyword("upgrade")
|
||||||
|
|
2
dist/debug/linux/debug_attach_arguments.txt
vendored
2
dist/debug/linux/debug_attach_arguments.txt
vendored
|
@ -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
|
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0
|
2
dist/debug/mac/debug_attach_arguments.txt
vendored
2
dist/debug/mac/debug_attach_arguments.txt
vendored
|
@ -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
|
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0
|
|
@ -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
|
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0
|
Loading…
Reference in a new issue