107 lines
3.9 KiB
Diff
107 lines
3.9 KiB
Diff
diff -Naur blender-2.72-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp blender-2.72/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
|
|
--- blender-2.72-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2014-10-08 00:07:23.583905600 +0100
|
|
+++ blender-2.72/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2014-10-08 00:08:46.678658400 +0100
|
|
@@ -69,6 +69,44 @@
|
|
{
|
|
}
|
|
|
|
+#if defined(__MINGW32__)
|
|
+
|
|
+const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const
|
|
+{
|
|
+ static char knownpath[MAX_PATH * 3 + 128] = {0};
|
|
+
|
|
+ char temppath[MAX_PATH + 1];
|
|
+ char temppath2[MAX_PATH + 1];
|
|
+ const GHOST_TUns8 *binary_dir = getBinaryDir();
|
|
+ strcpy(temppath2, reinterpret_cast<const char*>(binary_dir));
|
|
+ char* lastslash = strrchr(temppath2, '\\');
|
|
+ if (lastslash != NULL) {
|
|
+ *lastslash = '\0';
|
|
+ }
|
|
+ snprintf(temppath, sizeof(temppath), "%s\\..\\share\\blender\\%s", temppath2, versionstr);
|
|
+ temppath[MAX_PATH] = '\0';
|
|
+ GetFullPathNameA(temppath, sizeof(knownpath), knownpath, NULL);
|
|
+ return (GHOST_TUns8*)knownpath;
|
|
+}
|
|
+
|
|
+const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserDir(int, const char *versionstr) const
|
|
+{
|
|
+ static char knownpath[MAX_PATH * 3 + 128] = {0};
|
|
+
|
|
+ char temppath[MAX_PATH + 1];
|
|
+ char temppath2[MAX_PATH + 1];
|
|
+ const GHOST_TUns8 *binary_dir = getBinaryDir();
|
|
+ strcpy(temppath2, reinterpret_cast<const char*>(binary_dir));
|
|
+ char* lastslash = strrchr(temppath2, '\\');
|
|
+ if (lastslash != NULL) {
|
|
+ *lastslash = '\0';
|
|
+ }
|
|
+ snprintf(temppath, sizeof(temppath), "%s\\..\\..\\home\\%s\\.blender\\%s", temppath2, getenv("USERNAME") ?: "unknown", versionstr);
|
|
+ temppath[MAX_PATH] = '\0';
|
|
+ GetFullPathNameA(temppath, sizeof(knownpath), knownpath, NULL);
|
|
+ return (GHOST_TUns8*)knownpath;
|
|
+}
|
|
+#else
|
|
const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const
|
|
{
|
|
static char knownpath[MAX_PATH * 3 + 128] = {0}; /* 1 utf-16 might translante into 3 utf-8. 2 utf-16 translates into 4 utf-8*/
|
|
@@ -105,6 +143,8 @@
|
|
return NULL;
|
|
}
|
|
|
|
+#endif
|
|
+
|
|
const GHOST_TUns8 *GHOST_SystemPathsWin32::getBinaryDir() const
|
|
{
|
|
static char fullname[MAX_PATH * 3] = {0};
|
|
diff -Naur blender-2.72-orig/source/creator/CMakeLists.txt blender-2.72/source/creator/CMakeLists.txt
|
|
--- blender-2.72-orig/source/creator/CMakeLists.txt 2014-09-24 19:29:55.000000000 +0400
|
|
+++ blender-2.72/source/creator/CMakeLists.txt 2014-10-07 09:16:00.095600000 +0400
|
|
@@ -256,7 +256,7 @@
|
|
# -----------------------------------------------------------------------------
|
|
# Platform Specific Var: TARGETDIR_VER
|
|
|
|
-if(UNIX AND NOT APPLE)
|
|
+if((UNIX AND NOT APPLE) OR MINGW)
|
|
if(WITH_INSTALL_PORTABLE)
|
|
set(TARGETDIR_VER ${TARGETDIR}/${BLENDER_VERSION})
|
|
else()
|
|
@@ -393,13 +393,13 @@
|
|
# -----------------------------------------------------------------------------
|
|
# Install Targets (Platform Specific)
|
|
|
|
-if(UNIX AND NOT APPLE)
|
|
+if((UNIX AND NOT APPLE) OR MINGW)
|
|
|
|
if(NOT WITH_PYTHON_MODULE)
|
|
if(WITH_DOC_MANPAGE)
|
|
add_custom_target(
|
|
blender_man_page ALL
|
|
- COMMAND ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py
|
|
+ COMMAND python3 ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py
|
|
${EXECUTABLE_OUTPUT_PATH}/blender
|
|
${CMAKE_CURRENT_BINARY_DIR}/blender.1)
|
|
add_dependencies(blender_man_page blender)
|
|
@@ -1003,7 +1003,7 @@
|
|
|
|
install(TARGETS blender blender-launcher
|
|
COMPONENT Blender
|
|
- DESTINATION ".")
|
|
+ DESTINATION bin)
|
|
|
|
if(MSVC12_REDIST_DIR)
|
|
if(CMAKE_CL_64)
|
|
diff -Naur blender-2.72-orig/source/blenderplayer/CMakeLists.txt blender-2.72/source/blenderplayer/CMakeLists.txt
|
|
--- blender-2.72-orig/source/blenderplayer/CMakeLists.txt 2014-09-24 19:29:55.000000000 +0400
|
|
+++ blender-2.72/source/blenderplayer/CMakeLists.txt 2014-10-07 09:16:00.095600000 +0400
|
|
@@ -58,7 +58,7 @@
|
|
|
|
install(TARGETS blenderplayer
|
|
COMPONENT Blenderplayer
|
|
- DESTINATION ".")
|
|
+ DESTINATION bin)
|
|
|
|
elseif(APPLE)
|
|
add_executable(blenderplayer ${EXETYPE} bad_level_call_stubs/stubs.c)
|