From 20b662a946861b5acee8970948a22f7a2d1aedf3 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 25 Dec 2011 20:11:18 +0000 Subject: rbpaths: Add new special dir HOME_DIR for RaaA. HOME_DIR is intended for not-so-advanced files which shall be user visible, and thus not in /.rockbox. Therefore HOME_DIR is translated to $HOME on RaaA, /sdcard on android, the internal memory on ypr0 and "/" on native targets. ROCKBOX_DIR ("/.rockbox") already existed as special and is translated to whatever the real rockbox dir is on the target (e.g. /sdcard/rockbox on android), but it's not suitable for some files we generate (e.g. battery-bench.txt). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31430 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/rbpaths.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h index 8f554c25f4..f351c5e6c9 100644 --- a/firmware/export/rbpaths.h +++ b/firmware/export/rbpaths.h @@ -46,6 +46,12 @@ #if !defined(APPLICATION) || defined(SAMSUNG_YPR0) +#ifdef SAMSUNG_YPR0 +#define HOME_DIR "/mnt/media0" +#else +#define HOME_DIR "/." /* dot to avoid "//XX", /./X is valid */ +#endif + /* make sure both are the same for native builds */ #undef ROCKBOX_LIBRARY_PATH #define ROCKBOX_LIBRARY_PATH ROCKBOX_DIR @@ -53,12 +59,15 @@ #define PLUGIN_DIR ROCKBOX_DIR "/rocks" #define CODECS_DIR ROCKBOX_DIR "/codecs" -#define REC_BASE_DIR "/" -#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists" +#define REC_BASE_DIR HOME_DIR +#define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "/Playlists" #define paths_init() -#else /* application */ +#else /* APPLICATION */ + +#define HOME_DIR "" /* replaced at runtime */ +#define HOME_DIR_LEN (sizeof(HOME_DIR)-1) #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" #if (CONFIG_PLATFORM & PLATFORM_ANDROID) @@ -67,12 +76,12 @@ #define CODECS_DIR ROCKBOX_LIBRARY_PATH "/rockbox/codecs" #endif -#define REC_BASE_DIR ROCKBOX_DIR "/" -#define PLAYLIST_CATALOG_DEFAULT_DIR ROCKBOX_DIR "/Playlists" +#define REC_BASE_DIR HOME_DIR +#define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "Playlists" extern void paths_init(void); -#endif /* APPLICATION */ +#endif /* !APPLICATION || SAMSUNG_YPR0 */ #define LANG_DIR ROCKBOX_DIR "/langs" @@ -82,7 +91,7 @@ extern void paths_init(void); #define VIEWERS_DIR PLUGIN_DIR "/viewers" #if defined(APPLICATION) && !defined(SAMSUNG_YPR0) -#define PLUGIN_DATA_DIR "/.rockbox/rocks.data" +#define PLUGIN_DATA_DIR ROCKBOX_DIR "/rocks.data" #define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR #define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR #define PLUGIN_DEMOS_DATA_DIR PLUGIN_DATA_DIR -- cgit v1.2.3