Skip to content

Commit 9504707

Browse files
committed
fix: search for the doxygen directory in activate
1 parent c10dc8c commit 9504707

File tree

4 files changed

+37
-28
lines changed

4 files changed

+37
-28
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-lock.yaml

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/doxygen/doxygen.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { extractTar, extractZip } from "../utils/setup/extract"
88
import { notice } from "../utils/io/io"
99
import { setupGraphviz } from "../graphviz/graphviz"
1010
import { getVersion } from "../default_versions"
11+
import { existsSync } from "fs"
1112

1213
/** Get the platform data for cmake */
1314
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -74,9 +75,17 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
7475
function activateWinDoxygen() {
7576
switch (process.platform) {
7677
case "win32": {
77-
const binDir = "C:/Program Files/doxygen/bin"
78-
addPath(binDir)
79-
return binDir
78+
for (const binDir of [
79+
"C:/ProgramData/chocolatey/bin",
80+
"C:/Program Files/doxygen/bin",
81+
"C:/Program Files (x86)/doxygen",
82+
]) {
83+
if (existsSync(binDir)) {
84+
addPath(binDir)
85+
return binDir
86+
}
87+
}
88+
throw new Error("Failed to find doxygen binary")
8089
}
8190
default: {
8291
throw new Error(`Unsupported platform`)

0 commit comments

Comments
 (0)