Giter Club home page Giter Club logo

Comments (3)

genotrance avatar genotrance commented on July 18, 2024

Sorry it's been a while since I've done this but there might be a way to discriminate between MSYS and MinGW. Maybe the MSYSTEM variable?

from nimterop.

michaelsbradleyjr avatar michaelsbradleyjr commented on July 18, 2024

Nice idea, maybe $MSYSTEM detection is the way to go. I tried echo'ing it in Bash shells for various MSYS2 environments:

  • MSYS MSYS2 environment, $MSYSTEM is MSYS
  • MINGW64 MSYS2 environment, $MSYSTEM is MINGW64
  • MINGW32 MSYS2 environment, $MSYSTEM is MINGW32
  • UCRT64 MSYS2 environment, $MSYSTEM is UCRT64
  • ...

By default (at least when checking my own Win machines), %MSYSTEM% in cmd.exe is unset, and $env:MSYSTEM in PowerShell is unset.

So maybe it would be enough to check if it's set with the os module's existsEnv? If so, use -G"MSYS Makefiles"; if not, use -G"MinGW Makefiles"?

Would that logic be suitable to wholly replace the uname check in the if findExe("sh").len != 0 branch of when defined(Windows)?

πŸ€” I feel like I'm probably not appreciating the full variety of environmental conditions that could be in play (e.g. Cygwin vs. MSYS2 UCRT64/whatever), but am not really sure at present.

from nimterop.

genotrance avatar genotrance commented on July 18, 2024

I see you already clarified the MSYSTEM question here.

from nimterop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.