[twsocket] ICS and Delphi XE2

2011-08-03 Thread Angus Robertson - Magenta Systems Ltd
Embarcadero recently announced that RAD Studio XE2 will be launched in
the next few weeks, the main XE2 information page is currently:

http://www.embarcadero.com/world-tour

The NDA on vendors has been relaxed so we can now talk about some new XE2
features and components for XE2.  This note briefly overviews XE2 and
which new features will be supported by ICS on launch.  

Please note that general discussions about XE2 are outside the scope of
this mailing list, which is only for discussing ICS, and our NDA still
prevents most discussion anyhow. 

XE2 is still a 32-bit Windows application, and all development uses
32-bit Windows packages and design time components, but you can now
specify the target platform as being 32-bit or 64-bit Windows, or Mac
OS-X.  The VCL components support both Windows platforms, and there is a
new set of cross platform visual components called FireMonkey that also
support Mac OS, and possibly other platforms in the future like Linux. 

For cross platform development, you run a debugging application Platform
Assistant Server on the target platform, that communicates using TCP/IP
with the Delphi IDE, so when you click run the executable is
automatically copied to the remote platform and run, with full
integration with the IDE debugger so you can still set breakpoints, etc.
I've got XE2 running in a 32-bit Windows 7 VM 
(Microsoft Virtual PC on Win7 does not support 64-bit VMs). So when I run
my 64-bit application, it appears in the task bar of the 64-bit host
instead of the VM window, but it could be another PC, including a Mac. 

ICS has already been updated to support Delphi XE2 with both Windows
64-bit and 32-bit targets. ICS also supports C++ Builder XE2 but this
only targets the Windows 32-bit platform, 64-bit is due next year
according to the roadmap. 

I'm slowly testing my own components (such as TMagRas and IP Helper) for
64-bit compatibility.  The main issues are 64-bit assembler is different
to 32-bit, so has to be rewritten or replaced by pure Pascal, TPointer
and THandle are now 64-bit, so if you've used DWORD for a pointer in the
past, it will silently fail. Also the 80-bit extended float has gone, now
64-bit.  

Many structures with pointers or handles will be longer. Windows APIs
that have been converted to Delphi need careful checking to ensure DWORD
is not used when a pointer was needed.  Any pointer arithmetic must use
Sizeof (Pointer) since they may be 4 or 8 bytes depending on target
platform.  Anything using Windows messages also needs checking, these are
8 bytes so you must use uint, wparam, lparam and lresult, and be very
careful about casting these to long integers and such like.  

I found lots of errors in my RAS API conversions, mainly use of DWORD 
instead of TPointer or THandle, but you don't get compile errors, calling
the APIs just give errors.  I'm still having problems with 64-bit record
structures, suspect Microsoft has some bugs with 4 or 8 byte alignments
in RAS. 

FireMonkey is a new set of cross platform visual controls with unit names
similar to VCL like FMX.Controls, FMX.Forms, FMX.Dialogs, but the
component properties are not identical so it is a conversion job, not a
recompile and bug fix (which 64-bit mostly is).  FireMonkey offers 3D
controls, but these don't work in my VM which has simple SVGA.  Not sure
about third party components and FireMonkey, you can drop Indy components
on a form, not sure if they run. 

ICS does not currently support FireMonkey or Mac OS-X, it needs a lot of
work since Linux is not event driven like Windows, and makes use of
threads to prevent blocking.  ICS did support Kylix for Linux several
years ago, so some work has been done. 

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS and Delphi XE2

2011-08-03 Thread Tobias Rapp
Angus Robertson - Magenta Systems Ltd wrote:
 ICS does not currently support FireMonkey or Mac OS-X, it needs a lot of
 work since Linux is not event driven like Windows, and makes use of
 threads to prevent blocking.  ICS did support Kylix for Linux several
 years ago, so some work has been done. 

Both other VCL-like cross-platform libraries I'm aware of (GLib/GTK+ and
Qt) include an abstraction of the underlying event system ([1] and [2]). I
don't understand why Embarcado should not use a similar approach and
includes a cross-platform event-system wrapper in FireMonkey. It would make
the life easier not only for ICS developers, I suppose.

BTW: I am not 100% sure but I think that at least GLib doesn't build its
event system on threads but on I/O signals for better performance.

Regards,
Tobias

Links:
[1] http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html
[2] http://doc.qt.nokia.com/4.7/eventsandfilters.html

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS and Delphi XE2

2011-08-03 Thread Angus Robertson - Magenta Systems Ltd
 There may be such an event system in FireMonkey, don't actually 
 know.

It seems Embarcadero bought KSDev earlier this year:  

http://www.ksdev.com/

and the feature page of VGScene may provide some hints about the
capabilies of FireMonkey, although Embarcadero may have changed
everything!

http://www.ksdev.com/wiki/index.php?title=VGScene

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS and Delphi XE2

2011-08-03 Thread Tobias Rapp
Angus Robertson - Magenta Systems Ltd wrote:
 There may be such an event system in FireMonkey, don't actually know.
 
 But supporting ICS with FireMonkey and Mac OS-X is not simply a case of a
 few bug fixes and conditional compilation changes which is effectively
 all that is needed for 64-bit VCL support (and a massive effort from Arno
 testing it all!).  

Yes, I absolutely understand that. I'm as curious as you on what level
event handling will be supported by FireMonkey :-)

BTW: Thanks to the ICS team for their work on 64-bit VCL support!

Regards,
Tobias

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS and Delphi XE2

2011-08-03 Thread Arno Garrels
Tobias Rapp wrote:
 Angus Robertson - Magenta Systems Ltd wrote:
 ICS does not currently support FireMonkey or Mac OS-X, it needs a
 lot of work since Linux is not event driven like Windows, and makes
 use of threads to prevent blocking.  ICS did support Kylix for Linux
 several years ago, so some work has been done.
 
 Both other VCL-like cross-platform libraries I'm aware of (GLib/GTK+
 and Qt) include an abstraction of the underlying event system ([1]
 and [2]). I don't understand why Embarcado should not use a similar
 approach and includes a cross-platform event-system wrapper in
 FireMonkey. It would make the life easier not only for ICS
 developers, I suppose. 
 
 BTW: I am not 100% sure but I think that at least GLib doesn't build
 its event system on threads but on I/O signals for better performance.

Well that's one aspect.
Additionally ICS uses the message-based Windows non-blocking socket
API. There doesn't exist something similiar on other platforms, at 
least not at such a low level AFAIK. Means non-blocking behavior had 
to be implemented using threads (as Windows implements that as well, 
under the hood) using the platform messaging/notification stuff 
available. 

The ICS for Kylix Angus mentioned isn't true xplat, though it
made porting Windows ICS apps to Linux easier. That version will
certainly run on MAC OSX/POSIX as well with just a few changes. 
However if we want a true cross platform ICS major parts would have
to be rewritten from scratch which were a lot of work and porting
existing code to such a ICSX certainly won't be a very simple task.

-- 
Arno Garrels





   
 
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be