Use msys2 bash regardless of target and of Windows Apps - #30172
Conversation
|
|
||
| message(DEBUG "path_list:${path_list}") # Just to have --trace-expand output | ||
|
|
||
| set(find_system_dirs |
There was a problem hiding this comment.
should probably include the Win11 apps dir. (you probably find the reference to it faster than me)
There was a problem hiding this comment.
Hm, not sure about "faster", but probably I could find a Win11 machine. Would this help resolve the bash -> env -> bash puzzle from #29658?
There was a problem hiding this comment.
I mean you already found it ;)
Yeah that is basically the idea. Put msys before any windows related paths so that it and it tools get found.
There was a problem hiding this comment.
This still leaves the door open for other providers: git bash, scoop, etc. And I don't use them.
There may be multiple things to watch out for along the PATH:
- bash
- env
- msys2 DLL
- sh
- find
There was a problem hiding this comment.
Don't forget that PATH gets sanitized on windows. Unless vcvars pulls it in it won't be in vcpkg env.
There was a problem hiding this comment.
also cc @BillyONeal why does vcpkg even put PowerShell into the environment? What is it used for? Could vcpkg not do that? (at least not for building ports)
There was a problem hiding this comment.
Powershell is used at least for app-local deployment of DLLs, i.e. for tools built by ports.
There was a problem hiding this comment.
Yeah, it's due to applocal.ps1.
There was a problem hiding this comment.
that is only called in vcpkg_copy_tool_dependencies as far as i am concerned and that should have a vcpkg_find_acquire_program(POWERSHELL) instead or run directly via CMake GET_RUNTIME_DEPS.
There was a problem hiding this comment.
that is only called in
vcpkg_copy_tool_dependenciesas far as i am concerned and that should have avcpkg_find_acquire_program(POWERSHELL)instead or run directly via CMakeGET_RUNTIME_DEPS.
We already have plans to get rid of it, but those haven't been turned on yet: microsoft/vcpkg-tool#814
|
Currently not working. To be continued on a Windows machine... |
Moving Windows msys2 bash setup out of
VCPKG_TARGET_IS_WINDOWS.Fixes building for Android on Windows.
Together with #29966, fixes #30065.
Ensures that msys root is inserted into
PATHbefore Windows Apps dir.Fixes #29658, interference between msys and WSL executables. Cf. #30172 (comment)
./vcpkg x-add-version --alland committing the result.