Skip to content
slaeshjag edited this page Mar 24, 2013 · 9 revisions

Data dir

libDarnit has a few paths where it looks for files. Apart from just trying a relative path and looking in mounted LDI files, it also has a data directory and a write directory. The data directory is where all resources etc. are to be stored, it's a read only location. The write directory is where all files the program creates ends up. This directory is supposed to be guaranteed to be writeable across all platforms. It is automatically selected when you open a file for writing. On windows, it is also used to locate the registery key that tells libdarnit where the data directory is located.

Windows

  • Data directory can not be determined from the datadir variable. Instead, libdarnit looks up the registery key HKEY_LOCAL_MACHINE/SOFTWARE/libdarnit//path and uses the contents of that key as the path for data dir. If the key is not found, libdarnit will look for data in cwd.

  • Write directory is located in %APPDATA%/, and is created automatically.

Linux (desktop)

  • Data directory is located in /usr/share/games/
  • Write directory is located in $HOME/.libdarnit/

OpenPandora

Since all data is packaged into a PND anyway, both write dir and data dir are set to "."

Clone this wiki locally