import { execFileSync } from 'node:child_process' import { resolve } from 'node:path' const root = resolve(new URL('..', import.meta.url).pathname) const build = resolve(root, '.cache/freecad/build-native') const install = resolve(root, '.cache/freecad/install-native') const jobs = process.env.FREECAD_BUILD_JOBS || '4' execFileSync('cmake', ['--build', build, '--parallel', jobs], { cwd: root, stdio: 'inherit' }) execFileSync('cmake', ['--install', build], { cwd: root, stdio: 'inherit' }) console.log(`FreeCAD native oracle installed: ${install}`)