Blender-bf on windows with MSVC 6 and Python 2.22
Hey guys,
I just got the current Blender-bf to compile, by following:
http://www.cise.ufl.edu/~fishwick/blender/make.txt
I still ran into some difficulties though, and the people in #BlenderSauce helped me out with those, anyways here is what I found out today:
- Get Sp5 for visual studio at:
http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.asp
or for a direct link to the english version:
http://download.microsoft.com/download/vstudio60ent/SP5/Wideband-Full/WIN98Me/EN-US/vs6sp5.exe
- Don't get the daily-checkout tarballs, instead really pull the modules from the cvs, since somehow the tarballing messes the project files up.
- Be sure to not only checkout the module 'blender' but also check out the module 'lib'
- The following part in the original make.txt can be ignored, that is fixed in the current version:
| make.txt wrote: |
IMPORTANT: you must now remove a file area and replace it, otherwise the python code will
not build correctly:
4.1: Go to the left window, Press FileView, and locate "BPY_Frozen files". Highlight this
single item, and then Edit->Delete.
4.2: Go to Project->Add to Project->Files and then steer toward the following directory:
C:\blender\source\blender\bpython\frozen, and select all of the C files in that directory |
- if you try to compile and get an error that you can't include movies.h download:
ftp://ftp.apple.com/developer/Development_Kits/QT6SDK_Win.hqx
use stuffit to expand it, and place it inthe lib/windows directory.
You will then also need to add the following include and library paths to visual c:
lib\windows\QT6 SDK (Win)\Interfaces & Libraries\QTDevWin\CIncludes
lib\windows\QT6 SDK (Win)\Interfaces & Libraries\QTDevWin\Libraries
- When linking if you get the error:
LINK : fatal error LNK1181: cannot open input file "freetype214ST.lib"
then you need to link with freetype213ST.lib instead:
Project->Settings-> then click on the link tab, find freetype214ST.lib and change it to freetype213ST.lib
- if you get any other strange errors try regetting the modules from the cvs, it may be that someone was just updating them when you were downloading them the first time.
With this blender compiled and linked like a charm and I got myself a nice Blender 2.27 Binary in blender\bin
Greetings,
Timothy
p.s. if you experience any strange errors,.. and end up fixing them,.. be sure to post it here aswell!!!!!
(Was originally going to post this under a new topic, then saw this sticky. Consolidation is a good thing.)
Introduction: I recently managed (with almost no hiccups) to get the Tuhopuu CVS code compiled and running under FreeBSD 4.8.
Since the Downloads section has the FreeBSD version of Blender 2.8 listed as "Soon", I suspect there's other FreeBSD users out there who might like to try the same thing, but have been put off by the possible complexity of such a task. As I'm something of a neophyte myself, I've decided to write up How To Do It, because it's really not that hard at all. This is therefore mainly aimed at coding novices, so apologies if it's overly simplistic for you.
Preparation: First, of course, you're going to need to grab the Tuhopuu CVS sources. Create and enter the directory you want to work from (in my case, it's ~/Working/Blender/Tuhopuu/), and then follow the
instructions for Anonymous CVS Access.
If you get an error about a missing or incorrect
.cvspass file, you'll need to create one in your home directory and set the correct permissions.
Since there's only one module in the
CVS Repository, the
modulename we want is "blender".
So, our steps up to this point will look something like this:
% mkdirhier ~/Working/Blender/Tuhopuu; cd ~/Working/Blender/Tuhopuu
Create and move into directory we'll be working from
% ls ~/.cvspass
ls: /home/me/.cvspass: No such file or directory
% touch ~/.cvspass
% chmod 600 ~/.cvspass
Check for the existence of a .cvspass file - if it's not there, create it and set permissions
% cvs -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu login
% cvs -z3 -d:pserver:anonymous@cvs.blender.org:/cvsroot/tuhopuu co blender
Checkout the CVS code as per the project page instructions
Well, that's going to take a while (depending on your connection, of course - sodding dialup) .
Whilst it's going, you can spend some profitable time checking to see if you've got all the necessary ports installed- the essential ones are as follows:
graphics/Mesa3
graphics/jpeg
graphics/png
audio/openal
lang/python
print/freetype
security/openssl
To check if you've got these, use
pkg_info as follows:
% pkg_info|grep -i mesa
Mesa-3.4.2_2 A graphics library similar to SGI's OpenGL
Since they're all pretty popular as dependancies, you'll probably have most if not all of them already. If you're missing any, I'm assuming you know what to do (aren't ports wonderful?).
Compilation: Now, once the Tuhopuu CVS code has finished downloading, it's time to get it ready to compile. This is
really hard - it took me at least a minute.
Go into the
blender directory, and edit the Makefile there. For simple tasks like this, I tend to use FreeBSD's builtin
ee editor.
% pwd
/home/me/Working/Blender/Tuhopuu
% cd blender
% ee Makefile
The first thing we have to change is the assumption that the
make on our system is gnumake: Find the line
export GMAKE ?= make
and change it to
export GMAKE ?= gmake
Next, we'll disable the ketsji to speed things up - that's the new game engine, and if you're using this guide, you almost certainly don't want it. A few lines up from the line about GMAKE you'll find
# Not working on the ketsji? Why spend time compiling it?
# export NO_KETSJI=true
Change that second line to
export NO_KETSJI=true
Now, the last thing we need to do is correct the Makefile about where to look for all those include files and such. Most Linux systems have everything directly under
/usr, but FreeBSD uses
/usr/local. Find the following lines
export NAN_MESA ?= /usr
export NAN_OPENSSL ?= /usr
export NAN_PYTHON_VERSION ?= 2.2
export NAN_PYTHON ?= /usr/
export NAN_OPENAL ?= /usr/
export NAN_JPEG ?= /usr/
export NAN_PNG ?= /usr/
export NAN_ZLIB ?= /usr/
export NAN_FREETYPE ?= /usr/
and add a
local to the lines that need it, thus:
export NAN_MESA ?= /usr
export NAN_OPENSSL ?= /usr/local
export NAN_PYTHON_VERSION ?= 2.2
export NAN_PYTHON ?= /usr/local
export NAN_OPENAL ?= /usr/local
export NAN_JPEG ?= /usr/local
export NAN_PNG ?= /usr/local
export NAN_ZLIB ?= /usr/local
export NAN_FREETYPE ?= /usr/local
NAN_MESA shouldn't need to be altered, as Mesa installs in
/usr/X11R6, just like on a Linux system.
Save the Makefile, and exit to the command line.
Hopefully, everything should now be ready. Type
gmake (
not make!) and sit back and wait.
Eventually, if nothing goes wrong, compiling should finish something like this:
...
/bin/rm /usr/home/me/Work/Blender/Tuhopuu/blender/obj//freebsd-4.8-i386/debug/buildinfo.o
****> Build 11:29:51 31-Jul-2003 - 11:31:27 31-Jul-2003
NAN_PYTHON_VERSION=2.2
gmake[2]: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender/source'
gmake[1]: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender/source'
gmake: Leaving directory `/usr/home/me/Work/Blender/Tuhopuu/blender'
%
The compiled executable should be located at
blender/obj/freebsd-4.8-i386/debug/blenderdynamic
Launch it with the dot execute shortcut, cross your fingers, and have fun!
% ./blender/obj/freebsd-4.8-i386/debug/blenderdynamic
Well, that's how I got it running. I doubt I'll be able to help much if people run into problems with this, but hopefully someone with a bit more savvy can jump in if needed.
Incidentally,
bf-blender is even easier - there's a shellscript in the main directory specifically for FreeBSD compilation.
Good luck, and happy BSD Blending!
ÐÆ
thornae:
Thank you!!
I have been waiting and waiting and still there's no 2.28 for FBSD. Now I can at least compile Tuhopuu when I get desperate enough
The link for the tips on compiling with mingw does not work. I would like any info on how to compiler Blender with devc++/mingw. Thanks
Is there some help out for BeOs/Zeta as well?
Visual C++ 2003 does not have a iostream.h header, thus
in the files:
source\gameengine\GameLogic\SCA_KeyboardManager.cpp
source\gameengine\GameLogic\SCA_IInputDevice.cpp
change the
| Code: |
#include <iostream.h>
|
to
| Code: |
#if _MSC_VER >= 1300
#include <iostream>
using namespace std;
#else
#include <iostream.h>
#endif
|