From 9c0b2479f7025a84444adf08e3be8ced60dad013 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 1 Aug 2010 16:15:27 +0000 Subject: Rockbox as an application: add get_user_file_path(). For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox). This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local. On the DAPs it's a no-op, returing /.rockbox directly. Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.h | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'apps/settings.h') diff --git a/apps/settings.h b/apps/settings.h index 63305b5ae7..7deb2def41 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -33,6 +33,7 @@ #if CONFIG_CODEC == SWCODEC #include "audio.h" #endif +#include "rbpaths.h" struct opt_items { unsigned const char* string; @@ -40,50 +41,6 @@ struct opt_items { }; /** Setting values defines **/ - -/* name of directory where configuration, fonts and other data - * files are stored */ -#ifdef __PCTOOL__ -#undef ROCKBOX_DIR -#undef ROCKBOX_DIR_LEN -#undef WPS_DIR -#define ROCKBOX_DIR "." -#define ROCKBOX_DIR_LEN 1 -#else - -/* ROCKBOX_DIR is now defined in autoconf.h for flexible build types */ -#ifndef ROCKBOX_DIR -#error ROCKBOX_DIR not defined (should be in autoconf.h) -#endif -#define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1) -#endif /* def __PCTOOL__ */ - - -#define FONT_DIR ROCKBOX_DIR "/fonts" -#define LANG_DIR ROCKBOX_DIR "/langs" -#define WPS_DIR ROCKBOX_DIR "/wps" -#define SBS_DIR WPS_DIR -#define THEME_DIR ROCKBOX_DIR "/themes" -#define ICON_DIR ROCKBOX_DIR "/icons" - -#define PLUGIN_DIR ROCKBOX_DIR "/rocks" -#define PLUGIN_GAMES_DIR PLUGIN_DIR "/games" -#define PLUGIN_APPS_DIR PLUGIN_DIR "/apps" -#define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos" -#define VIEWERS_DIR PLUGIN_DIR "/viewers" - -#define BACKDROP_DIR ROCKBOX_DIR "/backdrops" -#define REC_BASE_DIR "/" -#define EQS_DIR ROCKBOX_DIR "/eqs" -#define CODECS_DIR ROCKBOX_DIR "/codecs" -#define RECPRESETS_DIR ROCKBOX_DIR "/recpresets" -#define FMPRESET_PATH ROCKBOX_DIR "/fmpresets" -#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists" - -#define VIEWERS_CONFIG ROCKBOX_DIR "/viewers.config" -#define CONFIGFILE ROCKBOX_DIR "/config.cfg" -#define FIXEDSETTINGSFILE ROCKBOX_DIR "/fixed.cfg" - #define MAX_FILENAME 32 -- cgit v1.2.3