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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Want <cwant@ualberta.ca>2003-05-25 00:04:37 +0400
committerChris Want <cwant@ualberta.ca>2003-05-25 00:04:37 +0400
commit924a8497551be7d83bb577e94ebf89b18374b874 (patch)
tree5912852343da88dcc863a56ab641e60983a5432b /source/blender
parent94c4250d9f7ca57d9af7a7265fcdec0b4e94e5b3 (diff)
Support for building bf-blender under windows with gcc (huge thanks to
Florian Eggenburger). Full instructions are in doc/README.windows-gcc. Main differences from Florian's patch: - the 'lib' dir should now be the same level as the 'blender' dir (rather than being a subdir of 'blender'). This is consistent with the other platforms that bf-blender supports (tuhopuu will also adopt this convention hopefully soon). - the script 'free_windows-env.mk' is no longer needed ... see the docs about how this is overcome (again, tuhopuu will hopefully also follow this route soon). - the dlltool dir has it's own Makefile that builds all of the needed stub libraries from the dll's in cvs.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/BLI_storage_types.h2
-rw-r--r--source/blender/blenlib/BLI_winstuff.h4
-rw-r--r--source/blender/blenlib/intern/rand.c2
-rw-r--r--source/blender/blenlib/intern/winstuff.c2
-rw-r--r--source/blender/blenloader/intern/genfile.c3
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/decrypt/BLO_en_de_cryptHeader.h4
-rw-r--r--source/blender/encrypt/intern/BLO_encrypt.c2
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h2
-rw-r--r--source/blender/makesdna/intern/Makefile12
-rw-r--r--source/blender/readstreamglue/BLO_sys_types.h7
-rw-r--r--source/blender/render/intern/source/initrender.c6
-rw-r--r--source/blender/src/writeavicodec.c2
-rw-r--r--source/blender/verify/BLO_sign_verify_Header.h4
14 files changed, 42 insertions, 14 deletions
diff --git a/source/blender/blenlib/BLI_storage_types.h b/source/blender/blenlib/BLI_storage_types.h
index 2b756e26f5b..825a8bc9cbd 100644
--- a/source/blender/blenlib/BLI_storage_types.h
+++ b/source/blender/blenlib/BLI_storage_types.h
@@ -48,7 +48,7 @@ struct header{
char fill[HDRSIZE-NAMSIZE-2*sizeof(unsigned int)];
};
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
typedef unsigned int mode_t;
#endif
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index b09fcbafa8c..b9f92aedb98 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -69,7 +69,9 @@
#define S_ISDIR(x) ((x&S_IFMT) == S_IFDIR)
#endif
+#ifndef FREE_WINDOWS
typedef unsigned int mode_t;
+#endif
struct dirent {
int d_ino;
@@ -91,8 +93,10 @@ typedef struct _DIR {
} DIR;
void RegisterBlendExtension(char * str);
+#ifndef FREE_WINDOWS
int strcasecmp (char *s1, char *s2);
int strncasecmp (char *s1, char *s2, int n);
+#endif
DIR *opendir (const char *path);
struct dirent *readdir(DIR *dp);
int closedir (DIR *dp);
diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c
index e7c9ec1c864..1166932019a 100644
--- a/source/blender/blenlib/intern/rand.c
+++ b/source/blender/blenlib/intern/rand.c
@@ -36,7 +36,7 @@
#include <config.h>
#endif
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
typedef unsigned __int64 r_uint64;
#else
typedef unsigned long long r_uint64;
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 2a69bf0b1e5..3a4491dedaa 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -134,6 +134,7 @@ static void strnlower (char *str, int n) {
}
}
+#ifndef FREE_WINDOWS
int strcasecmp (char *s1, char *s2) {
char *st1, *st2;
int r;
@@ -174,6 +175,7 @@ int strncasecmp (char *s1, char *s2, int n) {
return r;
}
+#endif
DIR *opendir (const char *path) {
if (GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY) {
diff --git a/source/blender/blenloader/intern/genfile.c b/source/blender/blenloader/intern/genfile.c
index f985879de32..ea7f6dc2985 100644
--- a/source/blender/blenloader/intern/genfile.c
+++ b/source/blender/blenloader/intern/genfile.c
@@ -61,6 +61,9 @@
#include "genfile.h"
+#ifdef FREE_WINDOWS
+typedef long long __int64;
+#endif
/*
* - please note: no builtin security to detect input of double structs
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 609b99b9f15..5b5632401ba 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -498,7 +498,7 @@ static void switch_endian_bh8(BHead8 *bhead)
static void bh4_from_bh8(BHead *bhead, BHead8 *bhead8, int do_endian_swap)
{
BHead4 *bhead4 = (BHead4 *) bhead;
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
__int64 old;
#else
long long old;
@@ -1052,7 +1052,7 @@ static void link_glob_list(FileData *fd, ListBase *lb) /* for glob data */
static void test_pointer_array(FileData *fd, void **mat)
{
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
__int64 *lpoin, *lmat;
#else
long long *lpoin, *lmat;
diff --git a/source/blender/decrypt/BLO_en_de_cryptHeader.h b/source/blender/decrypt/BLO_en_de_cryptHeader.h
index fd9f634c27e..a555e66e800 100644
--- a/source/blender/decrypt/BLO_en_de_cryptHeader.h
+++ b/source/blender/decrypt/BLO_en_de_cryptHeader.h
@@ -40,6 +40,10 @@ extern "C" {
#include "BLO_sys_types.h"
+#ifdef FREE_WINDOWS
+typedef int int32_t;
+#endif
+
#define EN_DE_CRYPTHEADERSTRUCTSIZE sizeof(struct BLO_en_de_cryptHeaderStruct)
// Tests showed: pubKeyLen 64, cryptedKeyLen 64 bytes
diff --git a/source/blender/encrypt/intern/BLO_encrypt.c b/source/blender/encrypt/intern/BLO_encrypt.c
index ce44baf5e22..3353a1fd69f 100644
--- a/source/blender/encrypt/intern/BLO_encrypt.c
+++ b/source/blender/encrypt/intern/BLO_encrypt.c
@@ -91,8 +91,10 @@ BLO_encrypt(
}
#ifdef _WIN32
+#ifndef FREE_WINDOWS
RAND_screen();
#endif
+#endif
RAND_bytes(cryptKey, cryptKeyLen);
RC4_set_key(rc4_key, cryptKeyLen, cryptKey);
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index cdc0c33fb42..8553a3868d1 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -70,7 +70,7 @@ typedef struct BHead4 {
#
typedef struct BHead8 {
int code, len;
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
/* This is a compiler type! */
__int64 old;
#else
diff --git a/source/blender/makesdna/intern/Makefile b/source/blender/makesdna/intern/Makefile
index d6a762156ca..84d854064d7 100644
--- a/source/blender/makesdna/intern/Makefile
+++ b/source/blender/makesdna/intern/Makefile
@@ -54,10 +54,14 @@ ifeq ($(OS),windows)
# _really_ needed, but it is the easiest fix for now. If you have
# some spare time, try to trace down the exact dep. Then again, you
# could also spend that time making the sdna system more robust.
- WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
- WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
- WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
- WINLIBS += /link /nodefaultlib:libc
+ ifneq ($(FREE_WINDOWS),true)
+ WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
+ WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+ WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
+ WINLIBS += /link /nodefaultlib:libc
+ else
+ LDFLAGS += -mwindows -mno-cygwin
+ endif
endif
clean::
diff --git a/source/blender/readstreamglue/BLO_sys_types.h b/source/blender/readstreamglue/BLO_sys_types.h
index 4333f74465d..38dde20500e 100644
--- a/source/blender/readstreamglue/BLO_sys_types.h
+++ b/source/blender/readstreamglue/BLO_sys_types.h
@@ -47,7 +47,12 @@
extern "C" {
#endif
-#ifdef _WIN32
+#ifdef FREE_WINDOWS
+typedef unsigned char uint8_t;
+typedef unsigned int uint32_t;
+#endif
+
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
/* The __intXX are built-in types of the visual complier! So we don't
* need to include anything else here. */
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index 4aa8d5cf02d..bd331aa44d8 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -1260,7 +1260,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype==R_MOVIE) {
start_movie();
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) {
start_avi_codec();
#endif
@@ -1290,7 +1290,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype == R_MOVIE) {
append_movie((G.scene->r.cfra));
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) {
append_avi_codec((G.scene->r.cfra));
#endif
@@ -1330,7 +1330,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype==R_MOVIE) {
end_movie();
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) {
end_avi_codec();
#endif
diff --git a/source/blender/src/writeavicodec.c b/source/blender/src/writeavicodec.c
index b729b1d944d..1b6a9776515 100644
--- a/source/blender/src/writeavicodec.c
+++ b/source/blender/src/writeavicodec.c
@@ -37,7 +37,7 @@
#include <config.h>
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
#define INC_OLE2
#include <windows.h>
diff --git a/source/blender/verify/BLO_sign_verify_Header.h b/source/blender/verify/BLO_sign_verify_Header.h
index 8f26eed95aa..d2290dc4ad7 100644
--- a/source/blender/verify/BLO_sign_verify_Header.h
+++ b/source/blender/verify/BLO_sign_verify_Header.h
@@ -38,6 +38,10 @@
extern "C" {
#endif
+#ifdef FREE_WINDOWS
+typedef int int32_t;
+#endif
+
#include "BLO_sys_types.h"
#define SIGNVERIFYHEADERSTRUCTSIZE sizeof(struct BLO_sign_verify_HeaderStruct)