mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* refactor(tooling): organize test runtime and maintenance owners * test(tooling): preserve relocated runtime fixture dependency edges * refactor(tooling): preserve xterm routing owner checks * ci(tooling): include routing owner in sparse checkout * test(tooling): preserve copied workflow dependency closures * fix(tooling): normalize hashed JSON assets in release parity * fix(tooling): distinguish asset aliases from literal references * fix(tooling): frame normalized asset reference payloads * fix(tooling): normalize decoded JSON asset references * refactor(tooling): organize build, CI and release owners * fix(tooling): align moved generator and workflow path contracts * fix(tooling): update generated plugin bundle owner banners * test(tooling): create relocated mobile verifier fixture directories * test(tooling): copy headless detector dependency closure * test(tooling): align native batch policy fixtures with owner path * fix(tooling): link moved reliability command to historical evidence * fix(tooling): preserve nested sandbox owners and canonical guide source * fix(tooling): target release version owners in checkout fixture
41 lines
1.4 KiB
JavaScript
41 lines
1.4 KiB
JavaScript
const { spawnSync } = require('node:child_process')
|
|
const { chmodSync, existsSync } = require('node:fs')
|
|
const { join } = require('node:path')
|
|
const {
|
|
collectNativeBinaries
|
|
} = require('./scripts/native-build/linux/verify-linux-glibc-floor.cjs')
|
|
|
|
function ensureBundledWaylandClipboard(archEnum, root = join(__dirname, '..'), run = spawnSync) {
|
|
const arch = { 1: 'x64', 3: 'arm64' }[archEnum]
|
|
if (!arch) {
|
|
throw new Error(`Unsupported Wayland clipboard packaging architecture: ${archEnum}`)
|
|
}
|
|
const result = run(
|
|
process.execPath,
|
|
[
|
|
join(root, 'config', 'scripts', 'native-build', 'linux', 'build-wayland-clipboard.mjs'),
|
|
'--arch',
|
|
arch
|
|
],
|
|
{ cwd: root, stdio: 'inherit' }
|
|
)
|
|
if (
|
|
result.error ||
|
|
result.status !== 0 ||
|
|
!existsSync(join(root, 'native', 'wayland-clipboard', '.build', arch, 'orca-wayland-clipboard'))
|
|
) {
|
|
throw new Error('The Linux package requires a built Wayland clipboard helper.')
|
|
}
|
|
}
|
|
|
|
function finalizePackagedWaylandClipboard(resourcesDir) {
|
|
const binDir = join(resourcesDir, 'bin')
|
|
const helper = join(binDir, 'orca-wayland-clipboard')
|
|
if (!existsSync(helper) || !collectNativeBinaries(binDir).includes(helper)) {
|
|
throw new Error('The Linux package is missing its Wayland clipboard executable.')
|
|
}
|
|
chmodSync(helper, 0o755)
|
|
}
|
|
|
|
module.exports = { ensureBundledWaylandClipboard, finalizePackagedWaylandClipboard }
|