CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2010
    Posts
    2

    Saving files inside executable

    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.

  2. #2
    Join Date
    Dec 2007
    Posts
    234

    Re: Saving files inside executable

    Add them as a resource to your project... then extract them as needed.

    -tg
    * I don't respond to private requests for help. It's not conducive to the general learning of others.-I also subscribe to all threads I participate, so there's no need to pm when there's an update.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help - how to remove eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to???
    * On Error Resume Next is error ignoring, not error handling(tm). * Use Offensive Programming, not Defensive Programming.
    "There is a major problem with your code, and VB wants to tell you what it is.. but you have decided to put your fingers in your ears and shout 'I'm not listening!'" - si_the_geek on using OERN
    MVP '06-'10

  3. #3
    Join Date
    Aug 2010
    Posts
    2

    Re: Saving files inside executable

    Thank you, that's what I was looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured