fix: fix default gcc version + fix Mingw arch

This commit is contained in:
Amin Yahyaabadi 2024-09-03 04:08:01 -07:00
parent 11fad2b093
commit a45740c01f
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
9 changed files with 16 additions and 12 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,11 @@ async function getGccPackageInfo(version: string, platform: NodeJS.Platform, arc
mingwAssets, mingwAssets,
{ {
version, version,
arch, arch: arch === "x64"
? "x86_64"
: arch === "ia32"
? "i386"
: arch,
filterName: (name) => name.endsWith(".7z"), filterName: (name) => name.endsWith(".7z"),
}, },
) )

View File

@ -32,7 +32,7 @@ export const DefaultVersions: Record<string, string | undefined> = {
doxygen: isArch() ? "1.11.0-4" : "1.11.0", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/ doxygen: isArch() ? "1.11.0-4" : "1.11.0", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/
gcc: process.platform === "win32" gcc: process.platform === "win32"
? "14.2.0posix-18.1.8-12.0.0-ucrt-r1" ? "14.2.0posix-18.1.8-12.0.0-ucrt-r1"
: undefined, // use the default version on Ubuntu, Fedora, Arch, macOS, etc. : "", // use the default version on Ubuntu, Fedora, Arch, macOS, etc.
// mingw: isArch() ? "12.2.0-1" : "8", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/ // mingw: isArch() ? "12.2.0-1" : "8", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/
powershell: "7.4.5", // https://github.com/PowerShell/PowerShell/releases/tag/v7.4.5 powershell: "7.4.5", // https://github.com/PowerShell/PowerShell/releases/tag/v7.4.5
} }

View File

@ -7,7 +7,7 @@ export function getVersion(name: string, version: string | undefined, osVersion:
if (isVersionDefault(version) && process.platform === "linux" && osVersion !== null && name in DefaultLinuxVersion) { if (isVersionDefault(version) && process.platform === "linux" && osVersion !== null && name in DefaultLinuxVersion) {
return getDefaultLinuxVersion(osVersion, DefaultLinuxVersion[name]!) return getDefaultLinuxVersion(osVersion, DefaultLinuxVersion[name]!)
} else if (isVersionDefault(version) && name in DefaultVersions) { } else if (isVersionDefault(version) && name in DefaultVersions) {
return DefaultVersions[name]! return DefaultVersions[name] ?? ""
} else if (version === "true") { } else if (version === "true") {
return "" return ""
} }