diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-12-25 20:11:18 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-12-25 20:11:18 +0000 |
commit | 20b662a946861b5acee8970948a22f7a2d1aedf3 (patch) | |
tree | 392d9568a3baaa23be0e109799485255ddcd067f /firmware/export/rbpaths.h | |
parent | 16784598ac550dab147ea8ee15634a2f15739fff (diff) | |
download | rockbox-20b662a946861b5acee8970948a22f7a2d1aedf3.tar.gz rockbox-20b662a946861b5acee8970948a22f7a2d1aedf3.zip |
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
Diffstat (limited to 'firmware/export/rbpaths.h')
-rw-r--r-- | firmware/export/rbpaths.h | 23 |
1 files changed, 16 insertions, 7 deletions
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 @@ | |||
46 | 46 | ||
47 | #if !defined(APPLICATION) || defined(SAMSUNG_YPR0) | 47 | #if !defined(APPLICATION) || defined(SAMSUNG_YPR0) |
48 | 48 | ||
49 | #ifdef SAMSUNG_YPR0 | ||
50 | #define HOME_DIR "/mnt/media0" | ||
51 | #else | ||
52 | #define HOME_DIR "/." /* dot to avoid "//XX", /./X is valid */ | ||
53 | #endif | ||
54 | |||
49 | /* make sure both are the same for native builds */ | 55 | /* make sure both are the same for native builds */ |
50 | #undef ROCKBOX_LIBRARY_PATH | 56 | #undef ROCKBOX_LIBRARY_PATH |
51 | #define ROCKBOX_LIBRARY_PATH ROCKBOX_DIR | 57 | #define ROCKBOX_LIBRARY_PATH ROCKBOX_DIR |
@@ -53,12 +59,15 @@ | |||
53 | #define PLUGIN_DIR ROCKBOX_DIR "/rocks" | 59 | #define PLUGIN_DIR ROCKBOX_DIR "/rocks" |
54 | #define CODECS_DIR ROCKBOX_DIR "/codecs" | 60 | #define CODECS_DIR ROCKBOX_DIR "/codecs" |
55 | 61 | ||
56 | #define REC_BASE_DIR "/" | 62 | #define REC_BASE_DIR HOME_DIR |
57 | #define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists" | 63 | #define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "/Playlists" |
58 | 64 | ||
59 | #define paths_init() | 65 | #define paths_init() |
60 | 66 | ||
61 | #else /* application */ | 67 | #else /* APPLICATION */ |
68 | |||
69 | #define HOME_DIR "<HOME>" /* replaced at runtime */ | ||
70 | #define HOME_DIR_LEN (sizeof(HOME_DIR)-1) | ||
62 | 71 | ||
63 | #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" | 72 | #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" |
64 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) | 73 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) |
@@ -67,12 +76,12 @@ | |||
67 | #define CODECS_DIR ROCKBOX_LIBRARY_PATH "/rockbox/codecs" | 76 | #define CODECS_DIR ROCKBOX_LIBRARY_PATH "/rockbox/codecs" |
68 | #endif | 77 | #endif |
69 | 78 | ||
70 | #define REC_BASE_DIR ROCKBOX_DIR "/" | 79 | #define REC_BASE_DIR HOME_DIR |
71 | #define PLAYLIST_CATALOG_DEFAULT_DIR ROCKBOX_DIR "/Playlists" | 80 | #define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "Playlists" |
72 | 81 | ||
73 | extern void paths_init(void); | 82 | extern void paths_init(void); |
74 | 83 | ||
75 | #endif /* APPLICATION */ | 84 | #endif /* !APPLICATION || SAMSUNG_YPR0 */ |
76 | 85 | ||
77 | #define LANG_DIR ROCKBOX_DIR "/langs" | 86 | #define LANG_DIR ROCKBOX_DIR "/langs" |
78 | 87 | ||
@@ -82,7 +91,7 @@ extern void paths_init(void); | |||
82 | #define VIEWERS_DIR PLUGIN_DIR "/viewers" | 91 | #define VIEWERS_DIR PLUGIN_DIR "/viewers" |
83 | 92 | ||
84 | #if defined(APPLICATION) && !defined(SAMSUNG_YPR0) | 93 | #if defined(APPLICATION) && !defined(SAMSUNG_YPR0) |
85 | #define PLUGIN_DATA_DIR "/.rockbox/rocks.data" | 94 | #define PLUGIN_DATA_DIR ROCKBOX_DIR "/rocks.data" |
86 | #define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR | 95 | #define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR |
87 | #define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR | 96 | #define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR |
88 | #define PLUGIN_DEMOS_DATA_DIR PLUGIN_DATA_DIR | 97 | #define PLUGIN_DEMOS_DATA_DIR PLUGIN_DATA_DIR |