@@ -4,10 +4,11 @@ import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin
44import { setupBrewPack } from "../utils/setup/setupBrewPack"
55import { setupChocoPack } from "../utils/setup/setupChocoPack"
66import { addBinExtension } from "../utils/extension/extension"
7- import { extractTar } from "../utils/setup/extract"
7+ import { extractTar , extractZip } from "../utils/setup/extract"
88import { notice } from "../utils/io/io"
99import { setupGraphviz } from "../graphviz/graphviz"
1010import { 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
@@ -23,6 +24,16 @@ function getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch
2324 url : `https://www.doxygen.nl/files/${ folderName } .linux.bin.tar.gz` ,
2425 }
2526 }
27+ case "win32" : {
28+ const folderName = `doxygen-${ version } `
29+ return {
30+ binRelativeDir : "" ,
31+ binFileName : addBinExtension ( "doxygen" ) ,
32+ extractedFolderName : folderName ,
33+ extractFunction : extractZip ,
34+ url : `https://www.doxygen.nl/files/${ folderName } .windows.x64.bin.zip` ,
35+ }
36+ }
2637 default :
2738 throw new Error ( `Unsupported platform '${ platform } '` )
2839 }
@@ -32,9 +43,10 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
3243 switch ( process . platform ) {
3344 case "win32" : {
3445 await setupChocoPack ( "doxygen.install" , version )
35- await setupGraphviz ( getVersion ( "graphviz" , undefined ) , "" , arch )
3646 const binDir = activateWinDoxygen ( )
37- return { binDir }
47+ const installationInfo = { binDir }
48+ await setupGraphviz ( getVersion ( "graphviz" , undefined ) , "" , arch )
49+ return installationInfo
3850 }
3951 case "darwin" : {
4052 const installationInfo = setupBrewPack ( "doxygen" , undefined )
@@ -63,9 +75,17 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
6375function activateWinDoxygen ( ) {
6476 switch ( process . platform ) {
6577 case "win32" : {
66- const binDir = "C:/Program Files/doxygen/bin"
67- addPath ( binDir )
68- 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" )
6989 }
7090 default : {
7191 throw new Error ( `Unsupported platform` )
0 commit comments