diff options
author | Simon Clitherow <aphex@nildram.co.uk> | 2004-07-12 01:54:18 +0400 |
---|---|---|
committer | Simon Clitherow <aphex@nildram.co.uk> | 2004-07-12 01:54:18 +0400 |
commit | c90ffd49e0b3a9480c2b02e8674ecf20ffe35a71 (patch) | |
tree | 1803dda3ab696010ce95c39c7a534cd340c2a77d /source/blender/blenlib/intern | |
parent | 84b399364c1a7f9ea69f4acf158282a7bfc6e2d9 (diff) |
- changed sequence for finding HOME on Win32. Sequence is now as
shown at http://www.blender3d.org/cms/Installation_Policy.352.0.html
Still TODO: update NSIS installer script to suit the change.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index faa7d45fa9d..2bd36658abc 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -492,11 +492,24 @@ char *BLI_gethome(void) { static char dir[512]; char tmpdir[512]; + /* Check for %HOME% env var */ + ret = getenv("HOME"); if(ret) { sprintf(dir, "%s\.blender", ret); if (BLI_exists(dir)) return dir; } + + /* else, check install dir (path containing blender.exe) */ + + BLI_getInstallationDir(dir); + + if (BLI_exists(dir)) + { + strcat(dir,"/.blender"); + if (BLI_exists(dir)) return(dir); + } + /* add user profile support for WIN 2K / NT */ ret = getenv("USERPROFILE"); @@ -511,14 +524,6 @@ char *BLI_gethome(void) { } } - BLI_getInstallationDir(dir); - - if (BLI_exists(dir)) - { - strcat(dir,"/.blender"); - if (BLI_exists(dir)) return(dir); - } - /* Saving in the Windows dir is less than desirable. Use as a last resort ONLY! (aphex) |