Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve SDL compilation instructions #118

Open
tomvanbraeckel opened this issue Jun 26, 2024 · 5 comments
Open

Improve SDL compilation instructions #118

tomvanbraeckel opened this issue Jun 26, 2024 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tomvanbraeckel
Copy link
Contributor

I see retro-go has an "sdl2" target that would presumably allow running it on a regular, x86/64 desktop computer, I think...

But I can't find documentation on how to do it, in components/retro-go/targets/sdl2/docs/README.md or BUILDING.md

I apt-get installed libsdl2-dev and ran:

./rg_tool.py --target sdl2 build

But immediately it complains about:

IDF_PATH is not defined. Are you running inside esp-idf environment?

And with IDF_PATH set as usual, of course ESP_PLATFORM is set and then it tries to compile all sorts of non-desktop things.

So I was wondering if some more instructions could be added about this, or provided here, or just some clarification that "this is not supported anymore" if that's the case.

@tomvanbraeckel tomvanbraeckel added the enhancement New feature or request label Jun 26, 2024
@ducalex
Copy link
Owner

ducalex commented Jun 26, 2024

SDL2 target is only for myself, for debugging and profiling, hence the no documentation. It works but it must be built manually (gcc/tcc/clang supported) and launching a game must be done by editing the config and I think the display patches are missing from master right now.

It will never be a prime target but I agree that it would be nice to eventually make it easy to build the SDL2 version. It would make it simpler for people to tinker.

We can keep this issue open as a reminder!

@tomvanbraeckel
Copy link
Contributor Author

Ah yes, that makes sense, thanks!

I would love to also be able to do some debugging and profiling ;-)

Not to push, but as a first step, I made this list of what's needed:

  • hints on how you compile it: which command do you use, some script maybe?
  • editing the config to launch the game: sounds easy, but an example file or diff will help
  • display patches: would it be possible to just push them out on a branch for now?

@ducalex
Copy link
Owner

ducalex commented Jun 28, 2024

I've pushed to a temp branch, though it no longer works very well due to changes since I last used it. But it should build!

7cd4a38

The build scripts builds the launcher and retro-core then runs both. The first run will create the folder structure where you can drop some roms to test.

I build with mingw64 (it also works with tinycc and clang) so you might have to change some things if you run Linux proper.

@tomvanbraeckel
Copy link
Contributor Author

That's so cool! Let me see if I can get it to work on Linux proper :-D

@ducalex
Copy link
Owner

ducalex commented Aug 22, 2024

I've added build_sdl2.sh to the dev branch 034047e and as of now the dev branch can be built with SDL2. Unfortunately it doesn't run because the SDL2 code is broken. (Well it runs but it just freezes because we don't have any event loop or proper main SDL2 task.)

I'll try to fix it before the next release but if someone experienced with SDL2 comes around I'd be very happy to accept a PR or some guidance :).

Once it's working I'll make a proper makefile to build all apps. Or maybe make rg_tool.py just work for SDL2 too. Not sure what's best.

@ducalex ducalex added the help wanted Extra attention is needed label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants