mirror of https://github.com/aminya/setup-cpp
fix: add cppcheck, doxygen, and mingw to PATH on windows
This commit is contained in:
parent
39993729df
commit
c61f0e5307
|
@ -1,12 +1,15 @@
|
||||||
|
import { addPath } from "@actions/core"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function setupCppcheck(version: string | undefined, _setupCppDir: string, _arch: string) {
|
export async function setupCppcheck(version: string | undefined, _setupCppDir: string, _arch: string) {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
return setupChocoPack("cppcheck", version)
|
await setupChocoPack("cppcheck", version)
|
||||||
|
addPath("C:\\Program Files\\Cppcheck")
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
return setupBrewPack("cppcheck", version)
|
return setupBrewPack("cppcheck", version)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { addPath } from "@actions/core"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
|
@ -7,10 +8,13 @@ export async function setupDoxygen(version: string | undefined, _setupCppDir: st
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
await setupChocoPack("graphviz", version)
|
await setupChocoPack("graphviz", version)
|
||||||
return setupChocoPack("doxygen.install", version)
|
await setupChocoPack("doxygen.install", version)
|
||||||
|
addPath("C:\\Program Files\\Graphviz\\bin")
|
||||||
|
addPath("C:\\Program Files\\doxygen\\bin")
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
await setupBrewPack("graphviz", version)
|
setupBrewPack("graphviz", version)
|
||||||
return setupBrewPack("doxygen", version)
|
return setupBrewPack("doxygen", version)
|
||||||
}
|
}
|
||||||
case "linux": {
|
case "linux": {
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
|
import { addPath } from "@actions/core"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export function setupGcc(version: string, _setupCppDir: string, arch: string) {
|
export async function setupGcc(version: string, _setupCppDir: string, arch: string) {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
if (arch === "arm" || arch === "arm64") {
|
if (arch === "arm" || arch === "arm64") {
|
||||||
return setupChocoPack("gcc-arm-embedded", version)
|
await setupChocoPack("gcc-arm-embedded", version)
|
||||||
}
|
}
|
||||||
return setupChocoPack("mingw", version)
|
await setupChocoPack("mingw", version)
|
||||||
|
if (arch === "x64") {
|
||||||
|
addPath("C:\\tools\\mingw64\\bin")
|
||||||
|
} else if (arch === "ia32") {
|
||||||
|
addPath("C:\\tools\\mingw32\\bin")
|
||||||
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
return setupBrewPack("gcc", version)
|
return setupBrewPack("gcc", version)
|
||||||
|
|
Loading…
Reference in New Issue