forked from git-for-windows/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blender-git: Update to latest. Use unix-like files layout.
- Loading branch information
Showing
5 changed files
with
179 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- blender-2.72/extern/clew/include/clew.h.orig 2014-09-24 19:29:54.000000000 +0400 | ||
+++ blender-2.72/extern/clew/include/clew.h 2014-10-06 13:41:38.711800000 +0400 | ||
@@ -493,7 +493,7 @@ | ||
/* Define alignment keys */ | ||
#if defined( __GNUC__ ) | ||
#define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) | ||
-#elif defined( _WIN32) && (_MSC_VER) | ||
+#elif defined( _WIN32) && defined(_MSC_VER) | ||
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ | ||
/* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ | ||
/* #include <crtdefs.h> */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
mingw-w64-blender-git/mingw-use-X11-like-path-layout.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters