diff options
author | Chris Want <cwant@ualberta.ca> | 2003-05-25 00:04:37 +0400 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2003-05-25 00:04:37 +0400 |
commit | 924a8497551be7d83bb577e94ebf89b18374b874 (patch) | |
tree | 5912852343da88dcc863a56ab641e60983a5432b /intern | |
parent | 94c4250d9f7ca57d9af7a7265fcdec0b4e94e5b3 (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 'intern')
-rw-r--r-- | intern/SoundSystem/SND_DependKludge.h | 2 | ||||
-rw-r--r-- | intern/ghost/GHOST_Types.h | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_DisplayManagerWin32.cpp | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 7 | ||||
-rw-r--r-- | intern/keymaker/Makefile | 8 | ||||
-rw-r--r-- | intern/python/freeze/Makefile | 12 | ||||
-rw-r--r-- | intern/python/freeze/makemakefile.py | 14 |
7 files changed, 37 insertions, 10 deletions
diff --git a/intern/SoundSystem/SND_DependKludge.h b/intern/SoundSystem/SND_DependKludge.h index e924df5889b..df30f46b582 100644 --- a/intern/SoundSystem/SND_DependKludge.h +++ b/intern/SoundSystem/SND_DependKludge.h @@ -34,7 +34,7 @@ * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ -#if defined (_WIN32) +# if defined (_WIN32) && !defined(FREE_WINDOWS) #define USE_OPENAL #elif defined (__linux__) # if defined (__i386__) diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index a7c89c7e0a6..f4649a9574b 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -39,7 +39,7 @@ typedef unsigned short GHOST_TUns16; typedef int GHOST_TInt32; typedef unsigned int GHOST_TUns32; -#ifdef WIN32 +#if defined(WIN32) && !defined(FREE_WINDOWS) typedef __int64 GHOST_TInt64; typedef unsigned __int64 GHOST_TUns64; #else diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp index 0e5e82f1f11..3fbacfb1db8 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp +++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp @@ -47,7 +47,9 @@ // We do not support multiple monitors at the moment #include <windows.h> #define COMPILE_MULTIMON_STUBS +#ifndef FREE_WINDOWS #include <multimon.h> +#endif GHOST_DisplayManagerWin32::GHOST_DisplayManagerWin32(void) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 3d9943a5c8c..d1242198d4e 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -317,7 +317,11 @@ GHOST_TSuccess GHOST_SystemWin32::init() wc.cbClsExtra= 0; wc.cbWndExtra= 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) { ::LoadIcon(NULL, IDI_APPLICATION); } @@ -466,6 +470,7 @@ GHOST_EventCursor* GHOST_SystemWin32::processCursorEvent(GHOST_TEventType type, { GHOST_TInt32 x, y; getSystem()->getCursorPosition(x, y); + printf("%d %d\n",x,y); return new GHOST_EventCursor (getSystem()->getMilliSeconds(), type, window, x, y); } diff --git a/intern/keymaker/Makefile b/intern/keymaker/Makefile index 038dd85fc7e..703482a851b 100644 --- a/intern/keymaker/Makefile +++ b/intern/keymaker/Makefile @@ -51,8 +51,12 @@ LOADER_OBJS = $(DIR)/$(DEBUG_DIR)keyloader.o ifneq ($(OS),windows) LIBS = $(NAN_OPENSSL)/lib/libcrypto.a else - LIBS = $(NAN_OPENSSL)/lib/libeay32.lib - LIBS += advapi32.lib gdi32.lib + ifeq ($(FREE_WINDOWS),true) + LIBS = $(NAN_OPENSSL)/lib/libcrypto.a + else + LIBS = $(NAN_OPENSSL)/lib/libeay32.lib + LIBS += advapi32.lib gdi32.lib + endif endif all debug:: link diff --git a/intern/python/freeze/Makefile b/intern/python/freeze/Makefile index a9e363cb687..893f6493a11 100644 --- a/intern/python/freeze/Makefile +++ b/intern/python/freeze/Makefile @@ -8,6 +8,10 @@ SRCDIR = ../modules TARGETDIR = $(OCGDIR)/blender/bpython/frozen +ifeq ($(FREE_WINDOWS),true) + export NAN_PYTHON_BINARY = python +endif + PYFLAGS=-S -O default: importer @@ -18,7 +22,15 @@ all debug: default install: 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) +endif $(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) diff --git a/intern/python/freeze/makemakefile.py b/intern/python/freeze/makemakefile.py index 0e97ad81147..c13689304b7 100644 --- a/intern/python/freeze/makemakefile.py +++ b/intern/python/freeze/makemakefile.py @@ -25,11 +25,15 @@ def makemakefile(outfp, makevars, files, target): for key in keys: outfp.write("%s=%s\n" % (key, makevars[key])) - outfp.write("\n\ninclude nan_definitions.mk\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("endif\n") + outfp.write("\n\ninclude nan_definitions.mk\n") + outfp.write("ifeq ($(OS),windows)\n") + outfp.write(" CFLAGS=-I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) $(OPT)\n") + outfp.write(" ifneq ($(FREE_WINDOWS),true)\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) |