Closed GoogleCodeExporter closed 8 years ago
sorry, close to being right, change it to:
-----Change the section ----
// if the config dir was not specified at the commandline, look for
~/.mupen64plus dir
if (strlen(l_ConfigDir) == 0)
{
strncpy(l_ConfigDir, getenv("HOME"), PATH_MAX);
strncat(l_ConfigDir, "/.mupen64plus", PATH_MAX - strlen(l_ConfigDir));
// if ~/.mupen64plus dir is not found, create it
---- to ----
// if the config dir was not specified at the commandline, look for
~/.config/mupen64plus dir
if (strlen(l_ConfigDir) == 0)
{
if (strlen(getenv("XDG_CONFIG_HOME")) == 0)
{
strncpy(l_ConfigDir, getenv("HOME"), PATH_MAX);
strncat(l_ConfigDir, "/.config/mupen64plus", PATH_MAX -
strlen(l_ConfigDir));
}
else
{
strncpy(l_ConfigDir, getenv("XDG_CONFIG_HOME"), PATH_MAX);
strncat(l_ConfigDir, "/mupen64plus", PATH_MAX -
strlen(l_ConfigDir));
}
// if ~/.config/mupen64plus dir is not found, create it
Original comment by duncan.hawthorne
on 8 Aug 2008 at 9:33
I'd like to cast a vote for this. Alot of software (at least typical desktop
software) are starting to respect this standard, and adding mupen64plus to
those will
help consistency of the system overall.
Original comment by micket...@gmail.com
on 31 Dec 2008 at 12:50
issue #192 is a duplicate of this, and also contains a patch.
Original comment by richard...@gmail.com
on 4 Jan 2009 at 7:57
The xdg standard is more complex and a patch for that can be found at
http://git.debian.org/?p=collab-maint/mupen64plus.git;a=tree;f=debian/patches;hb
=master
It is again 1.5+dfsg1. So it wasn't made with glN64 or any new plugins in mind.
Please read the commit message of the message for more informations
Original comment by sven@narfation.org
on 31 Aug 2009 at 10:44
Attachments:
The patch was ported to the current trunk r1404 and checked against glN64 and
z64 for
generated data/cache files. The commit message is the same.
---
The freedesktop standard for basedir[1] defines three different types of user
directories which mupen64plus uses. They are defined by environment variables
and in
the case if they are absend by well defined standard paths.
* Data directory ($XDG_DATA_HOME); default: $HOME/.local/share/
- save, screenshots, hires_texture, texture_dump
* Config directory ($XDG_CONFIG_HOME); default: $HOME/.config/
- mupen64plus.conf, configuration files of plugins
* Cache directory ($XDG_DATA_HOME); default: $HOME/.cache/
- rombrowser.cache and all other files which could be deleted
without loosing essential data
Specific directories for each tool should be created below that base
directories.
libxdg-basedir can be used to find the correct paths without caring much about
the
actual specification.
The current config dir has to be splitted in these three different directories.
That
also means that plugins have to be informed about that dirs. New functions
SetDataDir
and SetCacheDir have been specified inside the API headers and implemented were
the
plugin would benefit from it. This is the case in rice_video for texture_dump
and
hires_texture.
The user can also override the data and cache directories by the new commandline
options --datadir and --cachedir.
As there is no real specification for Windows available the behavior on that
platform
was not changed.
[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
---
Makefile | 3 +-
blight_input/Input_1.1.h | 22 ++++++++
doc/Audio_1.1.h | 22 ++++++++
doc/Audio_1.2.h | 22 ++++++++
doc/Graphics_1.3.h | 22 ++++++++
doc/Input_1.1.h | 22 ++++++++
dummy_audio/Audio_1.1.h | 22 ++++++++
dummy_input/Input_1.1.h | 22 ++++++++
dummy_video/Graphics_1.3.h | 22 ++++++++
glN64/Zilmar GFX 1.3.h | 22 ++++++++
glide64/Gfx1.3.h | 22 ++++++++
jttl_audio/Audio_1.2.h | 22 ++++++++
main/main.c | 121 +++++++++++++++++++++++++++++++++++------
main/main.h | 2 +
main/plugin.c | 12 ++++-
main/plugin.h | 2 +-
main/romcache.c | 2 +-
pre.mk | 9 +++
rice_video/Graphics_1.3.h | 22 ++++++++
rice_video/TextureFilters.cpp | 8 ++--
rice_video/Video.cpp | 80 ++++++++++++++++++++++++++--
rsp_hle/Audio_1.1.h | 22 ++++++++
z64/Gfx #1.3.h | 22 ++++++++
23 files changed, 517 insertions(+), 30 deletions(-)
Original comment by sven@narfation.org
on 31 Aug 2009 at 11:13
Updated patch to have the saves at the correct place.
Original comment by sven@narfation.org
on 1 Sep 2009 at 12:40
Attachments:
This feature has been implemented with the re-architecture of the Mupen64Plus
project.
Original comment by richard...@gmail.com
on 12 Jan 2010 at 4:50
Original issue reported on code.google.com by
duncan.hawthorne
on 8 Aug 2008 at 6:21