Skip to content

Windows: Add support for MINGW-UCRT based ruby #193

@larskanis

Description

@larskanis

RubyInstaller-3.1 is planned to be released as UCRT based build. RubyInstaller-head is already UCRT based for the x64 architecture. The x86 32-bit architecture will not change. UCRT is the modern C runtime, that MS Visual C compiler is using since years, while RubyInstaller up to 3.0 uses the ancient MSVCRT.

The main difference from a users point of view are that the PATH to the MINGW tools changes and that the MSYS2-MINGW packages have a new prefix. The PATH is
C:/msys64/ucrt64/bin/
instead of
C:/msys64/mingw64/bin/
and the package is
mingw-w64-ucrt-x86_64
instead of
mingw-w64-x86_64

The MINGW PATH is currently hardcoded here:

const msys2 = ['C:\\msys64\\mingw64\\bin', 'C:\\msys64\\usr\\bin']

It needs to be dependent on the ruby version.

Note: The ridk exec or ridk enable commands installed by RubyInstaller respect the different MINGW PATH and MINGW package prefix on UCRT already. So if ridk is used in the target project's CI, everything works already: https://github.com/oneclick/rubyinstaller2/blob/4300b3dbf4c2d9bae1522188ecccf7294b2e7617/lib/ruby_installer/build/msys2_installation.rb#L23-L35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions