Merge pull request #71 from aminya/doxygen [skip ci]

This commit is contained in:
Amin Yahyaabadi 2022-05-09 20:17:02 -07:00 committed by GitHub
commit 9614260d33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 32 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
lockfileVersion: 5.4
lockfileVersion: 5.3
overrides:
semver: 7.3.7
@ -85,7 +85,7 @@ devDependencies:
prettier-config-atomic: 3.0.9
shx: 0.3.4
terser-config-atomic: 0.1.1
ts-jest: 28.0.1_jw4qpfj6m43htbnoqw2i363564
ts-jest: 28.0.1_4db907953e67367985ae85b48dfb7df7
typescript: 4.6.4
packages:
@ -309,7 +309,7 @@ packages:
- supports-color
dev: true
/@babel/eslint-parser/7.17.0_ore52sp75uhoubdikfje6htfpm:
/@babel/eslint-parser/7.17.0_7449dd49ffed0eea046851524f1e657b:
resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==}
engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0}
peerDependencies:
@ -2212,7 +2212,7 @@ packages:
'@types/yargs-parser': 21.0.0
dev: true
/@typescript-eslint/eslint-plugin/5.22.0_lnjlwhtxjffjmj5o7dnwvwyqxq:
/@typescript-eslint/eslint-plugin/5.22.0_5b52bb1e77494a9627aef8db6adb10bc:
resolution: {integrity: sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2223,10 +2223,10 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/parser': 5.22.0_eslint@8.14.0+typescript@4.6.4
'@typescript-eslint/scope-manager': 5.22.0
'@typescript-eslint/type-utils': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/type-utils': 5.22.0_eslint@8.14.0+typescript@4.6.4
'@typescript-eslint/utils': 5.22.0_eslint@8.14.0+typescript@4.6.4
debug: 4.3.4
eslint: 8.14.0
functional-red-black-tree: 1.0.1
@ -2239,7 +2239,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.22.0_t725usgvqspm5woeqpaxbfp2qu:
/@typescript-eslint/parser/5.22.0_eslint@8.14.0+typescript@4.6.4:
resolution: {integrity: sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2267,7 +2267,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.22.0
dev: true
/@typescript-eslint/type-utils/5.22.0_t725usgvqspm5woeqpaxbfp2qu:
/@typescript-eslint/type-utils/5.22.0_eslint@8.14.0+typescript@4.6.4:
resolution: {integrity: sha512-iqfLZIsZhK2OEJ4cQ01xOq3NaCuG5FQRKyHicA3xhZxMgaxQazLUHbH/B2k9y5i7l3+o+B5ND9Mf1AWETeMISA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -2277,7 +2277,7 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/utils': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/utils': 5.22.0_eslint@8.14.0+typescript@4.6.4
debug: 4.3.4
eslint: 8.14.0
tsutils: 3.21.0_typescript@4.6.4
@ -2312,7 +2312,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils/5.22.0_t725usgvqspm5woeqpaxbfp2qu:
/@typescript-eslint/utils/5.22.0_eslint@8.14.0+typescript@4.6.4:
resolution: {integrity: sha512-HodsGb037iobrWSUMS7QH6Hl1kppikjA1ELiJlNSTYf/UdMEwzgj0WIp+lBNb6WZ3zTwb0tEz51j0Wee3iJ3wQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -3603,7 +3603,7 @@ packages:
engines: {node: '>=10'}
dev: true
/eslint-config-airbnb-base/14.2.1_myxbwluo6p3kuxjcyp342zygci:
/eslint-config-airbnb-base/14.2.1_662e1b2e8ef3f6aa5d22c3f7cd670612:
resolution: {integrity: sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==}
engines: {node: '>= 6'}
peerDependencies:
@ -3618,7 +3618,7 @@ packages:
dev: true
optional: true
/eslint-config-airbnb/18.2.1_6wn3z3tjgyofixiej62ekfyqzm:
/eslint-config-airbnb/18.2.1_f59bbcee69361c545d044fb4451710cb:
resolution: {integrity: sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==}
engines: {node: '>= 6'}
peerDependencies:
@ -3629,7 +3629,7 @@ packages:
eslint-plugin-react-hooks: ^4 || ^3 || ^2.3.0 || ^1.7.0
dependencies:
eslint: 8.14.0
eslint-config-airbnb-base: 14.2.1_myxbwluo6p3kuxjcyp342zygci
eslint-config-airbnb-base: 14.2.1_662e1b2e8ef3f6aa5d22c3f7cd670612
eslint-plugin-import: 2.26.0_eslint@8.14.0
eslint-plugin-jsx-a11y: 6.5.1_eslint@8.14.0
eslint-plugin-react: 7.23.2_eslint@8.14.0
@ -3643,11 +3643,11 @@ packages:
resolution: {integrity: sha512-LFytMqabif4bB59bV8s3pc1gN/UNzRY53l5F8mzZQLKmSETXQ2UDTEJ62l8xyQocMsDcaCaY5ALNmJqBngIAFQ==}
dependencies:
'@babel/core': 7.17.10
'@babel/eslint-parser': 7.17.0_ore52sp75uhoubdikfje6htfpm
'@babel/eslint-parser': 7.17.0_7449dd49ffed0eea046851524f1e657b
'@babel/plugin-syntax-flow': 7.16.7_@babel+core@7.17.10
'@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.17.10
'@typescript-eslint/eslint-plugin': 5.22.0_lnjlwhtxjffjmj5o7dnwvwyqxq
'@typescript-eslint/parser': 5.22.0_t725usgvqspm5woeqpaxbfp2qu
'@typescript-eslint/eslint-plugin': 5.22.0_5b52bb1e77494a9627aef8db6adb10bc
'@typescript-eslint/parser': 5.22.0_eslint@8.14.0+typescript@4.6.4
eslint: 8.14.0
eslint-config-prettier: 8.5.0_eslint@8.14.0
eslint-plugin-html: 6.2.0
@ -3663,7 +3663,7 @@ packages:
typescript: 4.6.4
optionalDependencies:
coffeescript: 1.12.7
eslint-plugin-coffee: 0.1.15_y2xqir6l3xvl5q2ameens7dpqy
eslint-plugin-coffee: 0.1.15_c6af0447cbddeabec3406108d97c6f86
eslint-plugin-react-hooks: 4.5.0_eslint@8.14.0
transitivePeerDependencies:
- supports-color
@ -3693,20 +3693,20 @@ packages:
find-up: 2.1.0
dev: true
/eslint-plugin-coffee/0.1.15_y2xqir6l3xvl5q2ameens7dpqy:
/eslint-plugin-coffee/0.1.15_c6af0447cbddeabec3406108d97c6f86:
resolution: {integrity: sha512-+qtkIPSc9etYqOODIlENqiRjID/oEoGMAAQJN988Aczy461NIwzaamFY6Fi0QDVVDb2v+OL/StVrk/QmyItfeg==}
requiresBuild: true
peerDependencies:
eslint: '*'
dependencies:
axe-core: 3.5.6
babel-eslint: /@babel/eslint-parser/7.17.0_ore52sp75uhoubdikfje6htfpm
babel-eslint: /@babel/eslint-parser/7.17.0_7449dd49ffed0eea046851524f1e657b
babylon: 7.0.0-beta.47
coffeescript: 2.7.0
doctrine: 2.1.0
eslint: 8.14.0
eslint-config-airbnb: 18.2.1_6wn3z3tjgyofixiej62ekfyqzm
eslint-config-airbnb-base: 14.2.1_myxbwluo6p3kuxjcyp342zygci
eslint-config-airbnb: 18.2.1_f59bbcee69361c545d044fb4451710cb
eslint-config-airbnb-base: 14.2.1_662e1b2e8ef3f6aa5d22c3f7cd670612
eslint-plugin-import: 2.26.0_eslint@8.14.0
eslint-plugin-jsx-a11y: 6.5.1_eslint@8.14.0
eslint-plugin-react: 7.23.2_eslint@8.14.0
@ -7618,7 +7618,7 @@ packages:
punycode: 2.1.1
dev: true
/ts-jest/28.0.1_jw4qpfj6m43htbnoqw2i363564:
/ts-jest/28.0.1_4db907953e67367985ae85b48dfb7df7:
resolution: {integrity: sha512-PbkbitaT/9ZYAqqzk3UYTvCq080Seo46T3m/AdwcZ0D8WH2uBhG6PvA8oOAWsZIknzPQU66fYobvFCL8IqIhmg==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
hasBin: true

View File

@ -12,7 +12,7 @@ const DefaultVersions: Record<string, string> = {
python: "3.8.10",
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
task: "3.12.0", // https://github.com/go-task/task/releases
doxygen: "1.9.1", // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
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
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
}

View File

@ -4,10 +4,11 @@ import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin
import { setupBrewPack } from "../utils/setup/setupBrewPack"
import { setupChocoPack } from "../utils/setup/setupChocoPack"
import { addBinExtension } from "../utils/extension/extension"
import { extractTar } from "../utils/setup/extract"
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
@ -23,6 +24,16 @@ function getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch
url: `https://www.doxygen.nl/files/${folderName}.linux.bin.tar.gz`,
}
}
case "win32": {
const folderName = `doxygen-${version}`
return {
binRelativeDir: "",
binFileName: addBinExtension("doxygen"),
extractedFolderName: folderName,
extractFunction: extractZip,
url: `https://www.doxygen.nl/files/${folderName}.windows.x64.bin.zip`,
}
}
default:
throw new Error(`Unsupported platform '${platform}'`)
}
@ -32,9 +43,10 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
switch (process.platform) {
case "win32": {
await setupChocoPack("doxygen.install", version)
await setupGraphviz(getVersion("graphviz", undefined), "", arch)
const binDir = activateWinDoxygen()
return { binDir }
const installationInfo = { binDir }
await setupGraphviz(getVersion("graphviz", undefined), "", arch)
return installationInfo
}
case "darwin": {
const installationInfo = setupBrewPack("doxygen", undefined)
@ -63,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`)