Skip to content

Commit

Permalink
fix: search for the doxygen directory in activate
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed May 10, 2022
1 parent c10dc8c commit 9504707
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion dist/setup_cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/setup_cpp.js.map

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions src/doxygen/doxygen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { extractTar, extractZip } from "../utils/setup/extract"
import { notice } from "../utils/io/io"
import { setupGraphviz } from "../graphviz/graphviz"
import { getVersion } from "../default_versions"
import { existsSync } from "fs"

/** Get the platform data for cmake */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down Expand Up @@ -74,9 +75,17 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
function activateWinDoxygen() {
switch (process.platform) {
case "win32": {
const binDir = "C:/Program Files/doxygen/bin"
addPath(binDir)
return binDir
for (const binDir of [
"C:/ProgramData/chocolatey/bin",
"C:/Program Files/doxygen/bin",
"C:/Program Files (x86)/doxygen",
]) {
if (existsSync(binDir)) {
addPath(binDir)
return binDir
}
}
throw new Error("Failed to find doxygen binary")
}
default: {
throw new Error(`Unsupported platform`)
Expand Down

0 comments on commit 9504707

Please sign in to comment.