Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 修复 macOS 远程桌面 helper target

guyongcc42ef791a67
diff --git a/apps/desktop/forge.config.ts b/apps/desktop/forge.config.ts
index d119943946..05551bf708 100644
--- a/apps/desktop/forge.config.ts
+++ b/apps/desktop/forge.config.ts
@@ -911,6 +911,7 @@ const MACOS_AGENT_ISLAND_HELPER_DEPLOYMENT_TARGET = 'macos14.0';
const MACOS_COMPUTER_PERMISSION_GUIDE_HELPER_DEPLOYMENT_TARGET = 'macos13.0';
const MACOS_SESSION_DRAG_RELEASE_HELPER_DEPLOYMENT_TARGET = 'macos10.15';
const MACOS_XBOX_GAMEPAD_HELPER_DEPLOYMENT_TARGET = 'macos11.0';
+const MACOS_REMOTE_DESKTOP_INPUT_DEPLOYMENT_TARGET = 'macos10.15';
function swiftTargetTriple(cpuArch: 'arm64' | 'x86_64', deploymentTarget: string): string {
return `${cpuArch}-apple-${deploymentTarget}`;
@@ -1033,7 +1034,14 @@ function buildRemoteDesktopInput(platform: ForgePlatform, arch: ForgeArch): void
fs.mkdirSync(destDir, { recursive: true });
if (process.platform === 'darwin' && isMacForgePlatform(platform)) {
const dest = path.join(destDir, 'cindy-macos-desktop-input');
- buildSwiftHelperForForgeArch(path.join(__dirname, 'native', 'remote-desktop', 'macos-input.swift'), dest, arch, '10.15', [], 'remote desktop input');
+ buildSwiftHelperForForgeArch(
+ path.join(__dirname, 'native', 'remote-desktop', 'macos-input.swift'),
+ dest,
+ arch,
+ MACOS_REMOTE_DESKTOP_INPUT_DEPLOYMENT_TARGET,
+ [],
+ 'remote desktop input',
+ );
fs.chmodSync(dest, 0o755);
const capture = path.join(destDir, 'cindy-macos-desktop-capture');
const captureArch = arch === 'universal' ? ['-arch', 'arm64', '-arch', 'x86_64'] : ['-arch', arch === 'arm64' ? 'arm64' : 'x86_64'];
diff --git a/apps/desktop/src/main/__tests__/sessionDragReleaseNativeHost.test.ts b/apps/desktop/src/main/__tests__/sessionDragReleaseNativeHost.test.ts
index d614488461..90905da692 100644
--- a/apps/desktop/src/main/__tests__/sessionDragReleaseNativeHost.test.ts
+++ b/apps/desktop/src/main/__tests__/sessionDragReleaseNativeHost.test.ts
@@ -135,6 +135,20 @@ describe('SessionDragReleaseNativeHost', () => {
expect(forgeSource).toContain('buildMacSessionDragReleaseHelper(platform, arch);');
expect(forgeSource).toContain("'xdt-macos-session-drag-release-helper'");
});
+
+ it('uses a complete macOS target triple for the remote desktop input helper', () => {
+ const forgeSource = fs.readFileSync(
+ path.resolve(__dirname, '..', '..', '..', 'forge.config.ts'),
+ 'utf8',
+ );
+ expect(forgeSource).toContain(
+ "const MACOS_REMOTE_DESKTOP_INPUT_DEPLOYMENT_TARGET = 'macos10.15';",
+ );
+ expect(forgeSource).toContain(
+ "MACOS_REMOTE_DESKTOP_INPUT_DEPLOYMENT_TARGET,\n [],\n 'remote desktop input'",
+ );
+ expect(forgeSource).not.toContain("dest, arch, '10.15', [], 'remote desktop input'");
+ });
});
function createFakeChild(): FakeNativeProcess {