Re: [fpc-pascal] MQTT package for freepascal/lazarus?

2022-10-21 Thread Zeljko Avramovic via fpc-pascal
> I am looking for a pascal implementation of the MQTT protocol.

https://github.com/cutec-chris/TMQTTClient
https://github.com/jamiei/Delphi-TMQTT2
https://github.com/songshuang8/MqttServer
https://github.com/AndersonGaitolini/MQTT-Gaitolini
https://github.com/ZiCog/mqtt-free-pascal
https://github.com/quini27/MQTT-client-application-for-Windows
https://github.com/crossrw/mqttClient
https://github.com/apelsinovv/MQTT
https://github.com/bkeevil/mqtt
https://github.com/sigmdel/mosquitto-p
https://github.com/sigmdel/lazmqttc
https://github.com/GRIDSystemSAS/GS.GRID
https://github.com/join2017/dmqtt
https://github.com/wizinfantry/delphi-mqtt-client
https://github.com/pjde/delphi-mqtt
https://github.com/windflee/delphimqtt
https://github.com/Indemsys/Delphi_MQTT_mosquitto
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] BoolToStr

2022-08-31 Thread Zeljko Avramovic via fpc-pascal
> > You can use
>
> BoolToStr(b,'TRUE','FALSE')
>
> That works great!  Shouldn't that be the default and you can put in
> something else if you want it?

Latest trunk allows you this if you include new syshelpers unit:

True.ToString;  // True
True.ToTrueFalseString(scfUpperCase);   // TRUE
True.ToString('OnState', 'OffState');   // OnState
True.ToString('Running', 'Stopped', scfUpperCase);  // RUNNING

It also allows you to populate TBitFormatSettings with your strings for TRUE 
and FALSE and gives you method CopyToDefaultBoolStrings. This changes boolean 
to string text outputs in syshelpers and some other places. Maybe that could 
fit your bill.

More info can be found in this demo:
https://gitlab.com/freepascal.org/fpc/source/-/blob/main/packages/rtl-objpas/examples/syshelpersdemo.pas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] 64 bit cross binutils on a 32 bit OS

2013-04-11 Thread zeljko

On 04/11/2013 10:33 AM, Sven Barth wrote:

Am 11.04.2013 10:16, schrieb patspiper:

Hi,

Is it possible to build cross binutils to produce win 64 bit files on
a 32 bit Linux OS (Ubuntu 32 bit)?

If I set target=x86_64-cygwin, the error is:
'BFD does not support target x86_64-pc-cygwin'


Why don't you install binutils-mingw-w64 package? [Note: I don't have
Ubuntu, so I don't know whether it exists for your specific version of
Ubuntu]


New fedora's also have complete binutils for 32/64 bit.

zeljko

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Modular Qt4Pas

2013-02-17 Thread zeljko
On Sunday 17 of February 2013 20:31:32 Krzysztof wrote:
> Hi,
> 
> Simple "hello world" application created in QT Creator has only basic QT
> dependencies (libqtgui, libqtcore and libqtwidgets). But Qt4Pas has static
> linked api for all QT modules, so creating "hello world" in free pascal
> need also libqtnetworking, libwebkit (33 MB!) and even libsqlite and more.
> Are plans for split Qt4Pas to separated modules?

You should ask Den about it, better ask at
q...@lists.lazarus.freepascal.org


zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] wayland support for FPC

2012-11-09 Thread zeljko
On Friday 09 of November 2012 13:11:27 ik wrote:
> On Fri, Nov 9, 2012 at 1:06 PM, Graeme Geldenhuys
> 
>  wrote:
> > On 2012-11-09 10:42, Marco van de Voort wrote:
> >> IOW, I wouldn't desperately try to support Wayland native at this point.
> >> 
> >> That can be done if the native api turns out to be stable, Wayland
> >> truely takes over X11, and all distros package it.
> >> 
> >> Now it is just asking for pain IMHO.
> > 
> > +1
> > That's exactly how I feel. There has been too many attempts to displace
> > X11 - and they all tanked. Wayland does seems to have more backing than
> > its predecessors though.
> > 
> > Bottom line, existing X11 apps will apparently continue to run on
> > Wayland. So we have timeā€¦
> 
> Qt5 afaik, does not support X11 anymore, only wayland, and that's the
> main path most Linux toolkits takes today.

afaik, Qt5 DOES support X11.

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Wiki search broken?

2012-08-26 Thread zeljko
On Monday 27 of August 2012 06:07:25 Andrew Haines wrote:
> Hi,
> 
> Search seems to be broken for me on the wiki
> 
> "There was a server error processing your request. We apologize.
> 
> 
> Take me back where I was (before the error)
> Database operation "0or1row" failed (exception NSDB, "Query was not a
> statement returning rows.")
> 
> ERROR:  invalid byte sequence for encoding "UTF8": 0xc080
> HINT:  This error can also happen if the byte sequence does not match
> the encoding expected by the server, which is controlled by
> "client_encoding".
> "

This looks like postgresql error msg (is it pgsql db ? ). It happens when 
pgsql server db encoding != utf8 (unicode) and you're trying to insert 
character which is untransatable by internal encoding funcions eg. 
win1250toUTF8('something') (eg. double minus (or whatever name it have) sign 
which can be found in ms word (it looks like double minus -- but in one 
line)).

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: [Lazarus] Any FPC/Lazarus success stories on Nokia N9?

2012-08-25 Thread zeljko
On Saturday 25 of August 2012 14:30:12 Reinier Olislagers wrote:
> Hi FPC & Lazarus lists (crossposted),
> 
> Just wondering if anybody has compiled FPC, Lazarus, or fpgui
> applications on Nokia's N9 smartphone.

I've successfully built bindings and qtlcl apps for n9 (I guess that Joost 
also was succesfull). It works, but normal qtlcl app cannot change orientation 
so it's always horizontal.
If you want to create really fancy n9 apps you need QtCreator (Nokia SDK).
Besides that, N9 is normal linux machine (eg. X11) with arm processor (no need 
for QTOPIA defines in bindings like N900 needs).
P.S: There's guy on #lazarus-ide irc channel nick = trx. 
He created complete api to work with nokia ui's,so you can create same app 
like with QtCreator (under Lazarus)  ask him for more details.

zeljko

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] OT: Amazing new development tools

2012-02-26 Thread zeljko
On Sunday 26 of February 2012 11:43:38 Michael Van Canneyt wrote:

> I don't see him doing this in huge corporate administrative business
> programs where hundreds of database tables are involved.

and that tables can contain billion of rows ... so visualisation won't be so 
snappy :)

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-02-01 Thread zeljko
On Wednesday 01 of February 2012 21:02:38 Vladimir Zhirov wrote:
> > Do other languages like python use the plain c interface, or
> > C++?
> > how about something like ruby, lua, objective C, php ..
> 
> AFAIK, Lua uses automatically generated plain C binding.
> When I looked at it, the binding generator consisted of
> the following parts:
> 1) A C++-based program to parse C++ source and extract
>required information as XML;
> 2) A Lua program to build plain C binding based on this XML
> 3) A CMake scripts to manage building of the above parts
>and generated binding itself.

Wow, that's "something" ! :)
Few years ago in age of Kylix 3 Andreas Hausladen builded C bindings for Qt3 
via doxygen which created xml files and then small app builded bindings from 
that xml files - even virtual methods overriding was supported.
So if someone have enough doxygen knowledge it is possible to create automatic 
C bindings with some efforts.

zeljko

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-01-30 Thread zeljko
On Monday 30 of January 2012 20:17:22 Andrew Haines wrote:
> On 01/30/12 02:19, Graeme Geldenhuys wrote:
> > On 29 January 2012 16:31, Jonas Maebe  wrote:
> >> GTK offers a plain C interface. QT only offers a C++ interface. FPC does
> >> not (fully) support directly calling external C++ libraries. LibQT4Pas
> >> offers a plain C interface to QT for use by FPC.
> > 
> > Can one statically bind the LibQt4Pas into a FPC program, thus not
> > require to ship an external libqt4pas DLL/SO? If possible, that might
> > solve the original posters problem.
> 
> It seems to me that you could compile qt4pas.c (or what ever the source
> file(s) of libqt4pas.so is) into a qt4pas.o and just link them
> statically with {$link qt4pas.o} which then would leave out the
> requirement for libqt4pas.so to be distributed with any program using
> the qt interface. The gpl? license may or may not make that possible
> though.

hm..this looks pretty interesting. Have you tried that ?

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: RE : [fpc-pascal] libQT4Pas - Why it is needed?

2012-01-30 Thread zeljko
On Monday 30 of January 2012 14:27:10 Ludo Brands wrote:
> > Eh, I meant how does ruby, lua, objective c, and similar
> > tools bind the
> > C++ api. Do they use an automatic tool that converts QT C++ objects to
> > procedural? or by hand, someone converts the objects to
> > procedures and structs? Or do they use the c++ objects
> > directly to python objects..
> 
> The smoke wrapper http://techbase.kde.org/Development/Languages/Smoke is
> used by a lot of these languages. See also
> http://lists.trolltech.com/qt-interest/2006-08/thread00721-0.html.
> 
> Smoke is actually a tool that generates runtime wrappers for c++ libraries.
> It supports virtual methods, multiple inheritance etc.

Yes there's smoke but that's all... no docs - exactly nothing. I've tried to 
dig into and try to get out how to create simplest wrapper, lost 3-4 hours 
with result = 0.

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-01-30 Thread zeljko
On Monday 30 of January 2012 11:51:10 Den Jean wrote:
> On Monday 30 January 2012 09:28:00 michael.vancann...@wisa.be wrote:
> > There are no plans to support it, since every C++ compiler uses it's own
> > (incompatible) format, and G++ changes it format regularly, so I was
> > given to understand.
> 
> even with support for calling c++ methods,
> the many inlined functions are still an issue

Yes, there's only one thing which can put some light over it, and that is if 
qt nokia decides to create pure C bindings as separate packages (dlls) for qt 
libs .. but it won't happen  so long live libQt4Pas

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-01-30 Thread zeljko
On Monday 30 of January 2012 08:35:23 waldo kitty wrote:
> i may have easily misunderstood the OP's post... i tend to read in literan
> english format... ie: if you say eggs are round, that is where i base my
> response unless it is very obvious that there is something else to consider
> which i point out ;

I think that this question was pretty clear:

"Do other languages like python use the plain c interface, or C++?"

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-01-29 Thread zeljko
On Monday 30 of January 2012 03:28:45 waldo kitty wrote:
> On 1/29/2012 17:38, Lars wrote:
> > Do other languages like python use the plain c interface, or C++?
> > 
> > how about something like ruby, lua, objective C, php ..
> :
> :( i don't nderstand why one would want to apply interpreted script
> :languages,

I've understand that he asks how python bindings works then ? Probably same 
way as our libQt4Pas. You cannot use Qt python without python bindings for qt 
- so no direct C++ usage.

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-01-29 Thread zeljko
On Sunday 29 of January 2012 22:16:45 Krzysztof wrote:
> Just as I thought - it is object class thing. So if "FPC does not
> (fully) support directly calling external C++ libraries" there are
> plans to support it? This will be great

Maybe it is possible (or will be possible) to use C++ class, but I don't see 
light at the end of tunnel for eg override virtual routine from such C++ class 
which is possible by C interface or howto attach callback (event) from pascal 
to C++. So if it isn't possible then what's the point with C++ support ?

zeljko

> 
> 2012/1/29 Michael Van Canneyt :
> > On Sun, 29 Jan 2012, Krzysztof wrote:
> >> Hi,
> >> 
> >> I am wondering. If I build application for linux using gtk2 widgetset
> >> for GNOME (or XFCE etc.) and send this program to my friend, then he
> >> can run it without any external librarys (of course if he have gnome
> >> too), this same thing on windows. But why when I build application on
> >> KDE interface I need some external libQT4Pas to run it and my friend
> >> need it too (he have KDE so all QT librarys too)? There is no
> >> libGTK4Pas so why exists layer libQT4Pas? What is difference between
> >> GTK and QT librarys?
> > 
> > GTK has a procedural C interface, it is exposed in the GTK libraries. The
> > FPC compiler understands this interface.
> > 
> > Qt is written in C++, and exposes C++ classes in the Qt libraries. The
> > FPC compiler does not know how to handle C++ classes.
> > Therefor, a 'procedural' interface to the C++ needs to be made, and this
> > is libQT4Pas. It is generated by a GCC.
> > 
> > Michael.
> > 
> > ___
> > fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Meego Harmattan (Nokia N9) and fpc

2011-12-24 Thread zeljko
Hi,
Successfully created cross arm with 2.4.5 (console apps works fine on this 
device), but have problems with lazarus projects.
/home/linda/temp/cross_fpc/cross-arm/arm-linux/bin/ld: error: Source object 
/home/linda/temp/cross_fpc/cross-arm/arm-linux/lib/libQt4Pas.so has EABI 
version 5, but target project1 has EABI version 0

libQt4Pas is builded with QtSDK for harmattan, and it's ok.
How to pass EABI to version 5 (fpc-2.4.5) ?

zeljko
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Timer in X11

2011-12-22 Thread zeljko
On Thursday 22 of December 2011 09:43:28 Felipe Monteiro de Carvalho wrote:
> On Thu, Dec 22, 2011 at 9:15 AM,   wrote:
> > As I understand it, Delphi and Lazarus implement the former, and don't
> > need a timeout for it.
> 
> Ops, you are correct, it is a one shot event:
> 
> http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate
> 2/EN/html/delphivclwin32/Forms_TApplication_OnIdle.html
> 
> I think I implemented it as a repetitive event. ops =D I guess I'll
> need to fix this.
> 
> But you should not try to compare directly the LCL gtk2 or qt4
> widgetsets with fpgui since gtk2 and qt4 do most of the real work.
> Lazarus now has a X11 interface which can be used for direct
> comparisons and it uses the timeout. In general I don't fully trust
> select() to wakeup correctly yet. I guess that more testing would show
> if it does, but I read in the web that X11 could use more then one
> file descriptor for communication, so if I use a infinite select() the
> application could hang in some corner cases.

FYI, qt and gtk2 uses same source for timers and loops - glib2.
http://en.wikipedia.org/wiki/GLib
http://developer.gnome.org/glib/2.26/glib.html
I would try with it before reinventing wheel, because it works on all X11 
platforms (even on OS/2 and BeOS) and I'm pretty sure that it's installed by 
default.

zeljko


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal