2021-09-18 10:17:21 +08:00
|
|
|
import { addPath } from "../utils/path/addPath"
|
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"
|
|
|
|
|
2021-09-16 19:57:37 +08:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
export async function setupDoxygen(version: string | undefined, _setupCppDir: string, _arch: string) {
|
2021-09-16 16:47:47 +08:00
|
|
|
switch (process.platform) {
|
|
|
|
case "win32": {
|
2021-09-16 22:19:56 +08:00
|
|
|
await setupChocoPack("doxygen.install", version)
|
2021-09-17 18:17:21 +08:00
|
|
|
await setupChocoPack("graphviz", version)
|
2021-09-17 07:26:57 +08:00
|
|
|
addPath("C:/Program Files/Graphviz/bin")
|
|
|
|
const binDir = "C:/Program Files/doxygen/bin"
|
2021-09-17 02:49:24 +08:00
|
|
|
addPath(binDir)
|
|
|
|
return { binDir }
|
2021-09-16 16:47:47 +08:00
|
|
|
}
|
|
|
|
case "darwin": {
|
2021-09-17 18:17:21 +08:00
|
|
|
setupBrewPack("doxygen", version)
|
|
|
|
return setupBrewPack("graphviz", version)
|
2021-09-16 16:47:47 +08:00
|
|
|
}
|
|
|
|
case "linux": {
|
2021-09-17 18:17:21 +08:00
|
|
|
await setupAptPack("doxygen", version)
|
|
|
|
return setupAptPack("graphviz", version)
|
2021-09-16 16:47:47 +08:00
|
|
|
}
|
|
|
|
default: {
|
|
|
|
throw new Error(`Unsupported platform`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|