2024-08-16 17:52:11 +08:00
|
|
|
import { addPath } from "envosman"
|
2024-08-16 06:22:07 +08:00
|
|
|
import { rcOptions } from "../cli-options.js"
|
|
|
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
2021-09-16 16:49:25 +08:00
|
|
|
|
2021-09-16 19:57:37 +08:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
2021-11-22 02:46:34 +08:00
|
|
|
export async function setupOpencppcoverage(version: string | undefined, _setupDir: string, _arch: string) {
|
2021-09-16 16:49:25 +08:00
|
|
|
if (process.platform !== "win32") {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
await setupChocoPack("opencppcoverage", version)
|
2022-05-13 03:55:00 +08:00
|
|
|
const binDir = await activateOpencppcoverage()
|
2021-09-20 20:30:10 +08:00
|
|
|
return { binDir }
|
|
|
|
}
|
|
|
|
|
2022-05-13 03:55:00 +08:00
|
|
|
async function activateOpencppcoverage() {
|
2021-09-17 02:52:24 +08:00
|
|
|
const binDir = "C:/Program Files/OpenCppCoverage"
|
2024-08-15 09:43:53 +08:00
|
|
|
await addPath(binDir, rcOptions)
|
2021-09-20 20:30:10 +08:00
|
|
|
return binDir
|
2021-09-16 16:49:25 +08:00
|
|
|
}
|