blender: update to 3.2.2
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,23 @@
|
||||
diff -Naur blender-2.77a-orig/extern/glog/src/windows/config.h blender-2.77a/extern/glog/src/windows/config.h
|
||||
--- blender-2.77a-orig/extern/glog/src/windows/config.h 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.77a/extern/glog/src/windows/config.h 2016-07-12 13:40:19.613595000 +0300
|
||||
--- a/extern/ceres/include/ceres/jet.h
|
||||
+++ b/extern/ceres/include/ceres/jet.h
|
||||
@@ -590,6 +590,7 @@
|
||||
return Jet<T, N>(erfc(x.a), -x.v * M_2_SQRTPI * exp(-x.a * x.a));
|
||||
}
|
||||
|
||||
+#ifndef __MINGW32__
|
||||
// Bessel functions of the first kind with integer order equal to 0, 1, n.
|
||||
//
|
||||
// Microsoft has deprecated the j[0,1,n]() POSIX Bessel functions in favour of
|
||||
@@ -647,6 +648,7 @@
|
||||
BesselJn(n, f.a),
|
||||
T(0.5) * (BesselJn(n - 1, f.a) - BesselJn(n + 1, f.a)) * f.v);
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Jet Classification. It is not clear what the appropriate semantics are for
|
||||
// these classifications. This picks that std::isfinite and std::isnormal are
|
||||
--- a/extern/glog/src/windows/config.h
|
||||
+++ b/extern/glog/src/windows/config.h
|
||||
@@ -15,6 +15,10 @@
|
||||
#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1900))
|
||||
# define HAVE_SNPRINTF
|
||||
@@ -12,9 +29,8 @@ diff -Naur blender-2.77a-orig/extern/glog/src/windows/config.h blender-2.77a/ext
|
||||
|
||||
/* Always the empty-string on non-windows systems. On windows, should be
|
||||
"__declspec(dllexport)". This way, when we compile the dll, we export our
|
||||
diff -Naur blender-2.77a-orig/extern/glog/src/windows/port.h blender-2.77a/extern/glog/src/windows/port.h
|
||||
--- blender-2.77a-orig/extern/glog/src/windows/port.h 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.77a/extern/glog/src/windows/port.h 2016-07-12 13:40:19.613595000 +0300
|
||||
--- a/extern/glog/src/windows/port.h
|
||||
+++ b/extern/glog/src/windows/port.h
|
||||
@@ -62,7 +62,7 @@
|
||||
* used by both C and C++ code, so we put all the C++ together.
|
||||
*/
|
||||
@@ -24,8 +40,8 @@ diff -Naur blender-2.77a-orig/extern/glog/src/windows/port.h blender-2.77a/exter
|
||||
|
||||
/* 4244: otherwise we get problems when substracting two size_t's to an int
|
||||
* 4251: it's complaining about a private struct I've chosen not to dllexport
|
||||
@@ -74,17 +74,19 @@
|
||||
#pragma warning(disable:4244 4251 4355 4715 4800 4996)
|
||||
@@ -77,17 +77,19 @@
|
||||
#pragma warning(disable:4244 4251 4355 4715 4800 4996 4267 4312 4722)
|
||||
|
||||
/* file I/O */
|
||||
-#define PATH_MAX 1024
|
||||
@@ -38,28 +54,107 @@ diff -Naur blender-2.77a-orig/extern/glog/src/windows/port.h blender-2.77a/exter
|
||||
#define close _close
|
||||
#define popen _popen
|
||||
#define pclose _pclose
|
||||
+#ifndef __MINGW64_VERSION_MAJOR
|
||||
+#ifndef __MINGW32__
|
||||
+#define lseek _lseek
|
||||
+#define PATH_MAX 1024
|
||||
#define R_OK 04 /* read-only (for access()) */
|
||||
+#endif
|
||||
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
||||
#ifndef __MINGW32__
|
||||
enum { STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2 };
|
||||
@@ -130,7 +132,9 @@
|
||||
|
||||
#define O_WRONLY _O_WRONLY
|
||||
@@ -138,7 +138,9 @@
|
||||
#define DEFAULT_TEMPLATE_ROOTDIR ".."
|
||||
|
||||
// ----------------------------------- SYSTEM/PROCESS
|
||||
+#ifndef __MINGW64_VERSION_MAJOR
|
||||
+#ifndef __MINGW32__
|
||||
typedef int pid_t;
|
||||
+#endif
|
||||
#define getpid _getpid
|
||||
|
||||
#endif // _MSC_VER
|
||||
diff -Naur blender-2.77a-orig/intern/cycles/util/util_logging.h blender-2.77a/intern/cycles/util/util_logging.h
|
||||
--- blender-2.77a-orig/intern/cycles/util/util_logging.h 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.77a/intern/cycles/util/util_logging.h 2016-07-12 13:40:19.646095000 +0300
|
||||
@@ -18,7 +18,9 @@
|
||||
--- a/extern/mantaflow/helper/util/vectorbase.h
|
||||
+++ b/extern/mantaflow/helper/util/vectorbase.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#endif
|
||||
|
||||
// redefine usage of some windows functions
|
||||
-#if defined(WIN32) || defined(_WIN32)
|
||||
+#if defined(_MSC_VER)
|
||||
# ifndef snprintf
|
||||
# define snprintf _snprintf
|
||||
# endif
|
||||
--- a/extern/quadriflow/src/dedge.cpp
|
||||
+++ b/extern/quadriflow/src/dedge.cpp
|
||||
@@ -10,6 +10,11 @@
|
||||
#ifdef WITH_TBB
|
||||
#include "tbb/tbb.h"
|
||||
#endif
|
||||
+
|
||||
+#ifdef _WIN32
|
||||
+#include <intrin.h>
|
||||
+#endif
|
||||
+
|
||||
namespace qflow {
|
||||
|
||||
inline int dedge_prev(int e, int deg) { return (e % deg == 0u) ? e + (deg - 1) : e - 1; }
|
||||
--- a/intern/clog/clog.c
|
||||
+++ b/intern/clog/clog.c
|
||||
@@ -24,8 +24,8 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
-#if defined(_MSC_VER)
|
||||
-# include <Windows.h>
|
||||
+#if defined(_WIN32)
|
||||
+# include <windows.h>
|
||||
|
||||
# include <VersionHelpers.h> /* This needs to be included after Windows.h. */
|
||||
# include <io.h>
|
||||
@@ -384,7 +384,7 @@
|
||||
static uint64_t clg_timestamp_ticks_get(void)
|
||||
{
|
||||
uint64_t tick;
|
||||
-#if defined(_MSC_VER)
|
||||
+#if defined(_WIN32)
|
||||
tick = GetTickCount64();
|
||||
#else
|
||||
struct timeval tv;
|
||||
--- a/intern/cycles/device/cuda/device.cpp
|
||||
+++ b/intern/cycles/device/cuda/device.cpp
|
||||
@@ -74,7 +74,7 @@
|
||||
#ifdef WITH_CUDA
|
||||
static CUresult device_cuda_safe_init()
|
||||
{
|
||||
-# ifdef _WIN32
|
||||
+# ifdef _MSC_VER
|
||||
__try {
|
||||
return cuInit(0);
|
||||
}
|
||||
--- a/intern/cycles/device/hip/device.cpp
|
||||
+++ b/intern/cycles/device/hip/device.cpp
|
||||
@@ -80,7 +80,7 @@
|
||||
#ifdef WITH_HIP
|
||||
static hipError_t device_hip_safe_init()
|
||||
{
|
||||
-# ifdef _WIN32
|
||||
+# ifdef _MSC_VER
|
||||
__try {
|
||||
return hipInit(0);
|
||||
}
|
||||
--- a/intern/cycles/util/defines.h
|
||||
+++ b/intern/cycles/util/defines.h
|
||||
@@ -47,7 +47,7 @@
|
||||
# define ccl_device_forceinline static inline __attribute__((always_inline))
|
||||
# define ccl_device_inline_method __attribute__((always_inline))
|
||||
# define ccl_align(...) __attribute__((aligned(__VA_ARGS__)))
|
||||
-# ifndef FREE_WINDOWS64
|
||||
+# ifndef __MINGW32__
|
||||
# define __forceinline inline __attribute__((always_inline))
|
||||
# endif
|
||||
# define ccl_try_align(...) __attribute__((aligned(__VA_ARGS__)))
|
||||
--- a/intern/cycles/util/log.h
|
||||
+++ b/intern/cycles/util/log.h
|
||||
@@ -6,7 +6,9 @@
|
||||
|
||||
#if defined(WITH_CYCLES_LOGGING) && !defined(__KERNEL_GPU__)
|
||||
# include <gflags/gflags.h>
|
||||
@@ -69,10 +164,20 @@ diff -Naur blender-2.77a-orig/intern/cycles/util/util_logging.h blender-2.77a/in
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
diff -Naur blender-2.80-orig/intern/cycles/util/util_simd.h blender-2.80/intern/cycles/util/util_simd.h
|
||||
--- blender-2.80-orig/intern/cycles/util/util_simd.h 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.80/intern/cycles/util/util_simd.h 2016-07-12 13:40:19.681095000 +0300
|
||||
@@ -26,12 +16,8 @@
|
||||
--- a/intern/cycles/util/murmurhash.cpp
|
||||
+++ b/intern/cycles/util/murmurhash.cpp
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "util/math.h"
|
||||
#include "util/murmurhash.h"
|
||||
|
||||
-#if defined(_MSC_VER)
|
||||
+#if defined(_WIN32)
|
||||
# define ROTL32(x, y) _rotl(x, y)
|
||||
# define ROTL64(x, y) _rotl64(x, y)
|
||||
# define BIG_CONSTANT(x) (x)
|
||||
--- a/intern/cycles/util/simd.h
|
||||
+++ b/intern/cycles/util/simd.h
|
||||
@@ -13,12 +13,8 @@
|
||||
/* SSE Intrinsics includes
|
||||
*
|
||||
* We assume __KERNEL_SSEX__ flags to have been defined at this point.
|
||||
@@ -80,29 +185,16 @@ diff -Naur blender-2.80-orig/intern/cycles/util/util_simd.h blender-2.80/intern/
|
||||
- * MinGW64 has conflicting declarations for these SSE headers in <windows.h>.
|
||||
- * Since we can't avoid including <windows.h>, better only include that */
|
||||
-#if defined(FREE_WINDOWS64)
|
||||
-# include "util/util_windows.h"
|
||||
-# include "util/windows.h"
|
||||
-#elif defined(_MSC_VER)
|
||||
+ */
|
||||
+#if defined(_WIN32)
|
||||
# include <intrin.h>
|
||||
#elif (defined(__x86_64__) || defined(__i386__))
|
||||
# include <x86intrin.h>
|
||||
diff -Naur blender-2.80-orig/intern/cycles/util/util_defines.h blender-2.80/intern/cycles/util/util_defines.h
|
||||
--- blender-2.80-orig/intern/cycles/util/util_defines.h 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.80/intern/cycles/util/util_defines.h 2016-07-12 13:40:19.712595000 +0300
|
||||
@@ -59,7 +59,7 @@
|
||||
# define ccl_device_inline static inline __attribute__((always_inline))
|
||||
# define ccl_device_forceinline static inline __attribute__((always_inline))
|
||||
# define ccl_align(...) __attribute__((aligned(__VA_ARGS__)))
|
||||
-# ifndef FREE_WINDOWS64
|
||||
+# ifndef __MINGW64_VERSION_MAJOR
|
||||
# define __forceinline inline __attribute__((always_inline))
|
||||
# endif
|
||||
# define ccl_try_align(...) __attribute__((aligned(__VA_ARGS__)))
|
||||
diff -Naur blender-2.80-orig/intern/dualcon/intern/Projections.h blender-2.80/intern/dualcon/intern/Projections.h
|
||||
--- blender-2.80-orig/intern/dualcon/intern/Projections.h 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.80/intern/dualcon/intern/Projections.h 2016-07-12 13:40:19.712595000 +0300
|
||||
@@ -23,7 +23,7 @@
|
||||
--- a/intern/dualcon/intern/Projections.h
|
||||
+++ b/intern/dualcon/intern/Projections.h
|
||||
@@ -9,7 +9,7 @@
|
||||
#define CONTAINS_INDEX
|
||||
#define GRID_DIMENSION 20
|
||||
|
||||
@@ -111,43 +203,24 @@ diff -Naur blender-2.80-orig/intern/dualcon/intern/Projections.h blender-2.80/in
|
||||
# define isnan(n) _isnan(n)
|
||||
# define LONG __int64
|
||||
# define int64_t __int64
|
||||
diff -Naur blender-2.80-orig/intern/ghost/intern/GHOST_WindowWin32.cpp blender-2.80/intern/ghost/intern/GHOST_WindowWin32.cpp
|
||||
--- blender-2.80-orig/intern/ghost/intern/GHOST_WindowWin32.cpp 2016-03-23 11:49:43.000000000 +0300
|
||||
+++ blender-2.80/intern/ghost/intern/GHOST_WindowWin32.cpp 2016-07-12 13:40:19.800595000 +0300
|
||||
@@ -23,6 +23,12 @@
|
||||
--- a/intern/ghost/intern/GHOST_ContextWGL.h
|
||||
+++ b/intern/ghost/intern/GHOST_ContextWGL.h
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include "GHOST_Context.h"
|
||||
|
||||
+#if defined(WITH_GL_EGL)
|
||||
+# include "GHOST_ContextEGL.h"
|
||||
+#else
|
||||
+# include "GHOST_ContextWGL.h"
|
||||
+#endif
|
||||
+
|
||||
#include "GHOST_WindowWin32.h"
|
||||
#include "GHOST_ContextD3D.h"
|
||||
#include "GHOST_ContextNone.h"
|
||||
@@ -36,11 +42,6 @@
|
||||
#include "utfconv.h"
|
||||
#include "utf_winfunc.h"
|
||||
+#undef INT
|
||||
#include <GL/wglew.h>
|
||||
|
||||
-#if defined(WITH_GL_EGL)
|
||||
-# include "GHOST_ContextEGL.h"
|
||||
-#else
|
||||
-# include "GHOST_ContextWGL.h"
|
||||
-#endif
|
||||
#ifdef WIN32_COMPOSITING
|
||||
# include <Dwmapi.h>
|
||||
#endif
|
||||
diff -Naur blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h blender-2.77a/intern/libmv/libmv/numeric/numeric.h
|
||||
--- blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.77a/intern/libmv/libmv/numeric/numeric.h 2016-07-12 13:40:19.817095000 +0300
|
||||
#ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY
|
||||
--- a/intern/libmv/libmv/numeric/numeric.h
|
||||
+++ b/intern/libmv/libmv/numeric/numeric.h
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <Eigen/QR>
|
||||
#include <Eigen/SVD>
|
||||
|
||||
-#if !defined(__MINGW64__)
|
||||
+#if !defined(__MINGW64_VERSION_MAJOR)
|
||||
+#if !defined(__MINGW32__)
|
||||
# if defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__) || \
|
||||
defined(__NetBSD__) || defined(__HAIKU__)
|
||||
inline void sincos(double x, double* sinx, double* cosx) {
|
||||
@@ -156,53 +229,53 @@ diff -Naur blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h blender-2.77a
|
||||
}
|
||||
# endif
|
||||
-#endif // !__MINGW64__
|
||||
+#endif // !__MINGW64_VERSION_MAJOR
|
||||
+#endif // !__MINGW32__
|
||||
|
||||
#if (defined(WIN32) || defined(WIN64)) && !defined(__MINGW32__)
|
||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
|
||||
inline long lround(double d) {
|
||||
diff --Naur a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
|
||||
@@ -449,7 +449,7 @@
|
||||
}
|
||||
|
||||
inline bool isnan(double i) {
|
||||
-#ifdef WIN32
|
||||
+#ifdef _MSC_VER
|
||||
return _isnan(i) > 0;
|
||||
#else
|
||||
return std::isnan(i);
|
||||
--- a/source/blender/blenlib/BLI_fileops.h
|
||||
+++ b/source/blender/blenlib/BLI_fileops.h
|
||||
@@ -65,8 +65,10 @@ int BLI_create_symlink(const char *path, const char *to) ATTR_NONNULL();
|
||||
@@ -64,7 +64,7 @@ int BLI_create_symlink(const char *path, const char *to) ATTR_NONNULL();
|
||||
|
||||
/* keep in sync with the definition of struct direntry in BLI_fileops_types.h */
|
||||
/* Keep in sync with the definition of struct `direntry` in `BLI_fileops_types.h`. */
|
||||
#ifdef WIN32
|
||||
-# if defined(_MSC_VER)
|
||||
+# if defined(_MSC_VER) || defined(__MINGW64__)
|
||||
+# if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
typedef struct _stat64 BLI_stat_t;
|
||||
+# elif defined(__MINGW32__)
|
||||
+typedef struct _stati64 BLI_stat_t;
|
||||
# else
|
||||
typedef struct _stat BLI_stat_t;
|
||||
# endif
|
||||
diff -Naur blender-2.79-orig/source/blender/blenlib/BLI_fileops_types.h blender-2.79/source/blender/blenlib/BLI_fileops_types.h
|
||||
--- blender-2.79-orig/source/blender/blenlib/BLI_fileops_types.h 2016-03-23 11:49:43.000000000 +0300
|
||||
+++ blender-2.79/source/blender/blenlib/BLI_fileops_types.h 2016-07-12 13:40:19.827095000 +0300
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
--- a/source/blender/blenlib/BLI_fileops_types.h
|
||||
+++ b/source/blender/blenlib/BLI_fileops_types.h
|
||||
@@ -14,7 +14,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
-#if defined(WIN32)
|
||||
+#if defined(_MSC_VER)
|
||||
typedef unsigned int mode_t;
|
||||
#endif
|
||||
|
||||
@@ -50,8 +50,10 @@ struct direntry {
|
||||
@@ -29,7 +29,7 @@ struct direntry {
|
||||
const char *relname;
|
||||
const char *path;
|
||||
#ifdef WIN32 /* keep in sync with the definition of BLI_stat_t in BLI_fileops.h */
|
||||
-# if defined(_MSC_VER)
|
||||
+# if defined(_MSC_VER) || defined(__MINGW64__)
|
||||
+# if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
struct _stat64 s;
|
||||
+# elif defined(__MINGW32__)
|
||||
+ struct _stati64 s;
|
||||
# else
|
||||
struct _stat s;
|
||||
# endif
|
||||
diff -Naur blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h blender-2.77a/source/blender/blenlib/BLI_winstuff.h
|
||||
--- blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h 2016-03-23 11:49:43.000000000 +0300
|
||||
+++ blender-2.77a/source/blender/blenlib/BLI_winstuff.h 2016-07-12 13:40:19.827095000 +0300
|
||||
@@ -65,7 +65,7 @@
|
||||
--- a/source/blender/blenlib/BLI_winstuff.h
|
||||
+++ b/source/blender/blenlib/BLI_winstuff.h
|
||||
@@ -49,7 +49,7 @@
|
||||
#endif
|
||||
|
||||
/* Defines for using ISO C++ conferment names. */
|
||||
@@ -211,7 +284,7 @@ diff -Naur blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h blender-2.77
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
@@ -82,10 +95,13 @@
|
||||
@@ -56,10 +56,13 @@
|
||||
# define F_OK 0
|
||||
#endif
|
||||
|
||||
@@ -227,154 +300,24 @@ diff -Naur blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h blender-2.77
|
||||
/* python uses HAVE_SSIZE_T */
|
||||
# ifndef HAVE_SSIZE_T
|
||||
# define HAVE_SSIZE_T 1
|
||||
--- blender-2.79b/source/blender/blenlib/intern/system.c.orig 2018-05-11 10:10:42.876493200 +0300
|
||||
+++ blender-2.79b/source/blender/blenlib/intern/system.c 2018-05-11 10:10:49.927705600 +0300
|
||||
@@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
/* Windows stack-walk lives in system_win32.c */
|
||||
-#if !defined(_MSC_VER)
|
||||
+#if !defined(_WIN32)
|
||||
/**
|
||||
* Write a backtrace into a file for systems which support it.
|
||||
*/
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/* NOTE: The code for CPU brand string is adopted from Cycles. */
|
||||
|
||||
-#if !defined(_WIN32) || defined(FREE_WINDOWS)
|
||||
+#if !defined(_WIN32) || (defined(FREE_WINDOWS) && !defined(__MINGW32__))
|
||||
static void __cpuid(
|
||||
/* Cannot be const, because it is modified below.
|
||||
* NOLINTNEXTLINE: readability-non-const-parameter. */
|
||||
--- blender-2.79b/source/blender/imbuf/intern/openexr/openexr_api.cpp.orig 2018-05-11 10:10:42.876493200 +0300
|
||||
+++ blender-2.79b/source/blender/imbuf/intern/openexr/openexr_api.cpp 2018-05-11 10:10:49.927705600 +0300
|
||||
@@ -77,7 +77,7 @@
|
||||
{
|
||||
|
||||
// The following prevents a linking error in debug mode for MSVC using the libs in CVS
|
||||
-#if defined(WITH_OPENEXR) && defined(_WIN32) && defined(DEBUG) && _MSC_VER < 1900
|
||||
+#if defined(WITH_OPENEXR) && defined(_MSC_VER) && defined(DEBUG) && _MSC_VER < 1900
|
||||
_CRTIMP void __cdecl _invalid_parameter_noinfo(void)
|
||||
{
|
||||
}
|
||||
diff -Naur blender-2.80-orig/source/blender/blenlib/intern/math_solvers.c blender-2.80/source/blender/blenlib/intern/math_solvers.c
|
||||
--- blender-2.80-orig/source/blender/blenlib/intern/math_solvers.c 2016-09-28 12:26:55.000000000 +0300
|
||||
+++ blender-2.80/source/blender/blenlib/intern/math_solvers.c 2016-10-14 13:53:56.430617800 +0300
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
MEM_freeN(c1);
|
||||
|
||||
- return isfinite(x_prev);
|
||||
+ return isfinite((float)x_prev);
|
||||
}
|
||||
|
||||
/**
|
||||
diff -Naur blender-2.81a-orig/source/creator/creator.c blender-2.81a/source/creator/creator.c
|
||||
--- blender-2.81a-orig/source/creator/creator.c 2016-09-28 12:26:55.000000000 +0300
|
||||
+++ blender-2.81a/source/creator/creator.c 2016-10-14 14:45:36.982849100 +0300
|
||||
@@ -23,8 +23,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <time.h>
|
||||
|
||||
-#ifdef WIN32
|
||||
+#ifdef _WIN32
|
||||
# include "utfconv.h"
|
||||
# include <windows.h>
|
||||
#endif
|
||||
diff -Naur a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
|
||||
--- a/source/blender/imbuf/intern/IMB_anim.h
|
||||
+++ b/source/blender/imbuf/intern/IMB_anim.h
|
||||
@@ -31,7 +31,10 @@
|
||||
# include <commdlg.h>
|
||||
# include <memory.h>
|
||||
# include <mmsystem.h>
|
||||
-# include <vfw.h>
|
||||
+
|
||||
+# ifndef FREE_WINDOWS
|
||||
+# include <vfw.h>
|
||||
+# endif
|
||||
# include <windows.h>
|
||||
# include <windowsx.h>
|
||||
|
||||
@@ -112,7 +115,7 @@ struct anim {
|
||||
/* avi */
|
||||
struct _AviMovie *avi;
|
||||
|
||||
-#if defined(_WIN32)
|
||||
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
/* windows avi */
|
||||
int avistreams;
|
||||
int firstvideo;
|
||||
diff -Naur a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
|
||||
--- a/source/blender/imbuf/intern/anim_movie.c
|
||||
+++ b/source/blender/imbuf/intern/anim_movie.c
|
||||
@@ -28,7 +28,10 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "BLI_winstuff.h"
|
||||
+
|
||||
+#ifndef FREE_WINDOWS
|
||||
# include <vfw.h>
|
||||
+#endif
|
||||
|
||||
# undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */
|
||||
# undef AVIIF_LIST /* redefined in AVI_avi.h */
|
||||
@@ -165,7 +168,7 @@ static void an_stringenc(char *string, const char *head, const char *tail, unsig
|
||||
#ifdef WITH_AVI
|
||||
static void free_anim_avi(struct anim *anim)
|
||||
{
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
int i;
|
||||
# endif
|
||||
|
||||
@@ -180,7 +183,7 @@ static void free_anim_avi(struct anim *anim)
|
||||
MEM_freeN(anim->avi);
|
||||
anim->avi = NULL;
|
||||
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
|
||||
if (anim->pgf) {
|
||||
AVIStreamGetFrameClose(anim->pgf);
|
||||
@@ -319,7 +322,7 @@ static int startavi(struct anim *anim)
|
||||
{
|
||||
|
||||
AviError avierror;
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
HRESULT hr;
|
||||
int i, firstvideo = -1;
|
||||
int streamcount;
|
||||
@@ -340,7 +343,7 @@ static int startavi(struct anim *anim)
|
||||
|
||||
avierror = AVI_open_movie(anim->name, anim->avi);
|
||||
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
if (avierror == AVI_ERROR_COMPRESSION) {
|
||||
AVIFileInit();
|
||||
hr = AVIFileOpen(&anim->pfile, anim->name, OF_READ, 0L);
|
||||
@@ -444,7 +447,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position)
|
||||
return NULL;
|
||||
--- a/source/blender/blenlib/intern/BLI_mmap.c
|
||||
+++ b/source/blender/blenlib/intern/BLI_mmap.c
|
||||
@@ -183,7 +183,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(FREE_WINDOWS)
|
||||
if (anim->avistreams) {
|
||||
LPBITMAPINFOHEADER lpbi;
|
||||
|
||||
diff -Naur a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
|
||||
-#ifndef WIN32
|
||||
+#ifndef _MSC_VER
|
||||
/* If an error occurs in this call, sigbus_handler will be called and will set
|
||||
* file->io_error to true. */
|
||||
memcpy(dest, file->memory + offset, length);
|
||||
--- a/source/blender/blenlib/intern/path_util.c
|
||||
+++ b/source/blender/blenlib/intern/path_util.c
|
||||
@@ -1263,7 +1263,18 @@ bool BLI_path_program_search(
|
||||
@@ -1186,7 +1186,18 @@ bool BLI_path_program_search(
|
||||
{
|
||||
/* free windows */
|
||||
|
||||
-#if (defined(WIN32) || defined(WIN64))
|
||||
-#if (defined(_WIN32) || defined(_WIN64))
|
||||
+#if defined(__MINGW32__)
|
||||
+ char *envstr;
|
||||
+
|
||||
@@ -390,22 +333,18 @@ diff -Naur a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/
|
||||
uputenv(env, val);
|
||||
|
||||
#else
|
||||
diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
|
||||
--- a/source/blender/blenlib/intern/storage.c
|
||||
+++ b/source/blender/blenlib/intern/storage.c
|
||||
@@ -266,8 +266,10 @@ int BLI_stat(const char *path, BLI_stat_t *buffer)
|
||||
@@ -376,7 +376,7 @@ int BLI_stat(const char *path, BLI_stat_t *buffer)
|
||||
|
||||
int BLI_wstat(const wchar_t *path, BLI_stat_t *buffer)
|
||||
{
|
||||
-# if defined(_MSC_VER)
|
||||
+# if defined(_MSC_VER) || defined(__MINGW64__)
|
||||
+# if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
return _wstat64(path, buffer);
|
||||
+# elif defined(__MINGW32__)
|
||||
+ return _wstati64(path, buffer);
|
||||
# else
|
||||
return _wstat(path, buffer);
|
||||
# endif
|
||||
@@ -457,17 +460,30 @@ void BLI_file_free_lines(LinkNode *lines)
|
||||
@@ -569,17 +569,30 @@ void BLI_file_free_lines(LinkNode *lines)
|
||||
bool BLI_file_older(const char *file1, const char *file2)
|
||||
{
|
||||
#ifdef WIN32
|
||||
@@ -437,143 +376,110 @@ diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/in
|
||||
|
||||
UTF16_UN_ENCODE(file2);
|
||||
UTF16_UN_ENCODE(file1);
|
||||
--- blender-2.80/intern/clog/clog.c.orig 2019-08-01 12:18:33.240672100 +0300
|
||||
+++ blender-2.80/intern/clog/clog.c 2019-08-01 12:18:45.784094200 +0300
|
||||
@@ -38,8 +38,8 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
--- a/source/blender/blenlib/intern/system.c
|
||||
+++ b/source/blender/blenlib/intern/system.c
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
|
||||
-#if defined(_MSC_VER)
|
||||
-# include <Windows.h>
|
||||
+#if defined(_WIN32)
|
||||
+# include <windows.h>
|
||||
|
||||
# include <VersionHelpers.h> /* This needs to be included after Windows.h. */
|
||||
# include <io.h>
|
||||
@@ -365,7 +365,7 @@
|
||||
static uint64_t clg_timestamp_ticks_get(void)
|
||||
/* Windows stack-walk lives in system_win32.c */
|
||||
-#if !defined(_MSC_VER)
|
||||
+#if !defined(_WIN32)
|
||||
void BLI_system_backtrace(FILE *fp)
|
||||
{
|
||||
uint64_t tick;
|
||||
-#if defined(_MSC_VER)
|
||||
+#if defined(_WIN32)
|
||||
tick = GetTickCount64();
|
||||
#else
|
||||
struct timeval tv;
|
||||
--- blender-2.80/intern/ghost/intern/GHOST_DisplayManagerWin32.h.orig 2019-08-01 13:25:18.577130500 +0300
|
||||
+++ blender-2.80/intern/ghost/intern/GHOST_DisplayManagerWin32.h 2019-08-01 13:25:57.358798600 +0300
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef __GHOST_DISPLAYMANAGERWIN32_H__
|
||||
#define __GHOST_DISPLAYMANAGERWIN32_H__
|
||||
/* ----------------------- */
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
-#ifndef WIN32
|
||||
+#ifndef _WIN32
|
||||
# error WIN32 only!
|
||||
#endif // WIN32
|
||||
/* NOTE: The code for CPU brand string is adopted from Cycles. */
|
||||
|
||||
--- blender-2.80/intern/ghost/intern/GHOST_SystemWin32.h.orig 2019-08-01 13:27:05.485718300 +0300
|
||||
+++ blender-2.80/intern/ghost/intern/GHOST_SystemWin32.h 2019-08-01 13:27:09.713325700 +0300
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef __GHOST_SYSTEMWIN32_H__
|
||||
#define __GHOST_SYSTEMWIN32_H__
|
||||
|
||||
-#ifndef WIN32
|
||||
+#ifndef _WIN32
|
||||
# error WIN32 only!
|
||||
#endif // WIN32
|
||||
|
||||
--- blender-2.80/intern/ghost/intern/GHOST_TaskbarWin32.h.orig 2019-08-01 13:26:35.424465500 +0300
|
||||
+++ blender-2.80/intern/ghost/intern/GHOST_TaskbarWin32.h 2019-08-01 13:26:37.764469600 +0300
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef __GHOST_TASKBARWIN32_H__
|
||||
#define __GHOST_TASKBARWIN32_H__
|
||||
|
||||
-#ifndef WIN32
|
||||
+#ifndef _WIN32
|
||||
# error WIN32 only!
|
||||
#endif // WIN32
|
||||
|
||||
--- blender-2.80/intern/ghost/intern/GHOST_WindowWin32.h.orig 2019-08-01 13:26:03.333609100 +0300
|
||||
+++ blender-2.80/intern/ghost/intern/GHOST_WindowWin32.h 2019-08-01 13:26:07.077615600 +0300
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef __GHOST_WINDOWWIN32_H__
|
||||
#define __GHOST_WINDOWWIN32_H__
|
||||
|
||||
-#ifndef WIN32
|
||||
+#ifndef _WIN32
|
||||
# error WIN32 only!
|
||||
#endif // WIN32
|
||||
|
||||
--- blender-2.80/intern/ghost/intern/GHOST_ContextWGL.h.orig 2019-08-01 13:26:03.333609100 +0300
|
||||
+++ blender-2.80/intern/ghost/intern/GHOST_ContextWGL.h 2019-08-01 13:26:07.077615600 +0300
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "GHOST_Context.h"
|
||||
|
||||
+#undef INT;
|
||||
#include <GL/wglew.h>
|
||||
|
||||
#ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY
|
||||
--- blender-2.80/intern/cycles/util/util_murmurhash.cpp.orig 2019-08-01 15:24:38.522454900 +0300
|
||||
+++ blender-2.80/intern/cycles/util/util_murmurhash.cpp 2019-08-01 14:58:05.222223800 +0300
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "util/util_algorithm.h"
|
||||
#include "util/util_murmurhash.h"
|
||||
|
||||
-#if defined(_MSC_VER)
|
||||
+#if defined(_WIN32)
|
||||
# define ROTL32(x, y) _rotl(x, y)
|
||||
# define ROTL64(x, y) _rotl64(x, y)
|
||||
# define BIG_CONSTANT(x) (x)
|
||||
--- blender-2.80/intern/cycles/device/device_cuda.cpp.orig 2019-08-01 15:26:37.073620900 +0300
|
||||
+++ blender-2.80/intern/cycles/device/device_cuda.cpp 2019-08-01 15:26:46.043633500 +0300
|
||||
@@ -2584,7 +2584,7 @@
|
||||
|
||||
static CUresult device_cuda_safe_init()
|
||||
{
|
||||
-# ifdef _WIN32
|
||||
+# ifdef _MSC_VER
|
||||
__try {
|
||||
return cuInit(0);
|
||||
}
|
||||
--- blender-2.80/intern/cycles/device/device_opencl.cpp.orig 2019-08-01 15:26:37.073620900 +0300
|
||||
+++ blender-2.80/intern/cycles/device/device_opencl.cpp 2019-08-01 15:26:46.043633500 +0300
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
static cl_int device_opencl_get_num_platforms_safe(cl_uint *num_platforms)
|
||||
{
|
||||
-# ifdef _WIN32
|
||||
+# ifdef _MSC_VER
|
||||
__try {
|
||||
return clGetPlatformIDs(0, NULL, num_platforms);
|
||||
}
|
||||
--- blender-2.81a/extern/quadriflow/src/dedge.cpp.orig 2019-12-06 11:45:08.681059300 +0300
|
||||
+++ blender-2.81a/extern/quadriflow/src/dedge.cpp 2019-12-06 11:45:54.841540400 +0300
|
||||
@@ -10,6 +10,11 @@
|
||||
#ifdef WITH_TBB
|
||||
#include "tbb/tbb.h"
|
||||
#endif
|
||||
-#if !defined(_WIN32) || defined(FREE_WINDOWS)
|
||||
+#if !defined(_WIN32)
|
||||
static void __cpuid(
|
||||
/* Cannot be const, because it is modified below.
|
||||
* NOLINTNEXTLINE: readability-non-const-parameter. */
|
||||
--- a/source/blender/imbuf/intern/IMB_anim.h
|
||||
+++ b/source/blender/imbuf/intern/IMB_anim.h
|
||||
@@ -12,7 +12,10 @@
|
||||
# include <commdlg.h>
|
||||
# include <memory.h>
|
||||
# include <mmsystem.h>
|
||||
-# include <vfw.h>
|
||||
+
|
||||
+#ifdef _WIN32
|
||||
+#include <intrin.h>
|
||||
+# ifndef __MINGW32__
|
||||
+# include <vfw.h>
|
||||
+# endif
|
||||
# include <windows.h>
|
||||
# include <windowsx.h>
|
||||
|
||||
@@ -95,7 +98,7 @@ struct anim {
|
||||
/* avi */
|
||||
struct _AviMovie *avi;
|
||||
|
||||
-#if defined(_WIN32)
|
||||
+#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
/* windows avi */
|
||||
int avistreams;
|
||||
int firstvideo;
|
||||
--- a/source/blender/imbuf/intern/anim_movie.c
|
||||
+++ b/source/blender/imbuf/intern/anim_movie.c
|
||||
@@ -7,7 +7,10 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "BLI_winstuff.h"
|
||||
+
|
||||
+#ifndef __MINGW32__
|
||||
# include <vfw.h>
|
||||
+#endif
|
||||
+
|
||||
namespace qflow {
|
||||
|
||||
inline int dedge_prev(int e, int deg) { return (e % deg == 0u) ? e + (deg - 1) : e - 1; }
|
||||
--- a/source/blender/blenlib/intern/BLI_mmap.c
|
||||
+++ b/source/blender/blenlib/intern/BLI_mmap.c
|
||||
@@ -199,7 +199,7 @@
|
||||
return false;
|
||||
# undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */
|
||||
# undef AVIIF_LIST /* redefined in AVI_avi.h */
|
||||
@@ -147,7 +150,7 @@ static void an_stringenc(char *string, const char *head, const char *tail, unsig
|
||||
#ifdef WITH_AVI
|
||||
static void free_anim_avi(struct anim *anim)
|
||||
{
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
int i;
|
||||
# endif
|
||||
|
||||
@@ -162,7 +165,7 @@ static void free_anim_avi(struct anim *anim)
|
||||
MEM_freeN(anim->avi);
|
||||
anim->avi = NULL;
|
||||
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
|
||||
if (anim->pgf) {
|
||||
AVIStreamGetFrameClose(anim->pgf);
|
||||
@@ -320,7 +323,7 @@ static int startavi(struct anim *anim)
|
||||
{
|
||||
|
||||
AviError avierror;
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
HRESULT hr;
|
||||
int i, firstvideo = -1;
|
||||
int streamcount;
|
||||
@@ -341,7 +344,7 @@ static int startavi(struct anim *anim)
|
||||
|
||||
avierror = AVI_open_movie(anim->name, anim->avi);
|
||||
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
if (avierror == AVI_ERROR_COMPRESSION) {
|
||||
AVIFileInit();
|
||||
hr = AVIFileOpen(&anim->pfile, anim->name, OF_READ, 0L);
|
||||
@@ -445,7 +448,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-#ifndef WIN32
|
||||
+#ifndef _MSC_VER
|
||||
/* If an error occurs in this call, sigbus_handler will be called and will set
|
||||
* file->io_error to true. */
|
||||
memcpy(dest, file->memory + offset, length);
|
||||
-# if defined(_WIN32)
|
||||
+# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
if (anim->avistreams) {
|
||||
LPBITMAPINFOHEADER lpbi;
|
||||
|
||||
--- a/source/blender/makesrna/intern/makesrna.c
|
||||
+++ b/source/blender/makesrna/intern/makesrna.c
|
||||
@@ -39,7 +39,7 @@
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "rna_internal.h"
|
||||
|
||||
@@ -582,14 +488,13 @@ diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/in
|
||||
# ifndef snprintf
|
||||
# define snprintf _snprintf
|
||||
# endif
|
||||
--- a/extern/mantaflow/helper/util/vectorbase.h
|
||||
+++ b/extern/mantaflow/helper/util/vectorbase.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#endif
|
||||
--- a/source/creator/creator.c
|
||||
+++ b/source/creator/creator.c
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
// redefine usage of some windows functions
|
||||
-#if defined(WIN32) || defined(_WIN32)
|
||||
+#if defined(_MSC_VER)
|
||||
# ifndef snprintf
|
||||
# define snprintf _snprintf
|
||||
# endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <time.h>
|
||||
|
||||
#ifdef WIN32
|
||||
# include "utfconv.h"
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
--- a/intern/cycles/kernel/types.h
|
||||
+++ b/intern/cycles/kernel/types.h
|
||||
@@ -1060,7 +1060,7 @@
|
||||
|
||||
int motion_position;
|
||||
} KernelCamera;
|
||||
-static_assert_align(KernelCamera, 16);
|
||||
+// static_assert_align(KernelCamera, 16);
|
||||
|
||||
typedef struct KernelFilm {
|
||||
float exposure;
|
||||
@@ -1148,7 +1148,7 @@
|
||||
|
||||
int pad1;
|
||||
} KernelFilm;
|
||||
-static_assert_align(KernelFilm, 16);
|
||||
+// static_assert_align(KernelFilm, 16);
|
||||
|
||||
typedef struct KernelFilmConvert {
|
||||
int pass_offset;
|
||||
@@ -1189,7 +1189,7 @@
|
||||
/* Padding. */
|
||||
int pad1;
|
||||
} KernelFilmConvert;
|
||||
-static_assert_align(KernelFilmConvert, 16);
|
||||
+// static_assert_align(KernelFilmConvert, 16);
|
||||
|
||||
typedef struct KernelBackground {
|
||||
/* only shader index */
|
||||
@@ -1222,7 +1222,7 @@
|
||||
/* Padding */
|
||||
int pad1, pad2;
|
||||
} KernelBackground;
|
||||
-static_assert_align(KernelBackground, 16);
|
||||
+// static_assert_align(KernelBackground, 16);
|
||||
|
||||
typedef struct KernelIntegrator {
|
||||
/* emission */
|
||||
@@ -1291,7 +1291,7 @@
|
||||
/* padding */
|
||||
int pad1;
|
||||
} KernelIntegrator;
|
||||
-static_assert_align(KernelIntegrator, 16);
|
||||
+// static_assert_align(KernelIntegrator, 16);
|
||||
|
||||
typedef enum KernelBVHLayout {
|
||||
BVH_LAYOUT_NONE = 0,
|
||||
@@ -1335,13 +1335,13 @@
|
||||
# endif
|
||||
#endif
|
||||
} KernelBVH;
|
||||
-static_assert_align(KernelBVH, 16);
|
||||
+// static_assert_align(KernelBVH, 16);
|
||||
|
||||
typedef struct KernelTables {
|
||||
int beckmann_offset;
|
||||
int pad1, pad2, pad3;
|
||||
} KernelTables;
|
||||
-static_assert_align(KernelTables, 16);
|
||||
+// static_assert_align(KernelTables, 16);
|
||||
|
||||
typedef struct KernelBake {
|
||||
int use;
|
||||
@@ -1349,7 +1349,7 @@
|
||||
int tri_offset;
|
||||
int pad1;
|
||||
} KernelBake;
|
||||
-static_assert_align(KernelBake, 16);
|
||||
+// static_assert_align(KernelBake, 16);
|
||||
|
||||
typedef struct KernelData {
|
||||
uint kernel_features;
|
||||
@@ -1365,7 +1365,7 @@
|
||||
KernelTables tables;
|
||||
KernelBake bake;
|
||||
} KernelData;
|
||||
-static_assert_align(KernelData, 16);
|
||||
+// static_assert_align(KernelData, 16);
|
||||
|
||||
/* Kernel data structures. */
|
||||
|
||||
@@ -1407,7 +1407,7 @@
|
||||
/* Volume velocity scale. */
|
||||
float velocity_scale;
|
||||
} KernelObject;
|
||||
-static_assert_align(KernelObject, 16);
|
||||
+// static_assert_align(KernelObject, 16);
|
||||
|
||||
typedef struct KernelCurve {
|
||||
int shader_id;
|
||||
@@ -1415,13 +1415,13 @@
|
||||
int num_keys;
|
||||
int type;
|
||||
} KernelCurve;
|
||||
-static_assert_align(KernelCurve, 16);
|
||||
+// static_assert_align(KernelCurve, 16);
|
||||
|
||||
typedef struct KernelCurveSegment {
|
||||
int prim;
|
||||
int type;
|
||||
} KernelCurveSegment;
|
||||
-static_assert_align(KernelCurveSegment, 8);
|
||||
+// static_assert_align(KernelCurveSegment, 8);
|
||||
|
||||
typedef struct KernelSpotLight {
|
||||
float radius;
|
||||
@@ -1467,7 +1467,7 @@
|
||||
KernelDistantLight distant;
|
||||
};
|
||||
} KernelLight;
|
||||
-static_assert_align(KernelLight, 16);
|
||||
+// static_assert_align(KernelLight, 16);
|
||||
|
||||
typedef struct KernelLightDistribution {
|
||||
float totarea;
|
||||
@@ -1483,7 +1483,7 @@
|
||||
} lamp;
|
||||
};
|
||||
} KernelLightDistribution;
|
||||
-static_assert_align(KernelLightDistribution, 16);
|
||||
+// static_assert_align(KernelLightDistribution, 16);
|
||||
|
||||
typedef struct KernelParticle {
|
||||
int index;
|
||||
@@ -1497,7 +1497,7 @@
|
||||
float4 velocity;
|
||||
float4 angular_velocity;
|
||||
} KernelParticle;
|
||||
-static_assert_align(KernelParticle, 16);
|
||||
+// static_assert_align(KernelParticle, 16);
|
||||
|
||||
typedef struct KernelShader {
|
||||
float constant_emission[3];
|
||||
@@ -1506,7 +1506,7 @@
|
||||
int pass_id;
|
||||
int pad2, pad3;
|
||||
} KernelShader;
|
||||
-static_assert_align(KernelShader, 16);
|
||||
+// static_assert_align(KernelShader, 16);
|
||||
|
||||
/* Patches */
|
||||
|
||||
@@ -1545,7 +1545,7 @@
|
||||
int prim;
|
||||
float u, v;
|
||||
} KernelShaderEvalInput;
|
||||
-static_assert_align(KernelShaderEvalInput, 16);
|
||||
+// static_assert_align(KernelShaderEvalInput, 16);
|
||||
|
||||
/* Pre-computed sample table sizes for PMJ02 sampler. */
|
||||
#define NUM_PMJ_DIVISIONS 32
|
||||
86
mingw-w64-blender/0005-fix-WINTAB_PRINTF-on-mingw.patch
Normal file
86
mingw-w64-blender/0005-fix-WINTAB_PRINTF-on-mingw.patch
Normal file
@@ -0,0 +1,86 @@
|
||||
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
|
||||
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
|
||||
@@ -948,11 +948,11 @@
|
||||
/* Test for Win32/Wintab button down match. */
|
||||
useWintabPos = wt->testCoordinates(msg.pt.x, msg.pt.y, info.x, info.y);
|
||||
if (!useWintabPos) {
|
||||
- WINTAB_PRINTF(" ... but associated system button mismatched position\n");
|
||||
+ WINTAB_PRINTF(" ... but associated system button mismatched position\n", "");
|
||||
continue;
|
||||
}
|
||||
|
||||
- WINTAB_PRINTF(" ... associated to system button\n");
|
||||
+ WINTAB_PRINTF(" ... associated to system button\n", "");
|
||||
|
||||
/* Steal the Win32 event which was previously peeked. */
|
||||
PeekMessage(&msg, window->getHWND(), message, message, PM_REMOVE | PM_NOYIELD);
|
||||
@@ -971,13 +971,13 @@
|
||||
break;
|
||||
}
|
||||
else {
|
||||
- WINTAB_PRINTF(" ... but no system button\n");
|
||||
+ WINTAB_PRINTF(" ... but no system button\n", "");
|
||||
}
|
||||
}
|
||||
case GHOST_kEventButtonUp: {
|
||||
WINTAB_PRINTF("HWND %p Wintab button up", window->getHWND());
|
||||
if (!useWintabPos) {
|
||||
- WINTAB_PRINTF(" ... but Wintab position isn't trusted\n");
|
||||
+ WINTAB_PRINTF(" ... but Wintab position isn't trusted\n", "");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1003,13 +1003,13 @@
|
||||
if (PeekMessage(&msg, window->getHWND(), message, message, PM_REMOVE | PM_NOYIELD) &&
|
||||
msg.message != WM_QUIT) {
|
||||
|
||||
- WINTAB_PRINTF(" ... associated to system button\n");
|
||||
+ WINTAB_PRINTF(" ... associated to system button\n", "");
|
||||
window->updateMouseCapture(MouseReleased);
|
||||
system->pushEvent(
|
||||
new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData));
|
||||
}
|
||||
else {
|
||||
- WINTAB_PRINTF(" ... but no system button\n");
|
||||
+ WINTAB_PRINTF(" ... but no system button\n", "");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1631,16 +1631,16 @@
|
||||
case WT_PROXIMITY: {
|
||||
WINTAB_PRINTF("HWND %p HCTX %p WT_PROXIMITY\n", window->getHWND(), (void *)wParam);
|
||||
if (LOWORD(lParam)) {
|
||||
- WINTAB_PRINTF(" Cursor entering context.\n");
|
||||
+ WINTAB_PRINTF(" Cursor entering context.\n", "");
|
||||
}
|
||||
else {
|
||||
- WINTAB_PRINTF(" Cursor leaving context.\n");
|
||||
+ WINTAB_PRINTF(" Cursor leaving context.\n", "");
|
||||
}
|
||||
if (HIWORD(lParam)) {
|
||||
- WINTAB_PRINTF(" Cursor entering or leaving hardware proximity.\n");
|
||||
+ WINTAB_PRINTF(" Cursor entering or leaving hardware proximity.\n", "");
|
||||
}
|
||||
else {
|
||||
- WINTAB_PRINTF(" Cursor neither entering nor leaving hardware proximity.\n");
|
||||
+ WINTAB_PRINTF(" Cursor neither entering nor leaving hardware proximity.\n", "");
|
||||
}
|
||||
|
||||
GHOST_Wintab *wt = window->getWintab();
|
||||
@@ -1690,13 +1690,13 @@
|
||||
WINTAB_PRINTF("HWND %p HCTX %p WT_CTXOVERLAP", window->getHWND(), (void *)wParam);
|
||||
switch (lParam) {
|
||||
case CXS_DISABLED:
|
||||
- WINTAB_PRINTF(" CXS_DISABLED\n");
|
||||
+ WINTAB_PRINTF(" CXS_DISABLED\n", "");
|
||||
break;
|
||||
case CXS_OBSCURED:
|
||||
- WINTAB_PRINTF(" CXS_OBSCURED\n");
|
||||
+ WINTAB_PRINTF(" CXS_OBSCURED\n", "");
|
||||
break;
|
||||
case CXS_ONTOP:
|
||||
- WINTAB_PRINTF(" CXS_ONTOP\n");
|
||||
+ WINTAB_PRINTF(" CXS_ONTOP\n", "");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur blender-2.77a-orig/extern/clew/include/clew.h blender-2.77a/extern/clew/include/clew.h
|
||||
--- blender-2.77a-orig/extern/clew/include/clew.h 2016-03-21 19:16:12.000000000 +0300
|
||||
+++ blender-2.77a/extern/clew/include/clew.h 2016-07-12 13:40:29.182095000 +0300
|
||||
@@ -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> */
|
||||
@@ -1,7 +1,6 @@
|
||||
diff -Naur blender-2.77a-orig/intern/libmv/CMakeLists.txt blender-2.77a/intern/libmv/CMakeLists.txt
|
||||
--- blender-2.77a-orig/intern/libmv/CMakeLists.txt 2016-03-23 11:49:49.000000000 +0300
|
||||
+++ blender-2.77a/intern/libmv/CMakeLists.txt 2016-07-12 13:40:32.165095000 +0300
|
||||
@@ -199,6 +199,9 @@
|
||||
--- a/intern/libmv/CMakeLists.txt
|
||||
+++ b/intern/libmv/CMakeLists.txt
|
||||
@@ -195,6 +195,9 @@
|
||||
third_party/msinttypes/stdint.h
|
||||
)
|
||||
|
||||
@@ -10,4 +9,4 @@ diff -Naur blender-2.77a-orig/intern/libmv/CMakeLists.txt blender-2.77a/intern/l
|
||||
+ set_source_files_properties(libmv/simple_pipeline/resect.cc PROPERTIES COMPILE_FLAGS "-g0")
|
||||
|
||||
if(WITH_GTESTS)
|
||||
blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "" "" "")
|
||||
include(GTestTesting)
|
||||
|
||||
20
mingw-w64-blender/0007-disable-compiler-warnings.patch
Normal file
20
mingw-w64-blender/0007-disable-compiler-warnings.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1537,7 +1537,7 @@
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Extra compile flags
|
||||
-
|
||||
+if(NOT MINGW)
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
|
||||
@@ -1762,7 +1762,7 @@
|
||||
set(CXX_WARNINGS "${_WARNINGS}")
|
||||
unset(_WARNINGS)
|
||||
endif()
|
||||
-
|
||||
+endif()
|
||||
# ensure python header is found since detection can fail, this could happen
|
||||
# with _any_ library but since we used a fixed python version this tends to
|
||||
# be most problematic.
|
||||
@@ -1,19 +1,18 @@
|
||||
diff -Naur blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp blender-2.77a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
|
||||
--- blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2016-03-16 15:57:57.000000000 +0300
|
||||
+++ blender-2.77a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2016-07-12 13:40:38.182595000 +0300
|
||||
@@ -69,6 +69,44 @@
|
||||
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
|
||||
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
|
||||
@@ -22,6 +22,44 @@
|
||||
{
|
||||
}
|
||||
|
||||
+#if defined(__MINGW32__)
|
||||
+
|
||||
+const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const
|
||||
+const char *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();
|
||||
+ const char *binary_dir = getBinaryDir();
|
||||
+ strcpy(temppath2, reinterpret_cast<const char*>(binary_dir));
|
||||
+ char* lastslash = strrchr(temppath2, '\\');
|
||||
+ if (lastslash != NULL) {
|
||||
@@ -22,16 +21,16 @@ diff -Naur blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp ble
|
||||
+ snprintf(temppath, sizeof(temppath), "%s\\..\\share\\blender\\%s", temppath2, versionstr);
|
||||
+ temppath[MAX_PATH] = '\0';
|
||||
+ GetFullPathNameA(temppath, sizeof(knownpath), knownpath, NULL);
|
||||
+ return (GHOST_TUns8*)knownpath;
|
||||
+ return (char*)knownpath;
|
||||
+}
|
||||
+
|
||||
+const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserDir(int, const char *versionstr) const
|
||||
+const char *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();
|
||||
+ const char *binary_dir = getBinaryDir();
|
||||
+ strcpy(temppath2, reinterpret_cast<const char*>(binary_dir));
|
||||
+ char* lastslash = strrchr(temppath2, '\\');
|
||||
+ if (lastslash != NULL) {
|
||||
@@ -40,18 +39,18 @@ diff -Naur blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp ble
|
||||
+ 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;
|
||||
+ return (char*)knownpath;
|
||||
+}
|
||||
+#else
|
||||
const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const
|
||||
const char *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;
|
||||
/* 1 utf-16 might translate into 3 utf-8. 2 utf-16 translates into 4 utf-8. */
|
||||
@@ -61,6 +99,8 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const
|
||||
const char *GHOST_SystemPathsWin32::getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const
|
||||
{
|
||||
GUID folderid;
|
||||
|
||||
10
mingw-w64-blender/0009-include-missing-headers.patch
Normal file
10
mingw-w64-blender/0009-include-missing-headers.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/intern/ghost/intern/GHOST_Wintab.cpp
|
||||
+++ b/intern/ghost/intern/GHOST_Wintab.cpp
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
+#include <cmath>
|
||||
|
||||
#include "GHOST_Wintab.h"
|
||||
|
||||
15
mingw-w64-blender/0010-do-not-link-to-extern_bullet.patch
Normal file
15
mingw-w64-blender/0010-do-not-link-to-extern_bullet.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- a/intern/rigidbody/CMakeLists.txt
|
||||
+++ b/intern/rigidbody/CMakeLists.txt
|
||||
@@ -20,8 +20,11 @@
|
||||
)
|
||||
|
||||
set(LIB
|
||||
- extern_bullet
|
||||
${BULLET_LIBRARIES}
|
||||
)
|
||||
+
|
||||
+if(NOT WITH_SYSTEM_BULLET)
|
||||
+ list(APPEND LIB extern_bullet)
|
||||
+endif()
|
||||
|
||||
blender_add_lib(bf_intern_rigidbody "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
@@ -1,96 +0,0 @@
|
||||
diff -urN blender-2.78a.orig/extern/sdlew/include/SDL2/SDL_stdinc.h blender-2.78a/extern/sdlew/include/SDL2/SDL_stdinc.h
|
||||
--- blender-2.78a.orig/extern/sdlew/include/SDL2/SDL_stdinc.h 2017-01-21 23:15:35.942200500 +0000
|
||||
+++ blender-2.78a/extern/sdlew/include/SDL2/SDL_stdinc.h 2017-01-21 23:16:13.040308500 +0000
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
|
||||
{
|
||||
-#if defined(__GNUC__) && defined(i386)
|
||||
+#if defined(__GNUC__) && defined(__i386__)
|
||||
int u0, u1, u2;
|
||||
__asm__ __volatile__ (
|
||||
"cld \n\t"
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:15:38.437603200 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:16:39.527894100 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
# define __KERNEL_SSE__
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:15:38.442605600 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:16:45.798993000 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
# define __KERNEL_SSE__
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:15:38.466624100 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:16:55.150783300 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
# define __KERNEL_SSE2__
|
||||
# endif
|
||||
#endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 */
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:15:38.471623800 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:17:01.336263900 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:15:38.457118700 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:17:06.789600800 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
diff -urN blender-2.78a.orig/intern/cycles/util/util_optimization.h blender-2.78a/intern/cycles/util/util_optimization.h
|
||||
--- blender-2.78a.orig/intern/cycles/util/util_optimization.h 2017-01-21 23:15:39.999924200 +0000
|
||||
+++ blender-2.78a/intern/cycles/util/util_optimization.h 2017-01-21 23:17:18.261111800 +0000
|
||||
@@ -23,7 +23,7 @@
|
||||
*
|
||||
* Compile a regular, SSE2 and SSE3 kernel. */
|
||||
|
||||
-# if defined(i386) || defined(_M_IX86)
|
||||
+# if defined(__i386__) || defined(_M_IX86)
|
||||
|
||||
/* We require minimum SSE2 support on x86, so auto enable. */
|
||||
# define __KERNEL_SSE2__
|
||||
diff -urN blender-2.78a.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c
|
||||
--- blender-2.78a.orig/source/blender/blenlib/intern/system.c 2017-01-21 23:15:56.216596800 +0000
|
||||
+++ blender-2.78a/source/blender/blenlib/intern/system.c 2017-01-21 23:19:07.797217100 +0000
|
||||
@@ -47,7 +47,7 @@
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
/* x86_64 always has SSE2 instructions */
|
||||
return 1;
|
||||
-#elif defined(__GNUC__) && defined(i386)
|
||||
+#elif defined(__GNUC__) && defined(__i386__)
|
||||
/* for GCC x86 we check cpuid */
|
||||
unsigned int d;
|
||||
__asm__(
|
||||
11
mingw-w64-blender/0011-no-TIME_UTC-on-msvcrt.patch
Normal file
11
mingw-w64-blender/0011-no-TIME_UTC-on-msvcrt.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/source/blender/blenlib/intern/uuid.cc
|
||||
+++ b/source/blender/blenlib/intern/uuid.cc
|
||||
@@ -28,7 +28,7 @@
|
||||
static_assert(std::mt19937_64::max() == 0xffffffffffffffffLL);
|
||||
|
||||
struct timespec ts;
|
||||
-#ifdef __APPLE__
|
||||
+#if defined(__APPLE__) || (defined(__MINGW32__) && !defined(_UCRT))
|
||||
/* `timespec_get()` is only available on macOS 10.15+, so until that's the minimum version
|
||||
* supported by Blender, use another function to get the timespec.
|
||||
*
|
||||
@@ -1,60 +0,0 @@
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:34:42.502290800 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:35:05.135410900 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
* is compiled without for other CPU's. */
|
||||
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32)
|
||||
# define __KERNEL_SSE__
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:34:42.535294300 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:35:11.368213100 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32)
|
||||
# define __KERNEL_SSE__
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:34:42.509291800 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:35:16.535104100 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32)
|
||||
# define __KERNEL_SSE2__
|
||||
# endif
|
||||
#endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 */
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:34:42.521290800 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:35:21.888140600 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32)
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp
|
||||
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:34:42.528291800 +0000
|
||||
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:35:41.958064000 +0000
|
||||
@@ -19,7 +19,7 @@
|
||||
# define KERNEL_STUB
|
||||
#else
|
||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
||||
-# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
|
||||
+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32)
|
||||
# define __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
@@ -1,6 +1,6 @@
|
||||
--- blender-2.79/source/blender/imbuf/intern/dds/dds_api.cpp.orig 2017-09-14 15:29:21.477036100 +0300
|
||||
+++ blender-2.79/source/blender/imbuf/intern/dds/dds_api.cpp 2017-09-14 15:29:30.667254000 +0300
|
||||
@@ -59,7 +59,7 @@
|
||||
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
|
||||
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
|
||||
@@ -43,7 +43,7 @@
|
||||
/* open file for writing */
|
||||
std::ofstream fildes;
|
||||
|
||||
@@ -9,23 +9,23 @@
|
||||
wchar_t *wname = alloc_utf16_from_8(name, 0);
|
||||
fildes.open(wname);
|
||||
free(wname);
|
||||
--- blender-2.79/source/blender/imbuf/intern/openexr/openexr_api.cpp.orig 2017-09-14 15:27:43.677657600 +0300
|
||||
+++ blender-2.79/source/blender/imbuf/intern/openexr/openexr_api.cpp 2017-09-14 15:28:07.224301900 +0300
|
||||
@@ -167,7 +167,7 @@
|
||||
IFileStream(const char *filename) : IStream(filename)
|
||||
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
|
||||
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
|
||||
@@ -216,7 +216,7 @@
|
||||
IFileStream(const char *filepath) : IStream(filepath)
|
||||
{
|
||||
/* utf-8 file path support on windows */
|
||||
-#if defined(WIN32)
|
||||
+#if defined (_MSC_VER)
|
||||
wchar_t *wfilename = alloc_utf16_from_8(filename, 0);
|
||||
ifs.open(wfilename, std::ios_base::binary);
|
||||
free(wfilename);
|
||||
@@ -273,7 +273,7 @@
|
||||
OFileStream(const char *filename) : OStream(filename)
|
||||
+#if defined(_MSC_VER)
|
||||
wchar_t *wfilepath = alloc_utf16_from_8(filepath, 0);
|
||||
ifs.open(wfilepath, std::ios_base::binary);
|
||||
free(wfilepath);
|
||||
@@ -322,7 +322,7 @@
|
||||
OFileStream(const char *filepath) : OStream(filepath)
|
||||
{
|
||||
/* utf-8 file path support on windows */
|
||||
-#if defined(WIN32)
|
||||
+#if defined (_MSC_VER)
|
||||
wchar_t *wfilename = alloc_utf16_from_8(filename, 0);
|
||||
ofs.open(wfilename, std::ios_base::binary);
|
||||
free(wfilename);
|
||||
+#if defined(_MSC_VER)
|
||||
wchar_t *wfilepath = alloc_utf16_from_8(filepath, 0);
|
||||
ofs.open(wfilepath, std::ios_base::binary);
|
||||
free(wfilepath);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- blender-2.79/source/blender/python/intern/bpy_app_handlers.c.orig 2017-09-14 15:41:13.142883900 +0300
|
||||
+++ blender-2.79/source/blender/python/intern/bpy_app_handlers.c 2017-09-14 15:41:34.396030100 +0300
|
||||
@@ -128,7 +128,7 @@
|
||||
--- a/source/blender/python/intern/bpy_app_handlers.c
|
||||
+++ b/source/blender/python/intern/bpy_app_handlers.c
|
||||
@@ -135,7 +135,7 @@
|
||||
/* dummy type because decorators can't be PyCFunctions */
|
||||
static PyTypeObject BPyPersistent_Type = {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
#else
|
||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||
@@ -207,7 +207,7 @@
|
||||
@@ -214,7 +214,7 @@
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
BPyPersistent_Type.ob_base.ob_base.ob_type = &PyType_Type;
|
||||
#endif
|
||||
|
||||
--- blender-2.79/source/blender/python/intern/bpy_rna.c.orig 2017-09-14 15:41:13.142883900 +0300
|
||||
+++ blender-2.79/source/blender/python/intern/bpy_rna.c 2017-09-14 15:41:34.396030100 +0300
|
||||
@@ -6254,7 +6254,7 @@
|
||||
--- a/source/blender/python/intern/bpy_rna.c
|
||||
+++ b/source/blender/python/intern/bpy_rna.c
|
||||
@@ -6543,7 +6543,7 @@
|
||||
NULL, /* struct PyMethodDef *tp_methods; */
|
||||
NULL, /* struct PyMemberDef *tp_members; */
|
||||
NULL, /* struct PyGetSetDef *tp_getset; */
|
||||
@@ -29,12 +29,12 @@
|
||||
NULL, /* defer assignment */
|
||||
#else
|
||||
&PyType_Type, /* struct _typeobject *tp_base; */
|
||||
@@ -7380,7 +7380,7 @@
|
||||
@@ -7679,7 +7679,7 @@
|
||||
#endif
|
||||
|
||||
/* For some reason MSVC complains of these. */
|
||||
-#if defined(_MSC_VER)
|
||||
+#if defined(_WIN32)
|
||||
pyrna_struct_meta_idprop_Type.tp_base = &PyType_Type;
|
||||
#endif
|
||||
|
||||
pyrna_prop_collection_iter_Type.tp_iter = PyObject_SelfIter;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/source/creator/CMakeLists.txt
|
||||
+++ b/source/creator/CMakeLists.txt
|
||||
@@ -140,10 +140,18 @@ if(WIN32 AND NOT UNIX)
|
||||
-DBLEN_VER_RC_3=${bver3}
|
||||
@@ -123,11 +123,19 @@ if(WIN32 AND NOT UNIX)
|
||||
-DBLEN_VER_RC_3=${BLENDER_VERSION_PATCH}
|
||||
-DBLEN_VER_RC_4=0
|
||||
)
|
||||
+ if(MINGW)
|
||||
@@ -21,6 +21,19 @@
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -275,10 +283,10 @@
|
||||
add_executable(blender-launcher WIN32
|
||||
blender_launcher_win32.c
|
||||
${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc
|
||||
- ${CMAKE_BINARY_DIR}/blender.exe.manifest
|
||||
+ ${CMAKE_SOURCE_DIR}/release/windows/icons/blender.exe.manifest
|
||||
)
|
||||
target_compile_definitions (blender-launcher PRIVATE -D_UNICODE -DUNICODE)
|
||||
- target_link_libraries(blender-launcher Pathcch.lib)
|
||||
+ target_link_libraries(blender-launcher pathcch)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
--- a/release/windows/icons/winblender.rc
|
||||
+++ b/release/windows/icons/winblender.rc
|
||||
@@ -3,10 +3,13 @@
|
||||
@@ -37,8 +50,8 @@
|
||||
#endif
|
||||
|
||||
APPICON ICON DISCARDABLE "winblender.ico"
|
||||
--- /dev/null 2020-02-18 15:56:11.000000000 +0300
|
||||
+++ b/release/windows/icons/blender.exe.manifest 2020-02-18 15:56:02.230820700 +0300
|
||||
--- /dev/null
|
||||
+++ b/release/windows/icons/blender.exe.manifest
|
||||
@@ -0,0 +1,36 @@
|
||||
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
diff -Naur blender-2.78-orig/source/blender/blenlib/intern/math_base.c blender-2.78/source/blender/blenlib/intern/math_base.c
|
||||
--- blender-2.78-orig/source/blender/blenlib/intern/math_base.c 2016-09-28 12:26:55.000000000 +0300
|
||||
+++ blender-2.78/source/blender/blenlib/intern/math_base.c 2016-10-14 13:53:56.430617800 +0300
|
||||
@@ -53,7 +53,7 @@
|
||||
--- a/source/blender/blenlib/intern/math_base.c
|
||||
+++ b/source/blender/blenlib/intern/math_base.c
|
||||
@@ -34,7 +34,7 @@
|
||||
pow2 = 1.0;
|
||||
y = (x * pow1) * pow2;
|
||||
/* if y overflows, then rounded value is exactly x */
|
||||
@@ -10,27 +9,25 @@ diff -Naur blender-2.78-orig/source/blender/blenlib/intern/math_base.c blender-2
|
||||
return x;
|
||||
}
|
||||
}
|
||||
diff -Naur blender-2.78-orig/source/blender/blenlib/intern/math_geom.c blender-2.78/source/blender/blenlib/intern/math_geom.c
|
||||
--- blender-2.78-orig/source/blender/blenlib/intern/math_geom.c 2016-09-28 12:26:55.000000000 +0300
|
||||
+++ blender-2.78/source/blender/blenlib/intern/math_geom.c 2016-10-14 13:53:56.430617800 +0300
|
||||
@@ -4296,7 +4296,7 @@
|
||||
const double dot = dot_v2v2_db(d_curr->dir, d_next->dir);
|
||||
const double len = d_curr->len * d_next->len;
|
||||
const double result = (len - dot) / area;
|
||||
--- a/source/blender/blenlib/intern/math_geom.c
|
||||
+++ b/source/blender/blenlib/intern/math_geom.c
|
||||
@@ -4039,7 +4039,7 @@
|
||||
const float dot = dot_v3v3(d_curr->dir, d_next->dir);
|
||||
const float len = d_curr->len * d_next->len;
|
||||
const float result = (len - dot) / area;
|
||||
- if (isfinite(result)) {
|
||||
+ if (isfinite((float)result)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
diff -Naur blender-2.92.0-orig/source/blender/blenlib/intern/string_utf8.c blender-2.92.0/source/blender/blenlib/intern/string_utf8.c
|
||||
--- blender-2.92.0-orig/source/blender/blenlib/intern/string_utf8.c 2021-03-28 12:26:55.000000000 +0300
|
||||
+++ blender-2.92.0/source/blender/blenlib/intern/string_utf8.c 2021-03-14 13:53:56.430617800 +0300
|
||||
@@ -396,7 +396,7 @@
|
||||
const size_t maxncpy)
|
||||
{
|
||||
#ifdef WIN32
|
||||
- return conv_utf_8_to_16(src_c, dst_w, maxncpy);
|
||||
+ return (size_t)conv_utf_8_to_16(src_c, dst_w, maxncpy);
|
||||
#else
|
||||
return BLI_str_utf8_as_utf32((char32_t *)dst_w, src_c, maxncpy);
|
||||
#endif
|
||||
--- a/source/blender/blenlib/intern/math_solvers.c
|
||||
+++ b/source/blender/blenlib/intern/math_solvers.c
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
MEM_freeN(c1);
|
||||
|
||||
- return isfinite(x_prev);
|
||||
+ return isfinite((float)x_prev);
|
||||
}
|
||||
|
||||
bool BLI_tridiagonal_solve_cyclic(
|
||||
|
||||
@@ -1,29 +1,25 @@
|
||||
--- blender-2.81a/source/blender/blendthumb/CMakeLists.txt.orig 2019-12-08 12:20:39.042905800 +0300
|
||||
+++ blender-2.81a/source/blender/blendthumb/CMakeLists.txt 2019-12-08 12:20:45.308264200 +0300
|
||||
@@ -29,10 +29,10 @@
|
||||
--- a/source/blender/blendthumb/CMakeLists.txt
|
||||
+++ b/source/blender/blendthumb/CMakeLists.txt
|
||||
@@ -36,8 +29,12 @@
|
||||
|
||||
add_library(BlendThumb SHARED ${SRC})
|
||||
setup_platform_linker_flags(BlendThumb)
|
||||
-target_link_libraries(BlendThumb ${ZLIB_LIBRARIES})
|
||||
+target_link_libraries(BlendThumb ${ZLIB_LIBRARIES} shlwapi windowscodecs)
|
||||
add_library(BlendThumb SHARED ${SRC} ${SRC_WIN32})
|
||||
|
||||
install(
|
||||
FILES $<TARGET_FILE:BlendThumb>
|
||||
COMPONENT Blender
|
||||
- DESTINATION "."
|
||||
+ DESTINATION "bin"
|
||||
)
|
||||
--- blender-2.81a/source/blender/blenlib/intern/winstuff.c.orig 2019-12-08 12:27:42.467124300 +0300
|
||||
+++ blender-2.81a/source/blender/blenlib/intern/winstuff.c 2019-12-08 12:30:11.497648300 +0300
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
+/*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
@@ -172,7 +173,11 @@
|
||||
- target_link_libraries(BlendThumb bf_blenlib dbghelp.lib Version.lib)
|
||||
- set_target_properties(BlendThumb PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:msvcrt")
|
||||
+ target_link_libraries(BlendThumb bf_blenlib dbghelp version shlwapi)
|
||||
+ if(MSVC)
|
||||
+ set_target_properties(BlendThumb PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:msvcrt")
|
||||
+ elseif(MINGW)
|
||||
+ target_link_libraries(BlendThumb ${PTHREADS_LIBRARIES})
|
||||
+ endif()
|
||||
|
||||
BLI_getInstallationDir(InstallDir);
|
||||
else()
|
||||
# -----------------------------------------------------------------------------
|
||||
--- a/source/blender/blenlib/intern/winstuff.c
|
||||
+++ b/source/blender/blenlib/intern/winstuff.c
|
||||
@@ -157,7 +157,11 @@
|
||||
# ifdef WITH_BLENDER_THUMBNAILER
|
||||
BLI_windows_get_executable_dir(InstallDir);
|
||||
GetSystemDirectory(SysDir, FILE_MAXDIR);
|
||||
+#ifdef __MINGW32__
|
||||
+ ThumbHandlerDLL = "libBlendThumb.dll";
|
||||
@@ -33,35 +29,34 @@
|
||||
snprintf(
|
||||
RegCmd, MAX_PATH * 2, "%s\\regsvr32 /s \"%s\\%s\"", SysDir, InstallDir, ThumbHandlerDLL);
|
||||
system(RegCmd);
|
||||
--- blender-2.81a/source/blender/blendthumb/src/BlenderThumb.cpp.orig 2019-12-08 12:08:05.045779600 +0300
|
||||
+++ blender-2.81a/source/blender/blendthumb/src/BlenderThumb.cpp 2019-12-08 12:32:20.265013400 +0300
|
||||
@@ -17,8 +17,11 @@
|
||||
#include <new>
|
||||
#include <shlwapi.h>
|
||||
#include <thumbcache.h> // For IThumbnailProvider.
|
||||
+#include <algorithm>
|
||||
--- a/source/blender/blendthumb/src/blendthumb_win32.cc
|
||||
+++ b/source/blender/blendthumb/src/blendthumb_win32.cc
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
#include "BLI_filereader.h"
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
#pragma comment(lib, "shlwapi.lib")
|
||||
+#endif
|
||||
|
||||
// this thumbnail provider implements IInitializeWithStream to enable being hosted
|
||||
// in an isolated process for robustness
|
||||
@@ -137,7 +140,7 @@
|
||||
//_pStream->Read(&dest_size,4,&BytesRead); // dest
|
||||
dest_size = 1024 * 70; // thumbnail is currently always inside the first 65KB...if it moves or
|
||||
// enlargens this line will have to change or go!
|
||||
- source_size = (uLong)max(SeekPos.QuadPart, dest_size); // for safety, assume no compression
|
||||
+ source_size = (uLong)std::max((uLong)SeekPos.QuadPart, dest_size); // for safety, assume no compression
|
||||
|
||||
// Input
|
||||
Bytef *src = new Bytef[source_size];
|
||||
@@ -264,7 +267,7 @@
|
||||
|
||||
// Scale down if required
|
||||
if ((unsigned)width > cx || (unsigned)height > cx) {
|
||||
- float scale = 1.0f / (max(width, height) / (float)cx);
|
||||
+ float scale = 1.0f / (std::max(width, height) / (float)cx);
|
||||
LONG NewWidth = (LONG)(width * scale);
|
||||
LONG NewHeight = (LONG)(height * scale);
|
||||
|
||||
/**
|
||||
* This thumbnail provider implements #IInitializeWithStream to enable being hosted
|
||||
--- a/source/creator/CMakeLists.txt
|
||||
+++ b/source/creator/CMakeLists.txt
|
||||
@@ -557,9 +557,14 @@
|
||||
DESTINATION share/icons/hicolor/symbolic/apps
|
||||
)
|
||||
if(WITH_BLENDER_THUMBNAILER)
|
||||
+ if(MINGW)
|
||||
+ set(BLENDER_THUMBNAILER_TARGET BlendThumb)
|
||||
+ else()
|
||||
+ set(BLENDER_THUMBNAILER_TARGET blender-thumbnailer)
|
||||
+ endif()
|
||||
install(
|
||||
- TARGETS blender-thumbnailer
|
||||
- DESTINATION bin
|
||||
+ TARGETS ${BLENDER_THUMBNAILER_TARGET}
|
||||
+ RUNTIME DESTINATION bin
|
||||
)
|
||||
endif()
|
||||
set(BLENDER_TEXT_FILES_DESTINATION share/doc/blender)
|
||||
|
||||
@@ -1,44 +1,113 @@
|
||||
diff -Naur blender-2.82/intern/cycles/render/CMakeLists.txt.orig blender-2.82/intern/cycles/render/CMakeLists.txt
|
||||
--- blender-2.82/intern/cycles/render/CMakeLists.txt.orig 2019-12-04 14:00:31.000000000 +0300
|
||||
+++ blender-2.82/intern/cycles/render/CMakeLists.txt 2020-02-12 13:15:01.000000000 +0300
|
||||
@@ -136,9 +136,6 @@
|
||||
--- a/extern/glog/CMakeLists.txt
|
||||
+++ b/extern/glog/CMakeLists.txt
|
||||
@@ -66,6 +66,7 @@
|
||||
list(APPEND INC
|
||||
src/windows
|
||||
)
|
||||
+ list(APPEND LIB dbghelp)
|
||||
if(MSVC)
|
||||
# Suppress warning about google::LogMessageFatal::~LogMessageFatal
|
||||
# not returning.
|
||||
--- a/intern/cycles/app/CMakeLists.txt
|
||||
+++ b/intern/cycles/app/CMakeLists.txt
|
||||
@@ -80,7 +80,7 @@
|
||||
add_executable(cycles ${SRC} ${INC} ${INC_SYS})
|
||||
unset(SRC)
|
||||
|
||||
- target_link_libraries(cycles PRIVATE ${LIB})
|
||||
+ target_link_libraries(cycles PRIVATE ${LIB} version)
|
||||
|
||||
if(APPLE)
|
||||
if(WITH_CYCLES_STANDALONE_GUI)
|
||||
--- a/intern/cycles/scene/CMakeLists.txt
|
||||
+++ b/intern/cycles/scene/CMakeLists.txt
|
||||
@@ -112,7 +112,7 @@
|
||||
list(APPEND LIB
|
||||
${OPENCOLORIO_LIBRARIES}
|
||||
)
|
||||
- if(WIN32)
|
||||
- add_definitions(-DOpenColorIO_SKIP_IMPORTS)
|
||||
- endif()
|
||||
- if(WIN32 AND NOT USD_OVERRIDE_OPENCOLORIO)
|
||||
+ if(MSVC AND NOT USD_OVERRIDE_OPENCOLORIO)
|
||||
add_definitions(-DOpenColorIO_SKIP_IMPORTS)
|
||||
endif()
|
||||
endif()
|
||||
--- a/intern/cycles/util/CMakeLists.txt
|
||||
+++ b/intern/cycles/util/CMakeLists.txt
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
--- blender-2.90.1/source/blender/blenlib/CMakeLists.txt.orig 2020-02-18 11:21:38.444947500 +0300
|
||||
+++ blender-2.90.1/source/blender/blenlib/CMakeLists.txt 2020-02-18 11:22:09.099292800 +0300
|
||||
@@ -311,6 +311,7 @@
|
||||
set(LIB
|
||||
${TBB_LIBRARIES}
|
||||
+ ${OPENIMAGEIO_LIBRARIES}
|
||||
)
|
||||
|
||||
set(SRC_HEADERS
|
||||
--- a/intern/ghost/CMakeLists.txt
|
||||
+++ b/intern/ghost/CMakeLists.txt
|
||||
@@ -387,6 +387,7 @@
|
||||
intern/GHOST_WindowWin32.h
|
||||
intern/GHOST_Wintab.h
|
||||
)
|
||||
+ list(APPEND LIB comctl32 shcore)
|
||||
|
||||
if(NOT WITH_GL_EGL)
|
||||
list(APPEND SRC
|
||||
@@ -404,6 +405,7 @@
|
||||
|
||||
intern/GHOST_ImeWin32.h
|
||||
)
|
||||
+ list(APPEND LIB imm32)
|
||||
endif()
|
||||
|
||||
if(WITH_INPUT_NDOF)
|
||||
--- a/source/blender/blenlib/CMakeLists.txt
|
||||
+++ b/source/blender/blenlib/CMakeLists.txt
|
||||
@@ -403,6 +403,8 @@
|
||||
)
|
||||
list(APPEND LIB
|
||||
bf_intern_utfconv
|
||||
+ version
|
||||
+ dbghelp
|
||||
)
|
||||
list(APPEND SRC
|
||||
intern/system_win32.c
|
||||
--- blender-2.82/source/blender/gpu/CMakeLists.txt.orig 2020-02-18 11:21:38.444947500 +0300
|
||||
+++ blender-2.82/source/blender/gpu/CMakeLists.txt 2020-02-18 11:22:09.099292800 +0300
|
||||
@@ -132,7 +132,11 @@
|
||||
${BLENDER_GL_LIBRARIES}
|
||||
--- a/source/blender/editors/interface/CMakeLists.txt
|
||||
+++ b/source/blender/editors/interface/CMakeLists.txt
|
||||
@@ -98,6 +98,10 @@
|
||||
add_definitions(-DWITH_PYTHON)
|
||||
endif()
|
||||
|
||||
+if(WITH_TBB)
|
||||
+ add_definitions(-DWITH_TBB)
|
||||
+endif()
|
||||
+
|
||||
if(WIN32 OR APPLE)
|
||||
if(WITH_INPUT_IME)
|
||||
add_definitions(-DWITH_INPUT_IME)
|
||||
--- a/source/blender/editors/space_spreadsheet/CMakeLists.txt
|
||||
+++ b/source/blender/editors/space_spreadsheet/CMakeLists.txt
|
||||
@@ -62,6 +62,10 @@
|
||||
add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
+if(WITH_TBB)
|
||||
+ add_definitions(-DWITH_TBB)
|
||||
+endif()
|
||||
+
|
||||
blender_add_lib(bf_editor_space_spreadsheet "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
# RNA_prototypes.h
|
||||
--- a/source/blender/python/generic/CMakeLists.txt
|
||||
+++ b/source/blender/python/generic/CMakeLists.txt
|
||||
@@ -41,6 +41,7 @@
|
||||
)
|
||||
|
||||
-if(NOT WITH_SYSTEM_GLEW)
|
||||
+if(WITH_SYSTEM_GLEW)
|
||||
+ list(APPEND LIB
|
||||
+ ${GLEW_LIBRARY}
|
||||
+ )
|
||||
+else()
|
||||
list(APPEND LIB
|
||||
${BLENDER_GLEW_LIBRARIES}
|
||||
)
|
||||
--- blender-2.82/source/blender/render/CMakeLists.txt.orig 2020-02-18 12:07:41.740701100 +0300
|
||||
+++ blender-2.82/source/blender/render/CMakeLists.txt 2020-02-18 12:09:20.740485400 +0300
|
||||
@@ -100,6 +100,12 @@
|
||||
set(LIB
|
||||
+ ${OPENGL_gl_LIBRARY}
|
||||
${GLEW_LIBRARY}
|
||||
${PYTHON_LINKFLAGS}
|
||||
${PYTHON_LIBRARIES}
|
||||
--- a/source/blender/render/CMakeLists.txt
|
||||
+++ b/source/blender/render/CMakeLists.txt
|
||||
@@ -79,5 +79,10 @@
|
||||
add_definitions(-DWITH_FREESTYLE)
|
||||
endif()
|
||||
|
||||
@@ -47,17 +116,17 @@ diff -Naur blender-2.82/intern/cycles/render/CMakeLists.txt.orig blender-2.82/in
|
||||
+ ${OPENCOLORIO_LIBRARIES}
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DWITH_INTERNATIONAL)
|
||||
endif()
|
||||
--- blender-2.82/intern/cycles/util/CMakeLists.txt.orig 2020-02-18 12:00:41.215804900 +0300
|
||||
+++ blender-2.82/intern/cycles/util/CMakeLists.txt 2020-02-18 12:03:21.654539300 +0300
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
set(LIB
|
||||
${TBB_LIBRARIES}
|
||||
+ ${OPENIMAGEIO_LIBRARIES}
|
||||
)
|
||||
|
||||
if(WITH_CYCLES_STANDALONE)
|
||||
blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
--- a/source/creator/CMakeLists.txt
|
||||
+++ b/source/creator/CMakeLists.txt
|
||||
@@ -285,6 +285,9 @@
|
||||
${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc
|
||||
${CMAKE_SOURCE_DIR}/release/windows/icons/blender.exe.manifest
|
||||
)
|
||||
+ if(MINGW)
|
||||
+ target_link_options(blender-launcher PRIVATE "-municode")
|
||||
+ endif()
|
||||
target_compile_definitions (blender-launcher PRIVATE -D_UNICODE -DUNICODE)
|
||||
target_link_libraries(blender-launcher pathcch)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
--- blender-2.90.1/intern/cycles/CMakeLists.txt.orig 2020-10-08 21:28:57.427384700 +0300
|
||||
+++ blender-2.90.1/intern/cycles/CMakeLists.txt 2020-10-08 21:29:04.707761700 +0300
|
||||
@@ -233,7 +233,6 @@
|
||||
|
||||
if(WITH_CYCLES_EMBREE)
|
||||
add_definitions(-DWITH_EMBREE)
|
||||
- add_definitions(-DEMBREE_STATIC_LIB)
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${EMBREE_INCLUDE_DIRS}
|
||||
--- blender-2.90.1/build_files/cmake/Modules/FindEmbree.cmake.orig 2020-10-08 22:57:05.690074300 +0300
|
||||
+++ blender-2.90.1/build_files/cmake/Modules/FindEmbree.cmake 2020-10-08 22:59:36.200482300 +0300
|
||||
@@ -44,12 +44,6 @@
|
||||
--- a/build_files/cmake/Modules/FindEmbree.cmake
|
||||
+++ b/build_files/cmake/Modules/FindEmbree.cmake
|
||||
@@ -40,12 +40,6 @@
|
||||
|
||||
SET(_embree_FIND_COMPONENTS
|
||||
embree3
|
||||
|
||||
@@ -1,17 +1,38 @@
|
||||
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
|
||||
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
|
||||
@@ -124,10 +124,10 @@
|
||||
@@ -267,11 +267,11 @@
|
||||
GetMonitorInfo(hmonitor, &monitor);
|
||||
|
||||
/* Adjust our requested size to allow for caption and borders and constrain to monitor. */
|
||||
AdjustWindowRectEx(&win_rect, WS_CAPTION, FALSE, 0);
|
||||
- width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect.right - win_rect.left);
|
||||
- left = min(max(monitor.rcWork.left, win_rect.left), monitor.rcWork.right - width);
|
||||
- height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect.bottom - win_rect.top);
|
||||
- top = min(max(monitor.rcWork.top, win_rect.top), monitor.rcWork.bottom - height);
|
||||
+ width = std::min(monitor.rcWork.right - monitor.rcWork.left, win_rect.right - win_rect.left);
|
||||
+ left = std::min(std::max(monitor.rcWork.left, win_rect.left), static_cast<long>(monitor.rcWork.right - width));
|
||||
+ height = std::min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect.bottom - win_rect.top);
|
||||
+ top = std::min(std::max(monitor.rcWork.top, win_rect.top), static_cast<long>(monitor.rcWork.bottom - height));
|
||||
/* Constrain requested size and position to fit within this monitor. */
|
||||
- LONG width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect->right - win_rect->left);
|
||||
- LONG height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect->bottom - win_rect->top);
|
||||
- win_rect->left = min(max(monitor.rcWork.left, win_rect->left), monitor.rcWork.right - width);
|
||||
+ LONG width = std::min(monitor.rcWork.right - monitor.rcWork.left, win_rect->right - win_rect->left);
|
||||
+ LONG height = std::min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect->bottom - win_rect->top);
|
||||
+ win_rect->left = std::min(std::max(monitor.rcWork.left, win_rect->left), monitor.rcWork.right - width);
|
||||
win_rect->right = win_rect->left + width;
|
||||
- win_rect->top = min(max(monitor.rcWork.top, win_rect->top), monitor.rcWork.bottom - height);
|
||||
+ win_rect->top = std::min(std::max(monitor.rcWork.top, win_rect->top), monitor.rcWork.bottom - height);
|
||||
win_rect->bottom = win_rect->top + height;
|
||||
|
||||
m_hWnd = ::CreateWindowExW(extended_style, // window extended style
|
||||
s_windowClassName, // pointer to registered class name
|
||||
/* With Windows 10 and newer we can adjust for chrome that differs with DPI and scale. */
|
||||
@@ -293,7 +293,7 @@
|
||||
}
|
||||
|
||||
/* But never allow a top position that can hide part of the title bar. */
|
||||
- win_rect->top = max(monitor.rcWork.top, win_rect->top);
|
||||
+ win_rect->top = std::max(monitor.rcWork.top, win_rect->top);
|
||||
}
|
||||
|
||||
bool GHOST_WindowWin32::getValid() const
|
||||
--- a/intern/ghost/intern/GHOST_Wintab.cpp
|
||||
+++ b/intern/ghost/intern/GHOST_Wintab.cpp
|
||||
@@ -91,7 +91,7 @@
|
||||
int queueSize = queueSizeGet(hctx.get());
|
||||
|
||||
while (queueSize < maxQueue) {
|
||||
- int testSize = min(queueSize + 16, maxQueue);
|
||||
+ int testSize = std::min(queueSize + 16, maxQueue);
|
||||
if (queueSizeSet(hctx.get(), testSize)) {
|
||||
queueSize = testSize;
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
From e5100ca3ad17b1b9a40ffd8a8edccb6cb553e558 Mon Sep 17 00:00:00 2001
|
||||
From: Brecht Van Lommel <brecht@blender.org>
|
||||
Date: Wed, 16 Feb 2022 17:40:20 +0100
|
||||
Subject: [PATCH] Build: update CMake to support OpenImageIO 2.3.4
|
||||
|
||||
FindOpenImageIO was updated to link to separate OpenImageIO_Util for new
|
||||
versions, where it is required. For older versions, we can not link to it
|
||||
because there will be duplicated symbols.
|
||||
|
||||
Ref D14128
|
||||
---
|
||||
.../cmake/Modules/FindOpenImageIO.cmake | 41 ++++++++++++++++++-
|
||||
1 file changed, 39 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/build_files/cmake/Modules/FindOpenImageIO.cmake b/build_files/cmake/Modules/FindOpenImageIO.cmake
|
||||
index aac5b5ce0a85..54b6d95e809d 100644
|
||||
--- a/build_files/cmake/Modules/FindOpenImageIO.cmake
|
||||
+++ b/build_files/cmake/Modules/FindOpenImageIO.cmake
|
||||
@@ -48,6 +48,8 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
+set(_openimageio_LIBRARIES ${OPENIMAGEIO_LIBRARY})
|
||||
+
|
||||
FIND_FILE(OPENIMAGEIO_IDIFF
|
||||
NAMES
|
||||
idiff
|
||||
@@ -57,14 +59,47 @@ FIND_FILE(OPENIMAGEIO_IDIFF
|
||||
bin
|
||||
)
|
||||
|
||||
+# Additionally find util library if needed. In old versions this library was
|
||||
+# included in libOpenImageIO and linking to both would duplicate symbols. In
|
||||
+# new versions we need to link to both.
|
||||
+FIND_FILE(_openimageio_export
|
||||
+ NAMES
|
||||
+ export.h
|
||||
+ PATHS
|
||||
+ ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO
|
||||
+ NO_DEFAULT_PATH
|
||||
+)
|
||||
+
|
||||
+# Use existence of OIIO_UTIL_API to check if it's a separate lib.
|
||||
+FILE(STRINGS "${_openimageio_export}" _openimageio_util_define
|
||||
+ REGEX "^[ \t]*#[ \t]*define[ \t]+OIIO_UTIL_API.*$")
|
||||
+
|
||||
+IF(_openimageio_util_define)
|
||||
+ FIND_LIBRARY(OPENIMAGEIO_UTIL_LIBRARY
|
||||
+ NAMES
|
||||
+ OpenImageIO_Util
|
||||
+ HINTS
|
||||
+ ${_openimageio_SEARCH_DIRS}
|
||||
+ PATH_SUFFIXES
|
||||
+ lib64 lib
|
||||
+ )
|
||||
+
|
||||
+ LIST(APPEND _openimageio_LIBRARIES ${OPENIMAGEIO_UTIL_LIBRARY})
|
||||
+ENDIF()
|
||||
+
|
||||
+# In cmake version 3.21 and up, we can instead use the NO_CACHE option for
|
||||
+# FIND_FILE so we don't need to clear it from the cache here.
|
||||
+UNSET(_openimageio_export CACHE)
|
||||
+UNSET(_openimageio_util_define)
|
||||
+
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
|
||||
- OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR)
|
||||
+ _openimageio_LIBRARIES OPENIMAGEIO_INCLUDE_DIR)
|
||||
|
||||
IF(OPENIMAGEIO_FOUND)
|
||||
- SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
|
||||
+ SET(OPENIMAGEIO_LIBRARIES ${_openimageio_LIBRARIES})
|
||||
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
|
||||
@@ -78,7 +113,9 @@ ENDIF()
|
||||
MARK_AS_ADVANCED(
|
||||
OPENIMAGEIO_INCLUDE_DIR
|
||||
OPENIMAGEIO_LIBRARY
|
||||
+ OPENIMAGEIO_UTIL_LIBRARY
|
||||
OPENIMAGEIO_IDIFF
|
||||
)
|
||||
|
||||
UNSET(_openimageio_SEARCH_DIRS)
|
||||
+UNSET(_openimageio_LIBRARIES)
|
||||
@@ -1,146 +0,0 @@
|
||||
From 2c9931699e2080639bb836357e116b8e340335d9 Mon Sep 17 00:00:00 2001
|
||||
From: Brecht Van Lommel <brecht@blender.org>
|
||||
Date: Wed, 16 Feb 2022 17:38:44 +0100
|
||||
Subject: [PATCH] Build: update CMake to support OpenEXR 3
|
||||
|
||||
FindOpenEXR was updated to find new lib names and separate Imath. It's all
|
||||
added to the list of OpenEXR include dirs and libs.
|
||||
|
||||
This keeps it compatible with both version 2 and 3 for now, and doesn't
|
||||
require changes outside the find module.
|
||||
|
||||
Ref D14128
|
||||
---
|
||||
build_files/cmake/Modules/FindOpenEXR.cmake | 93 ++++++++++++++++++---
|
||||
1 file changed, 83 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
|
||||
index 090f80b8df76..85e2cb557058 100644
|
||||
--- a/build_files/cmake/Modules/FindOpenEXR.cmake
|
||||
+++ b/build_files/cmake/Modules/FindOpenEXR.cmake
|
||||
@@ -33,14 +33,6 @@ ENDIF()
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
|
||||
SET(_openexr_libs_ver_init "2.0")
|
||||
|
||||
-SET(_openexr_FIND_COMPONENTS
|
||||
- Half
|
||||
- Iex
|
||||
- IlmImf
|
||||
- IlmThread
|
||||
- Imath
|
||||
-)
|
||||
-
|
||||
SET(_openexr_SEARCH_DIRS
|
||||
${OPENEXR_ROOT_DIR}
|
||||
/opt/lib/openexr
|
||||
@@ -93,6 +85,24 @@ UNSET(_openexr_libs_ver_init)
|
||||
|
||||
STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
|
||||
|
||||
+# Different library names in 3.0, and Imath and Half moved out.
|
||||
+IF(OPENEXR_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
+ SET(_openexr_FIND_COMPONENTS
|
||||
+ Iex
|
||||
+ IlmThread
|
||||
+ OpenEXR
|
||||
+ OpenEXRCore
|
||||
+ )
|
||||
+ELSE()
|
||||
+ SET(_openexr_FIND_COMPONENTS
|
||||
+ Half
|
||||
+ Iex
|
||||
+ IlmImf
|
||||
+ IlmThread
|
||||
+ Imath
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
SET(_openexr_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
@@ -111,6 +121,57 @@ ENDFOREACH()
|
||||
|
||||
UNSET(_openexr_libs_ver)
|
||||
|
||||
+IF(OPENEXR_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
+ # For OpenEXR 3.x, we also need to find the now separate Imath library.
|
||||
+ # For simplicity we add it to the OpenEXR includes and libraries, as we
|
||||
+ # have no direct dependency on Imath and it's simpler to support both
|
||||
+ # 2.x and 3.x this way.
|
||||
+
|
||||
+ # Find include directory
|
||||
+ FIND_PATH(IMATH_INCLUDE_DIR
|
||||
+ NAMES
|
||||
+ Imath/ImathMath.h
|
||||
+ HINTS
|
||||
+ ${_openexr_SEARCH_DIRS}
|
||||
+ PATH_SUFFIXES
|
||||
+ include
|
||||
+ )
|
||||
+
|
||||
+ # Find version
|
||||
+ FIND_FILE(_imath_config
|
||||
+ NAMES
|
||||
+ ImathConfig.h
|
||||
+ PATHS
|
||||
+ ${IMATH_INCLUDE_DIR}/Imath
|
||||
+ NO_DEFAULT_PATH
|
||||
+ )
|
||||
+
|
||||
+ # Find line with version, extract string, and format for library suffix.
|
||||
+ FILE(STRINGS "${_imath_config}" _imath_build_specification
|
||||
+ REGEX "^[ \t]*#define[ \t]+IMATH_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
|
||||
+ STRING(REGEX REPLACE ".*#define[ \t]+IMATH_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
|
||||
+ "\\1" _imath_libs_ver ${_imath_build_specification})
|
||||
+ STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _imath_libs_ver ${_imath_libs_ver})
|
||||
+
|
||||
+ # Find library, with or without version number.
|
||||
+ FIND_LIBRARY(IMATH_LIBRARY
|
||||
+ NAMES
|
||||
+ Imath-${_imath_libs_ver} Imath
|
||||
+ NAMES_PER_DIR
|
||||
+ HINTS
|
||||
+ ${_openexr_SEARCH_DIRS}
|
||||
+ PATH_SUFFIXES
|
||||
+ lib64 lib
|
||||
+ )
|
||||
+ LIST(APPEND _openexr_LIBRARIES "${IMATH_LIBRARY}")
|
||||
+
|
||||
+ # In cmake version 3.21 and up, we can instead use the NO_CACHE option for
|
||||
+ # FIND_FILE so we don't need to clear it from the cache here.
|
||||
+ UNSET(_imath_config CACHE)
|
||||
+ UNSET(_imath_libs_ver)
|
||||
+ UNSET(_imath_build_specification)
|
||||
+ENDIF()
|
||||
+
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -119,13 +180,25 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
||||
|
||||
IF(OPENEXR_FOUND)
|
||||
SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
|
||||
- # Both include paths are needed because of dummy OSL headers mixing #include <OpenEXR/foo.h> and #include <foo.h> :(
|
||||
- SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
|
||||
+ # Both include paths are needed because of dummy OSL headers mixing
|
||||
+ # #include <OpenEXR/foo.h> and #include <foo.h>, as well as Alembic
|
||||
+ # include <half.h> directly.
|
||||
+ SET(OPENEXR_INCLUDE_DIRS
|
||||
+ ${OPENEXR_INCLUDE_DIR}
|
||||
+ ${OPENEXR_INCLUDE_DIR}/OpenEXR)
|
||||
+
|
||||
+ IF(OPENEXR_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
+ LIST(APPEND OPENEXR_INCLUDE_DIRS
|
||||
+ ${IMATH_INCLUDE_DIR}
|
||||
+ ${IMATH_INCLUDE_DIR}/Imath)
|
||||
+ ENDIF()
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENEXR_INCLUDE_DIR
|
||||
OPENEXR_VERSION
|
||||
+ IMATH_INCLUDE_DIR
|
||||
+ IMATH_LIBRARY
|
||||
)
|
||||
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
@@ -1,174 +0,0 @@
|
||||
From cd7550cfe712598727b548d1c90565ac98a274c2 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Parborg <darkdefende@gmail.com>
|
||||
Date: Wed, 16 Feb 2022 17:36:47 +0100
|
||||
Subject: [PATCH] Images: update code to support OpenEXR 3
|
||||
|
||||
Compatibility with OpenEXR 2 is preserved, since Blender releases and Linux
|
||||
distribution packages can be on different versions.
|
||||
|
||||
Ref D14128
|
||||
---
|
||||
.../imbuf/intern/openexr/openexr_api.cpp | 84 +++++++++++--------
|
||||
1 file changed, 50 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
|
||||
index ec8cf36dd49..46abb986259 100644
|
||||
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
|
||||
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
|
||||
@@ -32,30 +32,46 @@
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
-#include <Iex.h>
|
||||
-#include <ImathBox.h>
|
||||
-#include <ImfArray.h>
|
||||
-#include <ImfChannelList.h>
|
||||
-#include <ImfCompression.h>
|
||||
-#include <ImfCompressionAttribute.h>
|
||||
-#include <ImfIO.h>
|
||||
-#include <ImfInputFile.h>
|
||||
-#include <ImfOutputFile.h>
|
||||
-#include <ImfPixelType.h>
|
||||
-#include <ImfStandardAttributes.h>
|
||||
-#include <ImfStringAttribute.h>
|
||||
-#include <ImfVersion.h>
|
||||
-#include <half.h>
|
||||
+/* The OpenEXR version can reliably be found in this header file from OpenEXR,
|
||||
+ * for both 2.x and 3.x:
|
||||
+ */
|
||||
+#include <OpenEXR/OpenEXRConfig.h>
|
||||
+#define COMBINED_OPENEXR_VERSION \
|
||||
+ ((10000 * OPENEXR_VERSION_MAJOR) + (100 * OPENEXR_VERSION_MINOR) + OPENEXR_VERSION_PATCH)
|
||||
+
|
||||
+#if COMBINED_OPENEXR_VERSION >= 20599
|
||||
+/* >=2.5.99 -> OpenEXR >=3.0 */
|
||||
+# include <Imath/half.h>
|
||||
+# include <OpenEXR/ImfFrameBuffer.h>
|
||||
+# define exr_file_offset_t uint64_t
|
||||
+#else
|
||||
+/* OpenEXR 2.x, use the old locations. */
|
||||
+# include <OpenEXR/half.h>
|
||||
+# define exr_file_offset_t Int64
|
||||
+#endif
|
||||
+
|
||||
+#include <OpenEXR/Iex.h>
|
||||
+#include <OpenEXR/ImfArray.h>
|
||||
+#include <OpenEXR/ImfChannelList.h>
|
||||
+#include <OpenEXR/ImfCompression.h>
|
||||
+#include <OpenEXR/ImfCompressionAttribute.h>
|
||||
+#include <OpenEXR/ImfIO.h>
|
||||
+#include <OpenEXR/ImfInputFile.h>
|
||||
+#include <OpenEXR/ImfOutputFile.h>
|
||||
+#include <OpenEXR/ImfPixelType.h>
|
||||
+#include <OpenEXR/ImfStandardAttributes.h>
|
||||
+#include <OpenEXR/ImfStringAttribute.h>
|
||||
+#include <OpenEXR/ImfVersion.h>
|
||||
|
||||
/* multiview/multipart */
|
||||
-#include <ImfInputPart.h>
|
||||
-#include <ImfMultiPartInputFile.h>
|
||||
-#include <ImfMultiPartOutputFile.h>
|
||||
-#include <ImfMultiView.h>
|
||||
-#include <ImfOutputPart.h>
|
||||
-#include <ImfPartHelper.h>
|
||||
-#include <ImfPartType.h>
|
||||
-#include <ImfTiledOutputPart.h>
|
||||
+#include <OpenEXR/ImfInputPart.h>
|
||||
+#include <OpenEXR/ImfMultiPartInputFile.h>
|
||||
+#include <OpenEXR/ImfMultiPartOutputFile.h>
|
||||
+#include <OpenEXR/ImfMultiView.h>
|
||||
+#include <OpenEXR/ImfOutputPart.h>
|
||||
+#include <OpenEXR/ImfPartHelper.h>
|
||||
+#include <OpenEXR/ImfPartType.h>
|
||||
+#include <OpenEXR/ImfTiledOutputPart.h>
|
||||
|
||||
#include "DNA_scene_types.h" /* For OpenEXR compression constants */
|
||||
|
||||
@@ -131,12 +147,12 @@ class IMemStream : public Imf::IStream {
|
||||
return false;
|
||||
}
|
||||
|
||||
- Int64 tellg() override
|
||||
+ exr_file_offset_t tellg() override
|
||||
{
|
||||
return _exrpos;
|
||||
}
|
||||
|
||||
- void seekg(Int64 pos) override
|
||||
+ void seekg(exr_file_offset_t pos) override
|
||||
{
|
||||
_exrpos = pos;
|
||||
}
|
||||
@@ -146,8 +162,8 @@ class IMemStream : public Imf::IStream {
|
||||
}
|
||||
|
||||
private:
|
||||
- Int64 _exrpos;
|
||||
- Int64 _exrsize;
|
||||
+ exr_file_offset_t _exrpos;
|
||||
+ exr_file_offset_t _exrsize;
|
||||
unsigned char *_exrbuf;
|
||||
};
|
||||
|
||||
@@ -182,12 +198,12 @@ class IFileStream : public Imf::IStream {
|
||||
return check_error();
|
||||
}
|
||||
|
||||
- Int64 tellg() override
|
||||
+ exr_file_offset_t tellg() override
|
||||
{
|
||||
return std::streamoff(ifs.tellg());
|
||||
}
|
||||
|
||||
- void seekg(Int64 pos) override
|
||||
+ void seekg(exr_file_offset_t pos) override
|
||||
{
|
||||
ifs.seekg(pos);
|
||||
check_error();
|
||||
@@ -231,19 +247,19 @@ class OMemStream : public OStream {
|
||||
ibuf->encodedsize += n;
|
||||
}
|
||||
|
||||
- Int64 tellp() override
|
||||
+ exr_file_offset_t tellp() override
|
||||
{
|
||||
return offset;
|
||||
}
|
||||
|
||||
- void seekp(Int64 pos) override
|
||||
+ void seekp(exr_file_offset_t pos) override
|
||||
{
|
||||
offset = pos;
|
||||
ensure_size(offset);
|
||||
}
|
||||
|
||||
private:
|
||||
- void ensure_size(Int64 size)
|
||||
+ void ensure_size(exr_file_offset_t size)
|
||||
{
|
||||
/* if buffer is too small increase it. */
|
||||
while (size > ibuf->encodedbuffersize) {
|
||||
@@ -254,7 +270,7 @@ class OMemStream : public OStream {
|
||||
}
|
||||
|
||||
ImBuf *ibuf;
|
||||
- Int64 offset;
|
||||
+ exr_file_offset_t offset;
|
||||
};
|
||||
|
||||
/* File Output Stream */
|
||||
@@ -284,12 +300,12 @@ class OFileStream : public OStream {
|
||||
check_error();
|
||||
}
|
||||
|
||||
- Int64 tellp() override
|
||||
+ exr_file_offset_t tellp() override
|
||||
{
|
||||
return std::streamoff(ofs.tellp());
|
||||
}
|
||||
|
||||
- void seekp(Int64 pos) override
|
||||
+ void seekp(exr_file_offset_t pos) override
|
||||
{
|
||||
ofs.seekp(pos);
|
||||
check_error();
|
||||
@@ -4,15 +4,15 @@ Date: Sun, 4 Dec 2022 21:48:38 +0800
|
||||
Subject: [PATCH 1/2] Fix ARM64 Build
|
||||
|
||||
---
|
||||
intern/cycles/util/util_system.cpp | 4 ++--
|
||||
intern/cycles/util/system.cpp | 4 ++--
|
||||
source/blender/blenlib/intern/system.c | 4 ++++
|
||||
source/blender/blenlib/intern/system_win32.c | 16 +++++++++++++++-
|
||||
3 files changed, 21 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp
|
||||
diff --git a/intern/cycles/util/system.cpp b/intern/cycles/util/system.cpp
|
||||
index 03bc5ae..be27a93 100644
|
||||
--- a/intern/cycles/util/util_system.cpp
|
||||
+++ b/intern/cycles/util/util_system.cpp
|
||||
--- a/intern/cycles/util/system.cpp
|
||||
+++ b/intern/cycles/util/system.cpp
|
||||
@@ -174,8 +174,8 @@ string system_cpu_brand_string()
|
||||
if (sysctlbyname("machdep.cpu.brand_string", &modelname, &bufferlen, NULL, 0) == 0) {
|
||||
return modelname;
|
||||
|
||||
@@ -23,10 +23,10 @@ index 060845b..3037cb6 100644
|
||||
if(WITH_LLVM)
|
||||
find_package_wrapper(LLVM)
|
||||
|
||||
diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h
|
||||
diff --git a/intern/cycles/util/simd.h b/intern/cycles/util/simd.h
|
||||
index e3e4127..6fe576b 100644
|
||||
--- a/intern/cycles/util/util_simd.h
|
||||
+++ b/intern/cycles/util/util_simd.h
|
||||
--- a/intern/cycles/util/simd.h
|
||||
+++ b/intern/cycles/util/simd.h
|
||||
@@ -31,7 +31,9 @@
|
||||
# include <intrin.h>
|
||||
#elif (defined(__x86_64__) || defined(__i386__))
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
--- blender-2.93.14/build_files/cmake/platform/platform_win32_mingw64.cmake.orig 2023-02-22 19:42:08.991589800 +0100
|
||||
+++ blender-2.93.14/build_files/cmake/platform/platform_win32_mingw64.cmake 2023-02-22 19:55:59.658475000 +0100
|
||||
@@ -205,13 +205,13 @@
|
||||
mark_as_advanced(FFMPEG)
|
||||
|
||||
# lame, but until we have proper find module for ffmpeg
|
||||
- if(EXISTS "${FFMPEG}/include/ffmpeg/")
|
||||
- list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg")
|
||||
+ if(EXISTS "${FFMPEG}/include/ffmpeg4.4/")
|
||||
+ list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg4.4")
|
||||
endif()
|
||||
# end lameness
|
||||
|
||||
mark_as_advanced(FFMPEG_LIBRARIES)
|
||||
- set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
+ set(FFMPEG_LIBPATH ${FFMPEG}/lib/ffmpeg4.4)
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
@@ -414,6 +414,10 @@
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+if(WITH_CPU_SIMD AND SUPPORT_NEON_BUILD)
|
||||
+ find_package_wrapper(sse2neon)
|
||||
+endif()
|
||||
+
|
||||
if(WITH_LLVM)
|
||||
find_package_wrapper(LLVM)
|
||||
|
||||
63
mingw-w64-blender/0037-build-with-ffmpeg6.patch
Normal file
63
mingw-w64-blender/0037-build-with-ffmpeg6.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
|
||||
index f311e04d8e0..4f474d0c267 100644
|
||||
--- a/intern/ffmpeg/ffmpeg_compat.h
|
||||
+++ b/intern/ffmpeg/ffmpeg_compat.h
|
||||
@@ -36,6 +36,10 @@
|
||||
# define FFMPEG_INLINE static inline
|
||||
#endif
|
||||
|
||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100)
|
||||
+# define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS
|
||||
+#endif
|
||||
+
|
||||
#if (LIBAVFORMAT_VERSION_MAJOR < 58) || \
|
||||
((LIBAVFORMAT_VERSION_MAJOR == 58) && (LIBAVFORMAT_VERSION_MINOR < 76))
|
||||
# define FFMPEG_USE_DURATION_WORKAROUND 1
|
||||
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
|
||||
index 1d4cbc48833..c812c2e8f26 100644
|
||||
--- a/source/blender/blenkernel/intern/writeffmpeg.c
|
||||
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
|
||||
@@ -855,7 +855,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
|
||||
255);
|
||||
st->avg_frame_rate = av_inv_q(c->time_base);
|
||||
|
||||
- if (codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
|
||||
+ if (codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
|
||||
c->thread_count = 0;
|
||||
}
|
||||
else {
|
||||
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
|
||||
index 94c0555dcf0..52314c2ca21 100644
|
||||
--- a/source/blender/imbuf/intern/anim_movie.c
|
||||
+++ b/source/blender/imbuf/intern/anim_movie.c
|
||||
@@ -554,7 +554,7 @@ static int startffmpeg(struct anim *anim)
|
||||
avcodec_parameters_to_context(pCodecCtx, video_stream->codecpar);
|
||||
pCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
|
||||
|
||||
- if (pCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
|
||||
+ if (pCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
|
||||
pCodecCtx->thread_count = 0;
|
||||
}
|
||||
else {
|
||||
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
|
||||
index 63836690ee4..fb0dd4f3e3e 100644
|
||||
--- a/source/blender/imbuf/intern/indexer.c
|
||||
+++ b/source/blender/imbuf/intern/indexer.c
|
||||
@@ -559,7 +559,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
|
||||
av_dict_set(&codec_opts, "preset", "veryfast", 0);
|
||||
av_dict_set(&codec_opts, "tune", "fastdecode", 0);
|
||||
|
||||
- if (rv->codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
|
||||
+ if (rv->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
|
||||
rv->c->thread_count = 0;
|
||||
}
|
||||
else {
|
||||
@@ -872,7 +872,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim,
|
||||
avcodec_parameters_to_context(context->iCodecCtx, context->iStream->codecpar);
|
||||
context->iCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
|
||||
|
||||
- if (context->iCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
|
||||
+ if (context->iCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) {
|
||||
context->iCodecCtx->thread_count = 0;
|
||||
}
|
||||
else {
|
||||
@@ -11,7 +11,7 @@
|
||||
_realname=blender
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.93.15
|
||||
pkgver=3.2.2
|
||||
pkgrel=1
|
||||
pkgdesc="A fully integrated 3D graphics creation suite (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -21,25 +21,29 @@ license=('GPL')
|
||||
url="https://www.blender.org"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-alembic"
|
||||
#"${MINGW_PACKAGE_PREFIX}-audaspace"
|
||||
"${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-llvm"
|
||||
"${MINGW_PACKAGE_PREFIX}-eigen3"
|
||||
#"${MINGW_PACKAGE_PREFIX}-bullet" blender required bullet to built with USE_DOUBLE_PRECISION=ON
|
||||
"${MINGW_PACKAGE_PREFIX}-embree"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
"${MINGW_PACKAGE_PREFIX}-glew"
|
||||
"${MINGW_PACKAGE_PREFIX}-gmp"
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg4.4"
|
||||
"${MINGW_PACKAGE_PREFIX}-ffmpeg"
|
||||
"${MINGW_PACKAGE_PREFIX}-fftw"
|
||||
"${MINGW_PACKAGE_PREFIX}-freetype"
|
||||
#"${MINGW_PACKAGE_PREFIX}-gflags"
|
||||
#"${MINGW_PACKAGE_PREFIX}-glog"
|
||||
"${MINGW_PACKAGE_PREFIX}-hdf5"
|
||||
"${MINGW_PACKAGE_PREFIX}-tbb"
|
||||
"${MINGW_PACKAGE_PREFIX}-icu"
|
||||
#"${MINGW_PACKAGE_PREFIX}-jemalloc"
|
||||
"${MINGW_PACKAGE_PREFIX}-libharu"
|
||||
"${MINGW_PACKAGE_PREFIX}-libiconv"
|
||||
"${MINGW_PACKAGE_PREFIX}-libjpeg-turbo"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng"
|
||||
"${MINGW_PACKAGE_PREFIX}-libsndfile"
|
||||
"${MINGW_PACKAGE_PREFIX}-libtiff"
|
||||
"${MINGW_PACKAGE_PREFIX}-libwebp"
|
||||
"${MINGW_PACKAGE_PREFIX}-libwinpthread-git"
|
||||
"${MINGW_PACKAGE_PREFIX}-libxml2"
|
||||
"${MINGW_PACKAGE_PREFIX}-lzo2"
|
||||
"${MINGW_PACKAGE_PREFIX}-omp"
|
||||
"${MINGW_PACKAGE_PREFIX}-openal"
|
||||
"${MINGW_PACKAGE_PREFIX}-opencollada"
|
||||
"${MINGW_PACKAGE_PREFIX}-opencolorio"
|
||||
@@ -49,7 +53,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-alembic"
|
||||
"${MINGW_PACKAGE_PREFIX}-openimageio"
|
||||
"${MINGW_PACKAGE_PREFIX}-openshadinglanguage"
|
||||
#"${MINGW_PACKAGE_PREFIX}-opensubdiv"
|
||||
#$([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-openvdb")
|
||||
"${MINGW_PACKAGE_PREFIX}-openvdb"
|
||||
"${MINGW_PACKAGE_PREFIX}-openxr-sdk"
|
||||
"${MINGW_PACKAGE_PREFIX}-pcre"
|
||||
"${MINGW_PACKAGE_PREFIX}-potrace"
|
||||
@@ -57,22 +61,30 @@ depends=("${MINGW_PACKAGE_PREFIX}-alembic"
|
||||
"${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-numpy"
|
||||
"${MINGW_PACKAGE_PREFIX}-SDL2"
|
||||
"${MINGW_PACKAGE_PREFIX}-wintab-sdk"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib")
|
||||
"${MINGW_PACKAGE_PREFIX}-tbb"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib"
|
||||
"${MINGW_PACKAGE_PREFIX}-zstd")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja"
|
||||
"${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-eigen3"
|
||||
"${MINGW_PACKAGE_PREFIX}-llvm"
|
||||
"${MINGW_PACKAGE_PREFIX}-wintab-sdk"
|
||||
$([[ "$CARCH" == "aarch64" ]] && echo "${MINGW_PACKAGE_PREFIX}-sse2neon"))
|
||||
install=blender-${MSYSTEM}.install
|
||||
source=(https://download.blender.org/source/${_realname}-${pkgver}.tar.xz
|
||||
0001-mingw-buildsystem.patch
|
||||
0002-fix-mingw-w64-definitions.patch
|
||||
0003-disable-static_assert_align-on-mingw.patch
|
||||
0004-fix-finding-glew.patch
|
||||
0005-fix-define-syntax.patch
|
||||
0005-fix-WINTAB_PRINTF-on-mingw.patch
|
||||
0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch
|
||||
0007-disable-compiler-warnings.patch
|
||||
0008-mingw-use-X11-like-path-layout.patch
|
||||
0011-c++11-defines-__i386__-not-i386.patch
|
||||
0012-re-enable-SSE-on-mingw-w64-i686.patch
|
||||
0009-include-missing-headers.patch
|
||||
0010-do-not-link-to-extern_bullet.patch
|
||||
0011-no-TIME_UTC-on-msvcrt.patch
|
||||
0014-libstdc++-not-support-utf-stream.patch
|
||||
0015-mingw-python-like-msvc.patch
|
||||
0016-mingw-windres.patch
|
||||
@@ -84,44 +96,41 @@ source=(https://download.blender.org/source/${_realname}-${pkgver}.tar.xz
|
||||
0025-callback-function-prototype-fix.patch
|
||||
0026-embree-shared.patch
|
||||
0028-use-std-min-max.patch
|
||||
0029-update-CMake-to-support-OpenImageIO-2.3.4.patch
|
||||
0030-update-CMake-to-support-OpenEXR-3.patch
|
||||
0031-Images-update-code-to-support-OpenEXR-3.patch
|
||||
0032-fix-finding-tbb.patch
|
||||
0033-dont-add-fno-rtti-compile-option.patch
|
||||
0034-Fix-ARM64-Build.patch
|
||||
0035-Enable-SSE2NEON-on-Windows-ARM.patch
|
||||
0036-fix-building-against-boost-1.81.patch
|
||||
0037-build-with-ffmpeg4.4.patch)
|
||||
sha256sums=('36ac5e4abef18404d50eec64839e5c6b6f3e5e30ff1386cf6906c21a553ed624'
|
||||
'6f76d7cbfcbbb9fc823250bfbe9c8eea112aef33880a4665b2be19247048e449'
|
||||
'c301c9c06d11cc801d5c6d061cc42972e7a5ae770ffc7eca8fb84f60ae2d5050'
|
||||
0037-build-with-ffmpeg6.patch)
|
||||
sha256sums=('0c4a6b571863fd5423c62f6a03d2a415babff83dd21a321b52deb5826962d803'
|
||||
'9891901a958ea9004d3578636329af6e82386cfbfbf74f0ce62f40f68ad92a60'
|
||||
'26fd511916ce858f7403c4b11782762afd55bb0a827ba379af9485bc50c21964'
|
||||
'2a0d796df047b6f1188e0fe9131ff7cc726d867dadfe8c7cfed82264c09302d1'
|
||||
'bcaa5b105463aa2dd9ab0f69ed4d422c23f9ae1a00a93e012c62113489f3db56'
|
||||
'87036a005a817bce9edd5fb7f18ba3b7a0b8d309d6f1f9bb0f813c931d889c0d'
|
||||
'cb603fd30a2e1421f653a187c3beb8e767d043a0d948213e884095cf0a27a411'
|
||||
'10d5d251132d2fd19d44e15249e8f80692ba613dd77cc8b7526cfdd5faa5a19b'
|
||||
'8774ed212ab365315e82b922c93b2018c90913bfcea8496205dee6d9e448b2a3'
|
||||
'f3e4a0cdec45a08df28f4d93dea508352df683d2fc8cf4b73f289db83eaf5d9e'
|
||||
'6c3e47c8051345bd7c98acdc8ea592889f650498793fd5053728cec4ac659303'
|
||||
'ed57c2bec0a48c2b946b48ea822874a69f578973c1334f8aefff51241db36c3d'
|
||||
'87684da9c11edd811ea939290bde8426e6aa5bb4003fe967f35b98055a60421c'
|
||||
'2f5967bbf0244fbd85e2fd7ffeb0b988bc5db3f9f520f7370cdd87b747f271ab'
|
||||
'23d7a41bff2d924a9232b78d39df1b8db79192c9e2940bb313daa18442cc0811'
|
||||
'e9b8047bcf57ed092e9f2124a5f58fe8e82efc8400b1c0ed98503d7a71dced70'
|
||||
'1ccbf571e8dae23d0bff4ac848825788ac0a838261c5b02578c30852061238c8'
|
||||
'0ca75d18527c1440c74336de3c61b48c1c048b8fdb83429b26f58ad257e38b06'
|
||||
'9493c3f8a648302aae082d84ee55f0f0ed97f8345dd0d24db0eaaf6282f19de2'
|
||||
'e182116789a0b9855b42828fd9d6205561356ed5cd1f9d943b33e89702112a8f'
|
||||
'b080e86dd8042864ccda3a53a066d04dbc7038d7d16359c588f8d1f6063038a3'
|
||||
'bb28ef424c63a53b788255e8752359313933a87bbe802764eb5d8aedf3ca525d'
|
||||
'88a920a31022e125565cce87437d2a36cdded5af86a9a1e19b024c9c0757496f'
|
||||
'b24c356419577fc1979f0f17ec147153cb3b63a8a80bb2c76ae086603528a018'
|
||||
'8e028a7cf7808664e133656b0efc54a858900e9483be08482b72dd0821f539a4'
|
||||
'a1a2e9aa9950e4438576291518c649074b6a0c473429bc16494995a981de614b'
|
||||
'b09851c61524cd8116cd016dca7ee086233c07696cd79ca1a5e88ca32ef469f5'
|
||||
'8be734582b9980ad0a3c5a82c200767ce558084f18e3cca11947991a14b0d68a'
|
||||
'5a93bb201ab6bcff79b87a64cc931008f8911a3d4bfca9488d9b1f0d6fc0f3dc'
|
||||
'8efbe16258b8bc6654153502cc5db220e65cddbac9d049ecc94ad08277a27374'
|
||||
'c39bfb8c5e4f6d26601e9cb03b979265ff0bbbcb2d2758005a4d0b0ed9616c7f'
|
||||
'61c0873f9c661f80eb189b7391a4c4c1eef2f7db4178177ce7ff7c47342384ae'
|
||||
'1e92e8be2e8e1c54df2608b064818a4ed0691a92b2d6c3066fe25a718fbf76b2'
|
||||
'26e296fa6b806282670a5688e8eaa334f5bab1dfb171d6f2fd37f9de5c574698'
|
||||
'ba7f6c1bfcf9c767225836f7874ea8d02675bd720a46946baf7e4c7a9459c72f'
|
||||
'fc46aab771d7791a0c97a50eb010cac452fa3c21f1c2299a1dfbbf9b4ba077c4'
|
||||
'25441ca67be1e8f2a2b792aa2c757620d08e4c98982b78a1cd3297f0ea422369'
|
||||
'5c50872ee0b8ab9f12d46092979fa7113090ff2867c2b858c7052610ad244f6c'
|
||||
'e52e8ed75f333fd8b3fd54b7ecedda2dfb1f19e157a564b286d586d8e1f629a6'
|
||||
'd24fab2e66b6fa736923cbe765a52162880cdd71dce179f9aa50ec251955c31f'
|
||||
'16b560363717357a0e69d3b46269cace9bf978126e08b604ad18a532a8dfd0b2'
|
||||
'4eed05d38519354f83f70dd3bf3b88682948fc7c56ae998308f911312bb3306f'
|
||||
'9e4edfb6e7f19d0398e98017ce1fc3640d88002711dec5d49c8c46fbcfb5eb13'
|
||||
'a48e49b9e6034ccd3b448bc44f4f30a4d64682e8820f68d470069c9cbcf8b6c7'
|
||||
'96d8f968b5c138ed2663c98c7e61df20fa219086109a350de000aeeb7f66422d'
|
||||
'dd70c472701632018c4e38b64697d8217506c7ab29182003f431031a16dac343'
|
||||
'618bf8a25d5c6a4ff85b4b04c3eb6347c584e0b627fe2b33555459fb6f0e30be')
|
||||
'78528aebbb13b7e74071f15886271bcd004069d74e614fd2eeb3f62303ccdebc')
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
@@ -134,17 +143,20 @@ apply_patch_with_msg() {
|
||||
prepare() {
|
||||
cd ${srcdir}/${_realname}-${pkgver}
|
||||
|
||||
[[ -d build_files/cmake/platform/platform_win32_mingw64.cmake ]] && rm build_files/cmake/platform/platform_win32_mingw64.cmake
|
||||
rm -f build_files/cmake/platform/platform_win32_mingw64.cmake
|
||||
rm -f release/windows/icons/blender.exe.manifest
|
||||
|
||||
apply_patch_with_msg \
|
||||
0001-mingw-buildsystem.patch \
|
||||
0002-fix-mingw-w64-definitions.patch \
|
||||
0003-disable-static_assert_align-on-mingw.patch \
|
||||
0004-fix-finding-glew.patch \
|
||||
0005-fix-define-syntax.patch \
|
||||
0005-fix-WINTAB_PRINTF-on-mingw.patch \
|
||||
0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch \
|
||||
0007-disable-compiler-warnings.patch \
|
||||
0008-mingw-use-X11-like-path-layout.patch \
|
||||
0011-c++11-defines-__i386__-not-i386.patch \
|
||||
0012-re-enable-SSE-on-mingw-w64-i686.patch \
|
||||
0009-include-missing-headers.patch \
|
||||
0011-no-TIME_UTC-on-msvcrt.patch \
|
||||
0014-libstdc++-not-support-utf-stream.patch \
|
||||
0015-mingw-python-like-msvc.patch \
|
||||
0016-mingw-windres.patch \
|
||||
@@ -156,49 +168,33 @@ prepare() {
|
||||
0025-callback-function-prototype-fix.patch \
|
||||
0026-embree-shared.patch \
|
||||
0028-use-std-min-max.patch \
|
||||
0029-update-CMake-to-support-OpenImageIO-2.3.4.patch \
|
||||
0030-update-CMake-to-support-OpenEXR-3.patch \
|
||||
0031-Images-update-code-to-support-OpenEXR-3.patch \
|
||||
0032-fix-finding-tbb.patch \
|
||||
0033-dont-add-fno-rtti-compile-option.patch \
|
||||
0034-Fix-ARM64-Build.patch \
|
||||
0035-Enable-SSE2NEON-on-Windows-ARM.patch \
|
||||
0036-fix-building-against-boost-1.81.patch \
|
||||
0037-build-with-ffmpeg4.4.patch
|
||||
0037-build-with-ffmpeg6.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf ${srcdir}/build-${MSYSTEM}
|
||||
mkdir "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
|
||||
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
|
||||
|
||||
# i686 SSE is problematic with Cycles: https://developer.blender.org/T36316
|
||||
# .. but commit:
|
||||
# https://lists.blender.org/pipermail/bf-blender-cvs/2013-October/059705.html
|
||||
# .. breaks the build:
|
||||
# undefined reference to `ccl::kernel_cpu_sse2_path_trace` .. etc
|
||||
# This is because it prevents the definition of __KERNEL_SSE2__ without having
|
||||
# ensured WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 is undefined. Let's hope that the
|
||||
# bugs have been fixed as patch 0011 re-enables __KERNEL_SSE2__. If they're not
|
||||
# fixed then we'll have to pass ENABLESSE2 to cmake instead, -DWITH_CPU_SSE being
|
||||
# the correct one (probably!)
|
||||
# [[ $CARCH == i686 ]] && ENABLESSE2="-DSUPPORT_SSE2_BUILD=OFF -DWITH_CPU_SSE=OFF"
|
||||
declare -a _btype
|
||||
if check_option "debug" "y"; then
|
||||
_btype=Debug
|
||||
declare -a _extra_config
|
||||
if check_option "debug" "n"; then
|
||||
_extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
_btype=Release
|
||||
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
CXXFLAGS+=" -w"
|
||||
CFLAGS+=" -w"
|
||||
if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
|
||||
CXXFLAGS+=" -Wno-c++11-narrowing -Wno-array-parameter -Wno-unreachable-code-generic-assoc"
|
||||
else
|
||||
CXXFLAGS+=" -Wno-narrowing -Wno-stringop-truncation -Wno-array-parameter"
|
||||
CXXFLAGS+=" -Wno-c++11-narrowing"
|
||||
CFLAGS+=" -Wno-unreachable-code-generic-assoc"
|
||||
fi
|
||||
|
||||
if [[ $CARCH == "aarch64" ]]; then
|
||||
_sse2neon="${MINGW_PREFIX}/include/sse2neon"
|
||||
else
|
||||
_sse2neon=""
|
||||
_extra_config+=("-DSSE2NEON_ROOT_DIR=${MINGW_PREFIX}/include/sse2neon")
|
||||
fi
|
||||
|
||||
export XR_OPENXR_SDK_ROOT_DIR=${MINGW_PREFIX}
|
||||
@@ -210,8 +206,7 @@ build() {
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-G"Ninja" \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DMINGW_LIBS=${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=${_btype} \
|
||||
"${_extra_config[@]}" \
|
||||
-DWITH_SYSTEM_AUDASPACE=OFF \
|
||||
-DWITH_SYSTEM_GLEW=ON \
|
||||
-DWITH_SYSTEM_GFLAGS=OFF \
|
||||
@@ -219,6 +214,7 @@ build() {
|
||||
-DWITH_SYSTEM_BULLET=OFF \
|
||||
-DWITH_SYSTEM_LZO=ON \
|
||||
-DWITH_SYSTEM_EIGEN3=ON \
|
||||
-DWITH_SYSTEM_FREETYPE=ON \
|
||||
-DWITH_INSTALL_PORTABLE=OFF \
|
||||
-DWITH_OPENCOLLADA=ON \
|
||||
-DWITH_ALEMBIC=ON \
|
||||
@@ -231,23 +227,18 @@ build() {
|
||||
-DWITH_CYCLES_CUDA_BINARIES=OFF \
|
||||
-DWITH_CYCLES_OSL=ON \
|
||||
-DWITH_FFTW3=ON \
|
||||
-DWITH_OPENVDB=OFF \
|
||||
-DWITH_OPENVDB=ON \
|
||||
-DWITH_MEM_JEMALLOC=OFF \
|
||||
-DWITH_MOD_OCEANSIM=ON \
|
||||
-DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
|
||||
-DPython_ROOT_DIR=${MINGW_PREFIX} \
|
||||
-DPython_FIND_REGISTRY=NEVER \
|
||||
-DPYTHON_VERSION=${_pyver} \
|
||||
-DPYTHON_LIBPATH=${MINGW_PREFIX}/lib \
|
||||
-DPYTHON_LIBRARY=${MINGW_PREFIX}/lib/libpython${_pyver}.dll.a \
|
||||
-DPYTHON_INCLUDE_DIR=${MINGW_PREFIX}/include/python${_pyver} \
|
||||
-DWITH_PYTHON_INSTALL=OFF \
|
||||
-DWITH_PYTHON_INSTALL_NUMPY=OFF \
|
||||
-DCYCLES_OSL=${MINGW_PREFIX} \
|
||||
-DWITH_OPENMP=ON \
|
||||
-DWITH_LLVM=ON \
|
||||
-DLLVM_STATIC=ON \
|
||||
-DSSE2NEON_ROOT_DIR=${_sse2neon} \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
${MINGW_PREFIX}/bin/cmake --build .
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
post_install() {
|
||||
find "clang32/bin" -type d -iname '2.*' | xargs -rt rm -rf
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
post_install() {
|
||||
find "mingw32/bin" -type d -iname '2.*' | xargs -rt rm -rf
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
Reference in New Issue
Block a user