Page 1 of 1

MySql on OS/X

Posted: 04.10.2016, 10:40
by tintinux
Hi

I can use successfully ZeosLib on MAC OS/X with applications created by Lazarus.

However, installation is a little complex for non technical end users, and difficult to automate, because MySql drivers for OS/X are named, for example,libmysqlclient.18.dylib instead of libmysqlclient.dylib.18 expected by ZPlainMySqlDriver.pas (they are libmysql.so.18 on linux).

Is it possible to add code to handle this OS/X particularity in the 7.2 version ?

I could do it myself, but will not be able to test this with Delphi and the OS it supports, since I have not bought it.

By the way, see my previous post about MySql 5.7 which should be added too.

Best regards

Re: MySql on OS/X

Posted: 04.10.2016, 15:24
by marsupilami
Hello tintinux,

it should be no problem to modify that behabiour in Zeos 7.2 and Zeos 7.1. Couls you plkease help me out with ifdefs for OS/X?
With best regards,

Jan

Re: MySql on OS/X

Posted: 04.10.2016, 15:57
by tintinux
Hi

I have just discovered a bug on 7.2, I will make a topic for it, but first I went back to 7.1.4 to finish this subject.

OK, I will send you as soon as possible a MySqlDriver.pas tested on OSX, Windows and Linux.

Best regards

Re: MySql on OS/X

Posted: 04.10.2016, 17:58
by tintinux
Hi

Attached is an update of ZPlainMySqlDriver with more libraries :
  • * search for version specific drivers for MySql 5.6 and 5.7 on all systems
    * search for 2 generic drivers (mariadb and libmysqlclient) on Linux and Mac OS/X (libmysqlclient has unfortunately been removed)
    * search for correct driver names used on Mac OS/X ( libmysqlclient.nn.dylib instead of libmysqlclient.dylib.nn previously, like on Linux)
it can be compiled by LAZARUS and it is working on Windows 8, Linux Ubuntu 14.04 and OS/X 10.6, with various driver names. It was not tested with DELPHI.

Despite this thread was started in 7.2 -betatest forum, the file is for Zeos 7.1.4. An admin could move the topic...

It should not be difficult to make the same for Zeos 7.2, but currently I can't.

The update is rather "bestial"... suitable for a stable or rc version.

In a next beta, maybe we could write this in a lighter and more optimized way, avoiding the large number of constants and the repetitions for different OS...

I hope this helps

Best regards

Tintinux