From ef218c75edf975b2f3946bd16194cc9679dd2d31 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 21 Oct 2011 02:13:36 +0000 Subject: - add convenience functions BLI_split_dir_part / BLI_split_file_part, which just call BLI_split_dirfile(). - add a fixed value for bprogdir (the dir of bprogname), since it was being used for resource lookups. --- source/creator/creator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index f6b99a9f73c..24f2d22a029 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -141,7 +141,8 @@ static int print_version(int argc, const char **argv, void *data); extern int pluginapi_force_ref(void); /* from blenpluginapi:pluginapi.c */ -char bprogname[FILE_MAX]; /* from blenpluginapi:pluginapi.c */ +char bprogname[FILE_MAX]; +char bprogdir[FILE_MAX]; char btempdir[FILE_MAX]; #define BLEND_VERSION_STRING_FMT "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION @@ -1157,6 +1158,7 @@ int main(int argc, const char **argv) // need this. BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]); + BLI_split_dir_part(bprogname, bprogdir, sizeof(bprogdir)); BLI_threadapi_init(); -- cgit v1.2.3