feat: establish reproducible FreeCAD web compatibility baseline
This commit is contained in:
@@ -2,9 +2,11 @@ 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 profile = process.env.FREECAD_ORACLE_PROFILE || 'headless'
|
||||
if (!['headless', 'desktop'].includes(profile)) throw new Error(`Unknown FreeCAD oracle profile: ${profile}`)
|
||||
const build = resolve(root, profile === 'desktop' ? '.cache/freecad/build-desktop' : '.cache/freecad/build-native')
|
||||
const install = resolve(root, profile === 'desktop' ? '.cache/freecad/install-desktop' : '.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}`)
|
||||
console.log(`FreeCAD ${profile} oracle installed: ${install}`)
|
||||
|
||||
Reference in New Issue
Block a user