Since assets are shipped with the executable and required to run, the app shouldn't rely on the working directory to locate them. Instead, there should be a defined relationship between the exe location and the assets root directory, which is used to locate it at runtime.
Eg, in a shipped / release build:
carise/
carise[.exe]
data/...
During development:
carise/
build/.../carise[.exe]
out/.../carise[.exe]
src/...
data/...
Here, data/ is always in the same directory as carise[.exe] or in a parent directory. This setup can be used with the app "searching upwards" from argv[0] (the executable path) for a data/ directory. This will be the asset root / prefix.
All assets in source code / config files / manifests will contain URIs to assets, relative to the asset root. At runtime, the engine will resolve the full path to a given URI by appending it to the asset root.
AC
Since assets are shipped with the executable and required to run, the app shouldn't rely on the working directory to locate them. Instead, there should be a defined relationship between the exe location and the assets root directory, which is used to locate it at runtime.
Eg, in a shipped / release build:
During development:
Here,
data/is always in the same directory ascarise[.exe]or in a parent directory. This setup can be used with the app "searching upwards" fromargv[0](the executable path) for adata/directory. This will be the asset root / prefix.All assets in source code / config files / manifests will contain URIs to assets, relative to the asset root. At runtime, the engine will resolve the full path to a given URI by appending it to the asset root.
AC