Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
fix: sign packaged daemon native libraries on macOS
Leggett0bfbc269742f
diff --git a/apps/desktop/scripts/sign-creator-runtime-after-pack.mjs b/apps/desktop/scripts/sign-creator-runtime-after-pack.mjsindex b4fd8af6..c22ee568 100644--- a/apps/desktop/scripts/sign-creator-runtime-after-pack.mjs+++ b/apps/desktop/scripts/sign-creator-runtime-after-pack.mjs@@ -28,10 +28,20 @@ const machOMagicValues = new Set([export async function afterPack(context) {if (process.env.OPENCREATOR_SIGN_CREATOR_RUNTIME !== '1') return;+ await signDaemonRuntimeBundle(context);await signCreatorRuntimeBundle(context);await signStickmanRuntimeBundle(context);}+export async function signDaemonRuntimeBundle(context, options = {}) {+ return signPackagedRuntime(context, options, {+ name: 'Daemon Runtime',+ relativeRoot: ['daemon'],+ verifyRuntime: () => undefined,+ updateManifest: false+ });+}+export async function signCreatorRuntimeBundle(context, options = {}) {return signPackagedRuntime(context, options, {name: 'Creator Runtime',@@ -92,7 +102,9 @@ async function signPackagedRuntime(context, options, runtime) {for (const path of binaries) {await signBinary(path, identity, keychainFile);}- updateManifestHashes(runtimeRoot, binaries);+ if (runtime.updateManifest !== false) {+ updateManifestHashes(runtimeRoot, binaries);+ }verifyRuntime(runtimeRoot, 'darwin', arch);console.log(`[desktop-package] Signed ${binaries.length} ${runtime.name} binaries`@@ -163,7 +175,7 @@ function signMachOBinary(path, identity, keychainFile) {if (result.error) throw result.error;if (result.status !== 0) {throw new Error(- `Unable to sign Creator Runtime binary ${path}: `+ `Unable to sign packaged runtime binary ${path}: `+ `${result.stderr || result.stdout}`);}diff --git a/apps/desktop/test/creator-runtime-signing.test.mjs b/apps/desktop/test/creator-runtime-signing.test.mjsindex d198b5da..e2874943 100644--- a/apps/desktop/test/creator-runtime-signing.test.mjs+++ b/apps/desktop/test/creator-runtime-signing.test.mjs@@ -12,6 +12,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest';import { verifyCreatorRuntime } from '../scripts/creator-runtime-contract.mjs';import { verifyStickmanRuntime } from '../scripts/stickman-runtime-contract.mjs';import {+ signDaemonRuntimeBundle,signCreatorRuntimeBundle,signStickmanRuntimeBundle,updateManifestHashes@@ -118,6 +119,42 @@ describe('Creator Runtime Developer ID signing', () => {'arm64')).not.toThrow();});++ it('signs native dependencies in the packaged Daemon', async () => {+ const root = mkdtempSync(join(tmpdir(), 'opencreator-daemon-signing-'));+ temporaryDirectories.push(root);+ const appOutDir = join(root, 'mac-arm64');+ const daemonRoot = join(+ appOutDir,+ 'OpenCreator.app',+ 'Contents',+ 'Resources',+ 'daemon'+ );+ const binaryPaths = [+ join(daemonRoot, 'node_modules', '@remotion', 'compositor', 'ffmpeg'),+ join(daemonRoot, 'node_modules', '@img', 'sharp', 'libvips.dylib')+ ];+ for (const path of binaryPaths) {+ mkdirSync(dirname(path), { recursive: true });+ writeFileSync(path, 'binary');+ }+ const signBinary = vi.fn();++ await signDaemonRuntimeBundle(createContext(appOutDir), {+ env: signingEnv(),+ findIdentity: () => 'Developer ID Application: Junxi YIN (NVRH5R5DJ5)',+ findBinaries: () => binaryPaths,+ signBinary+ });++ expect(signBinary).toHaveBeenCalledTimes(binaryPaths.length);+ expect(signBinary).toHaveBeenCalledWith(+ binaryPaths[0],+ 'Developer ID Application: Junxi YIN (NVRH5R5DJ5)',+ '/tmp/release.keychain'+ );+ });});function createContext(appOutDir) {