From zoe at scootersoftware.com Wed Oct 3 00:53:44 2018 From: zoe at scootersoftware.com (=?UTF-8?Q?Zo=c3=ab_Peterson?=) Date: Tue, 2 Oct 2018 17:53:44 -0500 Subject: [Lazarus] Printers4Lazarus: QtDefaultPrinter Message-ID: I was just digging through the OSPrinters code and noticed that all of the Qt code interacts with QtDefaultPrinter instead of TQtPrinters.Handle (which is never assigned). Is that intentional? Also, is printing from background threads (either just 1 or multiple using separate TPrinter objects) supported on any of the widgetsets? -- Zoë Peterson Scooter Software From aaa5500 at ya.ru Thu Oct 4 14:42:35 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Thu, 4 Oct 2018 15:42:35 +0300 Subject: [Lazarus] Bugtracker IDE version list Message-ID: <4c3372b6-f9fe-aade-e9e8-f9b98e287aba@ya.ru> a) Pls, delete outdated beta versions from list: 1.8 RCx, 1.6 RCx, 1.4 RCx, 1.2 RCx b) Pls add 2.1 (trunk) -- Regards, Alexey From markbass72 at zoho.com Thu Oct 4 19:52:25 2018 From: markbass72 at zoho.com (Marcello) Date: Thu, 4 Oct 2018 19:52:25 +0200 Subject: [Lazarus] new http client In-Reply-To: <4c3372b6-f9fe-aade-e9e8-f9b98e287aba@ya.ru> References: <4c3372b6-f9fe-aade-e9e8-f9b98e287aba@ya.ru> Message-ID: <60aa0846-c2c9-2666-e95f-580221c9139a@zoho.com> hi all my friend has developed his own version of http client. here you can find repos: client: https://github.com/paxtibi/http demos: https://github.com/paxtibi/http-demos json: https://github.com/paxtibi/json It would be a pleasure for us to know what do you think about this sources and if you have some suggestion on development. Thanks in advantage. Marcello Basso From aaa5500 at ya.ru Thu Oct 4 20:22:28 2018 From: aaa5500 at ya.ru (Alexey) Date: Thu, 4 Oct 2018 21:22:28 +0300 Subject: [Lazarus] new http client In-Reply-To: <60aa0846-c2c9-2666-e95f-580221c9139a@zoho.com> References: <4c3372b6-f9fe-aade-e9e8-f9b98e287aba@ya.ru> <60aa0846-c2c9-2666-e95f-580221c9139a@zoho.com> Message-ID: <2114882A-C3AF-4068-8F55-606C3CAD77D9@ya.ru> FPC has the fpJson lib, so I cannot see why he made Json module. Suggestion for Http: name it PaxHTTP and put demos to the same repo, so OnlinePkgManager guy can get them all. From marcoroin at gmail.com Thu Oct 4 22:52:45 2018 From: marcoroin at gmail.com (Marco Roin) Date: Thu, 4 Oct 2018 22:52:45 +0200 Subject: [Lazarus] new http client Message-ID: quote: FPC has the fpJson lib, so I cannot see why he made Json module. Suggestion for Http: name it PaxHTTP and put demos to the same repo, so OnlinePkgManager guy can get them all. My idea was "clone" JSON object of Browser Javascript implementation. The name is taken from mozilla documentation. Only a my mistake. The implementation is based on fpjson. I have't reinvent the wheel. Renamed package and units as you have suggested. :) -- Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcoroin at gmail.com Thu Oct 4 23:09:59 2018 From: marcoroin at gmail.com (Marco Roin) Date: Thu, 4 Oct 2018 23:09:59 +0200 Subject: [Lazarus] new http client Message-ID: Other thing. http client is a "remake" of fphttpclient. The structure is pluggable and not monolitic. So you can change base autorization mecanism with barel mecanism. For example. You can activate or not a "middleware" (piece of code that alterate behavior of client class). You can add new encoder for request messages. The encoder clone request before send message, so untouch the original request message instance. I've taken ispiration from slim framework (php world) for "middleware" class name. -- Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptrg at freemail.hu Sat Oct 6 19:12:55 2018 From: ptrg at freemail.hu (=?UTF-8?B?UMOpdGVyIEfDoWJvcg==?=) Date: Sat, 6 Oct 2018 19:12:55 +0200 Subject: [Lazarus] Call for translations updates for 2.0 release In-Reply-To: <9eaa621c-e66c-8aa4-c5fc-54dc8e131b8b@narod.ru> References: <9eaa621c-e66c-8aa4-c5fc-54dc8e131b8b@narod.ru> Message-ID: <04a29180-08e2-7f96-913c-6bc34693c803@freemail.hu> Hi Maxim! Hungarian translation updates for fixes (2.0) and trunk (r.59254) posted on the bugtracker: https://bugs.freepascal.org/view.php?id=34397 As usually I posted two separate files however currently the contents may not differ. 2018-09-19 14:07 keltezéssel, Maxim Ganetsky via Lazarus írta: > Now that Lazarus 2.0 branch has been created it is time for translators > to review and update their translations. -- Péter Gábor ptrg at freemail.hu From michael at freepascal.org Sun Oct 7 11:42:44 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 7 Oct 2018 11:42:44 +0200 (CEST) Subject: [Lazarus] Package IDE Spotter renamed to IDE Scout Message-ID: Hello, It was brought to our attention that the word 'spotter' has some criminal connotations. This was - entirely coincidental - confirmed in an article in my newspaper yesterday ;) So the IDE Spotter package has been renamed to IDE Scout. If you installed the package, you will get a warning from lazarus that the IDESpotter package cannot be found and that a dummy package has been created. In the lazarus package installation dialog, deinstall IDE Spotter (it will still be listed) and install the IDE scout package, then recompile lazarus. If you want to keep any settings you adjusted, you will need to rename the idespotter.xml file to idescout.xml in the lazarus configuration directory. Michael. From aaa5500 at ya.ru Sun Oct 7 12:43:51 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 7 Oct 2018 13:43:51 +0300 Subject: [Lazarus] IDE packages dialog: captions Message-ID: <1a2d6560-c2d1-5371-f13d-6d2fd22852ff@ya.ru> 2 titles of groupboxes: Install  / Avail for installation. they mean almost the same thing. So: rename 1st title to "Installed". -- Regards, Alexey From aaa5500 at ya.ru Sun Oct 7 12:53:48 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 7 Oct 2018 13:53:48 +0300 Subject: [Lazarus] Package IDE Spotter renamed to IDE Scout In-Reply-To: References: Message-ID: <6620a236-f820-6d2b-4c72-065f6cc8be8c@ya.ru> I see truncated label "Default width" in Scout opts: screenshot. -------------- next part -------------- A non-text attachment was scrubbed... Name: cropped-txt.png Type: image/png Size: 12088 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Sun Oct 7 14:59:59 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sun, 7 Oct 2018 14:59:59 +0200 Subject: [Lazarus] IDE packages dialog: captions In-Reply-To: <1a2d6560-c2d1-5371-f13d-6d2fd22852ff@ya.ru> References: <1a2d6560-c2d1-5371-f13d-6d2fd22852ff@ya.ru> Message-ID: <20181007145959.308277b8@limapholos.matflo.wg> On Sun, 7 Oct 2018 13:43:51 +0300 AlexeyT via Lazarus wrote: > 2 titles of groupboxes: Install  / Avail for installation. they mean > almost the same thing. So: rename 1st title to "Installed". To be exact: It shows the list *to be* installed, not *currently* installed. So I guess "installed" is confusing. Mattias From restrepopj at gmail.com Thu Oct 11 04:36:47 2018 From: restrepopj at gmail.com (Pedro Restrepo) Date: Wed, 10 Oct 2018 21:36:47 -0500 Subject: [Lazarus] Compiler can't use pfcrc resource compiler Message-ID: First of all, I appreciate the incredible work the development team has put into building Lazarus. After using Lazarus successfully for some time, I started to get this error message when compiling an application, not the IDE or installing the program as is the case in other threads. It happens only after the first compilation. In other words, I open Lazarus, make whatever changes I need to make to the application, compile, and everything is fine. If I make another change, the error appears. After re-starting Lazarus, it compiles fine. Also, I don't have that problem with Lazarus 1.8.4 on both Debian stretch and Windows 10. When compiling another program, considerably larger, doesn't have that problem. I am using: Raspberry Pi 3B+ with Raspbian Stretch fpc 3.3.1 Lazarus 2.1.0, custom installation, as is the onlyh way to do it on a Raspberry Pi. Any suggestions? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Thu Oct 11 10:12:26 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 11 Oct 2018 11:12:26 +0300 Subject: [Lazarus] Compiler can't use pfcrc resource compiler In-Reply-To: References: Message-ID: On Thu, Oct 11, 2018 at 5:37 AM Pedro Restrepo via Lazarus wrote: > Lazarus 2.1.0 That is trunk which is a "rolling" version. It changes all the time. We also need the revision. Juha From juha.manninen62 at gmail.com Thu Oct 11 11:10:27 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 11 Oct 2018 12:10:27 +0300 Subject: [Lazarus] Compiler can't use pfcrc resource compiler In-Reply-To: References: Message-ID: The revision I had in mind was r59269 which fixed a hickup about generating resources. It may not be relevant because it could not cause the error shown in your subject line. Juha From restrepopj at gmail.com Thu Oct 11 15:58:40 2018 From: restrepopj at gmail.com (Pedro Restrepo) Date: Thu, 11 Oct 2018 08:58:40 -0500 Subject: [Lazarus] Compiler can't use pfcrc resource compiler In-Reply-To: References: Message-ID: Hello Juha, The revision I have is r59246. Thank you On Thu, Oct 11, 2018 at 4:10 AM Juha Manninen via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > The revision I had in mind was r59269 which fixed a hickup about > generating resources. > It may not be relevant because it could not cause the error shown in > your subject line. > > Juha > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Fri Oct 12 13:21:56 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 12 Oct 2018 13:21:56 +0200 Subject: [Lazarus] Combobox with sorted list of unique items? Message-ID: <3l01sd5lb8csekgen16nl19li02ivrlshn@4ax.com> I am trying to use a combobox as a container for recently used IP addresses for easy selection by the user. I can set the combobox style to csDropDown and Sorted to true. But I cannot find the duplicates setting so I can set it to unique... Is there some other way to do this except by loading the data on startup into a TStringList with sorted and unique set and then transfer the content into the Combobox? -- Bo Berglund Developer in Sweden From vojtech.cihak at atlas.cz Fri Oct 12 14:30:21 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Fri, 12 Oct 2018 14:30:21 +0200 Subject: [Lazarus] =?utf-8?q?Combobox_with_sorted_list_of_unique_items=3F?= In-Reply-To: 00000000914b0002bc240198502f References: 00000000914b0002bc240198502f Message-ID: <20181012143021.C2BCA885@atlas.cz> I just tried TStringList(ComboBox1.Items).Duplicates:=dupIgnore; but it does not work for combo (in Qt4).   V. ______________________________________________________________ > Od: "Bo Berglund via Lazarus" > Komu: lazarus at lists.lazarus.freepascal.org > Datum: 12.10.2018 13:22 > Předmět: [Lazarus] Combobox with sorted list of unique items? > I am trying to use a combobox as a container for recently used IP addresses for easy selection by the user. I can set the combobox style to csDropDown and Sorted to true. But I cannot find the duplicates setting so I can set it to unique... Is there some other way to do this except by loading the data on startup into a TStringList with sorted and unique set and then transfer the content into the Combobox? -- Bo Berglund Developer in Sweden -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bartjunk64 at gmail.com Fri Oct 12 15:30:52 2018 From: bartjunk64 at gmail.com (Bart) Date: Fri, 12 Oct 2018 15:30:52 +0200 Subject: [Lazarus] Combobox with sorted list of unique items? In-Reply-To: <20181012143021.C2BCA885@atlas.cz> References: <20181012143021.C2BCA885@atlas.cz> Message-ID: On Fri, Oct 12, 2018 at 2:30 PM Vojtěch Čihák via Lazarus wrote: > > I just tried TStringList(ComboBox1.Items).Duplicates:=dupIgnore; but it does not work for combo (in Qt4). Override Insert and check if it is already in there? Bart From bo.berglund at gmail.com Fri Oct 12 17:01:07 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 12 Oct 2018 17:01:07 +0200 Subject: [Lazarus] Combobox with sorted list of unique items? References: <20181012143021.C2BCA885@atlas.cz> Message-ID: On Fri, 12 Oct 2018 15:30:52 +0200, Bart via Lazarus wrote: >On Fri, Oct 12, 2018 at 2:30 PM Vojt?ch ?ihák via Lazarus > wrote: >> >> I just tried TStringList(ComboBox1.Items).Duplicates:=dupIgnore; but it does not work for combo (in Qt4). > >Override Insert and check if it is already in there? > It is going to be simpler to just use a TStringList container while reading from the ini file because it can be set for sorted and dupignore. Then at the end just assign the stringlist to the combobox text property. combobox.items.text := stringlist.text; -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Fri Oct 12 22:23:27 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Fri, 12 Oct 2018 22:23:27 +0200 Subject: [Lazarus] Bugtracker IDE version list In-Reply-To: <4c3372b6-f9fe-aade-e9e8-f9b98e287aba@ya.ru> References: <4c3372b6-f9fe-aade-e9e8-f9b98e287aba@ya.ru> Message-ID: <380855b7-b994-f3ec-9bff-ab7553b2e306@mfriebe.de> On 04/10/2018 14:42, AlexeyT via Lazarus wrote: > b) Pls add 2.1 (trunk) > added From bartjunk64 at gmail.com Sat Oct 13 16:15:47 2018 From: bartjunk64 at gmail.com (Bart) Date: Sat, 13 Oct 2018 16:15:47 +0200 Subject: [Lazarus] Combobox with sorted list of unique items? In-Reply-To: References: <20181012143021.C2BCA885@atlas.cz> Message-ID: On Fri, Oct 12, 2018 at 5:01 PM Bo Berglund via Lazarus wrote: > combobox.items.text := stringlist.text; combobox.items.assign(stringlist)? -- Bart From bo.berglund at gmail.com Sat Oct 13 20:43:43 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 13 Oct 2018 20:43:43 +0200 Subject: [Lazarus] Can't assign event procedure.... Message-ID: This is what I have: In a unit where a logging class is defined: type TRxEvent = procedure (const Buffer: TBytes) of object; ... TWiFiCommLogger = class(TThread) private ... FOnRxData: TRxEvent; ... public ... property OnRxData: TRxEvent read FOnRxData write FOnRxData; ... end; procedure TWiFiCommLogger.Execute; begin while not Terminated do begin ... if Assigned(FOnRxData) then begin FOnRxData(FBuffer); SetLength(FBuffer, 0); end; ... Then in the form unit where I want to use this: ... private ... procedure OnRxSS(Buf: TBytes); ... end; In the form constructor: procedure TfrmCommTest.FormCreate(Sender: TObject); ... FLogSS := TWiFiCommLogger.Create; FLogSS.OnRxData := OnRxSS; // <== Error on this line ... When I compile this I get the following error: formcommtest.pas(112,22) Error: Incompatible types: got "TfrmCommTest.OnRxSS(TBytes);" expected "" What am I doing wrong here? I have written similar types of programs where I have used this kind of construction and it has worked fine (in Delphi). Both the form file and the unit where the handler class is defined have been set to: {$mode Delphi} -- Bo Berglund Developer in Sweden From gabor at poczta.onet.pl Sat Oct 13 20:57:54 2018 From: gabor at poczta.onet.pl (gabor) Date: Sat, 13 Oct 2018 20:57:54 +0200 Subject: [Lazarus] Can't assign event procedure.... In-Reply-To: References: Message-ID: <19606b51-95f3-4429-8436-f02099f5f631@poczta.onet.pl> Missing "const" before Buf? procedure OnRxSS(*const* Buf: TBytes); W dniu 2018-10-13 o 20:43, Bo Berglund via Lazarus pisze: > Then in the form unit where I want to use this: > ... > private > ... > procedure OnRxSS(Buf: TBytes); > ... > end; Regards, Michał. From vojtech.cihak at atlas.cz Sat Oct 13 20:58:07 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sat, 13 Oct 2018 20:58:07 +0200 Subject: [Lazarus] =?utf-8?q?Can=27t_assign_event_procedure=2E=2E=2E=2E?= In-Reply-To: 0000000091510002c7cc01985034 References: 0000000091510002c7cc01985034 Message-ID: <20181013205807.443B8BFB@atlas.cz> Did you try simply to add "const"?   V. ______________________________________________________________ > Od: "Bo Berglund via Lazarus" > Komu: lazarus at lists.lazarus.freepascal.org > Datum: 13.10.2018 20:43 > Předmět: [Lazarus] Can't assign event procedure.... > What am I doing wrong here? I have written similar types of programs where I have used this kind of construction and it has worked fine (in Delphi). Both the form file and the unit where the handler class is defined have been set to: {$mode Delphi} -- Bo Berglund Developer in Sweden -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Sat Oct 13 21:00:51 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 13 Oct 2018 21:00:51 +0200 Subject: [Lazarus] Can't assign event procedure.... References: Message-ID: <23g4sddlasdkf0l163usbfats15b6kro8m@4ax.com> On Sat, 13 Oct 2018 20:43:43 +0200, Bo Berglund via Lazarus wrote: >type > TRxEvent = procedure (const Buffer: TBytes) of object; Of course posting here is the best way to actually discover the solution just a few minutes afterwards... The const specifier was missing in the implementation on the form where I wanted to use the class object. Adding it in let the compile succeed! Sorry for the noise. -- Bo Berglund Developer in Sweden From juha.manninen62 at gmail.com Sat Oct 13 22:08:59 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 13 Oct 2018 23:08:59 +0300 Subject: [Lazarus] Scaling of menuitem icons Message-ID: Hi When higher DPI setting is used on Windows, Lazarus IDE appears to obey nicely. All icons are also scaled, together with texts. On my Linux + KDE system however icons of the IDE's main menuitems do not scale. In KDE settings panel -> Fonts I set the "Force font's DPI" value to 144 which is about 150%. Then I start lazarus and everything is scaled including menu texts but not the icons beside them. Icons everywhere else like in the IDE Coolbar and component palette are scaled. Editor toolbar also has scaled icons and the exact same icons show smaller in the main menu. This happens with both GTK2 and QT bindings. Could somebody please test with other desktop / window manager systems. Who knows the High DPI code well enough to fix the issue? I wanted to take a screenshot but the IDE's menus always close when Spectacle (screeshot app) takes it. This is another bug somewhere. Menus of well behaving KDE apps, for example Kate's, do not close. Juha From vojtech.cihak at atlas.cz Sat Oct 13 22:52:49 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Sat, 13 Oct 2018 22:52:49 +0200 Subject: [Lazarus] =?utf-8?q?Scaling_of_menuitem_icons?= In-Reply-To: 0000000091550002cf5c01985039 References: 0000000091550002cf5c01985039 Message-ID: <20181013225249.573492B4@atlas.cz> It seems the same here (KDE and Lazarus Qt4). I was able to take screenshot with Spectacle (rectangular area).   V. ______________________________________________________________ > Od: "Juha Manninen via Lazarus" > Komu: "Lazarus mailing list" > Datum: 13.10.2018 22:09 > Předmět: [Lazarus] Scaling of menuitem icons > Hi When higher DPI setting is used on Windows, Lazarus IDE appears to obey nicely. All icons are also scaled, together with texts. On my Linux + KDE system however icons of the IDE's main menuitems do not scale. In KDE settings panel -> Fonts I set the "Force font's DPI" value to 144 which is about 150%. Then I start lazarus and everything is scaled including menu texts but not the icons beside them. Icons everywhere else like in the IDE Coolbar and component palette are scaled. Editor toolbar also has scaled icons and the exact same icons show smaller in the main menu. This happens with both GTK2 and QT bindings. Could somebody please test with other desktop / window manager systems. Who knows the High DPI code well enough to fix the issue? I wanted to take a screenshot but the IDE's menus always close when Spectacle (screeshot app) takes it. This is another bug somewhere. Menus of well behaving KDE apps, for example Kate's, do not close. Juha -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: menu144dpi.png Type: image/png Size: 63537 bytes Desc: menu144dpi.png URL: From mse00000 at gmail.com Sun Oct 14 09:09:54 2018 From: mse00000 at gmail.com (Martin Schreiber) Date: Sun, 14 Oct 2018 09:09:54 +0200 Subject: [Lazarus] Scaling of menuitem icons In-Reply-To: References: Message-ID: <201810140909.54969.mse00000@gmail.com> On Saturday 13 October 2018 22:08:59 Juha Manninen via Lazarus wrote: > > I wanted to take a screenshot but the IDE's menus always close when > Spectacle (screeshot app) takes it. Do you use a delay? https://userbase.kde.org/Spectacle#Screenshot_delay Martin From bo.berglund at gmail.com Sun Oct 14 17:51:09 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 14 Oct 2018 17:51:09 +0200 Subject: [Lazarus] Can't assign event procedure.... References: <23g4sddlasdkf0l163usbfats15b6kro8m@4ax.com> Message-ID: <1dp6sd9ijvmtd0un77k5uc60bviluoclrn@4ax.com> On Sat, 13 Oct 2018 21:00:51 +0200, Bo Berglund via Lazarus wrote: >Sorry for the noise. > This is just a test of posting via GMane since my posts on the fpc list have been rejected. Reason unknown to me. Worked for years until now... -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Oct 14 18:17:59 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 14 Oct 2018 18:17:59 +0200 Subject: [Lazarus] Can't assign event procedure.... References: <23g4sddlasdkf0l163usbfats15b6kro8m@4ax.com> <1dp6sd9ijvmtd0un77k5uc60bviluoclrn@4ax.com> Message-ID: <6vq6sdp8elc5jkp5a6sp3sjv9fh2ve2gic@4ax.com> On Sun, 14 Oct 2018 17:51:09 +0200, Bo Berglund via Lazarus wrote: >On Sat, 13 Oct 2018 21:00:51 +0200, Bo Berglund via Lazarus > wrote: > >>Sorry for the noise. >> >This is just a test of posting via GMane since my posts on the fpc >list have been rejected. Reason unknown to me. Worked for years until >now... After rebooting my router, thus obtaining a different Internet IP address my rejection from the fpc.general list disappeared. Surely a GMane thing... -- Bo Berglund Developer in Sweden From juha.manninen62 at gmail.com Sun Oct 14 18:37:10 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 14 Oct 2018 19:37:10 +0300 Subject: [Lazarus] Scaling of menuitem icons In-Reply-To: <201810140909.54969.mse00000@gmail.com> References: <201810140909.54969.mse00000@gmail.com> Message-ID: On Sun, Oct 14, 2018 at 10:10 AM Martin Schreiber via Lazarus wrote: > Do you use a delay? > https://userbase.kde.org/Spectacle#Screenshot_delay Yes I did. I tried all variations including the rectangular area that Vojtěch Čihák used. Strangely enough, I remember I could include menus in a screenshot earlier. Something has changed maybe in the libs provided by Manjaro. Who knows... I will test again some time later. Juha From aaa5500 at ya.ru Sun Oct 14 18:50:32 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sun, 14 Oct 2018 19:50:32 +0300 Subject: [Lazarus] IDE Scout issue Message-ID: https://bugs.freepascal.org/view.php?id=34383 just a reminder. -- Regards, Alexey From michael at freepascal.org Sun Oct 14 18:55:28 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 14 Oct 2018 18:55:28 +0200 (CEST) Subject: [Lazarus] IDE Scout issue In-Reply-To: References: Message-ID: On Sun, 14 Oct 2018, AlexeyT via Lazarus wrote: > https://bugs.freepascal.org/view.php?id=34383 > > just a reminder. Most if not all commands in the editor are registered, but do not do anything. The source editor simply looks up the key combination in the commands, and then invokes the main menu. The TIDECommand.Execute does method not do anything. This is a design error in the IDE, it needs to be fixed at a fundamental level. Michael. From juha.manninen62 at gmail.com Sun Oct 14 19:05:18 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 14 Oct 2018 20:05:18 +0300 Subject: [Lazarus] IDE Scout issue In-Reply-To: References: Message-ID: On Sun, Oct 14, 2018 at 7:55 PM Michael Van Canneyt via Lazarus wrote: > Most if not all commands in the editor are registered, but do not do > anything. The source editor simply looks up the key combination in the > commands, and then invokes the main menu. > The TIDECommand.Execute does method not do anything. > > This is a design error in the IDE, it needs to be fixed at a fundamental > level. Indeed, I remember the commands are invoked in different ways which feels wrong. I don't remember details, it was some time ago I looked at them. Maybe AlexeyT could take a look. Regards, Juha From michael at freepascal.org Sun Oct 14 19:16:43 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 14 Oct 2018 19:16:43 +0200 (CEST) Subject: [Lazarus] IDE Scout issue In-Reply-To: References: Message-ID: On Sun, 14 Oct 2018, Juha Manninen via Lazarus wrote: > On Sun, Oct 14, 2018 at 7:55 PM Michael Van Canneyt via Lazarus > wrote: >> Most if not all commands in the editor are registered, but do not do >> anything. The source editor simply looks up the key combination in the >> commands, and then invokes the main menu. >> The TIDECommand.Execute does method not do anything. >> >> This is a design error in the IDE, it needs to be fixed at a fundamental >> level. > > Indeed, I remember the commands are invoked in different ways which > feels wrong. I don't remember details, it was some time ago I looked > at them. > Maybe AlexeyT could take a look. >From what I can see, it should be sufficient to create a descendent of TIDECommand with the ec* editor command constant as a property, and register this descendant as an IDE command with the main menu callback as the command callback, and the source editor, after looking up the command using the key combination, must simply call .execute instead of calling the main menu function... Unless of course there are some hidden pitfalls :) Michael. From lazarus at mfriebe.de Sun Oct 14 21:09:14 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Sun, 14 Oct 2018 21:09:14 +0200 Subject: [Lazarus] New debugger for Mac based on lldb (Call for testers) Message-ID: <34a36461-6f32-69d1-d93b-534445b585e4@mfriebe.de> With the Lazarus Release Candidate 1 for 2.0 a new debugger for Mac users has been shipped. It is based on LLDB, which is provided by apple and is ready to use. So there should no longer be a need to build and codesign gdb. As the LLDB integration is all new, it needs a lot of testing. So this is a ...       call to all Mac users:       Please test the new LLDB based Lazarus debugger. To test the new debugger, please download the Lazarus 2.0RC1. - Open the IDE and install the package "LazDebuggerFpLLdb".   It should be in the list of available packages, but if not it is in components/lazdebuggers/lazdebuggerfplldb   Make sure to use the one with "Fp" in the name. (There also is LazDebuggerLLdb, but it is not as good.)   Restart the IDE. - Go to Tools > Options > Debugger   In the "debugger type" dropdown, you should find and select "LLDB debugger (with fpdebug)"   The edit below this (where you normally have the path to gdb), should be changed to the path of lldb.   (lldb comes with the tools from apple; and as such it is already codesigned by apple). To report any problems: Start Lazarus from a shell with the following command line (replace pathes according to your installation): You may need to use startlazarus, or specify the re-build lazarus which may be in your home folder / pcp. /path/to/lazarus/lazarus.app/Contents/MacOS/lazarus --debug-log=/path/to/yourfiles/laz.log --debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,FPDBG_DWARF_ERRORS,FPDBG_DWARF_WARNINGS,FPDBG_DWARF_VERBOSE_LOAD,FPDBG_DWARF_DATA_WARNINGS,DBG_VERBOSE,DBG_WARNINGS,DBG_STATE,DBG_EVENTS,DBG_THREAD_AND_FRAME Attach the log file after reproducing the error. From aaa5500 at ya.ru Tue Oct 16 08:53:40 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Tue, 16 Oct 2018 09:53:40 +0300 Subject: [Lazarus] Forms.pp function error? Message-ID: function ShiftStateToKeys(ShiftState: TShiftState): PtrUInt; begin   Result := 0;   if ssShift  in ShiftState then Result := Result or MK_SHIFT;   if ssCtrl   in ShiftState then Result := Result or MK_CONTROL;   if ssLeft   in ShiftState then Result := Result or MK_LBUTTON;   if ssRight  in ShiftState then Result := Result or MK_RBUTTON;   if ssMiddle in ShiftState then Result := Result or MK_MBUTTON;   if ssExtra1 in ShiftState then Result := Result or MK_XBUTTON1;   if ssExtra2 in ShiftState then Result := Result or MK_XBUTTON2;   if ssDouble in ShiftState then Result := Result or MK_DOUBLECLICK;   if ssTriple in ShiftState then Result := Result or MK_TRIPLECLICK;   if ssQuad   in ShiftState then Result := Result or MK_QUADCLICK; end; I don't see here "if ssAlt in ...." line -- Regards, Alexey From michael at freepascal.org Tue Oct 16 08:56:22 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 16 Oct 2018 08:56:22 +0200 (CEST) Subject: [Lazarus] Forms.pp function error? In-Reply-To: References: Message-ID: On Tue, 16 Oct 2018, AlexeyT via Lazarus wrote: > function ShiftStateToKeys(ShiftState: TShiftState): PtrUInt; > begin >   Result := 0; >   if ssShift  in ShiftState then Result := Result or MK_SHIFT; >   if ssCtrl   in ShiftState then Result := Result or MK_CONTROL; >   if ssLeft   in ShiftState then Result := Result or MK_LBUTTON; >   if ssRight  in ShiftState then Result := Result or MK_RBUTTON; >   if ssMiddle in ShiftState then Result := Result or MK_MBUTTON; >   if ssExtra1 in ShiftState then Result := Result or MK_XBUTTON1; >   if ssExtra2 in ShiftState then Result := Result or MK_XBUTTON2; >   if ssDouble in ShiftState then Result := Result or MK_DOUBLECLICK; >   if ssTriple in ShiftState then Result := Result or MK_TRIPLECLICK; >   if ssQuad   in ShiftState then Result := Result or MK_QUADCLICK; > end; > > I don't see here "if ssAlt in ...." line There does not need to be if there is no corresponding MK_nnn value ? What would be the MK_nnn value for ssAlt ? Michael. From aaa5500 at ya.ru Tue Oct 16 09:23:50 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Tue, 16 Oct 2018 10:23:50 +0300 Subject: [Lazarus] Forms.pp function error? In-Reply-To: References: Message-ID: <310c3565-72c6-bf83-680a-3e335f94c928@ya.ru> On 16.10.2018 09:56, Michael Van Canneyt via Lazarus wrote: > There does not need to be if there is no corresponding MK_nnn value ? > What would be the MK_nnn value for ssAlt ? We can  add in, LCLType.pp: const   // Mouse message key states   MK_LBUTTON  = 1;   MK_RBUTTON = 2;   MK_SHIFT = 4;   MK_CONTROL = 8;   MK_MBUTTON = $10;   MK_XBUTTON1 = $20;   MK_XBUTTON2 = $40;   // following are "virtual" key states   MK_DOUBLECLICK = $80;   MK_TRIPLECLICK = $100;   MK_QUADCLICK = $200; -- Regards, Alexey From michael at freepascal.org Tue Oct 16 09:32:52 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Tue, 16 Oct 2018 09:32:52 +0200 (CEST) Subject: [Lazarus] Forms.pp function error? In-Reply-To: <310c3565-72c6-bf83-680a-3e335f94c928@ya.ru> References: <310c3565-72c6-bf83-680a-3e335f94c928@ya.ru> Message-ID: On Tue, 16 Oct 2018, AlexeyT via Lazarus wrote: > > On 16.10.2018 09:56, Michael Van Canneyt via Lazarus wrote: >> There does not need to be if there is no corresponding MK_nnn value ? >> What would be the MK_nnn value for ssAlt ? > > We can  add in, LCLType.pp: > > const >   // Mouse message key states >   MK_LBUTTON  = 1; >   MK_RBUTTON = 2; >   MK_SHIFT = 4; >   MK_CONTROL = 8; >   MK_MBUTTON = $10; >   MK_XBUTTON1 = $20; >   MK_XBUTTON2 = $40; >   // following are "virtual" key states >   MK_DOUBLECLICK = $80; >   MK_TRIPLECLICK = $100; >   MK_QUADCLICK = $200; I understand that, but what additional value makes sense ? Michael. From aaa5500 at ya.ru Tue Oct 16 19:29:01 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Tue, 16 Oct 2018 20:29:01 +0300 Subject: [Lazarus] Forms.pp function error? In-Reply-To: <310c3565-72c6-bf83-680a-3e335f94c928@ya.ru> References: <310c3565-72c6-bf83-680a-3e335f94c928@ya.ru> Message-ID: <92c8572a-d071-cc8a-69f1-4107d24998de@ya.ru> Value $400 makes sense. And also this must be changed then: function KeysToShiftState(Keys: PtrUInt): TShiftState; it uses same constants. Alex From skalogryz.lists at gmail.com Tue Oct 16 19:37:48 2018 From: skalogryz.lists at gmail.com (Dmitry Boyarintsev) Date: Tue, 16 Oct 2018 13:37:48 -0400 Subject: [Lazarus] Forms.pp function error? In-Reply-To: <92c8572a-d071-cc8a-69f1-4107d24998de@ya.ru> References: <310c3565-72c6-bf83-680a-3e335f94c928@ya.ru> <92c8572a-d071-cc8a-69f1-4107d24998de@ya.ru> Message-ID: On Tue, Oct 16, 2018 at 1:29 PM AlexeyT via Lazarus < lazarus at lists.lazarus-ide.org> wrote: > Value $400 makes sense. > And also this must be changed then: > function KeysToShiftState(Keys: PtrUInt): TShiftState; > it uses same constants. > The value you're looking for is $20000000 It's being used/supported by all current widgetsets -------------- next part -------------- An HTML attachment was scrubbed... URL: From l at c-m-w.me.uk Tue Oct 16 23:23:33 2018 From: l at c-m-w.me.uk (C Western) Date: Tue, 16 Oct 2018 22:23:33 +0100 Subject: [Lazarus] New debugger for Mac based on lldb (Call for testers) In-Reply-To: <34a36461-6f32-69d1-d93b-534445b585e4@mfriebe.de> References: <34a36461-6f32-69d1-d93b-534445b585e4@mfriebe.de> Message-ID: On 14/10/2018 20:09, Martin Frb via Lazarus wrote: > > - Go to Tools > Options > Debugger >   In the "debugger type" dropdown, you should find and select "LLDB > debugger (with fpdebug)" >   The edit below this (where you normally have the path to gdb), > should be changed to the path of lldb. >   (lldb comes with the tools from apple; and as such it is already > codesigned by apple). > Did you mean the option "(with fpdebug)"? Trying with this option lazarus throws an exception trying to open a .o file that exists - I can't immediately see why it is throwing the exception. It doesn't seem to reach the stage of starting the program. If I try it without, the debugger seems to be working OK, at least at first glance. Colin From lazarus at mfriebe.de Tue Oct 16 23:39:31 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Tue, 16 Oct 2018 23:39:31 +0200 Subject: [Lazarus] New debugger for Mac based on lldb (Call for testers) In-Reply-To: References: <34a36461-6f32-69d1-d93b-534445b585e4@mfriebe.de> Message-ID: <198b0680-66bd-b7af-7975-71f105a1a603@mfriebe.de> On 16/10/2018 23:23, C Western via Lazarus wrote: > On 14/10/2018 20:09, Martin Frb via Lazarus wrote: >> >> - Go to Tools > Options > Debugger >>   In the "debugger type" dropdown, you should find and select "LLDB >> debugger (with fpdebug)" >>   The edit below this (where you normally have the path to gdb), >> should be changed to the path of lldb. >>   (lldb comes with the tools from apple; and as such it is already >> codesigned by apple). >> > Did you mean the option "(with fpdebug)"? Trying with this option > lazarus throws an exception trying to open a .o file that exists - I > can't immediately see why it is throwing the exception. It doesn't > seem to reach the stage of starting the program. If I try it without, > the debugger seems to be working OK, at least at first glance. Depending on which of the LazDebugger...LLDB package(s) you installed, you should have one or two entries:   "LLDB Debugger (Alpha)"   "LLDB Debugger (with fpdebug) (Alpha)" The 2nd one should be the better one. The first (without fpdebug), will accept/display watches in C style only, and has had way less testing. If you get an error, please provide the stacktrace (if you have), together with console output, and logfile. Please also test with and without "external debug info". When using (or having used) external dbg info, ensure that the folder with the debug info is not left behind/outdated (IIRC a folder with psym in the name) I tested this on a Mac, that I had on loan. Currently I do not have a Mac for testing. --- What you mean by "without, the debugger" Without any debugger, or with the lldb without fpdebug? From l at c-m-w.me.uk Wed Oct 17 09:40:09 2018 From: l at c-m-w.me.uk (C Western) Date: Wed, 17 Oct 2018 08:40:09 +0100 Subject: [Lazarus] New debugger for Mac based on lldb (Call for testers) In-Reply-To: <198b0680-66bd-b7af-7975-71f105a1a603@mfriebe.de> References: <34a36461-6f32-69d1-d93b-534445b585e4@mfriebe.de> <198b0680-66bd-b7af-7975-71f105a1a603@mfriebe.de> Message-ID: On 16/10/2018 22:39, Martin Frb via Lazarus wrote: > On 16/10/2018 23:23, C Western via Lazarus wrote: >> On 14/10/2018 20:09, Martin Frb via Lazarus wrote: >>> >>> - Go to Tools > Options > Debugger >>>   In the "debugger type" dropdown, you should find and select "LLDB >>> debugger (with fpdebug)" >>>   The edit below this (where you normally have the path to gdb), >>> should be changed to the path of lldb. >>>   (lldb comes with the tools from apple; and as such it is already >>> codesigned by apple). >>> >> Did you mean the option "(with fpdebug)"? Trying with this option >> lazarus throws an exception trying to open a .o file that exists - I >> can't immediately see why it is throwing the exception. It doesn't >> seem to reach the stage of starting the program. If I try it without, >> the debugger seems to be working OK, at least at first glance. > > Depending on which of the LazDebugger...LLDB package(s) you installed, > you should have one or two entries: >   "LLDB Debugger (Alpha)" >   "LLDB Debugger (with fpdebug) (Alpha)" > > The 2nd one should be the better one. > The first (without fpdebug), will accept/display watches in C style > only, and has had way less testing. > > If you get an error, please provide the stacktrace (if you have), > together with console output, and logfile. > > Please also test with and without "external debug info". > When using (or having used) external dbg info, ensure that the folder > with the debug info is not left behind/outdated (IIRC a folder with > psym in the name) > > I tested this on a Mac, that I had on loan. Currently I do not have a > Mac for testing. > > --- > What you mean by "without, the debugger" > Without any debugger, or with the lldb without fpdebug? > Using "LLDB Debugger (Alpha)" seems to give me working debugging. This was with current trunk fpc and lazarus. This was not with "external debug info". I will post some output when I have a chance. Colin From aforsprl at gmail.com Wed Oct 17 12:17:27 2018 From: aforsprl at gmail.com (Antonio) Date: Wed, 17 Oct 2018 03:17:27 -0700 (MST) Subject: [Lazarus] Lazarus daemon windows 10 Message-ID: <1539771447800-0.post@n3.nabble.com> Hi Folks. I need some help to get out of problems starting a daemon on Windows 10. The basic service source project attached compiles Ok, installs fine but refuses to start. In a command line window (open as administrator) : c:> BasicService.exe -i runs as expecterd c:>BasicService.Exe -r executes the data module creation and then stops (see log file service.log attached) c:>BasicService.exe -u ru BasicService.zip ns as expected as well. I did find a web page on this problem some months ago but I don't find it any more. Some ideas on what is going wrong ? Lazarus 1.8.4 FPC 3.0.4 win32 Thanks a lot Antonio -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From l at c-m-w.me.uk Wed Oct 17 23:04:52 2018 From: l at c-m-w.me.uk (C Western) Date: Wed, 17 Oct 2018 22:04:52 +0100 Subject: [Lazarus] New debugger for Mac based on lldb (Call for testers) In-Reply-To: References: <34a36461-6f32-69d1-d93b-534445b585e4@mfriebe.de> <198b0680-66bd-b7af-7975-71f105a1a603@mfriebe.de> Message-ID: <368d5315-2e28-aabe-50ff-5b1c9fee9053@c-m-w.me.uk> I have identified the issue. It seems that fpdebug opens all the object files associated with the project, and keeps them open. For the project I was working on this results in 700 or so open files in lazarus, and it seems the default system limit is 256. Awkwardly it is not clear how to change this; putting (say) "ulimit -n 6000" in .profile changes it in the terminal window, and the debugger then runs OK if lazarus is started from the terminal window, but if startlazarus is used the limit for lazarus stays at 256. Colin From aaa5500 at ya.ru Fri Oct 19 07:55:29 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 19 Oct 2018 08:55:29 +0300 Subject: [Lazarus] IDE Restriction Browser layout patch Message-ID: Patch adds BorderSpacing (6) for 3 main controls on the form. -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: res.diff Type: text/x-patch Size: 2456 bytes Desc: not available URL: From lazarus at kluug.net Fri Oct 19 10:15:53 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 19 Oct 2018 10:15:53 +0200 Subject: [Lazarus] Scaling of menuitem icons Message-ID: <68653c1f-7879-3150-bfbd-5ac6407c51a9@kluug.net> >  On my Linux + KDE system however icons of the IDE's main menuitems do not scale. > In KDE settings panel -> Fonts I set the "Force font's DPI" value to 144 which is about 150%. I remember I worked on it: 1.) Gtk2: I added support for Gtk2. See screenshot. It works well for me if I use "xrandr --dpi 144x144" as it is suggested in http://wiki.lazarus.freepascal.org/High_DPI Your settings revealed a bug in Gtk2 bindings. Patch is attached. 2.) Qt: I wasn't able to add support of high-resolution icons in menus under Qt. My conclusion was that either Qt itself or LCL-Qt bindings do not support big icons in menus. When I used the correct size icon in the menu it was always (badly) downscaled to 16x16 pixels. Greetings Ondrej -------------- next part -------------- Index: lcl/interfaces/gtk2/gtk2winapi.inc =================================================================== --- lcl/interfaces/gtk2/gtk2winapi.inc (revision 59319) +++ lcl/interfaces/gtk2/gtk2winapi.inc (working copy) @@ -4723,10 +4723,10 @@ //we will also have to add internal support for Papersizes etc.. LOGPIXELSX : { Logical pixels per inch in X } - Result := RoundToInt(gdk_screen_width / (GetScreenWidthMM / 25.4)); + Result := ScreenInfo.PixelsPerInchX; LOGPIXELSY : { Logical pixels per inch in Y } - Result := RoundToInt(gdk_screen_height / (GetScreenHeightMM / 25.4)); + Result := ScreenInfo.PixelsPerInchY; SIZEPALETTE: { number of entries in color palette } if GetVisual then -------------- next part -------------- A non-text attachment was scrubbed... Name: Laz-Gtk2.png Type: image/png Size: 41634 bytes Desc: not available URL: From zeljko at holobit.net Fri Oct 19 11:43:32 2018 From: zeljko at holobit.net (zeljko) Date: Fri, 19 Oct 2018 11:43:32 +0200 Subject: [Lazarus] Scaling of menuitem icons In-Reply-To: <68653c1f-7879-3150-bfbd-5ac6407c51a9@kluug.net> References: <68653c1f-7879-3150-bfbd-5ac6407c51a9@kluug.net> Message-ID: <3e895a26-7c01-50e9-6b1e-b8da543ac4c9@holobit.net> On 10/19/2018 10:15 AM, Ondrej Pokorny via Lazarus wrote: > >  On my Linux + KDE system however icons of the IDE's main menuitems > do not scale. > > In KDE settings panel -> Fonts I set the "Force font's DPI" value to > 144 which is about 150%. > > I remember I worked on it: > > 1.) Gtk2: I added support for Gtk2. See screenshot. It works well for me > if I use "xrandr --dpi 144x144" as it is suggested in > http://wiki.lazarus.freepascal.org/High_DPI > > Your settings revealed a bug in Gtk2 bindings. Patch is attached. > > 2.) Qt: I wasn't able to add support of high-resolution icons in menus > under Qt. My conclusion was that either Qt itself or LCL-Qt bindings do > not support big icons in menus. When I used the correct size icon in the > menu it was always (badly) downscaled to 16x16 pixels. Probably the only solution is to use QProxyStyle class. There's no QProxyStyle class in Qt4/Qt5 C bindings and to fix this problem it should be implemented with it's overrides. QProxyStyle can return any size for PM_SmallIconSize, but in that case we should know what's the current size of "normal" icons in LCL. zeljko From lazarus at kluug.net Fri Oct 19 11:46:55 2018 From: lazarus at kluug.net (Ondrej Pokorny) Date: Fri, 19 Oct 2018 11:46:55 +0200 Subject: [Lazarus] Scaling of menuitem icons In-Reply-To: <3e895a26-7c01-50e9-6b1e-b8da543ac4c9@holobit.net> References: <68653c1f-7879-3150-bfbd-5ac6407c51a9@kluug.net> <3e895a26-7c01-50e9-6b1e-b8da543ac4c9@holobit.net> Message-ID: <60c3836f-bd68-e5f3-a120-57d77bba0255@kluug.net> On 19.10.2018 11:43, zeljko wrote: > QProxyStyle can return any size for PM_SmallIconSize, but in that case > we should know what's the current size of "normal" icons in LCL. The current size of "normal" icons in LCL is perfectly known, as well as the size of any menu icon in LCL. Call the TMenuItem.GetIconSize function to get it. Ondrej From zeljko at holobit.net Fri Oct 19 11:50:45 2018 From: zeljko at holobit.net (zeljko) Date: Fri, 19 Oct 2018 11:50:45 +0200 Subject: [Lazarus] Scaling of menuitem icons In-Reply-To: <60c3836f-bd68-e5f3-a120-57d77bba0255@kluug.net> References: <68653c1f-7879-3150-bfbd-5ac6407c51a9@kluug.net> <3e895a26-7c01-50e9-6b1e-b8da543ac4c9@holobit.net> <60c3836f-bd68-e5f3-a120-57d77bba0255@kluug.net> Message-ID: <101087e8-6c0c-e09b-438c-2ec01197c077@holobit.net> On 10/19/2018 11:46 AM, Ondrej Pokorny wrote: > On 19.10.2018 11:43, zeljko wrote: >> QProxyStyle can return any size for PM_SmallIconSize, but in that case >> we should know what's the current size of "normal" icons in LCL. > > The current size of "normal" icons in LCL is perfectly known, as well as > the size of any menu icon in LCL. Call the TMenuItem.GetIconSize > function to get it. Tnx zeljko From juha.manninen62 at gmail.com Fri Oct 19 18:09:27 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 19 Oct 2018 19:09:27 +0300 Subject: [Lazarus] IDE Restriction Browser layout patch In-Reply-To: References: Message-ID: On Fri, Oct 19, 2018 at 8:55 AM AlexeyT via Lazarus wrote: > Patch adds BorderSpacing (6) for 3 main controls on the form. Applied in r59326. Thanks. Juha From juha.manninen62 at gmail.com Fri Oct 19 18:11:13 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 19 Oct 2018 19:11:13 +0300 Subject: [Lazarus] Scaling of menuitem icons In-Reply-To: <68653c1f-7879-3150-bfbd-5ac6407c51a9@kluug.net> References: <68653c1f-7879-3150-bfbd-5ac6407c51a9@kluug.net> Message-ID: On Fri, Oct 19, 2018 at 11:16 AM Ondrej Pokorny via Lazarus wrote: > Your settings revealed a bug in Gtk2 bindings. Patch is attached. Applied in r59325. It works now with GTK2. Very nice, thanks! Juha From l at c-m-w.me.uk Sun Oct 21 14:22:16 2018 From: l at c-m-w.me.uk (C Western) Date: Sun, 21 Oct 2018 13:22:16 +0100 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: <20180919135011.501e9aa0@limapholos.matflo.wg> References: <20180919135011.501e9aa0@limapholos.matflo.wg> Message-ID: On 19/09/2018 12:50, Mattias Gaertner via Lazarus wrote: > The Lazarus team is glad to announce the first release candidate of > Lazarus 2.0. I worked through installing and compiling with a fresh user on linux, and only noticed one issue. If I loaded a package (via "Package, Open Package File") with an unsatisfied dependency I saw a misleading error message "Unable to read file: /usr/lib64/lazarus/." This seems to be specific to a system wide install; I had installed the RPM version for testing, and I do not see this behaviour with my usual setup using an svn checkout for lazarus. Colin From bo.berglund at gmail.com Mon Oct 22 21:09:56 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 22 Oct 2018 21:09:56 +0200 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? Message-ID: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> I have a console program for Windows, which was developed using Delphi2007 and Indy10. Now I need to port this to Linux (Ubuntu Server 16.04-3 LTS on Intel i386 CPu). I have installed Lazarus 1.8.4-32 using the download from the official Lazarus site: lazarus-1.8.4-fpc-3.0.4-win32.exe So I have Lazarus ver 1.8.4 and FPC ver 3.0.4 rev 57972 on my Windows 7 Pro X64 laptop. I have also installed the IndyLaz package to get the Indy10 components and this works fine. Given that what do I have to download in order to build the project for Ubuntu Linux on the Intel platform? I am assuming that porting from Delphi2007 to Lazarus/FreePascal is OK... -- Bo Berglund Developer in Sweden From aaa5500 at ya.ru Mon Oct 22 21:45:53 2018 From: aaa5500 at ya.ru (Alexey) Date: Mon, 22 Oct 2018 22:45:53 +0300 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? In-Reply-To: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: <51296165-458D-4DEF-8801-AE140A31A76B@ya.ru> I would suggest to install FpcupDeluxe, in it you have button to install cross compilers. and then you can choose Target - Linux in Lazarus project options. Alex From bo.berglund at gmail.com Mon Oct 22 21:54:30 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 22 Oct 2018 21:54:30 +0200 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: On Mon, 22 Oct 2018 21:09:56 +0200, Bo Berglund via Lazarus wrote: >So I have Lazarus ver 1.8.4 and FPC ver 3.0.4 rev 57972 on my Windows >7 Pro X64 laptop. >I have also installed the IndyLaz package to get the Indy10 components >and this works fine. It turns out that this is false information! This version of FPC/Lazarus has not yet been provided with IndyLaz package. And I need OnLine Package Manager to do it. Now I am having problems because I cannot get the installation of OLPM to work... I have tried to install the OnlinePackageManager using instructions on this page: http://wiki.freepascal.org/Online_Package_Manager#Installation I did select the available package onlinepackagemanager 1.0, then hit Install Selection and waited a while until it was done. Then I assume it was rebuilding the IDE, but nothing much happened when it was done. So I exited Lazarus and started it again, then went over to Package Install/Uninstall only to find that the "available" list is now missing OLPM but at the same time it is not part of the other list and it does not show up on the main Package menu. In Package/Package Graph I can find the OLPM entry and it is marked with a green plus sign and when I click on it the info below shows this: Filename: C:\programs\lazarus_1.8.4-32\components\onlinepackagemanager\onlinepackagemanager.lpk State: Install on next start Description: Online package manger I have exited and restarted Lazarus several times already but it does not change a thing. No sign of OLPM. What can I do to actually register OLPM with my Lazarus? On previous installations this has "just worked" but not now.... -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Mon Oct 22 23:22:26 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 22 Oct 2018 23:22:26 +0200 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: On Mon, 22 Oct 2018 21:54:30 +0200, Bo Berglund via Lazarus wrote: >In Package/Package Graph I can find the OLPM entry and it is marked >with a green plus sign and when I click on it the info below shows >this: > >Filename: >C:\programs\lazarus_1.8.4-32\components\onlinepackagemanager\onlinepackagemanager.lpk >State: Install on next start >Description: Online package manger > >I have exited and restarted Lazarus several times already but it does >not change a thing. No sign of OLPM. > >What can I do to actually register OLPM with my Lazarus? > It seems like the problem was another package I had installed before but which dependent files could no longer be found. So I uninstalled that package first then reinstalled onlinepackagemanager and after some more cycles Indy10 has been installed. :) -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Oct 23 00:12:35 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Oct 2018 00:12:35 +0200 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: On Mon, 22 Oct 2018 21:09:56 +0200, Bo Berglund via Lazarus wrote: >I have a console program for Windows, which was developed using >Delphi2007 and Indy10. Now trying to compile the old Delphi sources in FPC/Lazarus and it stops in a common file on this type of construct: {$IF CompilerVersion >= 26} {Delphi XE5..} Fmt := TFormatSettings.Create; {$IFEND} The error message is: IniFileFuncs.pas(55,7) Error: Incompatible types: got "AnsiString" expected "Int64" IniFileFuncs.pas(55,7) Error: Compile time expression: Wanted Boolean but got at IF or ELSEIF I guess this might be a FPC difference to Delphi... How can I make FPC understand that this is a conditional it shall just ignore? -- Bo Berglund Developer in Sweden From freedos.la at gmail.com Tue Oct 23 01:04:56 2018 From: freedos.la at gmail.com (Ralf Quint) Date: Mon, 22 Oct 2018 16:04:56 -0700 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? In-Reply-To: References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: On 10/22/2018 3:12 PM, Bo Berglund via Lazarus wrote: > I guess this might be a FPC difference to Delphi... > How can I make FPC understand that this is a conditional it shall just > ignore? By first checking if you are compiling in FreePascal in the first place? {$IFNDEF FPC}   {$IF CompilerVersion >= 26} {Delphi XE5..}         Fmt := TFormatSettings.Create;   {$IFEND} {$IFEND} --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From bo.berglund at gmail.com Tue Oct 23 08:21:08 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Oct 2018 08:21:08 +0200 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: On Mon, 22 Oct 2018 21:09:56 +0200, Bo Berglund via Lazarus wrote: >I have a console program for Windows, which was developed using >Delphi2007 and Indy10. >Now I need to port this to Linux (Ubuntu Server 16.04-3 LTS on Intel >i386 CPu). >I have installed Lazarus 1.8.4-32 using the download from the official >Lazarus site: lazarus-1.8.4-fpc-3.0.4-win32.exe I have now succeeded in porting the code to Lazarus/FPC and it builds OK. A Windows32 exe file is produced. So now to crosscompile for Linux: When reading the wiki page http://wiki.lazarus.freepascal.org/Cross_compiling#From_Windows_to_Linux I understand that the IDE is ready to build for Linux out of the box provided it is the same CPU family on the target. So I changed the target from Default to Linux in ProjectOptions/CompilerOptions/ConfigAndTarget/TargetOS But when I try to build it does not work, instead I get the following error: Compile package FCL 1.0.1: Exit code 1, Errors: 1 Fatal: Cannot find system used by fcllaz of package FCL. I have no idea what this means, seems to have to do with Lazarus itself? What to do next? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Oct 23 09:00:04 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Oct 2018 09:00:04 +0200 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: On Tue, 23 Oct 2018 08:21:08 +0200, Bo Berglund via Lazarus wrote: >When reading the wiki page >http://wiki.lazarus.freepascal.org/Cross_compiling#From_Windows_to_Linux >I understand that the IDE is ready to build for Linux out of the box >provided it is the same CPU family on the target. >So I changed the target from Default to Linux in >ProjectOptions/CompilerOptions/ConfigAndTarget/TargetOS > >But when I try to build it does not work, instead I get the following >error: > >Compile package FCL 1.0.1: Exit code 1, Errors: 1 >Fatal: Cannot find system used by fcllaz of package FCL. > Is the wiki page falsely claiming that all you have to do to compile for Linux is to set the target to Linux? They say that the compiler is ready for all targets using the same CPU... I have looked in my installation directory of Lazarus 1.8.4 which was installed from the binary installer. There is only a single system.ppu there and it is in this dir: C:\Programs\lazarus_1.8.4-32\fpc\3.0.4\units\i386-win32\rtl Should there not be subdirectories for Linux too? Or how are you supposed to get these? -- Bo Berglund Developer in Sweden From nc-gaertnma at netcologne.de Tue Oct 23 10:40:33 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Tue, 23 Oct 2018 10:40:33 +0200 Subject: [Lazarus] Cross-compile console program to Linux (Ubuntu)? In-Reply-To: References: <4c7ssd1d31e74milr1sqpc55a7294kq7tk@4ax.com> Message-ID: <20181023104033.529455e0@limapholos.matflo.wg> On Tue, 23 Oct 2018 08:21:08 +0200 Bo Berglund via Lazarus wrote: >[...] > When reading the wiki page > http://wiki.lazarus.freepascal.org/Cross_compiling#From_Windows_to_Linux Did you install the binutils? Did you crossbuild the linux fpc files? > I understand that the IDE is ready to build for Linux out of the box > provided it is the same CPU family on the target. fpc calls for example ppcx64, which can cross compile to other OS for all x86_64 targets. But you need the cross compiled ppu and o files for this target, here linux. And for Linux you need the binutils as well. See the wiki. > So I changed the target from Default to Linux in > ProjectOptions/CompilerOptions/ConfigAndTarget/TargetOS That only works after installing the cross compiled fpc files. After changing the target OS, when you click Ok of the Project Options, you should have seen an Error dialog "Compiler C:\lazarus\....exe does not support target x86_64-linux". Mattias From bo.berglund at gmail.com Tue Oct 23 19:42:42 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 23 Oct 2018 19:42:42 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package Message-ID: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> I have decided to try out the version of Lazarus that can be installed via apt on a brand new installation of Ubuntu 18.04 wit MATE desktop. So I used this command: sudo apt install lazarus-ide This completed without errors and the Applications/Development menu contains Lazarus 1.8.2, which uses FPC 3.0.4 So far so good, now I wanted to open my console program project that works on Windows and build it for Linux. Since it uses INDY10 I needed OnLinePackageManager to install IndyLaz into Lazarus. But now I get into trouble! After I selected OLPM in Install/Uninstall Packages and set it for installation I clicked "Save and rebuild IDE" and it started doing things but then it stopped with an error: lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. What can I do now? I already have tried to install FPC 3.0.4 with Lazarus 1.8.4 from svn checked out sources but it failed because of a linking problem after 1m30s of make all activity for FPC. So that is why I tried the apt install route. Clearly installing via apt install should get a working system, but it seems not to do that. -- Bo Berglund Developer in Sweden From maaartinus at gmail.com Tue Oct 23 23:42:08 2018 From: maaartinus at gmail.com (Martin Grajcar) Date: Tue, 23 Oct 2018 23:42:08 +0200 Subject: [Lazarus] Use /dev/null for stdout Message-ID: My process may get started with or without console. In the latter case, any write leads to "Disk full" on MacOS. As I can't eliminate all writes, I'd need to open both stdout and stderr as /dev/null. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Wed Oct 24 01:38:14 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 02:38:14 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Tue, Oct 23, 2018 at 8:43 PM Bo Berglund via Lazarus wrote: > lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. Ubuntu's Lazarus package is faulty. Just get the sources directly from Subversion server and build them. svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0 cd lazarus_2_0 make ./lazarus As an extra bonus you will get latest bug fixes in future by running "svn up". My prediction is that you will ignore this advice and start to bang your head with .deb packages like many others do. The forum is full of threads by those people. Juha From teresa.williams at gmx.us Wed Oct 24 03:57:28 2018 From: teresa.williams at gmx.us (Teresa Williams) Date: Wed, 24 Oct 2018 03:57:28 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: > Sent: Wednesday, October 24, 2018 at 12:38 PM > From: "Juha Manninen via Lazarus" > To: bo.berglund at gmail.com, "Lazarus mailing list" > Cc: "Juha Manninen" > Subject: Re: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package > > On Tue, Oct 23, 2018 at 8:43 PM Bo Berglund via Lazarus > wrote: > > lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. > > Ubuntu's Lazarus package is faulty. Just get the sources directly from > Subversion server and build them. > > svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0 > cd lazarus_2_0 > make > ./lazarus > > As an extra bonus you will get latest bug fixes in future by running "svn up". > My prediction is that you will ignore this advice and start to bang > your head with .deb packages like many others do. The forum is full of > threads by those people. I know of no distribution which has both lazarus & fpc in valid packages packages. Some have one, but not both. An observation and a question: I have done this several times on opensuse Leap 14 and 15. Each time I have had fpc installed first: is that what you meant? Or does the svn repository include fpc now? And each time I have had to run make with -j1 Even on multiprocessor machines, parallel make runs into a race condition sooner or later, and report that a package cannot be found. Idle playing with the Makefile hasn't shed any light on why. Teresa From Amir at Aavani.net Wed Oct 24 05:46:02 2018 From: Amir at Aavani.net (Amir) Date: Tue, 23 Oct 2018 20:46:02 -0700 Subject: [Lazarus] Use /dev/null for stdout In-Reply-To: References: Message-ID: <1253f882-5257-756c-6335-02b6dd7bb8a1@Aavani.net> In Linux, I redirect stdin from a file (and/or stdout to a file) by putting "< input.txt"  ("> output.txt", respectively) in Run Parameters -> Command Line parameters. I believe that should work for MacOS... On 10/23/18 2:42 PM, Martin Grajcar via Lazarus wrote: > My process may get started with or without console. In the latter > case, any write leads to "Disk full" on MacOS. As I can't eliminate > all writes, I'd need to open both stdout and stderr as /dev/null. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From b_lists at patandbrian.org Wed Oct 24 07:40:10 2018 From: b_lists at patandbrian.org (Brian) Date: Wed, 24 Oct 2018 01:40:10 -0400 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> On 10/23/2018 07:38 PM, Juha Manninen via Lazarus wrote: > On Tue, Oct 23, 2018 at 8:43 PM Bo Berglund via Lazarus > wrote: >> lazarus.pp(1,1) Fatal: Cannot find lazcontroldsgn used by Lazarus. > > Ubuntu's Lazarus package is faulty. Just get the sources directly from > Subversion server and build them. > > svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ lazarus_2_0 > cd lazarus_2_0 > make > ./lazarus > > As an extra bonus you will get latest bug fixes in future by running "svn up". > My prediction is that you will ignore this advice and start to bang > your head with .deb packages like many others do. The forum is full of > threads by those people. > Just out of curiosity, might I ask how you feel about running the .DEBs downloaded from SourceForge? Brian. From juha.manninen62 at gmail.com Wed Oct 24 09:24:13 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 10:24:13 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Wed, Oct 24, 2018 at 4:57 AM Teresa Williams via Lazarus wrote: > I have done this several times on opensuse Leap 14 and 15. Each time I have had fpc installed first: is that what you meant? Or does the svn repository include fpc now? Yes, FPC must be installed first. Version 3.02 is enough to build latest Lazarus and most distros have at least that. FPC has its sources in a SVN repository, too, but building FPC is a little more difficult. I don't recommend it for new users. Getting and building Lazarus from sources however is so simple that anybody can do it. Just one "svn co ..." and then "make". > And each time I have had to run make with -j1 Even on multiprocessor machines, parallel make runs into a race condition sooner or later, and report that a package cannot be found. Idle playing with the Makefile hasn't shed any light on why. I guess you have compiled C code. Free Pascal does not have such problems as far as I know. At least for me "make" has worked always when building Lazarus. BTW, the default "make" target is "all". You can also use "make bigide" which includes the packages used for releases. Juha From juha.manninen62 at gmail.com Wed Oct 24 09:32:03 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 10:32:03 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> Message-ID: On Wed, Oct 24, 2018 at 8:40 AM Brian via Lazarus wrote: > Just out of curiosity, might I ask how you feel about running the > .DEBs downloaded from SourceForge? Apparently you have not read the forum threads about the issues caused by .DEBs. :) There are literally hundreds of them. Here is one: http://forum.lazarus-ide.org/index.php/topic,42393 Maybe we should collect them all somehow. External (not from distro repo) .DEBs are good for people who know the Debian package system well and can fix it when it gets screwed. For everybody else : * Stay away from external Debian packages! * Juha From b_lists at patandbrian.org Wed Oct 24 10:21:07 2018 From: b_lists at patandbrian.org (Brian) Date: Wed, 24 Oct 2018 04:21:07 -0400 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> Message-ID: <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> On 10/24/2018 03:32 AM, Juha Manninen via Lazarus wrote: > On Wed, Oct 24, 2018 at 8:40 AM Brian via Lazarus > wrote: >> Just out of curiosity, might I ask how you feel about running the >> .DEBs downloaded from SourceForge? > > Apparently you have not read the forum threads about the issues caused > by .DEBs. :) > There are literally hundreds of them. Here is one: > http://forum.lazarus-ide.org/index.php/topic,42393 > Maybe we should collect them all somehow. > > External (not from distro repo) .DEBs are good for people who know the > Debian package system well and can fix it when it gets screwed. > For everybody else : > * Stay away from external Debian packages! * > You're correct, I don't read the forums. I tend to the view that if I can't collect it with Thunderbird, then I don't have time to log in around all the various forums for my different packages, interests etc. FWIW, all that I've done (using Ubuntu 18.04, but also with previous versions of Ubuntu and Debian) is to lock all the FPC and Lazarus packages against upgrade from the repositories. When a new version comes out, I just download the DEBs from Sourceforge and install those manually. If there's a problem with using the DEBs from Sourceforge, then I'd like to know about it. Brian. From juha.manninen62 at gmail.com Wed Oct 24 11:19:54 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 12:19:54 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> Message-ID: On Wed, Oct 24, 2018 at 11:21 AM Brian via Lazarus wrote: > FWIW, all that I've done (using Ubuntu 18.04, but also with previous > versions of Ubuntu and Debian) is to lock all the FPC and Lazarus > packages against upgrade from the repositories. When a new version > comes out, I just download the DEBs from Sourceforge and install those > manually. If there's a problem with using the DEBs from Sourceforge, > then I'd like to know about it. You were lucky then. You must read details of those problems by searching the forum. It can be read also without logging in. The problems go beyond imagination. Here are just a few examples: https://forum.lazarus-ide.org/index.php/topic,42387.0.html https://forum.lazarus.freepascal.org/index.php/topic,41524.0.html https://forum.lazarus.freepascal.org/index.php/topic,41333 I also remember screwing up my Xubuntu package system when installing some external packages. Finally I switched to a rolling distro which has recent versions of the SW I am interested in. Building Lazarus from sources using "svn co" and "make" is so easy that I wonder why people refuse to do it. People want to try anything except for this most obvious and easiest way, including fpcupdeluxe which is an overkill for this simple task. Juha From bo.berglund at gmail.com Wed Oct 24 12:19:44 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 24 Oct 2018 12:19:44 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Wed, 24 Oct 2018 02:38:14 +0300, Juha Manninen via Lazarus wrote: >As an extra bonus you will get latest bug fixes in future by running "svn up". >My prediction is that you will ignore this advice and start to bang >your head with .deb packages like many others do. The forum is full of >threads by those people. > No, I decided to go the route of checking out the release sources and build from them. Needed the seed compiler 3.0.0 but advice here led me to where that could be fetched (important: It must be the 64 bit seed compiler!). So I followed my notes (actually a script) for installing FPC/Lazarus on RaspberryPi devices and it worked just fine. Had to change the Ubuntu desktop to xfce to get a decent start menu where I could install the start item for Lazarus 1.8.4. Now working fine! Source is the way to go! But I have another issue: My ported application uses Indy10 with the SMTP component and it must use SSL. On Windows I have put two SSL dll:s (libeay32.dll and ssleay32.dll) in the executable dir in order to get that going, but on Linux I assume there is another way to get SSL connectivity into an application. Right now my converted application builds and runs up until the point where it shall connect to the mail server with POP3 over SSL when an exception is generated due to not finding SSL.... Unfortunately I have not found if there are some similar dll type files on Linux that I need for SSL... -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Wed Oct 24 13:05:05 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 24 Oct 2018 13:05:05 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: <07k0tdli7ccuqj5pss7nrq1a9i9cvd6927@4ax.com> On Wed, 24 Oct 2018 12:19:44 +0200, Bo Berglund via Lazarus wrote: >But I have another issue: >My ported application uses Indy10 with the SMTP component and it must >use SSL. On Windows I have put two SSL dll:s (libeay32.dll and >ssleay32.dll) in the executable dir in order to get that going, but on >Linux I assume there is another way to get SSL connectivity into an >application. >Right now my converted application builds and runs up until the point >where it shall connect to the mail server with POP3 over SSL when an >exception is generated due to not finding SSL.... > >Unfortunately I have not found if there are some similar dll type >files on Linux that I need for SSL... Seems like it is not a problem with SSL because the application tha crashed when trying to retrieve email sent an exception alert email to me where it actually uses SSL as well! What was actually shown in one of the dialogs is this: "The file 'dl-error-skeleton.c' was not found. Do you want to locate it yourself?" So maybe a file needed by the Indy10 Pop3 component is not part of the package???? -- Bo Berglund Developer in Sweden From lazarus at mfriebe.de Wed Oct 24 13:07:22 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Wed, 24 Oct 2018 13:07:22 +0200 Subject: [Lazarus] Use /dev/null for stdout In-Reply-To: References: Message-ID: On 23/10/2018 23:42, Martin Grajcar via Lazarus wrote: > My process may get started with or without console. In the latter > case, any write leads to "Disk full" on MacOS. As I can't eliminate > all writes, I'd need to open both stdout and stderr as /dev/null. Have a look at logger frameworks. LazLogger is included: http://wiki.lazarus.freepascal.org/LazLogger Use "debugln" instead of "writeln". debugln will test if stdout is open or not. There are still cases where stdout can return a "disk full", those are (in the latest version) caught and ignored. From juha.manninen62 at gmail.com Wed Oct 24 13:10:33 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 14:10:33 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Wed, Oct 24, 2018 at 1:19 PM Bo Berglund via Lazarus wrote: > No, I decided to go the route of checking out the release sources and > build from them. Needed the seed compiler 3.0.0 but advice here led me > to where that could be fetched (important: It must be the 64 bit seed > compiler!). Why you had to build also FPC from sources? I first understood the problem was about installing Lazarus. > So I followed my notes (actually a script) for installing FPC/Lazarus > on RaspberryPi devices and it worked just fine. Had to change the > Ubuntu desktop to xfce to get a decent start menu where I could > install the start item for Lazarus 1.8.4. > Now working fine! Source is the way to go! Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? I don't know about the cross-platform SSL / email issues. Somebody else must answer that. Juha From b_lists at patandbrian.org Wed Oct 24 14:21:49 2018 From: b_lists at patandbrian.org (Brian) Date: Wed, 24 Oct 2018 08:21:49 -0400 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> Message-ID: <77688826-4dba-5add-0d3c-00dcda13d0d6@patandbrian.org> On 10/24/2018 05:19 AM, Juha Manninen via Lazarus wrote: Forgot to change the e-mail address on this post before I sent it, apologies if the other one somehow gets through and it appears twice. <...> > Building Lazarus from sources using "svn co" and "make" is so easy > that I wonder why people refuse to do it. > People want to try anything except for this most obvious and easiest > way, including fpcupdeluxe which is an overkill for this simple task. > I can't speak for why other people won't do it, but before I retired, I worked for a division of an extremely large company with a 'managed PC' environment, where we were strictly forbidden to install anything which could be regarded as beta-test software, and I'm absolutely certain that the SVN versions would be regarded in that light. *Approved* full releases only, no exceptions! This was in a testing laboratory environment, subject to ISO 9002 regulations, and breaking the policy was a disciplinary offence. I'm *NOT* defending the policy, just stating that it existed, and that I was subject to it. I had to get a fistful of exemptions from the IT department to be able to do my job as it was, the chances of my getting one to allow me to install incremental builds (of ANYTHING, not just Lazarus) varied from zero to slightly less than that. Now that I'm safely retired, OK, I'll take your recommendation, give the SVN version a whirl and see how it goes. Brian. From b_lists at patandbrian.org Wed Oct 24 14:45:45 2018 From: b_lists at patandbrian.org (Brian) Date: Wed, 24 Oct 2018 08:45:45 -0400 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> Message-ID: <69b29c2f-d146-c1eb-9801-9dad6b5f448e@patandbrian.org> On 10/24/2018 05:19 AM, Juha Manninen via Lazarus wrote: > Building Lazarus from sources using "svn co" and "make" is so easy > that I wonder why people refuse to do it. > People want to try anything except for this most obvious and easiest > way, including fpcupdeluxe which is an overkill for this simple task. > Well, here's an example for you of why people may refuse to use SVN. I downloaded the sources via svn and built Lazarus, no problem in that step. Then I ran V2.0 and started installing some packages I use. I got the following error on rebuilding Lazarus, line 1134 of IBCustomDataSet, which is " Result := ValidUTF8String(TextToSingleLine(Result))" The error message was "Identifier not found, ValidUTF8String". Now what? Brian. From bo.berglund at gmail.com Wed Oct 24 15:22:25 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 24 Oct 2018 15:22:25 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Wed, 24 Oct 2018 14:10:33 +0300, Juha Manninen via Lazarus wrote: >Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? Because it was the latest release tag I found... -- Bo Berglund Developer in Sweden From juha.manninen62 at gmail.com Wed Oct 24 17:54:53 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 18:54:53 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <69b29c2f-d146-c1eb-9801-9dad6b5f448e@patandbrian.org> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> <69b29c2f-d146-c1eb-9801-9dad6b5f448e@patandbrian.org> Message-ID: On Wed, Oct 24, 2018 at 3:21 PM Brian via Lazarus wrote: > I can't speak for why other people won't do it, but before I retired, > I worked for a division of an extremely large company with a 'managed > PC' environment, where we were strictly forbidden to install anything > which could be regarded as beta-test software, and I'm absolutely > certain that the SVN versions would be regarded in that light. > *Approved* full releases only, no exceptions! This was in a testing > laboratory environment, subject to ISO 9002 regulations, and breaking > the policy was a disciplinary offence. Yes I know there are such policies. In case of SVN fixes branches for released Lazarus versions, like fixes_1_8, the policy leads to having worse code. A fixes branch has the code from a release + recent bug fixes. It is better than the release by definition. On Wed, Oct 24, 2018 at 3:45 PM Brian via Lazarus wrote: > Well, here's an example for you of why people may refuse to use SVN. > > I downloaded the sources via svn and built Lazarus, no problem in that > step. > > Then I ran V2.0 and started installing some packages I use. > > I got the following error on rebuilding Lazarus, line 1134 of > IBCustomDataSet, which is > > " Result := ValidUTF8String(TextToSingleLine(Result))" > > The error message was "Identifier not found, ValidUTF8String". Where did you find IBCustomDataSet? I don't find it in FPC or Lazarus sources. ValidUTF8String was deprecated in Lazarus 1.7, then removed in 1.9 and thus 2.0. This is part of the normal deprecation / removal cycle, not related to using SVN. Is there ValidUTF8String in Delphi? In that case it should be restored preferably into the same unit Delphi has it. Again this is not related to using SVN. Juha From juha.manninen62 at gmail.com Wed Oct 24 17:58:44 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 18:58:44 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Wed, Oct 24, 2018 at 4:22 PM Bo Berglund via Lazarus wrote: > >Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? > Because it was the latest release tag I found... You found the release tag in fixes_1_8 branch? Ok, 2.0 has not been released yet but it will be soon(?). I dare to say it is better now than 1.8. Thus I recommend fixes_2_0 branch. You will get bug fixes there for years. Juha From bo.berglund at gmail.com Wed Oct 24 19:51:53 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 24 Oct 2018 19:51:53 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Wed, 24 Oct 2018 18:58:44 +0300, Juha Manninen via Lazarus wrote: >On Wed, Oct 24, 2018 at 4:22 PM Bo Berglund via Lazarus > wrote: >> >Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? >> Because it was the latest release tag I found... > >You found the release tag in fixes_1_8 branch? >Ok, 2.0 has not been released yet but it will be soon(?). I dare to >say it is better now than 1.8. >Thus I recommend fixes_2_0 branch. You will get bug fixes there for years. > I have always been using the tags list: https://svn.freepascal.org/svn/lazarus/tags/ and here are only immutable snapsots where I select the latest not set as RCx. Is that a bad practice? Do you mean that say fixes_1_8 contains these tags: lazarus_1_8_0 lazarus_1_8_2 lazarus_1_8_4 and the top of the fixes_1_8 branch has the very latest released fixes? If I already now have 1_8_4 as a tag and would like to switch it over to the fixes branch, how is that done? -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Wed Oct 24 19:57:23 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Wed, 24 Oct 2018 19:57:23 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <07k0tdli7ccuqj5pss7nrq1a9i9cvd6927@4ax.com> Message-ID: On Wed, 24 Oct 2018 13:05:05 +0200, Bo Berglund via Lazarus wrote: >"The file 'dl-error-skeleton.c' was not found. >Do you want to locate it yourself?" > >So maybe a file needed by the Indy10 Pop3 component is not part of the >package???? > Now I have nailed the problem with the dl-error-skeleton.c file! It turns out that this happens if I step through the code using Lazarus' debugging. When I reach the line: IdGetMail.Connect; and try to step over it I get the message and exception. But if I just let the program run without breakpoints in the function that collects the email, then there are no exceptions. The code just runs through! So apparently there is some bad interaction by Lazarus with the GNU debugger in play here.... -- Bo Berglund Developer in Sweden From juha.manninen62 at gmail.com Wed Oct 24 20:40:22 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Wed, 24 Oct 2018 21:40:22 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: On Wed, Oct 24, 2018 at 8:52 PM Bo Berglund via Lazarus wrote: > I have always been using the tags list: > https://svn.freepascal.org/svn/lazarus/tags/ > and here are only immutable snapsots where I select the latest not set as RCx. > Is that a bad practice? It is not bad but I think using the HEAD of a fixes branch is even better. Only bug fixes are merged there. New features stay in trunk. Every bug fix makes things better. > Do you mean that say fixes_1_8 contains these tags: > lazarus_1_8_0 > lazarus_1_8_2 > lazarus_1_8_4 > and the top of the fixes_1_8 branch has the very latest released fixes? Yes, except that fixes_1_8 branch is not updated any more as fixes_2_0 took its place. Here you can see what is already merged for the coming 2.0.0RC2: http://wiki.lazarus.freepascal.org/Lazarus_2.0_fixes_branch Thus the HEAD of fixes_2_0 is already much better than RC1. Most, maybe all, of those bugs exist in Lazarus 1.8.4, thus fixes_2_0 is way better. > If I already now have 1_8_4 as a tag and would like to switch it over > to the fixes branch, how is that done? I gave you instructions earlier in this thread. This is the fixes_2_0 branch: https://svn.freepascal.org/svn/lazarus/branches/fixes_2_0/ It may be easiest to do a new "svn checkout" for it and delete the old one. Juha From b_lists at patandbrian.org Wed Oct 24 21:16:34 2018 From: b_lists at patandbrian.org (Brian) Date: Wed, 24 Oct 2018 15:16:34 -0400 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> <69b29c2f-d146-c1eb-9801-9dad6b5f448e@patandbrian.org> Message-ID: <3107ab81-93e4-8e58-dca9-14ee97d7653c@patandbrian.org> On 10/24/2018 11:54 AM, Juha Manninen via Lazarus wrote: > On Wed, Oct 24, 2018 at 3:45 PM Brian via Lazarus > wrote: >> Well, here's an example for you of why people may refuse to use SVN. >> >> I downloaded the sources via svn and built Lazarus, no problem in that >> step. >> >> Then I ran V2.0 and started installing some packages I use. >> >> I got the following error on rebuilding Lazarus, line 1134 of >> IBCustomDataSet, which is >> >> " Result := ValidUTF8String(TextToSingleLine(Result))" >> >> The error message was "Identifier not found, ValidUTF8String". > > Where did you find IBCustomDataSet? I don't find it in FPC or Lazarus sources. > ValidUTF8String was deprecated in Lazarus 1.7, then removed in 1.9 and thus 2.0. > This is part of the normal deprecation / removal cycle, not related to > using SVN. > I allowed 2.0 to upgrade my 1.8.4 configuration, could that have been the mistake? I'm not sure where IBCustomDataSet came from. > Is there ValidUTF8String in Delphi? I don't know. This is a Xubuntu 18.04 box, I haven't used Delphi since Delphi 7. > In that case it should be restored > preferably into the same unit Delphi has it. > Again this is not related to using SVN. > Maybe not, but my point is that I was running the 1.8.4 .DEBs from SourceForge with no problems. I was a research chemist who had to teach himself how to program, not a computer scientist, and errors from deep inside code libraries tend to throw me, especially when it's object oriented code (yes, I'm that old). Anyway, I started uninstalling packages, and I do now have everything building correctly. Now it's just a case of finding out what I need to try to put back in again. Brian. From luca at wetron.es Wed Oct 24 21:35:59 2018 From: luca at wetron.es (Luca Olivetti) Date: Wed, 24 Oct 2018 21:35:59 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> Message-ID: <9f3e457f-799f-161e-1b20-5ba072c2c0d5@wetron.es> El 24/10/18 a les 13:10, Juha Manninen via Lazarus ha escrit: > > Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? I still have to keep 1.6.4 around due to a bug with bitpacked records in fpc 3. I use 1.8.4 for projects I can compile with fpc 3 (even if I provided some bug reports or fixes I don't trust it with fpc 2.6.4). I don't think that lazarus 2 will work with tpc 2.6.4, so I'll wait a while more before trying it. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From pascaldragon at googlemail.com Wed Oct 24 22:11:04 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Wed, 24 Oct 2018 22:11:04 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <9f3e457f-799f-161e-1b20-5ba072c2c0d5@wetron.es> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <9f3e457f-799f-161e-1b20-5ba072c2c0d5@wetron.es> Message-ID: Am 24.10.2018 um 21:35 schrieb Luca Olivetti via Lazarus: > El 24/10/18 a les 13:10, Juha Manninen via Lazarus ha escrit: > >> >> Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? > > I still have to keep 1.6.4 around due to a bug with bitpacked records > in fpc 3. > I use 1.8.4 for projects I can compile with fpc 3 (even if I provided > some bug reports or fixes I don't trust it with fpc 2.6.4). > I don't think that lazarus 2 will work with tpc 2.6.4, so I'll wait a > while more before trying it. What bug do you mean? Did you report it? Regards, Sven From luca at wetron.es Wed Oct 24 22:23:42 2018 From: luca at wetron.es (Luca Olivetti) Date: Wed, 24 Oct 2018 22:23:42 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <9f3e457f-799f-161e-1b20-5ba072c2c0d5@wetron.es> Message-ID: <020149bd-5f5b-23ca-6042-8bb9ba450a4c@wetron.es> El 24/10/18 a les 22:11, Sven Barth via Lazarus ha escrit: > Am 24.10.2018 um 21:35 schrieb Luca Olivetti via Lazarus: >> El 24/10/18 a les 13:10, Juha Manninen via Lazarus ha escrit: >> >>> >>> Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? >> >> I still have to keep 1.6.4 around due to a bug with bitpacked records >> in fpc 3. >> I use 1.8.4 for projects I can compile with fpc 3 (even if I provided >> some bug reports or fixes I don't trust it with fpc 2.6.4). >> I don't think that lazarus 2 will work with tpc 2.6.4, so I'll wait a >> while more before trying it. > What bug do you mean? Did you report it? https://bugs.freepascal.org/view.php?id=30208 (fixed but *not* in any released version) I discovered it when my program stopped working and I had to recompile it hastily with fpc 2.6.4. Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007 From pascaldragon at googlemail.com Wed Oct 24 22:36:24 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Wed, 24 Oct 2018 22:36:24 +0200 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <020149bd-5f5b-23ca-6042-8bb9ba450a4c@wetron.es> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <9f3e457f-799f-161e-1b20-5ba072c2c0d5@wetron.es> <020149bd-5f5b-23ca-6042-8bb9ba450a4c@wetron.es> Message-ID: <8e7cdc08-6c20-2a97-b40c-c1fb5dd4e1f1@googlemail.com> Am 24.10.2018 um 22:23 schrieb Luca Olivetti via Lazarus: > El 24/10/18 a les 22:11, Sven Barth via Lazarus ha escrit: >> Am 24.10.2018 um 21:35 schrieb Luca Olivetti via Lazarus: >>> El 24/10/18 a les 13:10, Juha Manninen via Lazarus ha escrit: >>> >>>> >>>> Why old Lazarus 1.8.4? Why don't you use the new 2.0 branch? >>> >>> I still have to keep 1.6.4 around due to a bug with bitpacked >>> records in fpc 3. >>> I use 1.8.4 for projects I can compile with fpc 3 (even if I >>> provided some bug reports or fixes I don't trust it with fpc 2.6.4). >>> I don't think that lazarus 2 will work with tpc 2.6.4, so I'll wait >>> a while more before trying it. >> What bug do you mean? Did you report it? > > https://bugs.freepascal.org/view.php?id=30208 > > (fixed but *not* in any released version) > > I discovered it when my program stopped working and I had to recompile > it hastily with fpc 2.6.4. Ah, okay. Then you'll be able to work with the upcoming 3.2 then. Maybe test your code with the fixes_3_2 branch to ensure that everything works? :) Regards, Sven From juha.manninen62 at gmail.com Wed Oct 24 23:12:31 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 25 Oct 2018 00:12:31 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <3107ab81-93e4-8e58-dca9-14ee97d7653c@patandbrian.org> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> <69b29c2f-d146-c1eb-9801-9dad6b5f448e@patandbrian.org> <3107ab81-93e4-8e58-dca9-14ee97d7653c@patandbrian.org> Message-ID: On Wed, Oct 24, 2018 at 10:16 PM Brian via Lazarus wrote: > Maybe not, but my point is that I was running the 1.8.4 .DEBs from > SourceForge with no problems. Yes but you are confusing unrelated things now. You were running Lazarus 1.8.4 with no problems because it had only deprecated ValidUTF8String instead of removing it. Using .deb packages was irrelevant. Getting sources for 1.8.4 through SVN would work equally well. This was in 1.8.4 : function ValidUTF8String(const s: String): String; inline; deprecated 'Use Utf8EscapeControlChars() instead.'; So the solution is to use Utf8EscapeControlChars() in IBCustomDataSet, whoever maintains it. Juha From juha.manninen62 at gmail.com Wed Oct 24 23:42:55 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 25 Oct 2018 00:42:55 +0300 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: <3107ab81-93e4-8e58-dca9-14ee97d7653c@patandbrian.org> References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> <69b29c2f-d146-c1eb-9801-9dad6b5f448e@patandbrian.org> <3107ab81-93e4-8e58-dca9-14ee97d7653c@patandbrian.org> Message-ID: On Wed, Oct 24, 2018 at 10:16 PM Brian via Lazarus wrote: > ... and errors from deep inside code libraries tend to throw me, > especially when it's object oriented code (yes, I'm that old). ValidUTF8String and Utf8EscapeControlChars are global functions. Nothing object oriented there. :) Looking at the code, ValidUTF8String was first renamed + deprecated and then removed for a reason. The name is misleading. Sounds like it checks the validity of a string while actually it escapes control chars. The new name is good and descriptive. Juha From b_lists at patandbrian.org Thu Oct 25 14:04:05 2018 From: b_lists at patandbrian.org (Brian) Date: Thu, 25 Oct 2018 08:04:05 -0400 Subject: [Lazarus] Installed lazarus-ide in Ubuntu18, cannot install package In-Reply-To: References: <8lmusd52obrk34sl9vea1beuv6eiq9grjt@4ax.com> <127b0c49-9964-ac2c-2500-260e331b7a46@patandbrian.org> <9febef83-1f20-ec5f-a506-e0513ca37670@patandbrian.org> <69b29c2f-d146-c1eb-9801-9dad6b5f448e@patandbrian.org> <3107ab81-93e4-8e58-dca9-14ee97d7653c@patandbrian.org> Message-ID: <769fc0a9-2660-a80b-5b41-495aa8a3074e@patandbrian.org> On 10/24/2018 05:42 PM, Juha Manninen via Lazarus wrote: > On Wed, Oct 24, 2018 at 10:16 PM Brian via Lazarus > wrote: >> ... and errors from deep inside code libraries tend to throw me, >> especially when it's object oriented code (yes, I'm that old). > > ValidUTF8String and Utf8EscapeControlChars are global functions. > Nothing object oriented there. :) > I know. I was talking generally, not about this specific problem. > Looking at the code, ValidUTF8String was first renamed + deprecated > and then removed for a reason. The name is misleading. Sounds like it > checks the validity of a string while actually it escapes control > chars. The new name is good and descriptive. > I'm still not sure where the unit came from. I admit that I have some rather old source code on this PC, but the only place I have my old Delphi 7 setup is inside an XP virtual machine. Brian. From fluisgirardi at gmail.com Thu Oct 25 15:08:39 2018 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Thu, 25 Oct 2018 10:08:39 -0300 Subject: [Lazarus] Remove unmatched vars in published Message-ID: Hi all! Lazarus has some feature, to remove all unmatched variable names (on published of class, specially on TForm class and it's descendants) that don't have a control or component with the same name? I'm working with big forms (process screens) and my coworkers are deleting some controls, but sometimes, Lazarus don't remove the variable. This behavior leads to some errors, like access violation, due access to a nil variable that still is referenced in code, but that is not created by the LFM reader (because it doesn't exist). If the variable is removed at the moment that the control is being deleted (or before save form) this erros will be filtered at compile time. -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vojtech.cihak at atlas.cz Thu Oct 25 16:07:40 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Thu, 25 Oct 2018 16:07:40 +0200 Subject: [Lazarus] =?utf-8?q?Remove_unmatched_vars_in_published?= In-Reply-To: 0000000091c60002dc60019b505e References: 0000000091c60002dc60019b505e Message-ID: <20181025160740.60723A53@atlas.cz> Hi,   do you mean that you add control on the form (let's say Button1), then you remove it (in designer) and line "Button1: TButton;" remains in source editor?   V. ______________________________________________________________ > Od: "Fabio Luis Girardi via Lazarus" > Komu: "Lazarus mailing list" > Datum: 25.10.2018 15:09 > Předmět: [Lazarus] Remove unmatched vars in published > Hi all!Lazarus has some feature, to remove all unmatched variable names (on published of class, specially on TForm class and it's descendants) that don't have a control or component with the same name?I'm working with big forms (process screens) and my coworkers are deleting some controls, but sometimes, Lazarus don't remove the variable. This behavior leads to some errors, like access violation, due access to a nil variable that still is referenced in code, but that is not created by the LFM reader (because it doesn't exist). If the variable is removed at the moment that the control is being deleted (or before save form) this erros will be filtered at compile time.-- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com ---------- -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus -------------- next part -------------- An HTML attachment was scrubbed... URL: From fluisgirardi at gmail.com Thu Oct 25 16:16:50 2018 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Thu, 25 Oct 2018 11:16:50 -0300 Subject: [Lazarus] Remove unmatched vars in published In-Reply-To: <20181025160740.60723A53@atlas.cz> References: <20181025160740.60723A53@atlas.cz> Message-ID: Yes, that's right. My coworkers reported that the same occurs when renaming controls/components. It's renamed at LFM file, but not in PAS file. No reported exception when deleting/renaming. Em qui, 25 de out de 2018 às 11:07, Vojtěch Čihák escreveu: > Hi, > > > > do you mean that you add control on the form (let's say Button1), then you > remove it (in designer) and line "Button1: TButton;" remains in source > editor? > > > > V. > > ______________________________________________________________ > > Od: "Fabio Luis Girardi via Lazarus" > > Komu: "Lazarus mailing list" > > Datum: 25.10.2018 15:09 > > Předmět: [Lazarus] Remove unmatched vars in published > > > Hi all! > Lazarus has some feature, to remove all unmatched variable names (on > published of class, specially on TForm class and it's descendants) that > don't have a control or component with the same name? > I'm working with big forms (process screens) and my coworkers are deleting > some controls, but sometimes, Lazarus don't remove the variable. This > behavior leads to some errors, like access violation, due access to a nil > variable that still is referenced in code, but that is not created by the > LFM reader (because it doesn't exist). If the variable is removed at the > moment that the control is being deleted (or before save form) this erros > will be filtered at compile time. > -- > The best regards, > > Fabio Luis Girardi > PascalSCADA Project > http://sourceforge.net/projects/pascalscada > http://www.pascalscada.com > > > ---------- > > -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From juha.manninen62 at gmail.com Thu Oct 25 16:59:09 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Thu, 25 Oct 2018 17:59:09 +0300 Subject: [Lazarus] Remove unmatched vars in published In-Reply-To: References: <20181025160740.60723A53@atlas.cz> Message-ID: Fabio Luis Girardi, if there is a systematic way to reproduce the error using the latest Lazarus (trunk or 2.0RC1) then please report in bug tracker. Juha From bo.berglund at gmail.com Thu Oct 25 18:46:11 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Thu, 25 Oct 2018 18:46:11 +0200 Subject: [Lazarus] Exception handling in Linux? Message-ID: <4ds3td569sess8lep8p6u3i71hanfbn3n5@4ax.com> I am working on a port of a Windows Win32 command line program (Delphi 2007) to Linux Ubuntu 18.04 64bit. I am almost done now and my tests show that the basic functionality works as intended. But I am not sure about the exception handling at all... In my code I have many instances of: try some code block except on E: Exception do begin LogDebug('Exception in module xxxx: ' + E.Message; end end; Now when testing I have experienced that Lazarus trows up an exception dialog when code inside such a construct is running (it typically comes from some Indy10 operation). When I hit Continue I expect the code to run the except block but it does not. There are no log messages concerning the exception.... So I wonder if this is a difference between Windows and Linux or some missing configuration setting on my part? -- Bo Berglund Developer in Sweden From fluisgirardi at gmail.com Thu Oct 25 19:09:52 2018 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Thu, 25 Oct 2018 14:09:52 -0300 Subject: [Lazarus] Remove unmatched vars in published In-Reply-To: References: <20181025160740.60723A53@atlas.cz> Message-ID: Hi Juha! I haven't a way to reproduce this, yet. Because of this I asked if Lazarus has way to remove unmatched instance class fields when saving the form/datamodule or that can be triggered manually. When I found a way to reproduce this and if this is related with Lazarus, I'll fill a bug report. Em Qui, 25 de out de 2018 11:59, Juha Manninen escreveu: > Fabio Luis Girardi, if there is a systematic way to reproduce the > error using the latest Lazarus (trunk or 2.0RC1) then please report in > bug tracker. > > Juha > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lazarus at mfriebe.de Thu Oct 25 19:14:12 2018 From: lazarus at mfriebe.de (Martin Frb) Date: Thu, 25 Oct 2018 19:14:12 +0200 Subject: [Lazarus] Remove unmatched vars in published In-Reply-To: References: <20181025160740.60723A53@atlas.cz> Message-ID: <72552147-3527-9514-8db6-c2e6cfb367cc@mfriebe.de> On 25/10/2018 19:09, Fabio Luis Girardi via Lazarus wrote: > Hi Juha! > > I haven't a way to reproduce this, yet. Because of this I asked if > Lazarus has way to remove unmatched instance class fields when saving > the form/datamodule or that can be triggered manually. > > When I found a way to reproduce this and if this is related with > Lazarus, I'll fill a bug report. > Afaik this can happen, if you have errors in the source code. Usually the error has to be in front of the form declaration. So Codetools can not parse the source to that point, and then the source can not be updated. I am not sure, if that can happen if the error is in a used unit. Again it would have to prevent codetools from parsing the unit with the form declaration. The problem with removing it later, is that the IDE can not know, if you added any fields yourself. From fluisgirardi at gmail.com Thu Oct 25 19:42:32 2018 From: fluisgirardi at gmail.com (Fabio Luis Girardi) Date: Thu, 25 Oct 2018 14:42:32 -0300 Subject: [Lazarus] Remove unmatched vars in published In-Reply-To: <72552147-3527-9514-8db6-c2e6cfb367cc@mfriebe.de> References: <20181025160740.60723A53@atlas.cz> <72552147-3527-9514-8db6-c2e6cfb367cc@mfriebe.de> Message-ID: Hi Martin! Em qui, 25 de out de 2018 às 14:14, Martin Frb via Lazarus < lazarus at lists.lazarus-ide.org> escreveu: > > > The problem with removing it later, is that the IDE can not know, if you > added any fields yourself. > When I add some field in a published section of a class, I avoid use the space where the IDE declares the form components/controls. I declare a new published section, something like this: TForm1 = class(TForm) Button1:TButton; Button2:TButton; Button3:TButton; Button4:TButton; //I dont declare published fields here. private / protected / public ... some private / protected / public fields ... published MyField:SomeType; end; But this is a question related with how each one handles their codes, which is not the point here. What's I'm suggesting is, a feature, like "Source -> Refactoring -> Empty methods..." but with a option (Source editor options) to enable/disable the published cleanup when saving the form. -- > _______________________________________________ > Lazarus mailing list > Lazarus at lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From leledumbo_cool at yahoo.co.id Fri Oct 26 06:40:25 2018 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Thu, 25 Oct 2018 21:40:25 -0700 (MST) Subject: [Lazarus] Use /dev/null for stdout In-Reply-To: References: Message-ID: <1540528825471-0.post@n3.nabble.com> > I'd need to open both stdout and stderr as /dev/null. Both are represented as System.Text (or ObjPas.TextFile) named System.Output and System.StdErr respectively (There are also System.StdOut and System.ErrOutput as their alias, but it looks like they're not proper alias but rather different instances pointing to the same file), you can System.Close, Re-System.Assign to '/dev/null' at runtime (start of your program, maybe?) then Re-Rewrite them. From that point onwards, every call to Write[Ln](...) will write to /dev/null. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From leledumbo_cool at yahoo.co.id Fri Oct 26 06:46:11 2018 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Thu, 25 Oct 2018 21:46:11 -0700 (MST) Subject: [Lazarus] Exception handling in Linux? In-Reply-To: <4ds3td569sess8lep8p6u3i71hanfbn3n5@4ax.com> References: <4ds3td569sess8lep8p6u3i71hanfbn3n5@4ax.com> Message-ID: <1540529171698-0.post@n3.nabble.com> > Now when testing I have experienced that Lazarus trows up an exception dialog when code inside such a construct is running The debugger by default catches all exceptions, handled or not, because it catches the exception before your handler (the except block). Configure exceptions to ignore in debugger options. > When I hit Continue I expect the code to run the except block but it does > not. There are too many possibilities, if you set a breakpoint in the LogDebug statement, after pressing continue, does the debugger stop there? -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ From bo.berglund at gmail.com Fri Oct 26 10:54:04 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Fri, 26 Oct 2018 10:54:04 +0200 Subject: [Lazarus] Lazarus tooltips do not work properly in Indy10 on Unix Message-ID: <5sj5tdhbu140jvffspb3mfr5vdmtvpqmoc@4ax.com> I discovered a strange IDE issue concerning the tooltips in Lazarus when using TIdFTP objects from Indy10. I have made two installations of Lazarus 1.8.4 + FPC 3.0.4, one on Windows7 and one in IUbuntu 18.04. I am working on a project ported from Delphi 2007 which uses Indy10. So in both IDE:s I have used the IndyLaz package (installed it via OnLine PackageManager). In both environments the project builds OK, no errors or warnings, but in the Lazarus IDE there are differences: Windows version: ---------------- If I type the name of a TIdFTP variable and wait a few seconds to get it highlighted, then type the period, the tooltips pop up with the possible methods I can use. This is expected and useful. Ubuntu Linux x64 version: ------------------------- If I do the same in this environment nothing pops up, instead there is an error message in the messages panel: Codetools, Errors: 1 IdGlobal.pas(1889,105) Error: expected ;, but deprecated found So I opened the iundicated line by clicking on the error message and got to this: {$IFDEF UNIX} GOffsetFromUTC: TDateTime = 0{$IFDEF HAS_DEPRECATED}{$IFDEF USE_SEMICOLON_BEFORE_DEPRECATED};{$ENDIF} deprecated{$ENDIF}; {$ENDIF} Apparently this line, which does not even exist on Windows breaks the tooltips in Lazarus without breaking the compiler 3.0.4. I have now tested a number of variations of this line without success: GOffsetFromUTC: TDateTime = 0 deprecated; ==> IdGlobal.pas(1890,33) Error: expected ;, but deprecated found GOffsetFromUTC: TDateTime = 0; deprecated; ==> IdGlobal.pas(1896,3) Error: expected end., but IndyPos found except: GOffsetFromUTC: TDateTime = 0; ==> This actually works in the IDE to bring up the IdFTP methods tooltips! And the project builds without any errors or warnings related to this, just warns about variables that are not used in my own code. They should be ifdef:ed for DELPHI... I asked Remy Lebeau about this and he suggested I report this on the Lazarus list since he has had debates before on this very issue... Why is there a construct like that in the IdGlobals file in the first place??? Lazarus without tool-tips for complex classes like this is no good. -- Bo Berglund Developer in Sweden From juha.manninen62 at gmail.com Fri Oct 26 11:41:21 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 26 Oct 2018 12:41:21 +0300 Subject: [Lazarus] Lazarus tooltips do not work properly in Indy10 on Unix In-Reply-To: <5sj5tdhbu140jvffspb3mfr5vdmtvpqmoc@4ax.com> References: <5sj5tdhbu140jvffspb3mfr5vdmtvpqmoc@4ax.com> Message-ID: If a syntax is accepted by FPC then it should be accepted also by CodeTools. Please open a bug report with a minimal example code. Do not include units from Indy. Just reduce the problematic line into its simplest form that triggers the bug. Juha From juha.manninen62 at gmail.com Fri Oct 26 11:48:25 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Fri, 26 Oct 2018 12:48:25 +0300 Subject: [Lazarus] Lazarus tooltips do not work properly in Indy10 on Unix In-Reply-To: References: <5sj5tdhbu140jvffspb3mfr5vdmtvpqmoc@4ax.com> Message-ID: BTW, what you call a tooltip is actually an identifier completion window. A tooltip is just a hint window for a ToolButton or similar. Juha From svaa at ciberpiula.net Fri Oct 26 12:50:34 2018 From: svaa at ciberpiula.net (Santiago A.) Date: Fri, 26 Oct 2018 12:50:34 +0200 Subject: [Lazarus] Exception handling in Linux? In-Reply-To: <4ds3td569sess8lep8p6u3i71hanfbn3n5@4ax.com> References: <4ds3td569sess8lep8p6u3i71hanfbn3n5@4ax.com> Message-ID: El 25/10/18 a las 18:46, Bo Berglund via Lazarus escribió: > I am working on a port of a Windows Win32 command line program (Delphi > 2007) to Linux Ubuntu 18.04 64bit. > > I am almost done now and my tests show that the basic functionality > works as intended. > But I am not sure about the exception handling at all... > > In my code I have many instances of: > try > some code block > except > on E: Exception do > begin > LogDebug('Exception in module xxxx: ' + E.Message; > end > end; > > Now when testing I have experienced that Lazarus trows up an exception > dialog when code inside such a construct is running (it typically > comes from some Indy10 operation). When I hit Continue I expect the > code to run the except block but it does not. > There are no log messages concerning the exception.... > > So I wonder if this is a difference between Windows and Linux or some > missing configuration setting on my part? > > Do you get that exception dialog when you run the executable out of the IDE environment? I mean, maybe the exception is handled inside indy10, so it is not propagated to the level of your except block. My theory is that the exception dialog is raised by Lazarus environment whenever an exception is raised, handled or not, and if you click "continue", then Indy10 handles it. -- Saludos Santiago A. From aaa5500 at ya.ru Fri Oct 26 20:21:16 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 26 Oct 2018 21:21:16 +0300 Subject: [Lazarus] Micro optimization for LazUtils Message-ID: added 2 inline's  + fixed for loop. -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: opt.diff Type: text/x-patch Size: 1218 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Fri Oct 26 21:22:29 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Fri, 26 Oct 2018 21:22:29 +0200 Subject: [Lazarus] Micro optimization for LazUtils In-Reply-To: References: Message-ID: <20181026212229.57aebd81@limapholos.matflo.wg> On Fri, 26 Oct 2018 21:21:16 +0300 AlexeyT via Lazarus wrote: > added 2 inline's  + fixed for loop. Thanks. Applied. Mattias From aaa5500 at ya.ru Fri Oct 26 21:30:05 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 26 Oct 2018 22:30:05 +0300 Subject: [Lazarus] Forms.pp function error? Message-ID: <8d6dd3b8-4366-0f62-cbbc-330065654423@ya.ru> As pointed by Dmitry B, and checked by myself in LCL, MK_ALT must be defined in LCLType.pp as $20000000. For ex, this is sample from qtwidgets.pas:   if (ModifierState and MK_SHIFT) <> 0 then     Msg.State := [ssShift];   if (ModifierState and MK_CONTROL) <> 0 then     Msg.State := [ssCtrl] + Msg.State;   if (ModifierState and $20000000) <> 0 then     Msg.State := [ssAlt] + Msg.State; patch added. -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: mkalt.diff Type: text/x-patch Size: 402 bytes Desc: not available URL: From aaa5500 at ya.ru Fri Oct 26 22:08:18 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Fri, 26 Oct 2018 23:08:18 +0300 Subject: [Lazarus] Patch for MK_ALT Message-ID: revised patch (ignore prev message about "Forms.pp function error"). Needs some testing on Carbon/Cocoa, because MK_ALT const is defined in Mac WS'es. -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: mkalt2.diff Type: text/x-patch Size: 7376 bytes Desc: not available URL: From nc-gaertnma at netcologne.de Sat Oct 27 10:56:27 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 27 Oct 2018 10:56:27 +0200 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: References: <20180919135011.501e9aa0@limapholos.matflo.wg> Message-ID: <20181027105627.0f72bc37@limapholos.matflo.wg> On Sun, 21 Oct 2018 13:22:16 +0100 C Western via Lazarus wrote: > On 19/09/2018 12:50, Mattias Gaertner via Lazarus wrote: > > The Lazarus team is glad to announce the first release candidate of > > Lazarus 2.0. > > I worked through installing and compiling with a fresh user on linux, > and only noticed one issue. If I loaded a package (via "Package, Open > Package File") with an unsatisfied dependency I saw a misleading error > message "Unable to read file: /usr/lib64/lazarus/." This seems to be > specific to a system wide install; I had installed the RPM version for > testing, and I do not see this behaviour with my usual setup using an > svn checkout for lazarus. Here on fedora core the IDE opens the package editor showing the dependency with the error icon (red exclamation mark). No message. Can you provide an example broken package? Mattias From bo.berglund at gmail.com Sat Oct 27 12:25:04 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 12:25:04 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine Message-ID: Using Lazarus 1.8.4 and FPC 3.0.4 64 bit on Ubuntu 18.04 64 bit. Project built and runs fine on dev system. Now copied executable to an Ubuntu Server 16.04 64 bit and tried to run it. But here I get an immediate error: ./LicMgr: error while loading shared libraries: libgdk-x11-2.0.so.0: cannot open shared object file: No such file or directory In my code there is no such request so it must be something built into the executable when compiled on Ubuntu 18.04, but how can I fix this? The dev machine has a GUI interface (otherwise Lazarus would not work) but the program itself is purely non-gui, it is just a Pascal program and it does not even send output to the console, just handles files and networking. Still the name libgdk-x11-2.0 suggests that it has something to do with X... Any ideas how I can remove dependencies of whatever libgdk-x11-2.0 means? The Ubuntu Server 16.04 is meant to be the home of this utility... -- Bo Berglund Developer in Sweden From nc-gaertnma at netcologne.de Sat Oct 27 12:43:02 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 27 Oct 2018 12:43:02 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: Message-ID: <20181027124302.0f9fb083@limapholos.matflo.wg> On Sat, 27 Oct 2018 12:25:04 +0200 Bo Berglund via Lazarus wrote: > Using Lazarus 1.8.4 and FPC 3.0.4 64 bit on Ubuntu 18.04 64 bit. > Project built and runs fine on dev system. > > Now copied executable to an Ubuntu Server 16.04 64 bit and tried to > run it. But here I get an immediate error: > > ./LicMgr: error while loading shared libraries: libgdk-x11-2.0.so.0: > cannot open shared object file: No such file or directory > > In my code there is no such request so it must be something built into > the executable when compiled on Ubuntu 18.04, but how can I fix this? Either install libgtk2.0-0 or remove the dependency. > The dev machine has a GUI interface (otherwise Lazarus would not work) > but the program itself is purely non-gui, it is just a Pascal program > and it does not even send output to the console, just handles files > and networking. Still the name libgdk-x11-2.0 suggests that it has > something to do with X... Maybe your project uses the LCL either directly or indirectly. See Project Inspector. If yes, remove it or set it to lclwidgettype "nogui". > Any ideas how I can remove dependencies of whatever libgdk-x11-2.0 > means? > > The Ubuntu Server 16.04 is meant to be the home of this utility... Mattias From bo.berglund at gmail.com Sat Oct 27 13:03:32 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 13:03:32 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> Message-ID: On Sat, 27 Oct 2018 12:43:02 +0200, Mattias Gaertner via Lazarus wrote: >Either install libgtk2.0-0 or remove the dependency. I don't know how to "remove dependency" When I work in Ubuntu 18.04 I am using the Xfce desktop, but the programI am building has no GUI components whatsoever, so why should there be any dependency towards X11? > >> The dev machine has a GUI interface (otherwise Lazarus would not work) >> but the program itself is purely non-gui, it is just a Pascal program >> and it does not even send output to the console, just handles files >> and networking. Still the name libgdk-x11-2.0 suggests that it has >> something to do with X... > >Maybe your project uses the LCL either directly or indirectly. See >Project Inspector. >If yes, remove it or set it to lclwidgettype "nogui". > I had LCL there as Required package, but I removed it. When I build the project the resulting binary is exactly the same size, so there could not be anythingadded or deleted to the program... The only external I can think of is needed is OpenSSH since my Indy10 external mail connection uses encrypted communication. But tah would not be related to X11, right? And I have not used any directive for it (other than what mau be hidden inside Indy10). -- Bo Berglund Developer in Sweden From aaa5500 at ya.ru Sat Oct 27 13:16:58 2018 From: aaa5500 at ya.ru (AlexeyT) Date: Sat, 27 Oct 2018 14:16:58 +0300 Subject: [Lazarus] More inline's for LazUtils Message-ID: <331ba791-54a0-4eef-a06d-086bb5fc3fff@ya.ru> patch adds inline to NN tiny functions. -- Regards, Alexey -------------- next part -------------- A non-text attachment was scrubbed... Name: inl.diff Type: text/x-patch Size: 12155 bytes Desc: not available URL: From pascaldragon at googlemail.com Sat Oct 27 13:39:12 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 27 Oct 2018 13:39:12 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> Message-ID: <82448ba6-884f-5086-9f9f-4a1f099b7de5@googlemail.com> Am 27.10.2018 um 13:03 schrieb Bo Berglund via Lazarus: > >>> The dev machine has a GUI interface (otherwise Lazarus would not work) >>> but the program itself is purely non-gui, it is just a Pascal program >>> and it does not even send output to the console, just handles files >>> and networking. Still the name libgdk-x11-2.0 suggests that it has >>> something to do with X... >> Maybe your project uses the LCL either directly or indirectly. See >> Project Inspector. >> If yes, remove it or set it to lclwidgettype "nogui". >> > I had LCL there as Required package, but I removed it. > When I build the project the resulting binary is exactly the same > size, so there could not be anythingadded or deleted to the program... > > The only external I can think of is needed is OpenSSH since my Indy10 > external mail connection uses encrypted communication. But tah would > not be related to X11, right? > And I have not used any directive for it (other than what mau be > hidden inside Indy10). Binaries usually have aligned sections so removing or adding just a small bit (like the dependency on gdk in your case introduced by the LCL) does not necessarily mean a change in size. You could also try "objdump -x /path/to/your/binary" and look at was is listed as NEEDED in the Dynamic Section. You'd then need to find out what dependencies you don't want to have and then figure out which units led to their inclusion. Maybe it's just a stray unit that pulls in some GUI dependencies. Regards, Sven Regards, Sven From juha.manninen62 at gmail.com Sat Oct 27 13:57:39 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 27 Oct 2018 14:57:39 +0300 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> Message-ID: On Sat, Oct 27, 2018 at 2:03 PM Bo Berglund via Lazarus wrote: > I had LCL there as Required package, but I removed it. So you know how to remove a dependency! How did the LCL dependency come there if you created a console program? Juha From bo.berglund at gmail.com Sat Oct 27 13:58:16 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 13:58:16 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> <82448ba6-884f-5086-9f9f-4a1f099b7de5@googlemail.com> Message-ID: <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> On Sat, 27 Oct 2018 13:39:12 +0200, Sven Barth via Lazarus wrote: >Binaries usually have aligned sections so removing or adding just a >small bit (like the dependency on gdk in your case introduced by the >LCL) does not necessarily mean a change in size. > >You could also try "objdump -x /path/to/your/binary" and look at was is >listed as NEEDED in the Dynamic Section. You'd then need to find out >what dependencies you don't want to have and then figure out which units >led to their inclusion. Maybe it's just a stray unit that pulls in some >GUI dependencies. > I tried to upgrade, dist-upgrade the server to remove the logon greeting about available updates then rebooted. No difference. Then I tried by installing xfce4 desktop, thinking that this would deposit the X11 stuff into the system. But it did not solve the problem even though the start error message now changed to: (LicMgr:19268): Gtk-WARNING **: cannot open display: So clearly there was a problem somewhere here concerning X11 and it is gone, but replaced with this display stuff... I *really* need to get this program running without any GUI references since it is supposed to be run by cron every 10 minutes to process website generated request emails... And the server itself is never accessed except via the command line over the network. I am currently some 8400 km away from the physical location of the server.... -- Bo Berglund Developer in Sweden From robin.listas at telefonica.net Sat Oct 27 14:03:16 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Sat, 27 Oct 2018 14:03:16 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> References: <20181027124302.0f9fb083@limapholos.matflo.wg> <82448ba6-884f-5086-9f9f-4a1f099b7de5@googlemail.com> <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> Message-ID: <1c895f1a-22ad-aaee-347a-fc6bf0030318@telefonica.net> On 27/10/2018 13.58, Bo Berglund via Lazarus wrote: > I tried to upgrade, dist-upgrade the server to remove the logon > greeting about available updates then rebooted. > No difference. > > Then I tried by installing xfce4 desktop, thinking that this would > deposit the X11 stuff into the system. But it did not solve the > problem even though the start error message now changed to: IMHO, that's the wrong approach. You have to remove the dependency, somehow, not fulfill it. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From bo.berglund at gmail.com Sat Oct 27 14:31:31 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 14:31:31 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> Message-ID: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> On Sat, 27 Oct 2018 14:57:39 +0300, Juha Manninen via Lazarus wrote: >On Sat, Oct 27, 2018 at 2:03 PM Bo Berglund via Lazarus > wrote: >> I had LCL there as Required package, but I removed it. > >So you know how to remove a dependency! >How did the LCL dependency come there if you created a console program? I ported an existing Delphi console program to Lazarus using its conversion function. It was a test to get around a problem running the original program on a new Windows 2016 Server machine... After conversion it complained about directive {$APPTYPE CONSOLE} being unrecognized so I had to IFNDEF FPC that line so it is only visible in Delphi (which I rarely use these days)... I assume that the converter brought in LCL, but I have removed it today, did not make a difference. Is there a way to tell Lazarus a program is meant to be a console (command line) type program without GUI connections? Or should I start over and create a new console program in Lazarus and then bring in the units I have used for certain functions and also change the main dpr file into a normal unit? -- Bo Berglund Developer in Sweden From l at c-m-w.me.uk Sat Oct 27 14:34:26 2018 From: l at c-m-w.me.uk (C Western) Date: Sat, 27 Oct 2018 13:34:26 +0100 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: <20181027105627.0f72bc37@limapholos.matflo.wg> References: <20180919135011.501e9aa0@limapholos.matflo.wg> <20181027105627.0f72bc37@limapholos.matflo.wg> Message-ID: On 27/10/2018 09:56, Mattias Gaertner via Lazarus wrote: > On Sun, 21 Oct 2018 13:22:16 +0100 > C Western via Lazarus wrote: > >> On 19/09/2018 12:50, Mattias Gaertner via Lazarus wrote: >>> The Lazarus team is glad to announce the first release candidate of >>> Lazarus 2.0. >> I worked through installing and compiling with a fresh user on linux, >> and only noticed one issue. If I loaded a package (via "Package, Open >> Package File") with an unsatisfied dependency I saw a misleading error >> message "Unable to read file: /usr/lib64/lazarus/." This seems to be >> specific to a system wide install; I had installed the RPM version for >> testing, and I do not see this behaviour with my usual setup using an >> svn checkout for lazarus. > Here on fedora core the IDE opens the package editor showing the > dependency with the error icon (red exclamation mark). No message. > > Can you provide an example broken package? > Did you try this starting the IDE with an empty .lazarus directory? I am not sure I made it clear in the original message, but this was on first run of the RC Lazarus, and I was loading my usual set of packages preparatory to recompiling Lazarus. Colin From nc-gaertnma at netcologne.de Sat Oct 27 14:37:02 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 27 Oct 2018 14:37:02 +0200 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: References: <20180919135011.501e9aa0@limapholos.matflo.wg> <20181027105627.0f72bc37@limapholos.matflo.wg> Message-ID: <20181027143702.17b7ad70@limapholos.matflo.wg> On Sat, 27 Oct 2018 13:34:26 +0100 C Western via Lazarus wrote: >[...] > Did you try this starting the IDE with an empty .lazarus directory? Yes, exactly. > I am > not sure I made it clear in the original message, but this was on first > run of the RC Lazarus, and I was loading my usual set of packages > preparatory to recompiling Lazarus. Maybe one of these packages makes the difference? Mattias From bo.berglund at gmail.com Sat Oct 27 14:32:38 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 14:32:38 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> <82448ba6-884f-5086-9f9f-4a1f099b7de5@googlemail.com> <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> <1c895f1a-22ad-aaee-347a-fc6bf0030318@telefonica.net> Message-ID: On Sat, 27 Oct 2018 14:03:16 +0200, "Carlos E. R. via Lazarus" wrote: >On 27/10/2018 13.58, Bo Berglund via Lazarus wrote: > >> I tried to upgrade, dist-upgrade the server to remove the logon >> greeting about available updates then rebooted. >> No difference. >> >> Then I tried by installing xfce4 desktop, thinking that this would >> deposit the X11 stuff into the system. But it did not solve the >> problem even though the start error message now changed to: > >IMHO, that's the wrong approach. > >You have to remove the dependency, somehow, not fulfill it. That is the problem, I don't know how to remove a dependency like this... -- Bo Berglund Developer in Sweden From aaa5500 at ya.ru Sat Oct 27 14:46:34 2018 From: aaa5500 at ya.ru (Alexey) Date: Sat, 27 Oct 2018 15:46:34 +0300 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> <82448ba6-884f-5086-9f9f-4a1f099b7de5@googlemail.com> <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> <1c895f1a-22ad-aaee-347a-fc6bf0030318@telefonica.net> Message-ID: <02A9794D-F1A6-41D9-9E1E-9A115F9507A2@ya.ru> I have an idea. Make an error in some gtk2 widget set unit. Build. Then you ll see which part of the app requires gtk2 code. Alexey From bo.berglund at gmail.com Sat Oct 27 15:35:05 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 15:35:05 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> Message-ID: On Sat, 27 Oct 2018 14:31:31 +0200, Bo Berglund via Lazarus wrote: >Or should I start over and create a new console program in Lazarus and >then bring in the units I have used for certain functions and also >change the main dpr file into a normal unit? I did this and created a new "Program", which was labeled in Lazarus as a Free Pascal command line program. Then I added my units from the other project and converted the dpr file into a pas unit by moving away the final begin-code-end proram section to the newly created program's source file. Had to fix sections etc in the old dpr file so it now is a proper unit. But once done it built OK and worked as expected in Ubuntu 18.04. The stripped size of this program as about 10 Mb whereas the earlier version was only some 7 Mb... But when I copied it over into the Ubuntu 16.04 server it again displayed the GTK error... (LicMgr:19450): Gtk-WARNING **: cannot open display: It should not need a display! -- Bo Berglund Developer in Sweden From nc-gaertnma at netcologne.de Sat Oct 27 16:06:07 2018 From: nc-gaertnma at netcologne.de (Mattias Gaertner) Date: Sat, 27 Oct 2018 16:06:07 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> Message-ID: <20181027160607.0603ab21@limapholos.matflo.wg> On Sat, 27 Oct 2018 15:35:05 +0200 Bo Berglund via Lazarus wrote: >[...] > (LicMgr:19450): Gtk-WARNING **: cannot open display: > > It should not need a display! Then remove the gtk dependency. Check Compiler options / Show Options / Inherited Parameters if you are using the LCL. If yes then use the Project Inspector, double click on the required packages to see their dependencies. Or use Package / Package graph to see the dependencies. If no, then some unit uses the gtk2 directly. Use "View / Unit Dependencies" to find out which one. Mattias From juha.manninen62 at gmail.com Sat Oct 27 17:00:56 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 27 Oct 2018 18:00:56 +0300 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> Message-ID: On Sat, Oct 27, 2018 at 4:35 PM Bo Berglund via Lazarus wrote: > Had to fix sections etc in the old dpr file so it now is a proper unit. You have a .lpr file in the Lazarus project, right? Not .dpr? > But once done it built OK and worked as expected in Ubuntu 18.04. > The stripped size of this program as about 10 Mb whereas the earlier > version was only some 7 Mb... With LCL it was 7 Mb and without LCL 10 Mb. Strange. > (LicMgr:19450): Gtk-WARNING **: cannot open display: There is no unit called LicMgr in FPC or Lazarus sources. Is it part of your project? BTW, the Delphi converter is buggy if it adds LCL dependency for a console program. It should not. If you send me a test program then I can have a look. Juha From mse00000 at gmail.com Sat Oct 27 17:23:58 2018 From: mse00000 at gmail.com (Martin Schreiber) Date: Sat, 27 Oct 2018 17:23:58 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <1c895f1a-22ad-aaee-347a-fc6bf0030318@telefonica.net> Message-ID: <201810271723.58414.mse00000@gmail.com> On Saturday 27 October 2018 14:32:38 Bo Berglund via Lazarus wrote: > > That is the problem, I don't know how to remove a dependency like > this... > Another option: - Compile the project with -vu, copy the message to a file. - Analise the file with the MSEunitdep tool from here: https://gitlab.com/mseide-msegui/mseide-msegui/tree/master/tools/unitdep - Setup 'Start Unit' and 'Dest- Unit' in order to check the dependency path, see the screenshot: https://mseide-msegui.sourceforge.io/pics/mseunitdep.png Martin From pascaldragon at googlemail.com Sat Oct 27 17:46:22 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 27 Oct 2018 17:46:22 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> Message-ID: Bo Berglund via Lazarus schrieb am Sa., 27. Okt. 2018, 14:31: > After conversion it complained about directive {$APPTYPE CONSOLE} > being unrecognized so I had to IFNDEF FPC that line so it is only > visible in Delphi (which I rarely use these days)... > It's only a warning, not an error. The $AppType directive is only handled on targets that have a distinction for binary types (e.g. Windows which has GUI and Console or Classic Mac OS which has Tool). Unix-like systems like Linux do not differ between console and GUI programs in that way and thus the directive is ignored(!) there. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascaldragon at googlemail.com Sat Oct 27 17:56:15 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Sat, 27 Oct 2018 17:56:15 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> References: <20181027124302.0f9fb083@limapholos.matflo.wg> <82448ba6-884f-5086-9f9f-4a1f099b7de5@googlemail.com> <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> Message-ID: Bo Berglund via Lazarus schrieb am Sa., 27. Okt. 2018, 13:58: > On Sat, 27 Oct 2018 13:39:12 +0200, Sven Barth via Lazarus > wrote: > > >Binaries usually have aligned sections so removing or adding just a > >small bit (like the dependency on gdk in your case introduced by the > >LCL) does not necessarily mean a change in size. > > > >You could also try "objdump -x /path/to/your/binary" and look at was is > >listed as NEEDED in the Dynamic Section. You'd then need to find out > >what dependencies you don't want to have and then figure out which units > >led to their inclusion. Maybe it's just a stray unit that pulls in some > >GUI dependencies. > > > > I tried to upgrade, dist-upgrade the server to remove the logon > greeting about available updates then rebooted. > No difference. > > Then I tried by installing xfce4 desktop, thinking that this would > deposit the X11 stuff into the system. But it did not solve the > problem even though the start error message now changed to: > > (LicMgr:19268): Gtk-WARNING **: cannot open display: > > So clearly there was a problem somewhere here concerning X11 and it is > gone, but replaced with this display stuff... > > I *really* need to get this program running without any GUI references > since it is supposed to be run by cron every 10 minutes to process > website generated request emails... > And the server itself is never accessed except via the command line > over the network. I am currently some 8400 km away from the physical > location of the server.... > As others already wrote you should not try to fulfill twee dependency on t he server, but to remove it from your binary. For this you need to find out what unit pulls in that dependency and get rid of that. You can maybe use the Unit Dependencies window for that (see http://wiki.freepascal.org/IDE_Window:_Unit_dependencies ). Alternatively you could try to switch the LCLWidgetType to NoGUI as had already been suggested by Mattias as well and try whether that is sufficient. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Sat Oct 27 18:11:46 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 18:11:46 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> Message-ID: On Sat, 27 Oct 2018 18:00:56 +0300, Juha Manninen via Lazarus wrote: >On Sat, Oct 27, 2018 at 4:35 PM Bo Berglund via Lazarus > wrote: >> Had to fix sections etc in the old dpr file so it now is a proper unit. > >You have a .lpr file in the Lazarus project, right? Not .dpr? In the converted Delphi project I started with a .dpr file that contained all active code except for two units to read Ini files mor easily and to create Unix style hashed passwords. When it was done it still used the dpr file as the main program source. >> But once done it built OK and worked as expected in Ubuntu 18.04. >> The stripped size of this program as about 10 Mb whereas the earlier >> version was only some 7 Mb... > >With LCL it was 7 Mb and without LCL 10 Mb. Strange. > >> (LicMgr:19450): Gtk-WARNING **: cannot open display: > >There is no unit called LicMgr in FPC or Lazarus sources. Is it part >of your project? My program is called LicMgr because it ie meant to create and send demo licenses to people asking on our website. For this it needs to: - Read incoming email (Indy 10) - Parse the messages for validity - If valid: - Create a new login entry on the server, so it needs to: - Read the password file from the server using FTP (Indy10) - Add the new entry to the end - Make sure there is not already a duplicate - Upload the modified password file (Indy10) - Compose an email to the customer with a link and login - Send the email (Indy10) - Log all activity including saving who is getting logins > >BTW, the Delphi converter is buggy if it adds LCL dependency for a >console program. It should not. Well, I created a new project from scratch and added in my units, still the same problem. >If you send me a test program then I can have a look. I will try to make one from scratch and see what happens. If still the same then I might take you up on that... -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sat Oct 27 18:20:14 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sat, 27 Oct 2018 18:20:14 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> Message-ID: On Sat, 27 Oct 2018 16:06:07 +0200, Mattias Gaertner via Lazarus wrote: >On Sat, 27 Oct 2018 15:35:05 +0200 >Bo Berglund via Lazarus wrote: > >>[...] >> (LicMgr:19450): Gtk-WARNING **: cannot open display: >> >> It should not need a display! > >Then remove the gtk dependency. >Check Compiler options / Show Options / Inherited Parameters if you >are using the LCL. Well, I took LCL out of the project and it still has these problems. Right now the Project Inspector only shows a single Required Package and this is "indylaz" > >If yes then use the Project Inspector, double click on the required >packages to see their dependencies. Or use Package / Package graph to >see the dependencies. This amazingly shows: LCL IDEIntf FCL (>=1.0) But I think these are for the Lazarus IDE integration of the visual components and I am not using any forms or such so there is no use for this. Now I am at a loss as to how I can use Indy without bringing in IndyLaz, just the required files. On Windows it is simple, I just set the search path in Delpi to the location of the three Indy10 source directories and I am done. Not so simple in Lazarus until I saw I could install indylaz. Has worked fine for GUI applications so far.... > >If no, then some unit uses the gtk2 directly. Use "View / Unit >Dependencies" to find out which one. Don't know how... -- Bo Berglund Developer in Sweden From juha.manninen62 at gmail.com Sat Oct 27 19:06:54 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sat, 27 Oct 2018 20:06:54 +0300 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> Message-ID: On Sat, Oct 27, 2018 at 7:11 PM Bo Berglund via Lazarus wrote: > In the converted Delphi project I started with a .dpr file that > contained all active code except for two units to read Ini files mor > easily and to create Unix style hashed passwords. When it > was done it still used the dpr file as the main program source. I don't understand you. The converter creates a .lpr file for sure. On Sat, Oct 27, 2018 at 7:20 PM Bo Berglund via Lazarus wrote: > >If yes then use the Project Inspector, double click on the required > >packages to see their dependencies. Or use Package / Package graph to > >see the dependencies. > > This amazingly shows: > LCL > IDEIntf > FCL (>=1.0) > But I think these are for the Lazarus IDE integration of the visual components > and I am not using any forms or such so there is no use for this. Indeed! It is not only for the IDE integration. There are units with GUI that need LCL. > Now I am at a loss as to how I can use Indy without bringing in > IndyLaz, just the required files. On Windows it is simple, I just set > the search path in Delpi to the location of the three Indy10 source > directories and I am done. You mean in Delphi it is simple.(?) But no, actually the global search path in Delphi can be considered a bug but they cannot remove it for backward compatibility. It pollutes the namespace also for projects that do not need a specific library/package. > Not so simple in Lazarus until I saw I could install indylaz. > Has worked fine for GUI applications so far.... Yes, Indy apparently suits best for GUI apps. You can of course set the search path of your Lazarus project to point to Indy source directories. That is not recommended normally but this is a special case. If Indy Lazarus port was well designed, it would separate the GUI and non-GUI parts to their own packages. Juha From bo.berglund at gmail.com Sun Oct 28 00:44:17 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 28 Oct 2018 00:44:17 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> Message-ID: On Sat, 27 Oct 2018 20:06:54 +0300, Juha Manninen via Lazarus wrote: >On Sat, Oct 27, 2018 at 7:11 PM Bo Berglund via Lazarus > wrote: >> In the converted Delphi project I started with a .dpr file that >> contained all active code except for two units to read Ini files mor >> easily and to create Unix style hashed passwords. When it >> was done it still used the dpr file as the main program source. > >I don't understand you. The converter creates a .lpr file for sure. > > >On Sat, Oct 27, 2018 at 7:20 PM Bo Berglund via Lazarus > wrote: >> >If yes then use the Project Inspector, double click on the required >> >packages to see their dependencies. Or use Package / Package graph to >> >see the dependencies. >> >> This amazingly shows: >> LCL >> IDEIntf >> FCL (>=1.0) >> But I think these are for the Lazarus IDE integration of the visual components >> and I am not using any forms or such so there is no use for this. > >Indeed! >It is not only for the IDE integration. There are units with GUI that need LCL. > > >> Now I am at a loss as to how I can use Indy without bringing in >> IndyLaz, just the required files. On Windows it is simple, I just set >> the search path in Delpi to the location of the three Indy10 source >> directories and I am done. > >You mean in Delphi it is simple.(?) >But no, actually the global search path in Delphi can be considered a >bug but they cannot remove it for backward compatibility. >It pollutes the namespace also for projects that do not need a >specific library/package. I am talking about Delphi's project options where search path can be entered, which are just valid for the project itself. One can use environment variables here too to simplify the entries in the list. >> Not so simple in Lazarus until I saw I could install indylaz. >> Has worked fine for GUI applications so far.... > >Yes, Indy apparently suits best for GUI apps. >You can of course set the search path of your Lazarus project to point >to Indy source directories. >That is not recommended normally but this is a special case. >If Indy Lazarus port was well designed, it would separate the GUI and >non-GUI parts to their own packages. > I found the location of the indylaz package files in: ~/.lazarus1.8.4/onlinepackagemanager/packages/Indy10/ Here are the 3 dirs I need, Core, Protocols and System. So I adding these into the Compiler/Path/OtherUnitFiles setting in Project Options lusing the selector button ../../../.lazarus1.8.4/onlinepackagemanager/packages/Indy10/Core ../../../.lazarus1.8.4/onlinepackagemanager/packages/Indy10/System ../../../.lazarus1.8.4/onlinepackagemanager/packages/Indy10/Protocols And I also removed the indylaz package from the project dependencies. But when I tried to build the project it complained that it could not find Interfaces, so I remembered that this is supplied by LCL, so I tried adding LCL back to the project required packages. Then the project built OK. But when I moved the (now skinnier executable) to the Ubuntu 18.04 machine I got the same warning once more: (LicMgr:3198): Gtk-WARNING **: cannot open display: So this did not cut it either... Now I also found that I can test this easier, I just have to log out of my development machine and stay at the login screen. Then using PuTTY to connect to it and navigate to the project and start the program from the command line throws the exact same error message and the program won't run. So it seems like someone (or maybe even me) must be logged on to the machine console in order for it to execute this command line program... Being logged on to a TightVNC session does not count... Soooo strange! -- Bo Berglund Developer in Sweden From pascaldragon at googlemail.com Sun Oct 28 00:49:50 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 28 Oct 2018 00:49:50 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> Message-ID: Bo Berglund via Lazarus schrieb am So., 28. Okt. 2018, 00:44: > >> Not so simple in Lazarus until I saw I could install indylaz. > >> Has worked fine for GUI applications so far.... > > > >Yes, Indy apparently suits best for GUI apps. > >You can of course set the search path of your Lazarus project to point > >to Indy source directories. > >That is not recommended normally but this is a special case. > >If Indy Lazarus port was well designed, it would separate the GUI and > >non-GUI parts to their own packages. > > > > I found the location of the indylaz package files in: > ~/.lazarus1.8.4/onlinepackagemanager/packages/Indy10/ > Here are the 3 dirs I need, Core, Protocols and System. > > So I adding these into the Compiler/Path/OtherUnitFiles setting in > Project Options lusing the selector button > ../../../.lazarus1.8.4/onlinepackagemanager/packages/Indy10/Core > ../../../.lazarus1.8.4/onlinepackagemanager/packages/Indy10/System > ../../../.lazarus1.8.4/onlinepackagemanager/packages/Indy10/Protocols > > And I also removed the indylaz package from the project dependencies. > > But when I tried to build the project it complained that it could not > find Interfaces, so I remembered that this is supplied by LCL, so I > tried adding LCL back to the project required packages. > Then the project built OK. > That something is pulling in unit Interfaces is proof that something tries to use GUI units. So either find out what unit that is (it could either be one of yours or maybe an Indy one) or try to set the LCLWidgetType to NoGUI. Regards, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From mse00000 at gmail.com Sun Oct 28 07:46:34 2018 From: mse00000 at gmail.com (Martin Schreiber) Date: Sun, 28 Oct 2018 07:46:34 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: Message-ID: <201810280746.34834.mse00000@gmail.com> On Sunday 28 October 2018 00:44:17 Bo Berglund via Lazarus wrote: > > But when I tried to build the project it complained that it could not > find Interfaces, so I remembered that this is supplied by LCL, so I > tried adding LCL back to the project required packages. > Then the project built OK. Why don't you do what I suggested in order to find out which unit pulls in the interfaces and gtk2 dependency? In order to get the MSEunitdep tool do: " git clone https://gitlab.com/mseide-msegui/mseide-msegui.git cd mseide-msegui fpc -Fulib/common/* -Fulib/common/kernel/linux tools/unitdep/mseunitdep.pas " A work of less than a minute. Martin From robin.listas at telefonica.net Sun Oct 28 08:04:16 2018 From: robin.listas at telefonica.net (Carlos E. R.) Date: Sun, 28 Oct 2018 08:04:16 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> <82448ba6-884f-5086-9f9f-4a1f099b7de5@googlemail.com> <57k8tdtj4m88noat6bntpeiva3t1b9mc5a@4ax.com> <1c895f1a-22ad-aaee-347a-fc6bf0030318@telefonica.net> Message-ID: <08469561-e463-aa41-22f3-da6da7c1576a@telefonica.net> On 27/10/2018 14.32, Bo Berglund via Lazarus wrote: > On Sat, 27 Oct 2018 14:03:16 +0200, "Carlos E. R. via Lazarus" > wrote: > >> On 27/10/2018 13.58, Bo Berglund via Lazarus wrote: >> >>> I tried to upgrade, dist-upgrade the server to remove the logon >>> greeting about available updates then rebooted. >>> No difference. >>> >>> Then I tried by installing xfce4 desktop, thinking that this would >>> deposit the X11 stuff into the system. But it did not solve the >>> problem even though the start error message now changed to: >> >> IMHO, that's the wrong approach. >> >> You have to remove the dependency, somehow, not fulfill it. > > That is the problem, I don't know how to remove a dependency like > this... I don't know either how to find it, but installing "missing" libraries on the server will not help, rather the contrary. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From juha.manninen62 at gmail.com Sun Oct 28 08:24:40 2018 From: juha.manninen62 at gmail.com (Juha Manninen) Date: Sun, 28 Oct 2018 09:24:40 +0200 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <20181027124302.0f9fb083@limapholos.matflo.wg> <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> Message-ID: On Sun, Oct 28, 2018 at 1:50 AM Sven Barth via Lazarus wrote: > That something is pulling in unit Interfaces is proof that something tries to use GUI units. So either find out what unit that is (it could either be one of yours or maybe an Indy one) or try to set the LCLWidgetType to NoGUI. NoGUI is a hack. You should uninstall Indy from the IDE when you have its units directly in your project. I thought it was obvious but maybe not. Lazarus IDE gets confused when you have units from a registered package in your project. Martin Schreiber and others, the GTK2 dependency comes from LCL. There is no question of it. I just don't understand why it is so hard for Bo to remove it. Such a simple thing to do! I personally would just copy the needed indy units into my project subdirectory and add them to the project. If any of those units require LCL, the project will not compile. Simple, ha? Bo, please report a bug for Indy project. They should divide their package into two. Juha From l at c-m-w.me.uk Sun Oct 28 09:03:04 2018 From: l at c-m-w.me.uk (C Western) Date: Sun, 28 Oct 2018 08:03:04 +0000 Subject: [Lazarus] Lazarus Release Candidate 1 of 2.0 In-Reply-To: <20181027143702.17b7ad70@limapholos.matflo.wg> References: <20180919135011.501e9aa0@limapholos.matflo.wg> <20181027105627.0f72bc37@limapholos.matflo.wg> <20181027143702.17b7ad70@limapholos.matflo.wg> Message-ID: On 27/10/2018 13:37, Mattias Gaertner via Lazarus wrote: > On Sat, 27 Oct 2018 13:34:26 +0100 > C Western via Lazarus wrote: > >> [...] >> Did you try this starting the IDE with an empty .lazarus directory? > Yes, exactly. > >> I am >> not sure I made it clear in the original message, but this was on first >> run of the RC Lazarus, and I was loading my usual set of packages >> preparatory to recompiling Lazarus. > Maybe one of these packages makes the difference? > > Mattias Attached is a minimal package that causes the problem for me. The trigger might be two missing packages? Colin -------------- next part -------------- A non-text attachment was scrubbed... Name: lutils.lpk Type: text/xml Size: 835 bytes Desc: not available URL: From mse00000 at gmail.com Sun Oct 28 10:10:52 2018 From: mse00000 at gmail.com (Martin Schreiber) Date: Sun, 28 Oct 2018 10:10:52 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: Message-ID: <201810281010.52317.mse00000@gmail.com> On Sunday 28 October 2018 08:24:40 Juha Manninen via Lazarus wrote: > I personally would just copy the needed indy units into my project > subdirectory and add them to the project. If any of those units > require LCL, the project will not compile. Simple, ha? Or add the Indy *.ppu directory as a -Fu parameter without using Indy packages? https://mseide-msegui.sourceforge.io/pics/indypath.png Martin From bo.berglund at gmail.com Sun Oct 28 10:47:40 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 28 Oct 2018 10:47:40 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> Message-ID: <3dtatdp67r2tcvo01thii6cg2dp2ssk9m8@4ax.com> On Sun, 28 Oct 2018 00:49:50 +0200, Sven Barth via Lazarus wrote: >That something is pulling in unit Interfaces is proof that something tries >to use GUI units. So either find out what unit that is (it could either be >one of yours or maybe an Indy one) or try to set the LCLWidgetType to NoGUI. > SVEN, THANK YOU VERY MUCH!!! ----------------------------- This was a project option I did not know about before and then not how to set it. But after a bit of google use I found the way: - open Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides - In this dialogue there is a dropdown above the listbox named: Set "LCLWidgetType" drop it down and find the entry "Value nogui" and select it - OK to the main window and select Run/Build This will rebuild the indylaz package and then the main application, which now starts OK also with noone logged on to the main window. It still needs the Interfaces entry under uses, though! But if I comment it out then it is not discovered until linking the application.... I always thought that options like these could be set in similar ways as the {$mode objfpc}{$H+} in the main project file. Maybe it is also possible? If so what is the correct syntax? I would like to have it visible in the source if ever possible. -- Bo Berglund Developer in Sweden From michael at freepascal.org Sun Oct 28 11:41:51 2018 From: michael at freepascal.org (Michael Van Canneyt) Date: Sun, 28 Oct 2018 11:41:51 +0100 (CET) Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: <3dtatdp67r2tcvo01thii6cg2dp2ssk9m8@4ax.com> References: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> <3dtatdp67r2tcvo01thii6cg2dp2ssk9m8@4ax.com> Message-ID: On Sun, 28 Oct 2018, Bo Berglund via Lazarus wrote: > On Sun, 28 Oct 2018 00:49:50 +0200, Sven Barth via Lazarus > wrote: > >> That something is pulling in unit Interfaces is proof that something tries >> to use GUI units. So either find out what unit that is (it could either be >> one of yours or maybe an Indy one) or try to set the LCLWidgetType to NoGUI. >> > > SVEN, THANK YOU VERY MUCH!!! > ----------------------------- > This was a project option I did not know about before and then not how > to set it. To be fair: Mattias suggested this already earlier in the thread than Sven. It was one of the first replies. Michael. From pascaldragon at googlemail.com Sun Oct 28 12:39:50 2018 From: pascaldragon at googlemail.com (Sven Barth) Date: Sun, 28 Oct 2018 12:39:50 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: References: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> <3dtatdp67r2tcvo01thii6cg2dp2ssk9m8@4ax.com> Message-ID: Michael Van Canneyt via Lazarus schrieb am So., 28. Okt. 2018, 11:41: > > > On Sun, 28 Oct 2018, Bo Berglund via Lazarus wrote: > > > On Sun, 28 Oct 2018 00:49:50 +0200, Sven Barth via Lazarus > > wrote: > > > >> That something is pulling in unit Interfaces is proof that something > tries > >> to use GUI units. So either find out what unit that is (it could either > be > >> one of yours or maybe an Indy one) or try to set the LCLWidgetType to > NoGUI. > >> > > > > SVEN, THANK YOU VERY MUCH!!! > > ----------------------------- > > This was a project option I did not know about before and then not how > > to set it. > > To be fair: > > Mattias suggested this already earlier in the thread than Sven. It was one > of the first replies. > Indeed. And in another mail I had written as well that Mattias had suggested that already. Regards, Sven > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo.berglund at gmail.com Sun Oct 28 17:22:50 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 28 Oct 2018 17:22:50 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> <3dtatdp67r2tcvo01thii6cg2dp2ssk9m8@4ax.com> Message-ID: On Sun, 28 Oct 2018 11:41:51 +0100 (CET), Michael Van Canneyt via Lazarus wrote: > > >On Sun, 28 Oct 2018, Bo Berglund via Lazarus wrote: > >> On Sun, 28 Oct 2018 00:49:50 +0200, Sven Barth via Lazarus >> wrote: >> >>> That something is pulling in unit Interfaces is proof that something tries >>> to use GUI units. So either find out what unit that is (it could either be >>> one of yours or maybe an Indy one) or try to set the LCLWidgetType to NoGUI. >>> >> >> SVEN, THANK YOU VERY MUCH!!! >> ----------------------------- >> This was a project option I did not know about before and then not how >> to set it. > >To be fair: > >Mattias suggested this already earlier in the thread than Sven. It was one >of the first replies. You are right! But at the time I was trailing in another direction and I also did not know how to acctually effect it.... Thanks to Mattias also, of course! I have been using Lazarus/FPC for a few years on RaspberryPi units and there I have also programmed utilities that run as command line programs and I had no problem with these. So I was stunned by this happening and really suspected something else entirely.... Of course these utilities were used on the RPi itself. But I was always connecting to the RPi using TightVNC or later RealVNC. I have never really had a monitor attached to any of my RPi units. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Sun Oct 28 17:25:45 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Sun, 28 Oct 2018 17:25:45 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine References: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <20181027160607.0603ab21@limapholos.matflo.wg> Message-ID: <6kobtdl1fajkavkgstcm14svdqen6mc8ml@4ax.com> On Sun, 28 Oct 2018 09:24:40 +0200, Juha Manninen via Lazarus wrote: >I personally would just copy the needed indy units into my project >subdirectory and add them to the project. If any of those units >require LCL, the project will not compile. Simple, ha? Well, years ago I tried that with Delphi, but it turned out that the units needed expanded from the first one since they are interdependent so in the end I used environment variables to direct the Delphi compiler to the correct Indy10 dirs where all files were collected. Different IDE paradigm of course.... -- Bo Berglund Developer in Sweden From mse00000 at gmail.com Mon Oct 29 08:00:03 2018 From: mse00000 at gmail.com (Martin Schreiber) Date: Mon, 29 Oct 2018 08:00:03 +0100 Subject: [Lazarus] Built console app on Linux, but won't run on another Linux machine In-Reply-To: <6kobtdl1fajkavkgstcm14svdqen6mc8ml@4ax.com> References: <76m8td55gs357lubemibbepl9pe4hdrfv0@4ax.com> <6kobtdl1fajkavkgstcm14svdqen6mc8ml@4ax.com> Message-ID: <201810290800.03152.mse00000@gmail.com> On Sunday 28 October 2018 17:25:45 Bo Berglund via Lazarus wrote: > On Sun, 28 Oct 2018 09:24:40 +0200, Juha Manninen via Lazarus >>I personally would just copy the needed indy units into my project >>subdirectory and add them to the project. If any of those units >>require LCL, the project will not compile. Simple, ha? > > Well, years ago I tried that with Delphi, but it turned out that the > units needed expanded from the first one since they are interdependent > so in the end I used environment variables to direct the Delphi > compiler to the correct Indy10 dirs where all files were collected. > Different IDE paradigm of course.... > As Juha writes, using NoGUI is a hack. You should find out which units pull in LCL and remove them. Different ways how to find out which units are affected already have been described in this thread, please read again. Martin From bo.berglund at gmail.com Mon Oct 29 19:34:43 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 29 Oct 2018 19:34:43 +0100 Subject: [Lazarus] Entering comment char { } not working in code window Message-ID: <25ketdpeq3vij9ac3tct1709hnp7bb6mve@4ax.com> Is this a known issue? In Lazarus 1.8.4 FPC 3.0.4 on Ubuntu 18.04 LTS with xfce desktop and using a Swedish keyboard. Ubuntu is running in a VMWare PRO12 virtual machine: In the code window I cannot enter regular pascal comments delimited by { and }. But in the Text Editor application there is no such problem. Also elsewhere in Lazarus I can enter these characters just fine, for example in property setting edit boxes. The { key is entered using AltGr + 7 and } using AltGr + 0. I have looked in the Tools/Editor/Display/Key Mappings dialog and used its "Find key combination" function to see if these key combinations are reserved, but not... -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Mon Oct 29 22:11:08 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Mon, 29 Oct 2018 22:11:08 +0100 Subject: [Lazarus] Entering comment char { } not working in code window References: <25ketdpeq3vij9ac3tct1709hnp7bb6mve@4ax.com> Message-ID: On Mon, 29 Oct 2018 19:34:43 +0100, Bo Berglund via Lazarus wrote: >Is this a known issue? >In Lazarus 1.8.4 FPC 3.0.4 on Ubuntu 18.04 LTS with xfce desktop and >using a Swedish keyboard. Ubuntu is running in a VMWare PRO12 virtual >machine: > >In the code window I cannot enter regular pascal comments delimited by >{ and }. Turns out that ALL such escaped chars do not work, sometimes the code editor jumps to a different tab or otherwise relocates focus and sometimes nothing at all happens.... I googled and finally found an old forum entry where it was stated that Ubuntu was to blame and that one could try the Keyboard setting in the desktop. I changed keyboard layout settings from "use system defaults" to Swedish layout and set the keyboard to "Generic 105-key PC (intl.)" Then the code editor also started to recognize the escaped characters correctly. The strange thing is that all other applications I have tested (terminal, Text Editor etc) worked fine even before I changed the settings, and inside Lazarus all other places than Code Editor also worked OK. So there is something special about Code Editor, it seems like. Anyway I seem to be able to type @{[]}\~ now, did not work before. -- Bo Berglund Developer in Sweden From bo.berglund at gmail.com Tue Oct 30 23:43:33 2018 From: bo.berglund at gmail.com (Bo Berglund) Date: Tue, 30 Oct 2018 23:43:33 +0100 Subject: [Lazarus] Exception handling in Linux? References: <4ds3td569sess8lep8p6u3i71hanfbn3n5@4ax.com> Message-ID: <0jnhtd970kjpqmp35vql1e9mjbd6id1e6f@4ax.com> On Fri, 26 Oct 2018 12:50:34 +0200, "Santiago A. via Lazarus" wrote: >Do you get that exception dialog when you run the executable out of the >IDE environment? > >I mean, maybe the exception is handled inside indy10, so it is not >propagated to the level of your except block. My theory is that the >exception dialog is raised by Lazarus environment whenever an exception >is raised, handled or not, and if you click "continue", then Indy10 >handles it. I think you are probably right. After I checked the box in the dialog the exception does not show up again... -- Bo Berglund Developer in Sweden From terry at haimann.us Wed Oct 31 13:05:46 2018 From: terry at haimann.us (Terry A. Haimann) Date: Wed, 31 Oct 2018 07:05:46 -0500 Subject: [Lazarus] Loading an image to a mysql blob Message-ID: <1540987546.8666.9.camel@haimann.us> I tried loading an image into a Medium Blob.  The image uploads and shows up on my form, but when I click post on my DbNavigator the program gives me an access violation. Here is the source code: procedure TPropertyForm.ImgButClick(Sender: TObject); Var   MyImageFile, MyDir:                              String; begin      MyImageFile := '/';      if OpenDialog1.Execute then      begin           MyImageFile := OpenDialog1.Filename;      end;      DbPropImg.Picture.Jpeg.LoadFromFile(MyImageFile); End; Am I missing something I have to do?  The blob should be large enough, they are supposed to be able to hold 16 Meg and the jpegs are running about 2 - 3 meg.  I am running Mint 18.3, using Mysql 5.7.22 and using ZeosDBO. Terry Haimann From vojtech.cihak at atlas.cz Wed Oct 31 19:28:06 2018 From: vojtech.cihak at atlas.cz (=?utf-8?q?Vojt=C4=9Bch_=C4=8Cih=C3=A1k?=) Date: Wed, 31 Oct 2018 19:28:06 +0100 Subject: [Lazarus] =?utf-8?q?Auto_accel=2E_keys_on_tabs_in_Qt5?= Message-ID: <20181031192806.8C005B88@atlas.cz> Hi,   I noticed that Qt5 automatically adds accerelator keys to TabSheets of PageControl, i.e. _TabSheet1, T_abSheet2, Ta_bSheet3 etc. which allows switching tab by Alt+T/A/B.   Is possible to disable this feature? The reason is that I have complex form and it creates duplicite shortcut Alt+C for Tab and Button, and this shortcut switches the tab rather than push button, which I want.   Thanks, V.