Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2006-06-12 23:13:17 +0400
committerAndrea Weikert <elubie@gmx.net>2006-06-12 23:13:17 +0400
commit98b8b876b61995af8f8e349ac39fae653f8a8af4 (patch)
treecd4a3c9337ff131e02499f79933c6b20040a6ad0
parent43326bb68672332acc4337fad2c2bbf7eba24b5a (diff)
- changed back SHGetFolderPath to SHGetSpecialFolderPath to support older Win98 and Win95 systems without having to redirstribute shfolder.dll
- MINGW should compile too now (was problem when fucntionality was first introduced), tested with MINGW 5.0.2 (scons) - added -lshell32 for the dependency on MINGW
-rw-r--r--config/win32-mingw-config.py2
-rw-r--r--source/blender/src/usiblender.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py
index a5c59158bde..5d256300685 100644
--- a/config/win32-mingw-config.py
+++ b/config/win32-mingw-config.py
@@ -141,7 +141,7 @@ CC_WARN = [ '-Wall' ]
##FIX_STUBS_WARNINGS = -Wno-unused
-LLIBS = ['-lshfolder', '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread']
+LLIBS = ['-lshell32', '-lshfolder', '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 68a1e08fcce..a638d003b63 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -38,7 +38,11 @@
#include <string.h>
#ifdef WIN32
-#include <shlobj.h> /* SHGetSpecialFolderPath, has to be done before BLI_winstuff for some reasons... */
+#include <windows.h> /* need to include windows.h so _WIN32_IE is defined */
+#ifndef _WIN32_IE
+#define _WIN32_IE 0x0400 /* minimal requirements for SHGetSpecialFolderPath on MINGW MSVC has this defined already */
+#endif
+#include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff because 'near' is disabled through BLI_windstuff */
#include "BLI_winstuff.h"
#include <process.h> /* getpid */
#else
@@ -530,9 +534,10 @@ static void readBlog(void)
/* Adding Desktop and My Documents */
fsmenu_append_seperator();
- SHGetFolderPath(0, CSIDL_PERSONAL,NULL, 0, folder);
+
+ SHGetSpecialFolderPath(0, folder, CSIDL_PERSONAL, 0);
fsmenu_insert_entry(folder, 0);
- SHGetFolderPath(0, CSIDL_DESKTOPDIRECTORY,NULL, 0, folder);
+ SHGetSpecialFolderPath(0, folder, CSIDL_DESKTOPDIRECTORY, 0);
fsmenu_insert_entry(folder, 0);
fsmenu_append_seperator();