Click to See Complete Forum and Search --> : Saving files inside executable


fearu
August 7th, 2010, 02:46 PM
Hello,

I have an easy question, but I couldn't find any answer on google. I'm learning videogame programming with SDL and opengl on c#, and in my small programs I usually have textures or fonts, that I load with their functions, that usually receive a string indicating where the image or whatever is on the filesystem -sometimes there are also functions that load these from memory-.

What I want is a method (general or for .net) to save inside the executable on compilation time files that I'm going to need in my program. I know a solution would be the method that the portable version of lamexp used, the executable only extracted the folder of the program with all the media to a temp folder and then executed the "true" program, but I'm looking for a better solution here.

TechGnome
August 10th, 2010, 01:52 PM
Add them as a resource to your project... then extract them as needed.

-tg

fearu
August 11th, 2010, 06:38 AM
Thank you, that's what I was looking for.