Hey,
On Monday, November 12, 2012 6:57:28 PM UTC+1, VZ wrote:
On Mon, 12 Nov 2012 05:44:14 -0800 (PST) Andreas Stenmark wrote:
AS> anything useful, I've just verified that it builds. At some point I'd like
AS> to merge the modifications with trunk and submit a basic port for
AS> consideration. My first question is at what point this would make sense?
If the modifications are relatively small, this could be done soon and
before 3.0. For anything more involved I'd like to wait until this port
becomes at least somewhat useful if possible.
So far they are trivial, essentially adding another platform symbol and checking for it mostly in spots where there is already conditional compilation for other platforms. Adding new platform directories under include and src with some content is also clearly necessary but doesn't seem intrusive. Whether or not it will stop at that -- I can't say at the moment. From my perspective, the main utility of having the port integrated is when others can review the changes and give meaningful feedback -- I'm certainly not at that point yet. I'll start working on the port privately for now, and see where it leads.
What would you consider somewhat useful? Can a port embryo be somewhat useful before it has a GUI?
AS> My second question would be regarding the basic approach to the port.
AS> AmigaOS isn't really POSIX, but providing a basic POSIX glue layer is
AS> simple enough. A bsd socket layer is also straightforward. GUI/graphics
AS> stuff would mostly need to be native, though going via wxUniv might make
AS> the path easier.
Unfortunately wxUniv is not in a great shape on its own, but, still, using
it at least initially should be indeed easier. And if you can fix some of
the problems in wxUniv while working on this port, it would certainly be
very welcome.
This is certainly possible. My main concern at the moment is finding a reasonable starting direction, and drawing on the experience of others. If going via wxUniv is likely to be more useful than not, then that's what I'll do. If it's in such bad shape that I'm just creating trouble for myself, then I'd prefer to know now. I did a test build of wxUniv for... MSW or GTK, I can't actually remember which (which is actually pretty cool, and proves to me that wx works!). But from what I recall it was... mostly working. Either way, if I go that route I'll be happy to supply patches for any issues I find and fix.
AS> Are there any particular known stumbling blocks for ports to non-Unix
AS> systems?
I think that having POSIX glue qualifies it as Unix (we really should have
used "posix" instead of "unix" everywhere). You may need to do something
different for wxEventLoop but as I have no idea about Amiga OS API I really
can't say anything useful about it.
The wxEventLoop certainly needs "something different" (I don't know what yet). AmigaOS uses well known concepts of signals, messages and things, and window/widget events are sort of similar to Win32, so it may not be all that different in principle. (though a fair bit different in implementation) The POSIX API is not rich enough to cover AmigaOS specifics, but it's a decent starting point and implementing native specifics can be done later.
AS> I know things like process and memory management sometimes provides
AS> challenges -- meaning fork()/sbrk() concepts don't map too well to
AS> AmigaOS, though the similar vfork()/mmap() would work better.
This is not used by wx, so you can implement wxExecute() in some other
way if it's simpler. Also, in the grand scheme of things, wxExecute() is a
tiny piece of the library and is nothing compared to the GUI work.
Ok good, this clearly won't be an issue.
AS> Anything in this basic plan I should reconsider? What else do I need to
AS> think about before starting?
Looking at the existing ports would be a good idea, but it's true that
there are no other non-Unix ports than wxMSW. wxDFB is the simplest one of
wxUniv-based ports. Of course, you will have plenty of questions about wx
and you shouldn't hesitate asking them here.
Lol. Cross-platform development would suddenly get a whole lot easier if Windows would also move to a Unix base, right? ;-)
I will probably take inspiration from most of the other main ports. I don't know if any single one is a good starting template, but all of them seem to have some portions that are relevant. But hey, aren't there DOS and OS/2 ports in the distribution? I didn't look too closely but I thought wxDFB was for DOS. Maybe I need to look again?
Thanks for your response. Guidance will be useful, especially in the beginning. Hopefully it won't be too long before I can provide something useful back, whether or not it's related to this particular port.
//Andreas