[SDL] Appending resources to .exe

Andre de Leiradella leiradella at bigfoot.com
Tue Apr 3 19:44:00 PDT 2007


> I'm using VC++ Express 2005 - does anyone know how to append resources to the .exe so I can distribute my game as a standalone executable?
>   
You can add anything you want at the end of a PE (Windows) executable. 
ELF (Linux) executables also support this, I think. You can build a 
linked list of resources (musics, images, sounds...) at the end of the 
executable and build a SDL_RWops that will read one of the entries.

I did this (well, a little bit more complicated, with compression and 
stuff...) and everything works great, except that MP3 musics had to be 
extracted to a regular file before being read. Apparently the code in 
SDL_Mixer that detects MP3 files if not working or I have some problems 
with my MP3 files and they were not being loaded properly directly from 
a SDL_RWops. OGG works fine though.

Cheers,

Andre
> Many Thanks
> Ed
>   



More information about the SDL mailing list