[GRASS5] cygwin/windows port

Hi,

i did some more experimentation with the cygwin build of grass and want
to tell my findings here.

As i told, i can now compile the whole GRASS 5.0beta9 tree on cygwin
without any problems. Thanks to John Huddleston for his great work.
But i still believe that the cygwin "port" is not ready for a broader
audience, as graphics output is still not usable.

I see the follwing roads to follow for a complete port with graphics
output:

- compile the source as it is under cygwin, including the XDRIVER for
graphics and install the Cygwin port of X11R6.4. This has the problem
that you use grass from an X Window server on Windows, which is
unfamiliar to windows users. And the X11R6.4 port is beta only,
complicated to install and crashes sometimes. And i haven't seen a
tcl/tk port for X Window under Windows yet. So tcltkgrass does not work
right now. Only commandline/XDRIVER.

- compile under cygwin, create a new windows graphics DRIVER, use
tcltkgrass with the Windows-wish (cygwish).
I can start tcltkgrass with the cygwish with some modifications. This
would not require to install the X11 system and would run in the windows
graphics, which is a big advantage (familiar usage).
Writing a graphics driver for windows should not be too complicated for
a windows programmer (i can assist as i already wrote a new driver for
GRASS). But i don't know if it is possible to compile this driver
without MS Visual C++. The headers and API is there, e. g. the cygwish
port uses this setup.

A third alternative would be to use the parts from the old tcltkgrass
(compiled into a custom wish) for graphics output. But this is not
feasible, as it would require adapting the old code to the new GRASS 5.0
API and re-writing most of tcltkgrass for windows compatibility.

The main problem is that tcltkgrass contains much unix dependend code
(e. g. xwininfo, /dev/null, redirection, usage of ps and kill, etc.), so
that in any case modification of tcltkgrass is needed. And i don't think
that it is wise to split tcltkgrass into an unix and a windows port.

I will not do any further work on this. If you want to use GRASS for
server side work or only need some isolated functionality, this is ready
for Windows. But not a real GIS product with GUI.
If some Windows-expirienced people will pick this up i'll help. If
someone is willing to sponsor the development, it would be possible to
do this too.

I think that we should learn from the Mac OS X port and not announce
something that rizes expectations we can not meet (see the discussion on
the Mac OS X list!). GRASS is scientific software and should not be
compared to commercial software.

Andreas

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Andreas.

without any problems.

There are still autoconfig problems

- Needs to choose "bison -y" instead of "yacc".

- Doesn't find openGL libraries.

Thanks to John Huddleston for his great work.

Yes!

- compile the source as it is under cygwin, including the XDRIVER for
graphics and install the Cygwin port of X11R6.4. This has the problem
that you use grass from an X Window server on Windows, which is
unfamiliar to windows users. And the X11R6.4 port is beta only,
complicated to install and crashes sometimes. And i haven't seen a
tcl/tk port for X Window under Windows yet. So tcltkgrass does not work
right now. Only commandline/XDRIVER.

Is there a fifo implementation yet? My understanding is that none of this
will work without it.

- compile under cygwin, create a new windows graphics DRIVER, use
tcltkgrass with the Windows-wish (cygwish).
I can start tcltkgrass with the cygwish with some modifications. This
would not require to install the X11 system and would run in the windows
graphics, which is a big advantage (familiar usage).
Writing a graphics driver for windows should not be too complicated for
a windows programmer (i can assist as i already wrote a new driver for
GRASS). But i don't know if it is possible to compile this driver
without MS Visual C++. The headers and API is there, e. g. the cygwish
port uses this setup.

As you say, Cygwin has Windows API headers. I'm not sure what the driver
would need that you would need MSVC++ for. There is also the mingw compiler
(gcc without Cygwin).

If the fifo problem is not an issue, please tell me what to do to make a
driver, and I will think about building one. I am unsure of how much time I
will have over the next two months, but I can at least work out what is
required.

Cheers

Mike Thomas.

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Mike and Andreas, (Grass list)

I've done the tcl/tk builds for Cygwin before so let me know what
I can upload to Markus' server.

No fifo yet; however, others in Cygwin are working on it. I was in
touch with Corinna over this topic. She left it in my lap and I am
finishing up my research for school so I have not had the time to
complete that code. Do you want me to dig up the references
she sent me?

John Huddleston

----- Original Message -----
From: "Mike Thomas" <mthomas@gil.com.au>
To: "grass5" <grass5@geog.uni-hannover.de>
Sent: Sunday, December 03, 2000 1:48 PM
Subject: Re: [GRASS5] cygwin/windows port

<snip>

Is there a fifo implementation yet? My understanding is that none of this
will work without it.

>
> - compile under cygwin, create a new windows graphics DRIVER, use
> tcltkgrass with the Windows-wish (cygwish).
> I can start tcltkgrass with the cygwish with some modifications. This
> would not require to install the X11 system and would run in the windows
> graphics, which is a big advantage (familiar usage).
> Writing a graphics driver for windows should not be too complicated for
> a windows programmer (i can assist as i already wrote a new driver for
> GRASS). But i don't know if it is possible to compile this driver
> without MS Visual C++. The headers and API is there, e. g. the cygwish
> port uses this setup.

As you say, Cygwin has Windows API headers. I'm not sure what the driver
would need that you would need MSVC++ for. There is also the mingw compiler
(gcc without Cygwin).

If the fifo problem is not an issue, please tell me what to do to make a
driver, and I will think about building one. I am unsure of how much time I
will have over the next two months, but I can at least work out what is
required.

Cheers

Mike Thomas.

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Mike,

Mike Thomas wrote:

Hi Andreas.

> without any problems.

There are still autoconfig problems

- Needs to choose "bison -y" instead of "yacc".

Yes, i missed that because i have a softlink from bison to yacc.

- Doesn't find openGL libraries.

This is true too, but the openGL libraries are needed only for the 3d
raster modules and NVIZ 2.2. Both will not compile out of the box on
windows, because togl and other parts need to be ported to windows and
the openGL libraries on Windows are IMHO DLLs from MS, that must be
linked dynamically. I am not sure which library/code parts are X11
specific in both 3d and NVIZ.

>Thanks to John Huddleston for his great work.

Yes!

> - compile the source as it is under cygwin, including the XDRIVER for
> graphics and install the Cygwin port of X11R6.4. This has the problem
> that you use grass from an X Window server on Windows, which is
> unfamiliar to windows users. And the X11R6.4 port is beta only,
> complicated to install and crashes sometimes. And i haven't seen a
> tcl/tk port for X Window under Windows yet. So tcltkgrass does not work
> right now. Only commandline/XDRIVER.

Is there a fifo implementation yet? My understanding is that none of this
will work without it.

See my other mail.

>
> - compile under cygwin, create a new windows graphics DRIVER, use
> tcltkgrass with the Windows-wish (cygwish).
> I can start tcltkgrass with the cygwish with some modifications. This
> would not require to install the X11 system and would run in the windows
> graphics, which is a big advantage (familiar usage).
> Writing a graphics driver for windows should not be too complicated for
> a windows programmer (i can assist as i already wrote a new driver for
> GRASS). But i don't know if it is possible to compile this driver
> without MS Visual C++. The headers and API is there, e. g. the cygwish
> port uses this setup.

As you say, Cygwin has Windows API headers. I'm not sure what the driver
would need that you would need MSVC++ for. There is also the mingw compiler
(gcc without Cygwin).

If the fifo problem is not an issue, please tell me what to do to make a
driver, and I will think about building one. I am unsure of how much time I
will have over the next two months, but I can at least work out what is
required.

see other mail too.

Andreas

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi John, Hi Mike,

I fear we are talking at cross purposes here. I hope i can clarify this
a little bit.

I started merging the IPC message queue code into the XDRIVER and
CELL/HTMLMAP code, so that it is possible to change between the FIFO and
IPC setup by compiler switch (not ready yet). The IPC message queues
basically work (at least on Linux/IRIX), so that i think this is an
option on MS windows.
It was my understanding that Markus Neteler asked Huidae Cho mainly for
the windows port to integrate the code for the IPC message queues into
the XDRIVER.

If there will be a FIFO setup on Windows (if you have details, please
tell me the URL), this will not work with Win95/Win98 (I don't know
about ME).

Is there already a tcl/tk wish on cygwin, that runs from within the
cygwin tools and uses X11 for windowing? This would be required to use
tcltkgrass on Windows in the X11 setup. But the tcltkgrass code needs to
be changed, because there are still some things missing in the cygwin
tools (e. g. i encountered an error with missing /dev/null, i fear that
the ps/kill is not fully compatible etc.).

The other option would be to write a windows specific DRIVER and modify
tcltkgrass to work with the cygwish shell (windowing with MS win).
Writing this driver would need:
- color table management,
- adapting the mouse support,
- some sort of event processing with MS win,
- start up / shutting down specific code, reading/writing from IPC
message queues,
- adapting the drawing primitives from src/display/devices/GENERIC resp.
src/display/devices/XDRIVER/XDRIVER24 .

I can't say how much work this would be. It should be possible use the
bits and pieces already there to hack something. I already wrote a new
driver with the g2 library (from sourceforge), but this has no mouse
support (no support in the library).

Mike, if you have the time, please look at src/display/devices/GENERIC
and HTMLMAP for a start. There are some instructions in the GENERIC code
for building a new driver, the windowing specific (mouse support, color
table management etc.) could be stripped out of the XDRIVER
code/library.

Please contact me if you have questions or if i should send you the g2
driver code.

cu,

Andreas

John Huddleston wrote:

Mike and Andreas, (Grass list)

I've done the tcl/tk builds for Cygwin before so let me know what
I can upload to Markus' server.

No fifo yet; however, others in Cygwin are working on it. I was in
touch with Corinna over this topic. She left it in my lap and I am
finishing up my research for school so I have not had the time to
complete that code. Do you want me to dig up the references
she sent me?

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'