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.
This commit is contained in:
Chris Want
2003-05-24 20:04:37 +00:00
parent 94c4250d9f
commit 924a849755
29 changed files with 303 additions and 85 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -91,7 +91,9 @@ BLO_encrypt(
}
#ifdef _WIN32
#ifndef FREE_WINDOWS
RAND_screen();
#endif
#endif
RAND_bytes(cryptKey, cryptKeyLen);

View File

@@ -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

View File

@@ -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::

View File

@@ -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. */

View File

@@ -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

View File

@@ -37,7 +37,7 @@
#include <config.h>
#endif
#ifdef _WIN32
#if defined(_WIN32) && !defined(FREE_WINDOWS)
#define INC_OLE2
#include <windows.h>

View File

@@ -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)