1. Re: Portability

Everett Williams wrote:

> If a portable GUI interface could be chosen or written,
> then the non-game programmers among us could hope to write
> portable programs without re-inventing the wheel each time.
> A portable language without portable programs is at best a
> non-sequiter.

I would have preferred that Robert included a cross-platform GUI with
Euphoria, but I think we can safely assume that's not going to happen - if
you want to access the OS or a library, it'll be done though a DLL. I don't
think that the BeOS or Mac support DLLs, but that's a worry for later. I've
seen some DOS DLLs floating around, but I don't know how standard they are.
It might be a nice thing to have.

Picking a cross-platform library that will work for Euphoria is a bit
problematic:

1. Most toolkits are written for the C++ programmer. For example, Zinc is
one of the few truly portable cross-platform libraries: they even have DOS
support. But it's a C++ class library system. It is possible to wrap a C++
library in a DLL, but it's a lot more work.

2. Most toolkits don't extend to all platforms. For example, Qt is an
excellent library, but only runs on Win32 and *nix. Most typically, DOS,
Macintosh, OS/2 and BeOS are not included.

3. Most toolkits cost a good chunk of cash. I suspect that the profit
margins on Euphoria just don't support shelling out that kind of money.


So if you wanted to choose a toolkit, it would pretty much have to be free
and C based. That's pretty limiting. Your other option would be to 'roll
your own'. Issues include:

1. Designing a platform neutral API.
2. Resolving OS differences - slashes vs. backslashes in paths, for example.
3. Emulating controls not available on both platforms.
4. Maintaining each release as the platforms change
5. Keeping the library acceptably fast.

Even then, people will demand to be able to write in native mode (for speed,
or access to some feature you don't provide), and the resulting application
is not portable as a result.

The other reality is that Windows is by far and away the dominant platform,
and there is not seem to be that much demand for portabilty. And under
Linux, I can get most Euphoria programs written in Win32Lib working under
WINE.

Here's my impressions about some free cross platform libraries that are
available. Note that the best (wxWindows and V) are both C++ libraries. For
a more complete list, you can take a look at


What's already been tried:

[ GraphApp http://www.cs.usyd.edu.au/~loki/graphapp/ ]

Windows, Macintosh, Motif and Athena versions available; Java in the
pre-alpha. Irv Mullins is currently working on porting it to Euphoria, and
has some nice demos running. The Athena stuff seems to run fairly well, and
the required DLL is nice and small.

Down side: Lightweight, not clear that the 16 bit Windows code could ever be
put into a DLL.


[ GTK http://www.gtk.org/ ]

Windows and Win32 port available. BeOS port in progress. I've wrapped some
of the routines for Llama/Gtk, it runs (sort of) under Linux, but there's a
lot of work left to do.

Down side: The Win32 DLLs are about 2 meg (there are 4 of them). Win32
version of beta quality, has own look and feel that Windows users would
probably balk at.


A few other top contenders, not yet (to my knowledge) tried in Euphoria. I
once tried wrapping wxWindows, but by C++ skills are non-existant, and
plowing through the huge API put me to sleep. Anyone want to give one of
these a shot?


[ wxWindows http://web.ukonline.co.uk/julian.smart/wxwin/ (site currently
down) ]

X Windows (GTK), Mac, Windows and more. Huge API, C++ framework. Lots of
users, more popular than V. Port to SciTech MGL in the works. Even has an
cross-platform HTML widget.

Down side: Standard C++ disclaimer, large API.


[ V http://www.objectcentral.com/ ]

C++ library supporting X (Athena, Motif/Lesstif and GTK), Windows and OS/2.
Mac version rumored. Does not require creating resource files, which is
nice.

Down side: Standard C++ disclaimer. Not as huge, complex, or comprehensive
as wxWindows.


[MGUI http://volftp.tin.it/italiani/MORELLO/index_e.htm ]

C++ framework. Supports Windows 3.1/95, X Windows and DOS. More lightweight
than wxWindows or V, and apparently written by a single coder.

Down side: C++ framework. Has own look and feel.



[ SciTech MGL http://www.scitechsoft.com/download.html ]

For Windows, MS-DOS, Linux, OS/2 and QNX. Provides fast, low level
rasterization of 2D and 3D primitives that can be used for creating computer
games, user interface software and other real-time graphics applications.
This would be

Down side: Runs in full screen mode, last time I looked. Seemed a bit large.
Pre-compiled DLLs not available Reading the licence (it's changed since it
first came out) gives me a headache.



[ JUGL http://www.planet.net/pjoshv/jugl.html ]

For writing portable real-time games on Linux, DOS and Win32. Provides
hardware and operating system independent methods to select video modes,
page-flip, mix sound effects, read proportional and digital controllers and
create opengl contexts. More lightweight than SciTech MGL, but the demo is
impressive.

Down side: Doesn't provide GUI elements, just a single window.


-- David Cuny

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu