mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-06-22 06:19:02 -04:00
MacOS fixes
This commit is contained in:
@@ -11,6 +11,7 @@ import io.xpipe.core.process.OsType;
|
||||
import io.xpipe.core.util.XPipeDaemonMode;
|
||||
import io.xpipe.extension.event.ErrorEvent;
|
||||
import io.xpipe.extension.event.TrackEvent;
|
||||
import io.xpipe.extension.util.ThreadHelper;
|
||||
import picocli.CommandLine;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -75,6 +76,14 @@ public class LauncherCommand implements Callable<Integer> {
|
||||
con.performSimpleExchange(
|
||||
OpenExchange.Request.builder().arguments(inputs).build());
|
||||
}
|
||||
|
||||
if (OsType.getLocal().equals(OsType.MAC)) {
|
||||
Desktop.getDesktop().setOpenURIHandler(e -> {
|
||||
con.performSimpleExchange(
|
||||
OpenExchange.Request.builder().arguments(List.of(e.getURI().toString())).build());
|
||||
});
|
||||
ThreadHelper.sleep(1000);
|
||||
}
|
||||
}
|
||||
TrackEvent.info("Another instance is already running on this port. Quitting ...");
|
||||
OperationMode.halt(0);
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.xpipe.app.core.mode.OperationMode;
|
||||
import io.xpipe.core.impl.FileStore;
|
||||
import io.xpipe.extension.DataSourceProvider;
|
||||
import io.xpipe.extension.event.ErrorEvent;
|
||||
import io.xpipe.extension.event.TrackEvent;
|
||||
import io.xpipe.extension.util.ActionProvider;
|
||||
import lombok.Getter;
|
||||
import lombok.Value;
|
||||
@@ -20,6 +21,8 @@ import java.util.List;
|
||||
public abstract class LauncherInput {
|
||||
|
||||
public static void handle(List<String> arguments) {
|
||||
TrackEvent.withDebug("launcher", "Handling arguments").elements(arguments).handle();
|
||||
|
||||
var all = new ArrayList<ActionProvider.Action>();
|
||||
arguments.forEach(s -> {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user