Enables MSys2 MSYS environment to build SDL3#15514
Conversation
|
I decided that most of your rejections can be reduced down to using So, I am doing those changes and others you posted. Tim S. |
f73c392 to
76fec34
Compare
|
Doing many casts in C programming when it is not needed can be a way to hiding programming mistakes after future changes. And if is cleaner to use defines like I have is the correct thing to do! When I was asked to revert my changes in "SDL3/SDL_stdinc.h" and use casts instead I considered that to be a major programming ethical violation! So, either understand or get someone else to either approved or reject this PR. Because I also am finished with it. |
Co-authored-by: TrueCat17 <truecat17@gmail.com>
under Cygwin or MSYS build enviroments
Many ideas are likely from PR 15457 Co-authored-by: TrueCat17 <truecat17@gmail.com> Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com> Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> [sdl-ci-filter msys2-msys]
|
|
||
| class SharedLibType(Enum): | ||
| WIN32 = "SDL3.dll" | ||
| MSYS = "msys-SDL3-0.dll" |
There was a problem hiding this comment.
I haven't done a full review, but the output of the build should be a compatible SDL3.dll with no additional dependencies.
We already do a mingw build that I believe uses msys already, is that right @madebr?
There was a problem hiding this comment.
This page explains the msys2 environments.
msys is the posix-like build environment, used as a base to target multiple platforms (mingw32, mingw64, clang32, clang64, clangarm64, ucrt64, ...)
Looking at what packages the msys layer provides,all packages are meant for developers, not for users.
I don't think this layer is meant for shipping guis and other user facing programs.
There was a problem hiding this comment.
The MSYS environment under MSys2 is like Cygwin and needs an extra dll to provide some Unix like support.
And you are correct that the MSys2 people have no desire to support GUIs via MSYS environment.
Tim S.
There was a problem hiding this comment.
Would you all approve the first 3 commits that support both Cygwin and MSYS builds?
Because I am willing to support the MSYS part just by myself patching the MSys2 [arch Linux style] package I have already created. I could then do a slight rename of the PR to match the change.
| if(CYGWIN) | ||
| # We build SDL on cygwin without the UNIX emulation layer | ||
| sdl_include_directories(PUBLIC SYSTEM "/usr/include/mingw") | ||
| cmake_push_check_state() | ||
| string(APPEND CMAKE_REQUIRED_FLAGS " -mno-cygwin") | ||
| check_c_source_compiles("int main(int argc, char **argv) { return 0; }" | ||
| HAVE_GCC_NO_CYGWIN) | ||
| cmake_pop_check_state() | ||
| if(HAVE_GCC_NO_CYGWIN) | ||
| sdl_shared_link_options("-mno-cygwin") | ||
| endif() | ||
| endif() |
There was a problem hiding this comment.
This is no longer relevant?
There was a problem hiding this comment.
Correct it has not been relevant for about 10 years. Note: The few people using Cygwin 32 might still need it.
Tim S.
There was a problem hiding this comment.
If it is a stopper, I can skip removing it at this time. This line is likely needed to be removed to get the CYGWIN CI posted in the other PR to work. And the comment above this line, partly goes with this line.
sdl_include_directories(PUBLIC SYSTEM "/usr/include/mingw")
Tim S.
There was a problem hiding this comment.
I don't know much about cygwin. @sezero might know.
I don't think this is a blocker.
If you're building SDL3 on the cygwin/msys platform, you're also subscribing to its family of runtime dependencies.
|
I did not resolve the two conversations because to me they are closely related and needs to be resolved togother. |
|
I have decided to do the Cygwin PR that I have a branch for because the number of people want SDL3 under MSYS is smaller than the number people wanting it under CYGWIN |
|
Please give feedback on which one is more likely to get approved, and I will close one of them |
|
The Cygwin build PR is more likely to be approved. |
Okay I am closing this one. |
This PR contains code from PR fix building on CYGWIN #15457
Description
This PR is based on the PR #15457.
The major difference is the PR enable MSYS to build SDL3.
The warning reduction changes are very different in header "SDL_platform_defines.h".
The method to get "d3d12.h" to work is very different.
This PR adds msys CI support and the tests runs.
Existing Issue(s)