Page 1 of 1

Manually locate libmysql.dll?

Posted: 23.09.2008, 11:12
by coolkid
In response to my topic in here, I've made a MIT-licensed app named winMyLib whose job is to "install" libmysql.dll and write a registry value of where this libmysql.dll located. winMyLib is also capable of detecting all potentially "would-be-loaded" libmysql.dll by iterating through PATH environment variable and determine whether there are libmysql.dll located there and what version it is. The main point of this app is, it able to "choose" which libmysql.dll path to write into the registry so the winMyLib-compliant apps can just simply read this registry value to determine where to find libmysql.dll.

The question is, how to tell ZConnection where to find the libmysql.dll to be used? I know I can use some dirty tricks by reading the registry value of winMyLib and just copy the pointed libmysql.dll to my exe directory (that way I dont distribute the libmysql.dll with my exe), but I mean, if can do it cleanly, why should I dirty my hands? :wink:

Posted: 23.09.2008, 12:39
by mdaems
Hi,

There's no way to do it using the regular Zeoslib distributions.
But:
- We are looking for somebody to implement a new component that could be linked to a ZConnection and allowing to specify a dll and protocol to be used with that connection. This would allow zeoslib to combine different protocol versions and dll versions at the same time.
- tohenk made a patch in the past allowing you to specify the dll as part of your connection properties. See http://zeos.firmos.at/viewtopic.php?t=819 .
It will not work right out of the box anymore, but will certainly point you the way to follow.

Mark

Posted: 09.10.2008, 21:56
by aducom
It would require a complete new design. Preferable DB components with a dll property connected to a master DB. This approach I had suggested ages ago. Advantage would be that if you only need MySQL, you could omit the others and thus have a smaller footprint. But it would require a lot of work.

Posted: 21.12.2008, 12:28
by coolkid
It's really been a while since the last post of mine regarding this topic :)

Just for information (perhaps someone has the same problem for me as I was two months ago :D), in the source of winMyLib I also put an additional driver and a lil modification to ZDbcMySql.pas and ZPlainMySqlDriver.pas to recognize the new driver which is winMyLib compliant.

winMyLib can be downloaded from this URL:
http://info.c-rex.co.cc/index.php?sub=p ... ew&lang=en

(the web just went up recently and a few weeks ago I have projects to finish, so don't ask why I made it public only recently :D )