== installation paths ==
authorAndrea Weikert <elubie@gmx.net>
Sun, 11 Jul 2010 16:28:28 +0000 (16:28 +0000)
committerAndrea Weikert <elubie@gmx.net>
Sun, 11 Jul 2010 16:28:28 +0000 (16:28 +0000)
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.

source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/intern/path_util.c

index 866201c..316b850 100644 (file)
@@ -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);
index 3b8599f..a75d57a 100644 (file)
@@ -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])