SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Default build type?

Open slouken opened this issue 1 year ago • 2 comments

Can we default the build type to RelWithDebInfo for SDL and the satellite libraries? Can we also add a note to the cmake output if tests are not enabled?

I'd like users to be in a good position if they naively just run cmake, so they get good performance and have the ability to debug and know that there are test programs available. That should help the newbie experience a lot, as seen in this video: https://www.youtube.com/watch?v=PuE98lipGU8

slouken avatar Dec 09 '24 01:12 slouken

RelWithDebInfo for SDL3 is the default since 48b6b93fb68ea2043254b96237c3a0ae5531f6e9.

You mean something like this?

--  Build Shared Library: ON    (SDL_SHARED)
--  Build Static Library: ON    (SDL_STATIC)
--  Build Test Library:   ON    (SDL_TEST_LIBRARY)
--  Build Tests:          ON    (SDL_TESTS, needs SDL_TEST_LIBRARY)
--  Build Examples:       ON    (SDL_EXAMPLES)
--  Build Static Library with Position Independent Code: OFF

madebr avatar Dec 09 '24 17:12 madebr

RelWithDebInfo for SDL3 is the default since 48b6b93.

Great! Can you roll this out to the satellite libraries as well?

You mean something like this?

--  Build Shared Library: ON    (SDL_SHARED)
--  Build Static Library: ON    (SDL_STATIC)
--  Build Test Library:   ON    (SDL_TEST_LIBRARY)
--  Build Tests:          ON    (SDL_TESTS, needs SDL_TEST_LIBRARY)
--  Build Examples:       ON    (SDL_EXAMPLES)
--  Build Static Library with Position Independent Code: OFF

No, I mean something a little more verbose, e.g.

You can build test and sample programs by running cmake with -DSDL_TESTS=ON

slouken avatar Dec 09 '24 18:12 slouken

SDL configuration currently prints a lot of information. This youtuber did not even attempt to read stdout.

Would adding this extra information have helped?

madebr avatar Dec 28 '24 00:12 madebr

RelWithDebInfo for SDL3 is the default since 48b6b93.

Great! Can you roll this out to the satellite libraries as well?

This has been applied to all SDL3 branches of all satellite libraries.

madebr avatar Dec 28 '24 00:12 madebr

SDL configuration currently prints a lot of information. This youtuber did not even attempt to read stdout.

Would adding this extra information have helped?

I don't know, but I've forgotten to add that option myself, so it wouldn't hurt to have a reminder for people. I'll go ahead and add it.

slouken avatar Dec 28 '24 01:12 slouken

This youtuber did not even attempt to read stdout.

90 seconds into this video and I had to pause it to consider the ramifications of Tsoding saying things like "people just use [SDL2] as a GLEW replacement." to 30,000+ viewers.

Am I going to die of stress before this video is done?! It's possible.

icculus avatar Dec 28 '24 05:12 icculus

Update: I'm definitely going to die of stress before this video is done.

icculus avatar Dec 28 '24 05:12 icculus

Okay, I didn't die, but we should probably make a list of obvious things we can adjust based on things he stumbled over on this stream.

There's only so much one can do, because there are lots things he misses that are right in front of him because he's reading fast and trying to intuit what he can. Which to be clear, I don't blame him for; he has to keep this moving on a Twitch stream, and I wouldn't be surprised if many people that aren't streaming live do the same thing anyhow.

But there were lots of little things, like the silly order of items on NewFeatures, to there not being a note in CategoryGPU about the GPU API not being built on top of the 2D Render API, to the Windows download he grabbed that has a .dll and no .lib or header files, etc...a lot of that is solid gold feedback, even if it was occasionally presented as if SDL3 was produced by a collection of dumbasses. 🤷‍♀️

icculus avatar Dec 28 '24 07:12 icculus

Okay, I didn't die, but we should probably make a list of obvious things we can adjust based on things he stumbled over on this stream.

There's only so much one can do, because there are lots things he misses that are right in front of him because he's reading fast and trying to intuit what he can. Which to be clear, I don't blame him for; he has to keep this moving on a Twitch stream, and I wouldn't be surprised if many people that aren't streaming live do the same thing anyhow.

But there were lots of little things, like the silly order of items on NewFeatures, to there not being a note in CategoryGPU about the GPU API not being built on top of the 2D Render API, to the Windows download he grabbed that has a .dll and no .lib or header files, etc...a lot of that is solid gold feedback, even if it was occasionally presented as if SDL3 was produced by a collection of dumbasses. 🤷‍♀️

Yup, this is great feedback!

We also should probably revisit all the documentation with a fresh eye for new users. I know the iOS and Android documentation needs to be revamped for sure.

Here's a couple of radical ideas:

  • Have a single release package that includes source and binaries for all prebuilt platforms
  • Include SDL_hello_world in the SDL repository and release package so people have an example of how to build and use SDL on all supported platforms that they can play with right away.

slouken avatar Dec 28 '24 15:12 slouken

Include SDL_hello_world in the SDL repository and release package so people have an example of how to build and use SDL on all supported platforms that they can play with right away.

Fwiw, the reason I haven't done this yet is because once you add all that stuff in, you have a 100-line .c program, a 10 line CMake file, and thousands of lines of garbage for Gradle, Visual Studio, XCode, etc.

Every time I go to do this, I think: this is definitely going to scare people off.

icculus avatar Dec 28 '24 20:12 icculus

After looking at the cmake output it's probably better to document this more clearly in the wiki and README.

slouken avatar Jan 13 '25 00:01 slouken