refactor(macos): bundle single relay binary

This commit is contained in:
Peter Steinberger
2025-12-20 19:35:29 +00:00
parent 8421ef7b4a
commit 405ff0377a
7 changed files with 81 additions and 29 deletions

View File

@@ -66,7 +66,7 @@ enum GatewayEnvironment {
static func bundledGatewayExecutable() -> String? {
guard let res = Bundle.main.resourceURL else { return nil }
let path = res.appendingPathComponent("Relay/clawdis-gateway").path
let path = res.appendingPathComponent("Relay/clawdis").path
return FileManager.default.isExecutableFile(atPath: path) ? path : nil
}
@@ -198,7 +198,7 @@ enum GatewayEnvironment {
let port = self.gatewayPort()
if let bundled {
let cmd = [bundled, "--port", "\(port)", "--bind", "loopback"]
let cmd = [bundled, "gateway-daemon", "--port", "\(port)", "--bind", "loopback"]
return GatewayCommandResolution(status: status, command: cmd)
}
if let gatewayBin {

View File

@@ -7,7 +7,7 @@ enum GatewayLaunchAgentManager {
}
private static func gatewayExecutablePath(bundlePath: String) -> String {
"\(bundlePath)/Contents/Resources/Relay/clawdis-gateway"
"\(bundlePath)/Contents/Resources/Relay/clawdis"
}
private static func relayDir(bundlePath: String) -> String {
@@ -62,6 +62,7 @@ enum GatewayLaunchAgentManager {
<key>ProgramArguments</key>
<array>
<string>\(gatewayBin)</string>
<string>gateway-daemon</string>
<string>--port</string>
<string>\(port)</string>
<string>--bind</string>