Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Find game files outside of the Executable directory

Open Lgt2x opened this issue 1 year ago • 2 comments

Currently, D3 looks for HOG files only in the same directory as the executable. This is not very practical during development, as it requires either copying game files to the build directory, or copying the built executable to the game directory.

We need to provide a way to avoid copying files around to run the game. For this, we could have 2 complementary solutions :

  • Create a CMake option to specify the default directory(ies) where the game should try to find the game files.
  • Provide a new command line option to specify at runtime the location where game files are located. This would override the CMake option.

Any other solutions you would like to see implemented ? Note that this does not replace creating a proper installer for the game, which we will do at some point

Lgt2x avatar Apr 27 '24 15:04 Lgt2x

Actually -setdir should already solve part of the problem https://github.com/DescentDevelopers/Descent3/wiki/Running-Descent-3#command-line-options

Lgt2x avatar Apr 27 '24 15:04 Lgt2x

We can also include a cmake way to deploy the build artifacts to your game directory, eg: setting prefix.

bryanperris avatar Apr 27 '24 15:04 bryanperris

-setdir is satisfying until we get to packaging

Lgt2x avatar May 06 '24 13:05 Lgt2x