Jump to content

Angus Robertson

Members
  • Content Count

    1731
  • Joined

  • Last visited

  • Days Won

    33

Posts posted by Angus Robertson


  1. Pleased you got the package built, I've put updating the sample uses sections on my list. 

     

    Sorry, never tried debugging a non-windows platform. 

     

    I have been wondering why ICS is using a lot of MacOS specific libraries to emulate Windows messages, when the FMX forms unit seems to have ProcessMessages which one assumes works similarly to the Windows forms unit, it might be early versions of FMX 10 years ago were more limited.  But I have other delayed projects to finish and can not investigate yet.

     

    Angus

     


  2. After updating to 10.4.1, installing FMXLinux, updating PAServer to the latest, and recreating my Linux Profile, I can now build and run the FMXLinux sample, so it does all work on UBUNTU 20.04.

     

    However, when building the new ICS Linux package (which is in SVN) I now get: E2597 ld-linux.exe: error: cannot find bplrtl270.so despite adding binlinux64 to the system path. Also 79 FMX units mplicitly imported into the package.  

     

    Still ned to fix the message pump, but getting closer.

     

    Angus
     


  3. SVN and the overnight zip have many updated units with Posix support, most of the changes are in new units I've added or things I'd changed over the years.  Some Posix is TODO, particularly ICMP/ping, ShellExec and some Windows specific file operations in OverbyteIcsFileCopy.

     

    But these changes allow the ICS FMX packages to build for the Linux 64-bit platform, and hopefully the MacOS64 platform.

     

    There is a new package IcsLinuxD104 that I'm able to build without errors, just a few hints and TODOs although final compile fails probably because I'm using an unsupported Ubuntu version.   This all needs FMXLinux
    installed first and you will get 79 FMX units implicitly imported into the package, because FMXLinux does not have a package, or I can not find it. 

    The main work needed is the message pump and timer support, the current implementation is MacOS specific using Apple libraries. I believe FMXLinux probably includes replacements, but it is undocumented and little source code, and without being able to build Linux applications not going to try. We have an ancient ICS version built for Kylix with a message handler that could be used, but my knowledge of Linux is zero so someone else will need to make a decision and finish the Linux implementation.  Hopefully not too much effort.

     

    Angus

     


  4. Quote

    Change to using the TIcsMailQueue component, you prepare email using THtmlSmptCli after which you forget about it while a thread tries to send the mail using several mail servers over several days, all queued.

     

    That's actually quite impressive, I didn't know ICS has these functions built-in! Simple question - does it (or offers a way to) handle backlogs? What happens if an E-mail could not be sent because no connection could be made and the application shuts down?

    I wrote the Mail Queue component 10 years ago and it was available from the Magenta Systems site, only integrated with ICS early last year. 

     

    For persistence, all emails are written as disk files and into database (simple text file).  You specify how many attempts to send each email with what gap, which are repeated for each server (if more than one) or it will look-up MX records and send directly, but that really only works if the server has proper reverse DNS for major email providers.  

     

    Once sent, the file is deleted or moved to an archive directory.  The sample app has a window to view the queue in a grid to see what is left in the queue and delete stuff. and I include that window in my applications.  So really all the concepts of a forwarding SMTP mail server, but it would need a better database design for heavier traffic, it really intended to send hundreds of emails at a time, not thousands.

     

    Angus

     


  5. Change to using the TIcsMailQueue component, you prepare email using THtmlSmptCli after which you forget about it while a thread tries to send the mail using several mail servers over several days, all queued.  Designed specifically for servers to call for help, Used in the OverbyteIcsSslMultiWebServ.dpr sample. 

     

    Angus

     


  6. Quote

    so you can send SMS as anybody, for example, "Bank of America" or "Interpol"?

    Yes, although I only send one message at a time, I'd hope the bureau has systems in place to stop bulk SMS from bad names.  The other bureau ICS supports offers the same for a price, but fixed for the account.  These places are how people fake SMS, but most commercial SMS comes with a name, not a number. 

     

    Angus

     


  7. The Overbyte ICS library includes an TIcsSms component that uses REST to send SMS via two different British bureau with a pre-paid account , there is a demo project.  Adding further bureaus is not hard, although they have their own ideas about authentication, one uses name/pw, the other a JSON block.  ICS supports SMS Works at https://thesmsworks.co.uk/ which allows you to set the originating SMS address to anything you like, name or number which is cool. 

     

    In the past I've used the Async Pro SMS component with an SMS modem connected by RS232 cable, had to modify the code to make it work properly,  but there are more things to configure, does not work from VMs, or data centres, etc. 

     

    Angus

     


  8. The code exporting X509 certificates from the Windows store was designed to build Certificate Authority root bundles with which to verify SSL/TLS certificates in ICS applications, not to export server certificates with private keys, generally you already have those as PEM or PFX files from your certificate supplier. 

     

    But Windows no longer has a complete CA store and downloads new roots on demand, so ICS stopped using exported certificates a while ago and builds it's CA bundles differently. 

     

    If you don't have original PEM files, you can export certificates manually from the Windows store to create them, if they were originally installed with export allowed.

     

    Angus

     


  9. If you have seen the more recent topic on Linux here, I've managed to get a Linux VM running so can now build packages for Linux 64 bit. which is closer to MacOS than Windows. 

     

    Making some changes today, I've managed to build the IcsCommonD104Run package for Linux, including OverbyteIcsTicks64. But am now stuck building IcsFmxD104 for Linux, with 'Required package 'fmx' not found'.  Attempting to check paths in Project Options quickly gets 'invalid value for CFBundleVersion' which seems to relate to Apple platforms which I'm not building, nor can I set MacOS version information.

     

    I was wondering about those missing Ics.Fmx prefixes, but all this MacOS stuff was written by another developer who is no longer with us,  so can not ask.  I assume it all worked many years when he tested it, but we are now many Delphi versions later and it seems we do need to change all those uses names. 

     

    Angus


  10. If you look at any ICS components or samples that receive data, you see that you need to loop within the event to receive data with that function, you may get six bytes first time, 29K next time, loop until nothing more is returned.  If you receive a string, it may be a partial line, so you need to buffer it until the a full line is available.  ICS also has line mode that makes sure you receive full lines, but you may lose data if the last line does include CRLF.  

     

    Also, you can not read UTF8 data reliably like this, because you may get a partial character with the first read.  You need to wait until you have a line, then convert from ANSI to Unicode.

     

    If you used the OverbyteIcsIpStmLogTst.dpr sample I suggested, none of this would be an issue, it's all done for you.

     

    Angus

    • Like 1

  11. Sure it's fine once you get a terminal window to install new components, but my problem was not getting past the login screen with an xorg session that needs RDP, and other methods like console and xvnc not working because they were not installed by default. 

     

    Angus

     


  12. If the latest RTL implements GetTickCount on all supported platforms, and hopefully new ones, why would an alternative be better? 

     

    Not sure which Delphi version implemented it, but MacOS-32 seems to be out of support now so ICS really only needs to support Posix/Mac for 10.3.2 and later.

     

    Angus


  13. The overloaded functions error is almost certainly down to our using variously RawByteString, UnicodeString, AnsiString, PWideChar and UTF8String for overloaded functions, and maybe more, two of which may be the same in the Linux compiler, but I've really not looked yet. 

     

    Angus

     

×