From 699549eeaaedb6f370fec82d1bb212c71d49eedb Mon Sep 17 00:00:00 2001 From: Christopher Schnick Date: Tue, 27 Dec 2022 14:56:51 +0100 Subject: [PATCH] Fix installation pass for mac --- .../main/java/io/xpipe/core/util/XPipeInstallation.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java b/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java index 35872b67..3996c44a 100644 --- a/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java +++ b/core/src/main/java/io/xpipe/core/util/XPipeInstallation.java @@ -14,6 +14,8 @@ public class XPipeInstallation { var suffix = (arguments != null ? " " + arguments : ""); if (OsType.getLocal().equals(OsType.LINUX)) { return "nohup \"" + installationBase + "/app/bin/xpiped\" --external" + suffix + " & disown"; + } else if (OsType.getLocal().equals(OsType.MAC)) { + return "nohup \"" + installationBase + "/Contents/MacOS/xpiped\" --external" + suffix + " & disown"; } return "\"" + FileNames.join(installationBase, XPipeInstallation.getDaemonExecutablePath(OsType.getLocal())) + "\" --external" + suffix; @@ -38,7 +40,11 @@ public class XPipeInstallation { return defaultInstallation; } - return FileNames.getParent(FileNames.getParent(cliExecutable)); + if (p.getOsType().equals(OsType.MAC)) { + return FileNames.getParent(FileNames.getParent(FileNames.getParent(FileNames.getParent(cliExecutable)))); + } else { + return FileNames.getParent(FileNames.getParent(cliExecutable)); + } } public static String queryInstallationVersion(ShellProcessControl p, String exec) throws Exception {