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

@@ -41,6 +41,10 @@ export NANBLENDERHOME=$(shell pwd)
MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory
SOURCEDIR = blender SOURCEDIR = blender
ifeq ($(FREE_WINDOWS),true)
DIRS ?= dlltool intern source po
endif
DIRS ?= extern intern source po DIRS ?= extern intern source po
include source/nan_subdirs.mk include source/nan_subdirs.mk

91
doc/README.windows-gcc Normal file
View File

@@ -0,0 +1,91 @@
Here are some basic instructions for building
blender blender for windows using gcc under cygwin.
Please note that the resulting executable does not
depend on cygwin and can be distrubuted to machines
that don't have cygwin installed.
The instructions are:
1. Download cygwin (www.cygwin.com) and use the setup program
to install packages for gcc, gcc-mingw, w32api, make, cvs,
python, and perl (and maybe others... the dependency list
is bound to change over time and hopefully these instructions
will keep with the changes). All of the following
commands will be entered at the cygwin prompt so launch
cygwin now.
2. Create a directory to put your sources and then enter that
directory, e.g.:
mkdir bf-blender
cd bf-blender
3. checkout the blender module from the bf-blender tree using cvs
(use password anonymous):
cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender login
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender \
co blender
4. checkout the lib/windows module from bf-blender using cvs:
cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/bf-blender \
co lib/windows
5. Enter the newly created blender directory:
cd blender
6. to prepare the build system to use only the free tools we must
set some environment variables. This is done by creating a
file called "user-def.mk" in the blender directory and
inserting the following line with notepad or your favorite
text editor:
export FREE_WINDOWS=true
The quickest way to do this though is to issue the following
command:
echo 'export FREE_WINDOWS=true' > user-def.mk
7. Time to build... issue the command:
make
8. Wait for it to finish (there is this mysterious place called
'outside' that I am told is nice to go to while waiting for a
compile to finish).
Getting Help
------------
If you have problems, come by #blendersauce on irc.freenode.net
or post questions to the "Compiling, Libraries, Modules" forum
at www.blender.org. There is also the very useful bf-committers
mailing list, what you can subscribe to here:
http://www.blender.org/mailman/listinfo/bf-committers
(as a bonus you can get info about the most recent features that
are coming down the pipe ...)
This said, the most common fix to a problem will
probably involve installing an additional cygwin package,
so keep that cygwin setup program close by ...
Some final notes
----------------
- The build will take a long time, even on a fast machine
(a clean build takes almost an hour on my Athlon 1800+
based laptop).
- If the build is successful you will find it has created
the program obj/windows/bin/blender.exe
- Sound is disabled
- If you want to clean your sources issue a 'make clean'
in the top blender directory.
- If you want to update your sources when somebody has
added a new awesome feature, you will want to go to the
topmost blender directory and issue the following command:
cvs -z3 update -P -d
It would probably be best to clean your sources before
re-building (see previous note).
- This is a work in progress, so some things may not be working
right or it may not support all of the cutting edge features.
- Want to make a fancy zipped up blender package to give
to your buddies? Try "make release" ... read the output
to find out where the zip file was placed (note: you will
probably need the zip/unzip packages from cygwin to do
this)

View File

@@ -34,7 +34,7 @@
* ***** END GPL/BL DUAL LICENSE BLOCK ***** * ***** END GPL/BL DUAL LICENSE BLOCK *****
*/ */
#if defined (_WIN32) # if defined (_WIN32) && !defined(FREE_WINDOWS)
#define USE_OPENAL #define USE_OPENAL
#elif defined (__linux__) #elif defined (__linux__)
# if defined (__i386__) # if defined (__i386__)

View File

@@ -39,7 +39,7 @@ typedef unsigned short GHOST_TUns16;
typedef int GHOST_TInt32; typedef int GHOST_TInt32;
typedef unsigned int GHOST_TUns32; typedef unsigned int GHOST_TUns32;
#ifdef WIN32 #if defined(WIN32) && !defined(FREE_WINDOWS)
typedef __int64 GHOST_TInt64; typedef __int64 GHOST_TInt64;
typedef unsigned __int64 GHOST_TUns64; typedef unsigned __int64 GHOST_TUns64;
#else #else

View File

@@ -47,7 +47,9 @@
// We do not support multiple monitors at the moment // We do not support multiple monitors at the moment
#include <windows.h> #include <windows.h>
#define COMPILE_MULTIMON_STUBS #define COMPILE_MULTIMON_STUBS
#ifndef FREE_WINDOWS
#include <multimon.h> #include <multimon.h>
#endif
GHOST_DisplayManagerWin32::GHOST_DisplayManagerWin32(void) GHOST_DisplayManagerWin32::GHOST_DisplayManagerWin32(void)

View File

@@ -317,7 +317,11 @@ GHOST_TSuccess GHOST_SystemWin32::init()
wc.cbClsExtra= 0; wc.cbClsExtra= 0;
wc.cbWndExtra= 0; wc.cbWndExtra= 0;
wc.hInstance= ::GetModuleHandle(0); wc.hInstance= ::GetModuleHandle(0);
wc.hIcon = ::LoadIcon(wc.hInstance, "APPICON"); #ifndef FREE_WINDOWS
wc.hIcon = ::LoadIcon(wc.hInstance, "APPICON");
#else
wc.hIcon = ::LoadIcon(NULL, "APPICON");
#endif
if (!wc.hIcon) { if (!wc.hIcon) {
::LoadIcon(NULL, IDI_APPLICATION); ::LoadIcon(NULL, IDI_APPLICATION);
} }
@@ -466,6 +470,7 @@ GHOST_EventCursor* GHOST_SystemWin32::processCursorEvent(GHOST_TEventType type,
{ {
GHOST_TInt32 x, y; GHOST_TInt32 x, y;
getSystem()->getCursorPosition(x, y); getSystem()->getCursorPosition(x, y);
printf("%d %d\n",x,y);
return new GHOST_EventCursor (getSystem()->getMilliSeconds(), type, window, x, y); return new GHOST_EventCursor (getSystem()->getMilliSeconds(), type, window, x, y);
} }

View File

@@ -51,8 +51,12 @@ LOADER_OBJS = $(DIR)/$(DEBUG_DIR)keyloader.o
ifneq ($(OS),windows) ifneq ($(OS),windows)
LIBS = $(NAN_OPENSSL)/lib/libcrypto.a LIBS = $(NAN_OPENSSL)/lib/libcrypto.a
else else
LIBS = $(NAN_OPENSSL)/lib/libeay32.lib ifeq ($(FREE_WINDOWS),true)
LIBS += advapi32.lib gdi32.lib LIBS = $(NAN_OPENSSL)/lib/libcrypto.a
else
LIBS = $(NAN_OPENSSL)/lib/libeay32.lib
LIBS += advapi32.lib gdi32.lib
endif
endif endif
all debug:: link all debug:: link

View File

@@ -8,6 +8,10 @@ SRCDIR = ../modules
TARGETDIR = $(OCGDIR)/blender/bpython/frozen TARGETDIR = $(OCGDIR)/blender/bpython/frozen
ifeq ($(FREE_WINDOWS),true)
export NAN_PYTHON_BINARY = python
endif
PYFLAGS=-S -O PYFLAGS=-S -O
default: importer default: importer
@@ -18,7 +22,15 @@ all debug: default
install: importer install: importer
importer: importer:
ifeq ($(FREE_WINDOWS),true)
cp $(NAN_PYTHON)/lib/python22.dll .
dlltool.exe -v --output-lib $(NAN_PYTHON)/lib/freepy.a \
--input-def $(NANBLENDERHOME)/dlltool/python.def \
--dllname python22.dll
ranlib $(NAN_PYTHON)/lib/freepy.a
rm ./python22.dll
@[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR) @[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR)
endif
$(NAN_PYTHON_BINARY) $(PYFLAGS) freeze.py -d -x os -x pprint -x string -x copy -I $(SRCDIR) -o $(TARGETDIR) $(SRCDIR)/VRMLmain.py $(NAN_PYTHON_BINARY) $(PYFLAGS) freeze.py -d -x os -x pprint -x string -x copy -I $(SRCDIR) -o $(TARGETDIR) $(SRCDIR)/VRMLmain.py
$(MAKE) -C $(TARGETDIR) $(MAKE) -C $(TARGETDIR)

View File

@@ -25,11 +25,15 @@ def makemakefile(outfp, makevars, files, target):
for key in keys: for key in keys:
outfp.write("%s=%s\n" % (key, makevars[key])) outfp.write("%s=%s\n" % (key, makevars[key]))
outfp.write("\n\ninclude nan_definitions.mk\n") outfp.write("\n\ninclude nan_definitions.mk\n")
outfp.write("ifeq ($(OS),windows)\n") outfp.write("ifeq ($(OS),windows)\n")
outfp.write(" CC=$(NANBLENDERHOME)/source/tools/cygwin/cl_wrapper.pl\n") outfp.write(" CFLAGS=-I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) $(OPT)\n")
outfp.write(" CFLAGS=-I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) $(OPT)\n") outfp.write(" ifneq ($(FREE_WINDOWS),true)\n")
outfp.write("endif\n") outfp.write(" CC=$(NANBLENDERHOME)/source/tools/cygwin/cl_wrapper.pl\n")
outfp.write(" else\n")
outfp.write(" CFLAGS += -mwindows -mno-cygwin\n")
outfp.write(" endif\n")
outfp.write("endif\n")
outfp.write("\nall: %s\n\n" % libtarget) outfp.write("\nall: %s\n\n" % libtarget)

View File

@@ -138,7 +138,11 @@ PYPLAYERLIB ?= $(PYLIB)
endif endif
ifeq ($(WITH_FREETYPE2), true) ifeq ($(WITH_FREETYPE2), true)
ifeq ($(OS), windows) ifeq ($(OS), windows)
COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib ifeq ($(FREE_WINDOWS), true)
COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
else
COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
endif
else else
ifeq ($(OS), irix) ifeq ($(OS), irix)
COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
@@ -153,8 +157,7 @@ ifeq ($(INTERNATIONAL), true)
ifeq ($(FREE_WINDOWS), true) ifeq ($(FREE_WINDOWS), true)
COMLIB += $(NAN_GETTEXT)/lib/freegettext.a COMLIB += $(NAN_GETTEXT)/lib/freegettext.a
COMLIB += $(NAN_FTGL)/lib/libftgl.a COMLIB += $(NAN_FTGL)/lib/libftgl.a
COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a #COMLIB += $(NAN_ICONV)/lib/freeiconv.a
COMLIB += $(NAN_ICONV)/lib/freeiconv.a
else else
COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib
COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
@@ -211,13 +214,18 @@ endif
PULIB += $(NAN_BLENKEY)/lib/libblenkey.a PULIB += $(NAN_BLENKEY)/lib/libblenkey.a
SPLIB += $(NAN_BLENKEY)/lib/libblenkey.a SPLIB += $(NAN_BLENKEY)/lib/libblenkey.a
ifeq ($(OS),windows) ifeq ($(OS),windows)
PULIB += $(NAN_OPENSSL)/lib/libeay32.lib ifeq ($(FREE_WINDOWS),true)
SPLIB += $(NAN_OPENSSL)/lib/libeay32.lib PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
else SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
PULIB += $(NAN_OPENSSL)/lib/libcrypto.a else
SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a PULIB += $(NAN_OPENSSL)/lib/libeay32.lib
endif SPLIB += $(NAN_OPENSSL)/lib/libeay32.lib
endif
else
PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
endif
# These three need to be explicitly mentioned on the cl, because # These three need to be explicitly mentioned on the cl, because
# if they are offered as a lib, they are optimized away. (nzc) # if they are offered as a lib, they are optimized away. (nzc)
@@ -395,7 +403,12 @@ else
endif endif
ifeq ($(OS),windows) ifeq ($(OS),windows)
PYLIB = $(NAN_PYTHON)/lib/python22.lib ifeq ($(FREE_WINDOWS),true)
PYLIB = $(NAN_PYTHON)/lib/freepy.a
else
PYLIB = $(NAN_PYTHON)/lib/python22.lib
endif
PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
PYPLAYERLIB = $(PYLIB) PYPLAYERLIB = $(PYLIB)
@@ -403,9 +416,11 @@ ifeq ($(OS),windows)
NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
BINTARGETS = blenderdynamic BINTARGETS = blenderdynamic
BINTARGETS += blenderplayer ifneq ($(FREE_WINDOWS),true)
BINTARGETS += blenderdynplayer BINTARGETS += blenderplayer
BINTARGETS += plugin BINTARGETS += blenderdynplayer
BINTARGETS += plugin
endif
PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
PULIB += $(NAN_ZLIB)/lib/libz.a PULIB += $(NAN_ZLIB)/lib/libz.a
@@ -513,7 +528,9 @@ ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
endif endif
# Windows needs a 8.3 name... Why? Dunno... # Windows needs a 8.3 name... Why? Dunno...
ifeq ($(OS),windows) ifeq ($(OS),windows)
plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT) ifneq ($(FREE_WINDOWS),true)
plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
endif
endif endif
$(DIR)/$(DEBUG_DIR)blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(DIR)/$(DEBUG_DIR)blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)

View File

@@ -48,7 +48,7 @@ struct header{
char fill[HDRSIZE-NAMSIZE-2*sizeof(unsigned int)]; char fill[HDRSIZE-NAMSIZE-2*sizeof(unsigned int)];
}; };
#ifdef WIN32 #if defined(WIN32) && !defined(FREE_WINDOWS)
typedef unsigned int mode_t; typedef unsigned int mode_t;
#endif #endif

View File

@@ -69,7 +69,9 @@
#define S_ISDIR(x) ((x&S_IFMT) == S_IFDIR) #define S_ISDIR(x) ((x&S_IFMT) == S_IFDIR)
#endif #endif
#ifndef FREE_WINDOWS
typedef unsigned int mode_t; typedef unsigned int mode_t;
#endif
struct dirent { struct dirent {
int d_ino; int d_ino;
@@ -91,8 +93,10 @@ typedef struct _DIR {
} DIR; } DIR;
void RegisterBlendExtension(char * str); void RegisterBlendExtension(char * str);
#ifndef FREE_WINDOWS
int strcasecmp (char *s1, char *s2); int strcasecmp (char *s1, char *s2);
int strncasecmp (char *s1, char *s2, int n); int strncasecmp (char *s1, char *s2, int n);
#endif
DIR *opendir (const char *path); DIR *opendir (const char *path);
struct dirent *readdir(DIR *dp); struct dirent *readdir(DIR *dp);
int closedir (DIR *dp); int closedir (DIR *dp);

View File

@@ -36,7 +36,7 @@
#include <config.h> #include <config.h>
#endif #endif
#ifdef WIN32 #if defined(WIN32) && !defined(FREE_WINDOWS)
typedef unsigned __int64 r_uint64; typedef unsigned __int64 r_uint64;
#else #else
typedef unsigned long long r_uint64; 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) { int strcasecmp (char *s1, char *s2) {
char *st1, *st2; char *st1, *st2;
int r; int r;
@@ -174,6 +175,7 @@ int strncasecmp (char *s1, char *s2, int n) {
return r; return r;
} }
#endif
DIR *opendir (const char *path) { DIR *opendir (const char *path) {
if (GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY) { if (GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY) {

View File

@@ -61,6 +61,9 @@
#include "genfile.h" #include "genfile.h"
#ifdef FREE_WINDOWS
typedef long long __int64;
#endif
/* /*
* - please note: no builtin security to detect input of double structs * - 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) static void bh4_from_bh8(BHead *bhead, BHead8 *bhead8, int do_endian_swap)
{ {
BHead4 *bhead4 = (BHead4 *) bhead; BHead4 *bhead4 = (BHead4 *) bhead;
#ifdef WIN32 #if defined(WIN32) && !defined(FREE_WINDOWS)
__int64 old; __int64 old;
#else #else
long long old; 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) static void test_pointer_array(FileData *fd, void **mat)
{ {
#ifdef WIN32 #if defined(WIN32) && !defined(FREE_WINDOWS)
__int64 *lpoin, *lmat; __int64 *lpoin, *lmat;
#else #else
long long *lpoin, *lmat; long long *lpoin, *lmat;

View File

@@ -40,6 +40,10 @@ extern "C" {
#include "BLO_sys_types.h" #include "BLO_sys_types.h"
#ifdef FREE_WINDOWS
typedef int int32_t;
#endif
#define EN_DE_CRYPTHEADERSTRUCTSIZE sizeof(struct BLO_en_de_cryptHeaderStruct) #define EN_DE_CRYPTHEADERSTRUCTSIZE sizeof(struct BLO_en_de_cryptHeaderStruct)
// Tests showed: pubKeyLen 64, cryptedKeyLen 64 bytes // Tests showed: pubKeyLen 64, cryptedKeyLen 64 bytes

View File

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

View File

@@ -70,7 +70,7 @@ typedef struct BHead4 {
# #
typedef struct BHead8 { typedef struct BHead8 {
int code, len; int code, len;
#ifdef WIN32 #if defined(WIN32) && !defined(FREE_WINDOWS)
/* This is a compiler type! */ /* This is a compiler type! */
__int64 old; __int64 old;
#else #else

View File

@@ -54,10 +54,14 @@ ifeq ($(OS),windows)
# _really_ needed, but it is the easiest fix for now. If you have # _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 # some spare time, try to trace down the exact dep. Then again, you
# could also spend that time making the sdna system more robust. # could also spend that time making the sdna system more robust.
WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib ifneq ($(FREE_WINDOWS),true)
WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
WINLIBS += /link /nodefaultlib:libc WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
WINLIBS += /link /nodefaultlib:libc
else
LDFLAGS += -mwindows -mno-cygwin
endif
endif endif
clean:: clean::

View File

@@ -47,7 +47,12 @@
extern "C" { extern "C" {
#endif #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 /* The __intXX are built-in types of the visual complier! So we don't
* need to include anything else here. */ * 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) { } else if (R.r.imtype==R_MOVIE) {
start_movie(); start_movie();
#endif #endif
#ifdef _WIN32 #if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) { } else if (R.r.imtype == R_AVICODEC) {
start_avi_codec(); start_avi_codec();
#endif #endif
@@ -1290,7 +1290,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype == R_MOVIE) { } else if (R.r.imtype == R_MOVIE) {
append_movie((G.scene->r.cfra)); append_movie((G.scene->r.cfra));
#endif #endif
#ifdef _WIN32 #if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) { } else if (R.r.imtype == R_AVICODEC) {
append_avi_codec((G.scene->r.cfra)); append_avi_codec((G.scene->r.cfra));
#endif #endif
@@ -1330,7 +1330,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype==R_MOVIE) { } else if (R.r.imtype==R_MOVIE) {
end_movie(); end_movie();
#endif #endif
#ifdef _WIN32 #if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) { } else if (R.r.imtype == R_AVICODEC) {
end_avi_codec(); end_avi_codec();
#endif #endif

View File

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

View File

@@ -38,6 +38,10 @@
extern "C" { extern "C" {
#endif #endif
#ifdef FREE_WINDOWS
typedef int int32_t;
#endif
#include "BLO_sys_types.h" #include "BLO_sys_types.h"
#define SIGNVERIFYHEADERSTRUCTSIZE sizeof(struct BLO_sign_verify_HeaderStruct) #define SIGNVERIFYHEADERSTRUCTSIZE sizeof(struct BLO_sign_verify_HeaderStruct)

View File

@@ -36,11 +36,16 @@
#pragma warning(disable : 4786) // shut off 255 char limit debug template warning #pragma warning(disable : 4786) // shut off 255 char limit debug template warning
#endif #endif
#include <map>
/* need to be here for conversion purposes */ /* need to be here for conversion purposes */
#ifdef FREE_WINDOWS
#undef HKEY
#endif
#include "mydevice.h" #include "mydevice.h"
#include "SCA_IInputDevice.h" #include "SCA_IInputDevice.h"
#include <map>
/** /**
Base Class for Blender specific inputdevices. Blender specific inputdevices are used when the gameengine is running in embedded mode instead of standalone mode. Base Class for Blender specific inputdevices. Blender specific inputdevices are used when the gameengine is running in embedded mode instead of standalone mode.
*/ */

View File

@@ -38,7 +38,9 @@ DIR = $(OCGDIR)/gameengine/GamePlayer
DIRS = common ghost DIRS = common ghost
ifeq ($(OS),$(findstring $(OS), "freebsd irix windows")) ifeq ($(OS),$(findstring $(OS), "freebsd irix windows"))
DIRS += netscape ifneq ($(FREE_WINDOWS),true)
DIRS += netscape
endif
endif endif
ifeq ($(OS),$(findstring $(OS), "linux")) ifeq ($(OS),$(findstring $(OS), "linux"))

View File

@@ -174,28 +174,47 @@ ifeq ($(OS),solaris)
endif endif
ifeq ($(OS),windows) ifeq ($(OS),windows)
CC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl ifeq ($(FREE_WINDOWS),true)
CCC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl CC = gcc
JAVAC = $(SRCHOME)/tools/cygwin/java_wrapper.pl -c CCC = g++
JAVAH = $(SRCHOME)/tools/cygwin/java_wrapper.pl -h CFLAGS += -pipe -mno-cygwin -mwindows
REL_CFLAGS += /O2 CCFLAGS += -pipe -mno-cygwin -mwindows
REL_CCFLAGS += /O2 -GX CPPFLAGS += -DFREE_WINDOWS
DBG_CFLAGS += /Fd$(DIR)/debug/ #CPPFLAGS += -I/usr/include/mingw
DBG_CCFLAGS += /Fd$(DIR)/debug/ REL_CFLAGS += -O2
CFLAGS += /MT REL_CCFLAGS += -O2
CCFLAGS += /MT #NAN_DEPEND = true
NAN_DEPEND = true #OPENGL_HEADERS = /usr/include/w32api
OPENGL_HEADERS = . OPENGL_HEADERS = ./
CPPFLAGS += -DWIN32 -D_WIN32 -D__WIN32 AR = ar
CPPFLAGS += -D_M_IX86 ARFLAGS = ruv
CPPFLAGS += -I"/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/include" ARFLAGSQUIET = ru
JAVA_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include WINRC = $(wildcard *.rc)
JAVA_SYSTEM_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include/win32 RANLIB = ranlib
CPP = $(SRCHOME)/tools/cygwin/cl_wrapper.pl else
AR = ar CC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl
ARFLAGS = ruv CCC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl
ARFLAGSQUIET = ru JAVAC = $(SRCHOME)/tools/cygwin/java_wrapper.pl -c
WINRC = $(wildcard *.rc) JAVAH = $(SRCHOME)/tools/cygwin/java_wrapper.pl -h
REL_CFLAGS += /O2
REL_CCFLAGS += /O2 -GX
DBG_CFLAGS += /Fd$(DIR)/debug/
DBG_CCFLAGS += /Fd$(DIR)/debug/
CFLAGS += /MT
CCFLAGS += /MT
NAN_DEPEND = true
OPENGL_HEADERS = .
CPPFLAGS += -DWIN32 -D_WIN32 -D__WIN32
CPPFLAGS += -D_M_IX86
CPPFLAGS += -I"/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/include"
JAVA_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include
JAVA_SYSTEM_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include/win32
CPP = $(SRCHOME)/tools/cygwin/cl_wrapper.pl
AR = ar
ARFLAGS = ruv
ARFLAGSQUIET = ru
WINRC = $(wildcard *.rc)
endif
endif endif
ifeq (debug, $(findstring debug, $(MAKECMDGOALS))) ifeq (debug, $(findstring debug, $(MAKECMDGOALS)))
@@ -245,8 +264,15 @@ $(DIR)/$(DEBUG_DIR)%.o: %.cpp
$(CCC) -c $(CCFLAGS) $(CPPFLAGS) $< -o $@ $(CCC) -c $(CCFLAGS) $(CPPFLAGS) $< -o $@
endif endif
#$(DIR)/$(DEBUG_DIR)%.res: %.rc
# $(SRCHOME)/tools/cygwin/cl_wrapper.pl - rc /fo$@ $<
$(DIR)/$(DEBUG_DIR)%.res: %.rc $(DIR)/$(DEBUG_DIR)%.res: %.rc
ifeq ($(FREE_WINDOWS),true)
windres $< -O coff -o $@
else
$(SRCHOME)/tools/cygwin/cl_wrapper.pl - rc /fo$@ $< $(SRCHOME)/tools/cygwin/cl_wrapper.pl - rc /fo$@ $<
endif
$(DIR)/$(DEBUG_DIR)%.class: %.java $(DIR)/$(DEBUG_DIR)%.class: %.java
ifdef JARS ifdef JARS

View File

@@ -74,7 +74,11 @@ all debug::
export NAN_GHOST ?= $(LCGDIR)/ghost export NAN_GHOST ?= $(LCGDIR)/ghost
export NAN_TEST_VERBOSITY ?= 1 export NAN_TEST_VERBOSITY ?= 1
export NAN_BMFONT ?= $(LCGDIR)/bmfont export NAN_BMFONT ?= $(LCGDIR)/bmfont
export NAN_FTGL ?= $(LCGDIR)/ftgl ifeq ($(FREE_WINDOWS), true)
export NAN_FTGL ?= $(LCGDIR)/gcc/ftgl
else
export NAN_FTGL ?= $(LCGDIR)/ftgl
endif
# Platform Dependent settings go below: # Platform Dependent settings go below:
@@ -379,7 +383,17 @@ all debug::
export NAN_PYTHON ?= $(LCGDIR)/python export NAN_PYTHON ?= $(LCGDIR)/python
export NAN_ICONV ?= $(LCGDIR)/iconv export NAN_ICONV ?= $(LCGDIR)/iconv
export NAN_PYTHON_VERSION ?= 2.2 export NAN_PYTHON_VERSION ?= 2.2
export NAN_PYTHON_BINARY ?= python ifeq ($(FREE_WINDOWS), true)
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
export NAN_OPENSSL ?= $(LCGDIR)/gcc/openssl
export NAN_FREETYPE ?= $(LCGDIR)/gcc/freetype
export NAN_ODE ?= $(LCGDIR)/gcc/ode
else
export NAN_PYTHON_BINARY ?= python
export NAN_OPENSSL ?= $(LCGDIR)/openssl
export NAN_FREETYPE ?= $(LCGDIR)/freetype
export NAN_ODE ?= $(LCGDIR)/ode
endif
export NAN_MXTEXTTOOLS ?= $(shell $(NAN_PYTHON_BINARY) -c \ export NAN_MXTEXTTOOLS ?= $(shell $(NAN_PYTHON_BINARY) -c \
'import mx; print mx.__path__[0]')/TextTools/mxTextTools/mxTextTools.so 'import mx; print mx.__path__[0]')/TextTools/mxTextTools/mxTextTools.so
export NAN_OPENAL ?= $(LCGDIR)/openal export NAN_OPENAL ?= $(LCGDIR)/openal
@@ -387,13 +401,10 @@ all debug::
export NAN_JPEG ?= $(LCGDIR)/jpeg export NAN_JPEG ?= $(LCGDIR)/jpeg
export NAN_PNG ?= $(LCGDIR)/png export NAN_PNG ?= $(LCGDIR)/png
export NAN_SDL ?= $(LCGDIR)/sdl export NAN_SDL ?= $(LCGDIR)/sdl
export NAN_ODE ?= $(LCGDIR)/ode
export NAN_OPENSSL ?= $(LCGDIR)/openssl
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr/src/Mesa-3.1 export NAN_MESA ?= /usr/src/Mesa-3.1
export NAN_ZLIB ?= $(LCGDIR)/zlib export NAN_ZLIB ?= $(LCGDIR)/zlib
export NAN_NSPR ?= $(LCGDIR)/nspr export NAN_NSPR ?= $(LCGDIR)/nspr
export NAN_FREETYPE ?= $(LCGDIR)/freetype
export NAN_GETTEXT ?= $(LCGDIR)/gettext export NAN_GETTEXT ?= $(LCGDIR)/gettext
# Uncomment the following line to use Mozilla inplace of netscape # Uncomment the following line to use Mozilla inplace of netscape
@@ -403,7 +414,7 @@ all debug::
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/ export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
# Will fall back to look in NAN_MOZILLA_INC/nspr and NAN_MOZILLA_LIB # Will fall back to look in NAN_MOZILLA_INC/nspr and NAN_MOZILLA_LIB
# if this is not set. # if this is not set.
export NAN_PYTHON_BINARY ?= python
export NAN_BUILDINFO ?= true export NAN_BUILDINFO ?= true
# Be paranoid regarding library creation (do not update archives) # Be paranoid regarding library creation (do not update archives)
export NAN_PARANOID ?= true export NAN_PARANOID ?= true
@@ -421,7 +432,7 @@ all debug::
export NAN_PYTHON ?= $(LCGDIR)/python export NAN_PYTHON ?= $(LCGDIR)/python
export NAN_PYTHON_VERSION ?= 2.0 export NAN_PYTHON_VERSION ?= 2.0
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION) export NAN_PYTHON_BINARY ?= python
export NAN_MXTEXTTOOLS ?= $(shell $(NAN_PYTHON_BINARY) -c \ export NAN_MXTEXTTOOLS ?= $(shell $(NAN_PYTHON_BINARY) -c \
'import mx; print mx.__path__[0]')/TextTools/mxTextTools/mxTextTools.so 'import mx; print mx.__path__[0]')/TextTools/mxTextTools/mxTextTools.so
export NAN_OPENAL ?= $(LCGDIR)/openal export NAN_OPENAL ?= $(LCGDIR)/openal

View File

@@ -59,7 +59,7 @@ ifeq ($(OS),darwin)
LLIBS += -lGLU -lGL LLIBS += -lGLU -lGL
LLIBS += -lz -framework Carbon -framework AGL LLIBS += -lz -framework Carbon -framework AGL
ifeq ($(WITH_QUICKTIME), true) ifeq ($(WITH_QUICKTIME), true)
LLIBS += -framework QuickTime LLIBS += -framework QuickTime
endif endif
LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
DBG_LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries DBG_LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
@@ -124,19 +124,26 @@ endif
ifeq ($(OS),windows) ifeq ($(OS),windows)
EXT = .exe EXT = .exe
SOEXT = .dll SOEXT = .dll
DADD = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib ifeq ($(FREE_WINDOWS),true)
DADD += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib MINGWLIB = /usr/lib/w32api
DADD += vfw32.lib winmm.lib opengl32.lib glu32.lib largeint.lib dxguid.lib LDFLAGS += -mwindows -mno-cygwin -mconsole
DADD += libcmt.lib DADD += -L/usr/lib/w32api -lnetapi32 -lopengl32 -lglu32
LOPTS = /link DADD += -L/usr/lib/w32api
LOPTS += /NODEFAULTLIB:"libc" else
LOPTS += /NODEFAULTLIB:"libcd" DADD = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
LOPTS += /NODEFAULTLIB:"libcp" DADD += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
LOPTS += /NODEFAULTLIB:"libcpd" DADD += vfw32.lib winmm.lib opengl32.lib glu32.lib largeint.lib dxguid.lib
LOPTS += /NODEFAULTLIB:"python20" DADD += libcmt.lib
LOPTS += /NODEFAULTLIB:"msvcrt" LOPTS = /link
LOPTS += /SUBSYSTEM:CONSOLE LOPTS += /NODEFAULTLIB:"libc"
LDFLAGS += /MT LOPTS += /NODEFAULTLIB:"libcd"
DYNLDFLAGS = /LD LOPTS += /NODEFAULTLIB:"libcp"
LOPTS += /NODEFAULTLIB:"libcpd"
LOPTS += /NODEFAULTLIB:"python20"
LOPTS += /NODEFAULTLIB:"msvcrt"
LOPTS += /SUBSYSTEM:CONSOLE
LDFLAGS += /MT
DYNLDFLAGS = /LD
endif
endif endif