Skip to content

Commit fb48106

Browse files
committed
fix: mingw version
1 parent 5ea2c0f commit fb48106

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

dev/docker/__tests__/arch.mingw.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ RUN pacman -Syuu --noconfirm && \
2929

3030
ENTRYPOINT ["/bin/bash"]
3131

32-
#### Building (example)
33-
FROM setup-cpp-arch AS builder
32+
#### Cross Building (example)
33+
FROM setup-cpp-arch-mingw AS builder
3434

3535
COPY ./dev/cpp_vcpkg_project /home/app
3636
WORKDIR /home/app

dev/docker/__tests__/fedora.mingw.dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ COPY ./dev/cpp_vcpkg_project /home/app
3333
WORKDIR /home/app
3434
RUN bash -c 'source ~/.cpprc \
3535
&& task build_cross_mingw'
36-

dev/docker/__tests__/ubuntu.mingw.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ RUN apt-get update -qq && \
3232

3333
ENTRYPOINT ["/bin/bash"]
3434

35-
#### Building (example)
36-
FROM setup-cpp-ubuntu AS builder
35+
#### Cross Building (example)
36+
FROM setup-cpp-ubuntu-mingw AS builder
3737

3838
COPY ./dev/cpp_vcpkg_project /home/app
3939
WORKDIR /home/app

src/compilers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function installCompiler(
6060
case "mingw":
6161
case "cygwin":
6262
case "msys": {
63-
const gccVersion = getVersion("gcc", version, osVersion)
63+
const gccVersion = (compiler === "mingw")? getVersion("mingw", version, osVersion) : getVersion("gcc", version, osVersion)
6464
const installationInfo = (compiler === "mingw")? await setupMingw(gccVersion, join(setupCppDir, "gcc"), arch) : await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch)
6565

6666
if (hasLLVM) {

src/gcc/gcc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export async function setupMingw(version: string, setupDir: string, arch: string
151151
}
152152
case "linux": {
153153
if (isArch()) {
154-
installationInfo = await setupPacmanPack("mingw-w64", version, "yay")
154+
installationInfo = await setupPacmanPack("mingw-w64-gcc", version)
155155
} else if (hasDnf()) {
156156
installationInfo = await setupDnfPack([
157157
{ name: "mingw64-gcc", version },

src/versions/default_versions.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const DefaultVersions: Record<string, string | undefined> = {
2828
task: "3.25.0", // https://github.com/go-task/task/releases
2929
doxygen: isArch() ? "1.9.6-1" : "1.9.7", // 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/
3030
gcc: isArch() ? "13.1.1-1" : "13", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
31+
//mingw: isArch() ? "12.2.0-1" : "8", // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64 // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/
3132
}
3233

3334
export const MinVersions: Record<string, string | undefined> = {
@@ -46,6 +47,10 @@ export const DefaultLinuxVersion: Record<string, Record<number, string> | undefi
4647
16: "11",
4748
14: "11",
4849
},
50+
mingw: {
51+
22: "8.0.0-1",
52+
20: "7.0.0-2",
53+
},
4954
llvm: {
5055
22: "15.0.6-ubuntu-18.04",
5156
20: "15.0.6-ubuntu-18.04",

0 commit comments

Comments
 (0)