[fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-05 Thread Bo Berglund via fpc-pascal
I have an application which is ported from Delphi to FreePascal and will be used on Raspberry Pi (Debian based Linux). It uses Indy10 components. Indy is installed using OnLinePackageManager in Lazarus. The problem I have is that when I run the application it gets an exception when trying to send

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-05 Thread Bo Berglund via fpc-pascal
On Wed, 5 May 2021 16:51:06 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Wed, 5 May 2021, Nico Neumann via fpc-pascal wrote: > >> Indy has support for OpenSSL 1.1.1, just not officially (yet). >> See https://github.com/IndySockets/Indy/pull/299 > >I am aware of this. Good luck

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-06 Thread Bo Berglund via fpc-pascal
On Wed, 5 May 2021 23:20:08 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Wed, 5 May 2021, Bo Berglund via fpc-pascal wrote: > >> On Wed, 5 May 2021 16:51:06 +0200 (CEST), Michael Van Canneyt via fpc-pascal >> wrote: >> >>> >>&

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-06 Thread Bo Berglund via fpc-pascal
On Thu, 6 May 2021 14:04:07 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >On Thu, 6 May 2021, Bo Berglund via fpc-pascal wrote: > >>> I highly recommend Synapse over Indy. >>> >> >> I had great troubles a year or so ago when I tried using some

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-10 Thread Bo Berglund via fpc-pascal
On Thu, 6 May 2021 14:04:07 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Thu, 6 May 2021, Bo Berglund via fpc-pascal wrote: > >>> I highly recommend Synapse over Indy. >>> >> >> I had great troubles a year or so ago when I tried usin

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-10 Thread Bo Berglund via fpc-pascal
On Mon, 10 May 2021 10:08:53 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Mon, 10 May 2021, Bo Berglund via fpc-pascal wrote: > >> >> I have now installed Synapse 40.1 in LKazarus 2.0.12 with Fpc 3.2.0 >> >>> I use it myself in a headl

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-10 Thread Bo Berglund via fpc-pascal
On Mon, 10 May 2021 11:40:41 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Mon, 10 May 2021, Bo Berglund via fpc-pascal wrote: > >> >> Not so simple when you read scores of Internet pages on the subject... > >99% of what is written on internet is

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-10 Thread Bo Berglund via fpc-pascal
On Mon, 10 May 2021 13:11:26 +0200, Bo Berglund via fpc-pascal wrote: >Slowly wrapping my head around Synapse, never used it before. I have used Indy >on Delphi since 20 years or so and continued that path on FreePascal/Lazarus. >But it does not handle openssl above 1.0.2 :( >

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-11 Thread Bo Berglund via fpc-pascal
On Mon, 10 May 2021 09:24:37 - (UTC), Virgo Pärna via fpc-pascal wrote: >On Mon, 10 May 2021 10:08:53 +0200 (CEST), Michael Van Canneyt via fpc-pascal > wrote: >> >> That's it. From your story, it seems you just need to set >>FSMTP.TargetPort:=465; >>FSMTP.FullSSL:=True; >> > >

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-13 Thread Bo Berglund via fpc-pascal
On Wed, 12 May 2021 12:42:14 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >> The only attachment example I have (from Michael) brings in mime, which I >> don't >> understand much of and the synapse docs are very hard reading too. > >I guess we have a different understanding of "hard r

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-14 Thread Bo Berglund via fpc-pascal
On Wed, 12 May 2021 12:42:14 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >> So right now I try to read up on how to actually handle the mime object >> here... >> >> And I had an additional question: >> >> Does Synapse throw exceptions when errors happen? It does not look like that >

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-14 Thread Bo Berglund via fpc-pascal
On Sat, 15 May 2021 01:11:07 +0200, Tomas Hajny via fpc-pascal wrote: >> Is there some kind of blocking for emails with zip attachments which >> stops them >> from being delivered to GMail accounts? >> >> If so, is there some other type of compressed format I can use which >> is allowed >> by

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-15 Thread Bo Berglund via fpc-pascal
On Sat, 15 May 2021 09:00:08 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >Glad you got it working. > >I worked for some time for a mass mailing company. >From that experience I assure you that delivering mail is NOT easy. > >Meanwhile, there are a lot of safety mechanisms installed o

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-15 Thread Bo Berglund via fpc-pascal
On Sat, 15 May 2021 18:11:22 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >Welcome to the world of mailing. >I wish I could say it gets better, but it does not. > >> >> The body of the message is fixed at the moment, I could add a timestamp >> string >> to it but not much more to make

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-17 Thread Bo Berglund via fpc-pascal
On Sat, 15 May 2021 09:00:08 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > >Glad you got it working. > >I worked for some time for a mass mailing company. >From that experience I assure you that delivering mail is NOT easy. > >Meanwhile, there are a lot of safety mechanisms installed

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-17 Thread Bo Berglund via fpc-pascal
On Mon, 17 May 2021 23:20:16 +0200, gebylist via fpc-pascal wrote: >?Dne 17.05.2021 v 22:06 Bo Berglund via fpc-pascal napsal(a): >> >> And that is what I have done, it is listed in uses of my mailsupport source >> file >> as: >> uses >>

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-18 Thread Bo Berglund via fpc-pascal
On Tue, 18 May 2021 00:25:51 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >> Follow-on question: >> Do I have to install dev packages like this on the target system as well >> (one >> where the application is not going to be built on? >> >> Or is it only needed to be on the *developm

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-18 Thread Bo Berglund via fpc-pascal
On Tue, 18 May 2021 16:20:29 +0100, Henry Vermaak via fpc-pascal wrote: >On Tue, 18 May 2021 at 11:50, Sven Barth via fpc-pascal > wrote: > >> I don't think we need to mention any specific clients (and why did your list >> not include Filezilla? :P ) > >Because FileZilla bundles adware when you

[fpc-pascal] How to find where my app consumes CPU?

2021-05-18 Thread Bo Berglund via fpc-pascal
I have a pretty sizable console app written with Delphi 15 years ago but ported to Linux using FreePascal (3.2.0) with Lazarus (2.0.12) as IDE. It runs as a systemd service on a Raspberry Pi3. Basically it is a scheduler, which checks every minute if there is a task to run, otherwise it waits for

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-18 Thread Bo Berglund via fpc-pascal
On Tue, 18 May 2021 21:59:33 +0200, Bo Berglund via fpc-pascal wrote: >This is working seemingly OK, but today when I checked the RPi I found using >top >that it was running 11% CPU, which is strange because it has nothing to do at >the moment. > >I have tried to be as conser

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-18 Thread Bo Berglund via fpc-pascal
On Tue, 18 May 2021 21:40:15 +, Alexander Grotewohl via fpc-pascal wrote: >if it's waiting on keyboard input you might be better off using select() for >that instead of looping and checking for keyboard input each go around. > >sleep() might already do something similar with a zero timeout b

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Bo Berglund via fpc-pascal
On Wed, 19 May 2021 00:29:17 +0200, Bo Berglund via fpc-pascal wrote: >Could this tiny loop consume 6-7% CPU cycles? Thanks for all of the responses, I will test tomorrow. I have noted that there are no other service processes that are waiting for some action but show up with CPU cycles ab

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Bo Berglund via fpc-pascal
On Wed, 19 May 2021 00:44:18 +0200, Martin Frb via fpc-pascal wrote: >Also CheckSyncronize afaik takes a timeout. >So if you do not need to check the variables every millisecond, then do > > While not (bSTerm or bSInt or bsHup) do > begin > //Here is where the server runs as d

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Bo Berglund via fpc-pascal
On Wed, 19 May 2021 11:45:34 +0200, Marco van de Voort via fpc-pascal wrote: >So my guess something else is spinning (e.g. in a thread). Seems likely based on my test with giving ChecSynchronize an argument 5 and not noticing any difference... So the original conundrum still applies: ** How to

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Bo Berglund via fpc-pascal
On Wed, 19 May 2021 16:02:00 +0200, Bo Berglund via fpc-pascal wrote: >The "other" items might be hidden inside other used classes such as the Indy10 >components I use to implement the TCP/IP communications. >But when searching for sleep through the complete project sourc

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Bo Berglund via fpc-pascal
On Wed, 19 May 2021 19:42:27 +0200, Florian Klämpfl via fpc-pascal wrote: >Even it’s a service, running it with gprof enabled should be possible, no? I do not know what you mean, but the program is installed as a service but it is essentially a normal console application with no GUI parts. The r

Re: [fpc-pascal] How to find where my app consumes CPU?

2021-05-19 Thread Bo Berglund via fpc-pascal
On Wed, 19 May 2021 19:46:43 +0100, Martin Wynne via fpc-pascal wrote: >On 18/05/2021 20:59, Bo Berglund via fpc-pascal wrote: >> I have a pretty sizable console app written with Delphi 15 years ago but >> ported >> to Linux using FreePascal (3.2.0) with Lazarus (2.0.12)

[fpc-pascal] Can a console app running as Linux service restart itself?

2021-05-20 Thread Bo Berglund via fpc-pascal
I would like my service application to restart itself once per 24 hours, but only when nothing else is going on. So the application itself would know this but how can I make it restart itself (as the service)? It is running in a RaspberryPi so it is a Debian derivative Linux. -- Bo Berglund Dev

Re: [fpc-pascal] Can a console app running as Linux service restart itself?

2021-05-20 Thread Bo Berglund via fpc-pascal
On Thu, 20 May 2021 14:52:47 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Thu, 20 May 2021, Bo Berglund via fpc-pascal wrote: > >> I would like my service application to restart itself once per 24 hours, but >> only when nothing else is going on. S

Re: [fpc-pascal] Can a console app running as Linux service restart itself?

2021-05-20 Thread Bo Berglund via fpc-pascal
On Thu, 20 May 2021 17:13:16 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Thu, 20 May 2021, Bo Berglund via fpc-pascal wrote: > >> On Thu, 20 May 2021 14:52:47 +0200 (CEST), Michael Van Canneyt via fpc-pascal >> wrote: >> >>> >>&

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-06-05 Thread Bo Berglund via fpc-pascal
On Sun, 30 May 2021 13:36:08 -0400, Dennis Lee Bieber via fpc-pascal wrote: > > Okay, slipping in late and you may have solved your problem by now >but... Yes, I ditched Indy10 for smtp emailing and instead used Synapse 40.1 from the OnLinePackageManager in Lazarus. Took a while to underst

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-06-06 Thread Bo Berglund via fpc-pascal
On Sun, 6 Jun 2021 08:58:21 +0200, gebylist via fpc-pascal wrote: >?Dne 05.06.2021 v 22:04 Bo Berglund via fpc-pascal napsal(a): >> Yes, I ditched Indy10 for smtp emailing and instead used Synapse 40.1 >> from the OnLinePackageManager in Lazarus. > >I am not sure what is

[fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-15 Thread Bo Berglund via fpc-pascal
If I by habit add a bunch of often used units to the uses clause will that affects the size of the compiled application even if they are not in fact used? I.e. if there are unused units in uses can I shrink the application size by removing them? If so is this the same for GUI and non-GUI applicat

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Bo Berglund via fpc-pascal
On Wed, 16 Jun 2021 12:08:26 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >FPC/lazarus tell you which units are unused, and in the Lazarus IDE you can >use the >quick actions of the message dialog to quickly remove all unused units. >I use it all the time. Thanks, I will have a look

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Bo Berglund via fpc-pascal
On Wed, 16 Jun 2021 12:30:55 +0200, Mattias Gaertner via fpc-pascal wrote: >> Since the final binary size after using strip -s on the exe file is >> 271 kb it seems a bit big! >> Or is there a lot behind the scenes I have missed? > >Classes is a hog. > I commented it away ane recompiled. Worked f

[fpc-pascal] How to check if a network is available?

2021-06-18 Thread Bo Berglund via fpc-pascal
I would like to know how I can check if a remote network is available, i.e. if the VPN system has succeeded to connect the remote network. I need this in a class that connects an OpenVPN tunnel on demand and takes it down after use. Unfortunately openvpn-gui does not have an API call to do this...

Re: [fpc-pascal] How to check if a network is available?

2021-06-18 Thread Bo Berglund via fpc-pascal
On Fri, 18 Jun 2021 15:00:18 +0200, Jean SUZINEAU via fpc-pascal wrote: >May be you can get some information with the "route" command . > >If you run "route print" in cmd command prompt, you can get information >on the different networks available. > >https://docs.microsoft.com/en-us/windows-ser

Re: [fpc-pascal] How to check if a network is available?

2021-06-18 Thread Bo Berglund via fpc-pascal
On Fri, 18 Jun 2021 16:39:52 +0200, Jean SUZINEAU via fpc-pascal wrote: >I've never used open vpn, may be the 10.117 is defined in your >configuration file ? > >For the vpns I've used, the ip adressed were fixed. The tunnel IP address is defined server side and the route is pushed to the client

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-19 Thread Bo Berglund via fpc-pascal
On Fri, 18 Jun 2021 18:13:52 +0200, Jean SUZINEAU via fpc-pascal wrote: > >function _2d( _i: Integer): String; >begin > Str( _i, _2d); > if Length(_2d) < 2 then _2d:= '0'+_2d; > >end; Thanks, it seems like this gets rid of the Format call, which probably brings in a lot of un-needed st

Re: [fpc-pascal] How to check if a network is available?

2021-06-20 Thread Bo Berglund via fpc-pascal
On Fri, 18 Jun 2021 08:34:43 -0400, James Richters via fpc-pascal wrote: >Do a Ping to an address on the network to see if it's connected? > I would need a ping with only one execution so I can put it into a loop and break after a successful ping or break after some timeout value. Seems like th

Re: [fpc-pascal] FPC & Lazarus moving to gitlab

2021-07-04 Thread Bo Berglund via fpc-pascal
On Tue, 22 Jun 2021 18:05:14 +0200 (CEST), Michael Van Canneyt via fpc-devel wrote: >The Free Pascal and Lazarus teams are in the process of switching to >Gitlab to manage their source code and issue reports. Does this mean that the sources will disappear from SVN? I am using scripts to instal

Re: [fpc-pascal] FPC & Lazarus moving to gitlab

2021-07-05 Thread Bo Berglund via fpc-pascal
On Mon, 5 Jul 2021 19:17:35 +0100, Graeme Geldenhuys via fpc-pascal wrote: >On 04/07/2021 9:12 pm, Martin Frb via fpc-pascal wrote: >> I recommend on the long run to switch to git. > >Once you switch, you'll never want to go back. ;-) > In fpc/lazaus I only ever use the svn repositories to *retr

Re: [fpc-pascal] gritwiev layout issue

2021-07-22 Thread Bo Berglund via fpc-pascal
On Tue, 20 Jul 2021 12:43:03 +0200, "Mgr. Janusz Chmiel via fpc-pascal" wrote: >xmlns:w="urn:schemas-microsoft-com:office:word" >xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"; >xmlns="http://www.w3.org/TR/REC-html40";>content="text/html; charset=utf-8">