Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8307621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:33:51+00:00 2026-06-08T18:33:51+00:00

When writing a game, you always add some data (images, sounds, …). On Unix

  • 0

When writing a game, you always add some data (images, sounds, …). On Unix like systems I usually install them to ${PREFIX}/share/project/data where ${PREFIX} may be controlled by the build system like CMake or autotools.

In this case, it’s easy to setup the data directory directly with some #define that are automatically generated by the build system.

On Windows I absolutely have no idea how to find the data directory, because applications installer always ask where to install the project, and the code is already compiled it is not possible to control this by some #define.

I have two ideas for this problem:

  1. Use a .bat script that starts the binary and add a switch to the data directory. Then user will only starts this .bat file.

  2. Generate a new file by the application installer that contains paths to data directory and install it somewhere in the Common App Data folder.

What do you advise me to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:33:52+00:00Added an answer on June 8, 2026 at 6:33 pm

    If you’re targeting win32 exclusively then you should use the Resource Compiler.
    It allows you to include arbitrary files in the executable itself, and automatically generates macros with which to refer to them and you can use the win32 API to load them. The User-Defined Resource allows you to store arbitrary blobs in the build.

    The drawbacks are that it’s not portable at all and you need to have some moderate Microsoft fu in order to get it to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some game at c++. The problem is with arrays. It always shows
So I'm writing a game in c++ for MS-DOS and I'm including some inline
I'm writing a realtime game for android, and as such I'd like to minimize
I'm writing a game write now which involves saving highscores and basic data such
I'm writing a game that is played in a pseudo-Internet like environment. I'm just
I'm writing a game of sorts to practice some programming, and i've come across
I am writing a game which uses opengles. I have created my renderer class
I'm writing free game for Android and im going to use AdMob. I have
I am writing a game in python in which I must periodically pull a
I'm writing a game in python with pygame and need to render text onto

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.