setup-cpp/src/doxygen/doxygen.ts

24 lines
711 B
TypeScript
Raw Normal View History

2021-09-16 16:47:47 +08:00
import { setupAptPack } from "../utils/setup/setupAptPack"
import { setupBrewPack } from "../utils/setup/setupBrewPack"
import { setupChocoPack } from "../utils/setup/setupChocoPack"
export async function setupDoxygen(version?: string) {
switch (process.platform) {
case "win32": {
await setupChocoPack("graphviz", version)
return setupChocoPack("doxygen.install", version)
}
case "darwin": {
await setupBrewPack("graphviz", version)
return setupBrewPack("doxygen", version)
}
case "linux": {
await setupAptPack("graphviz", version)
return setupAptPack("doxygen", version)
}
default: {
throw new Error(`Unsupported platform`)
}
}
}