diff options
author | Andrea Weikert <elubie@gmx.net> | 2010-07-11 20:28:28 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2010-07-11 20:28:28 +0400 |
commit | 75a0301c7df147a35789db191346f8a266aef591 (patch) | |
tree | ffb65f8d83a474f9b10bb4bb42e56c2595ecc915 /source/blender/blenlib | |
parent | 148ccc2f17d63748512dd5f04ceebda7c2284f82 (diff) |
== installation paths ==
separate define for the user and system blender directory name,
on Linux the directories should be named /usr/share/blender and ~/.blender.
Platform maintainers should still check if that's ok.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_path_util.h | 9 | ||||
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h index 866201cba52..316b850805d 100644 --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -101,11 +101,14 @@ char *BLI_get_folder_create(int folder_id, char *subfolder); #define BLENDER_HISTORY_FILE "recent-files.txt" #ifdef WIN32 -#define BLENDER_BASE_FORMAT "%s\\Blender Foundation\\Blender\\%s" +#define BLENDER_USER_FORMAT "%s\\Blender Foundation\\Blender\\%s" +#define BLENDER_SYSTEM_FORMAT "%s\\Blender Foundation\\Blender\\%s" #elif __APPLE__ -#define BLENDER_BASE_FORMAT "%s/Blender/%s" +#define BLENDER_USER_FORMAT "%s/Blender/%s" +#define BLENDER_SYSTEM_FORMAT "%s/Blender/%s" #else -#define BLENDER_BASE_FORMAT "%s/.blender/%s" +#define BLENDER_USER_FORMAT "%s/.blender/%s" +#define BLENDER_SYSTEM_FORMAT "%s/blender/%s" #endif void BLI_setenv(const char *env, const char *val); diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 3b8599fe1c6..a75d57a988e 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1014,7 +1014,7 @@ static int get_path_user(char *targetpath, char *folder_name, char *envvar) user_base_path = (const char *)GHOST_getUserDir(); if (user_base_path) { - BLI_snprintf(user_path, FILE_MAX, BLENDER_BASE_FORMAT, user_base_path, blender_version_decimal()); + BLI_snprintf(user_path, FILE_MAX, BLENDER_USER_FORMAT, user_base_path, blender_version_decimal()); } if(!user_path[0]) @@ -1040,7 +1040,7 @@ static int get_path_system(char *targetpath, char *folder_name, char *envvar) system_base_path = (const char *)GHOST_getSystemDir(); if (system_base_path) { - BLI_snprintf(system_path, FILE_MAX, BLENDER_BASE_FORMAT, system_base_path, blender_version_decimal()); + BLI_snprintf(system_path, FILE_MAX, BLENDER_SYSTEM_FORMAT, system_base_path, blender_version_decimal()); } if(!system_path[0]) |