[Bf-committers] New supported platform

Yomgui yomgui1 at gmail.com
Tue Sep 6 15:36:24 CEST 2005


Hello the Blender team,

I'm writting here to bring the information about a new supported platform:
I've finished the port of Blender-2.37a for MorphOS, a well know
Power-PPC Operating System.

(googlization if you want more information :-))

Recently, the MorphOS team have released  3D drivers and an OpenGL
compatible library.
So, I've released my blender port too, you can see everything about
that on my personal web site:

http://yellowblue.nerim.net/

Note: the main page talks about my port of Python-2.4, click on the
blender item on left.

Sources are availables too (GPL) but now I want merge my version with
your, to obtain an official archive.
But before to do that, I must say many things about my port:

1) Blender uses makefile and scons for the build management. But...
  * makefiles are really bad for an easy maintain.
  * scons is not ported on MorphOS

For the second point I've tried to port it, but fail because (I've
discuted about that with the scons team) scons is really designed to
be POSIX with paths.
For the first point... after playing with scons on unix and see what
it could be done with python, I can't see a makefile anymore :)

So... to accelerate my port I've written some scons-like scripts in
python and there is only 1 scripts to compile everything for MorphOS
in blender sources tree (in the root directory, named 'makeall.py').
It's a poor script, but very efficient! and it uses my 'Boa' (temp.
name) python module (given with my python - 2.4 port).

2) MorphOS, as Window, is a non-Unix platform, but support in some
ways POSIX path (not in native, but the shell does the translation).

To handle this, I've coded 2 news functions in blenlib:

BLI_NativeToPosix() and BLI_PosixToNative()

The purpose of this functions is to convert a native path into a POSIX
path. each platform should make a port of these functions, and only
that, to have a file path support.
But in this case, everywhere in blender sources, the rules is to say:
"Blender must use POSIX file paths and when a path should be given to
an external lib or used by the system, it must be passed throught this
functions". This rule applies to Python too (external lib case).

In future (blender 3 ?) I propose this: have an OSAL (Operating System
Abstraction Layer) to not have to handle in every source code path
convertions or I/O operations (like this question: "is opendir()
existing on my XXX platform?", etc...)

In this osal we found my previous convertion functions, but such thing
like to read/write files, know information about files (complex stat()
support), and everything that would be founded linked to the OS (or a
'DOS').

This method is a particular benefit to eliminate all dedicated code
for one platform or another  one... and eliminate all #ifdef WIN32 or
#ifdef __APPLE__ that complexify the source code readability.

My last notes: I don't know if such thing are in progress for next
versions of Blender, but if we want to simplify the code and support
all platform possible, we should do that! ;-)

Sincerly yours,
Guillaume ROGUEZ (aka Yomgui on the web ;-)).


More information about the Bf-committers mailing list