Skip to content

Commit 2ddc806

Browse files
committed
fix: update the default to doxygen 1.9.4
1 parent 4b6411c commit 2ddc806

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

src/default_versions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const DefaultVersions: Record<string, string> = {
1212
python: "3.8.10",
1313
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
1414
task: "3.12.0", // https://github.com/go-task/task/releases
15-
doxygen: "1.9.1", // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
15+
doxygen: process.platform === "darwin" ? "1.9.3" : "1.9.4", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
1616
gcc: process.platform === "win32" ? "11.2.0.07112021" : "11", // https://community.chocolatey.org/packages/mingw#versionhistory and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
1717
}
1818

src/doxygen/doxygen.ts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin
44
import { setupBrewPack } from "../utils/setup/setupBrewPack"
55
import { setupChocoPack } from "../utils/setup/setupChocoPack"
66
import { addBinExtension } from "../utils/extension/extension"
7-
import { extractTar } from "../utils/setup/extract"
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"
@@ -23,6 +23,16 @@ function getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch
2323
url: `https://www.doxygen.nl/files/${folderName}.linux.bin.tar.gz`,
2424
}
2525
}
26+
case "win32": {
27+
const folderName = `doxygen-${version}`
28+
return {
29+
binRelativeDir: "bin/",
30+
binFileName: addBinExtension("doxygen"),
31+
extractedFolderName: folderName,
32+
extractFunction: extractZip,
33+
url: `https://www.doxygen.nl/files/${folderName}.windows.x64.bin.zip`,
34+
}
35+
}
2636
default:
2737
throw new Error(`Unsupported platform '${platform}'`)
2838
}
@@ -31,10 +41,17 @@ function getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch
3141
export async function setupDoxygen(version: string, setupDir: string, arch: string) {
3242
switch (process.platform) {
3343
case "win32": {
34-
await setupChocoPack("doxygen.install", version)
44+
let installationInfo: InstallationInfo
45+
try {
46+
installationInfo = await setupBin("doxygen", version, getDoxygenPackageInfo, setupDir, arch)
47+
} catch (err) {
48+
notice(`Failed to download doxygen binary. ${err}. Falling back to choco.`)
49+
await setupChocoPack("doxygen.install", version)
50+
const binDir = activateWinDoxygen()
51+
installationInfo = { binDir }
52+
}
3553
await setupGraphviz(getVersion("graphviz", undefined), "", arch)
36-
const binDir = activateWinDoxygen()
37-
return { binDir }
54+
return installationInfo
3855
}
3956
case "darwin": {
4057
const installationInfo = setupBrewPack("doxygen", undefined)

0 commit comments

Comments
 (0)