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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2012-04-24 00:09:59 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-04-24 00:09:59 +0400
commit8b476d0275be15fbe18c9a0589e81a996e952496 (patch)
treee896508c392601d61944e6e091b014bbcf924b69 /source
parent95432a2a2bc371eab628e7846bb5736f236d0efe (diff)
First MinGW-w64 support for cmake has been added. To test I recommend this build:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ray_linn/GCC-4.7.0-with-ada/mingw-w64-gcc-4.7.0-runtime-2.0.1-static-ada-20120330.7z/download Other builds may also work but due to the constantly changing nature of the compiler this cannot be guaranteed. I often had to change compilers while building the libraries and this one is the one that did the job for most of them. This first support is experimental and considered "advanced". To enable pass -DWITH_MINGW64 during cmake configuration. Also make sure to extract the compiler on C:/MinGW and that MinGW/bin is in your path. To build check out lib/mingw64. Initially the support is lacking until I get every library compiled correctly. For now you should disable WITH_CYCLES(sorry, I know some people are dying to do benchmarks, but still a few libs to go), WITH_IMAGE_OPENEXR, WITH_OPENCOLLADA, WITH_LIBMV and WITH_CODEC_FFMPEG(links but hangs on startup). Still the tools are working, the memory limit is increased and due to the experimental nature of the setup, full optimization with SSE2 is available, which makes the build quite fast. Also the compiler and especially, the linker are way faster than regular MinGW. The wiki docs have also updated. Happy testing!
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_armature.h2
-rw-r--r--source/blender/blenlib/BLI_winstuff.h2
-rw-r--r--source/blender/blenlib/intern/fileops.c2
-rw-r--r--source/blender/blenloader/BLO_sys_types.h2
-rw-r--r--source/creator/CMakeLists.txt26
-rw-r--r--source/gameengine/Expressions/KX_HashedPtr.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_IPO_SGController.cpp2
8 files changed, 25 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 1334528c035..dfe3fde17eb 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -89,7 +89,7 @@ int bone_autoside_name (char name[64], int strip_number, short axis, float head,
struct Bone *get_named_bone (struct bArmature *arm, const char *name);
-float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist);
+float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist);
void where_is_armature (struct bArmature *arm);
void where_is_armature_bone(struct Bone *bone, struct Bone *prevbone);
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index 33ca7d235fa..a0ab88e8baf 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -113,7 +113,9 @@ typedef unsigned int mode_t;
/* python uses HAVE_SSIZE_T */
# ifndef HAVE_SSIZE_T
# define HAVE_SSIZE_T 1
+# ifndef FREE_WINDOWS64
typedef long ssize_t;
+# endif
# endif
#endif
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 5bbfd596ba7..4b5ea44e97c 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -209,7 +209,7 @@ FILE *BLI_fopen(const char *filename, const char *mode)
return ufopen(filename, mode);
}
-gzFile BLI_gzopen(const char *filename, const char *mode)
+void *BLI_gzopen(const char *filename, const char *mode)
{
gzFile gzfile;
diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h
index 7dbd4df1056..41e33eb2a05 100644
--- a/source/blender/blenloader/BLO_sys_types.h
+++ b/source/blender/blenloader/BLO_sys_types.h
@@ -100,8 +100,10 @@ typedef uint64_t u_int64_t;
#include <inttypes.h>
#elif defined(FREE_WINDOWS)
+#ifndef FREE_WINDOWS64
/* define htoln here, there must be a syntax error in winsock2.h in MinGW */
unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
+#endif
#include <stdint.h>
#else
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 83804ab1a7f..3e1b7772d17 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -448,7 +448,7 @@ elseif(WIN32)
DESTINATION ${TARGETDIR}
)
- if(WITH_INTERNATIONAL)
+ if(WITH_INTERNATIONAL AND (NOT WITH_MINGW64))
install(
FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
DESTINATION ${TARGETDIR}
@@ -523,11 +523,14 @@ elseif(WIN32)
DESTINATION ${TARGETDIR}
)
else()
- install(
- FILES
- ${LIBDIR}/zlib/lib/zlib.dll
- DESTINATION ${TARGETDIR}
- )
+ #not needed since we link statically, maybe also unneeded for MinGW?
+ if(NOT WITH_MINGW64)
+ install(
+ FILES
+ ${LIBDIR}/zlib/lib/zlib.dll
+ DESTINATION ${TARGETDIR}
+ )
+ endif()
endif()
if(MSVC)
@@ -536,10 +539,13 @@ elseif(WIN32)
DESTINATION ${TARGETDIR}
)
else()
- install(
- FILES ${LIBDIR}/pthreads/lib/pthreadGC2.dll
- DESTINATION ${TARGETDIR}
- )
+ #MinGW64 comes with own version. For portable builds it will probaly have to be copied to work
+ if(NOT WITH_MINGW64)
+ install(
+ FILES ${LIBDIR}/pthreads/lib/pthreadGC2.dll
+ DESTINATION ${TARGETDIR}
+ )
+ endif()
endif()
if(WITH_CODEC_FFMPEG)
diff --git a/source/gameengine/Expressions/KX_HashedPtr.cpp b/source/gameengine/Expressions/KX_HashedPtr.cpp
index 988b78b8810..51550d52636 100644
--- a/source/gameengine/Expressions/KX_HashedPtr.cpp
+++ b/source/gameengine/Expressions/KX_HashedPtr.cpp
@@ -34,7 +34,7 @@
unsigned int KX_Hash(void * inDWord)
{
-#if defined(_WIN64)
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
unsigned __int64 key = (unsigned __int64)inDWord;
#else
unsigned long key = (unsigned long)inDWord;
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 74f028849cc..c5145ef2171 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -31,7 +31,7 @@
*/
-#if defined(_WIN64)
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
typedef unsigned __int64 uint_ptr;
#else
typedef unsigned long uint_ptr;
diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.cpp b/source/gameengine/Ketsji/KX_IPO_SGController.cpp
index 728d0fb8561..950e3c88a9e 100644
--- a/source/gameengine/Ketsji/KX_IPO_SGController.cpp
+++ b/source/gameengine/Ketsji/KX_IPO_SGController.cpp
@@ -31,7 +31,7 @@
*/
-#if defined(_WIN64)
+#if defined(_WIN64) && !defined(FREE_WINDOWS64)
typedef unsigned __int64 uint_ptr;
#else
typedef unsigned long uint_ptr;