Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

Delphi XE5 Compile errors/questions and why no -l for plink.exe?

thecoder2012's profile image thecoder2012 posted 4 years ago in General
Little thing is not any readme for compile instructions. Yes packages/delphiXE5/heidisql.groupproj are helpful. In the file readme.html is only a link to http://www.heidisql.com/help.php (for normal customer okay, but not for developers!)

Why you use user@host for ssh tunnel with plink and not -l for the ssh user?
Without -l not working for me. Yes my username is really crazy for more security.

My solution for the file dbconnection.pas:
if FConnection.Parameters.SSHUser <> '' then
PlinkParameters := PlinkParameters + ' -l "' + FConnection.Parameters.SSHUser + '"';

1. I have "W1030 Invalid compiler directive: ‘true' warning" but the solution was:
http://blog.spreendigital.de/2014/03/14/w1030_warning_xe5/

2. Trouble with res/icon.rc (mainicon.ico) and brcc32.exe to convert *.rc to *.res
I have XE2, XE5 and XE8 with this error "Compiling ICON: MAINICON - Error icon.rc 1 15: Allocate failed".

Solution was save the icon (mainicon.ico) without any (png) compression. Any better solution possible?

3. I need res/updater/manifest.xml for res/manifest.rc to res/manifest.RES. Yes I can copy the manifest.xml to res directory but not really helpful as solution. Any other solution possible?

4. Why I have libmysql32.dll and libmysql64.dll (and other dlls) but need libmysql.dll to start heidisql.exe? Or updater32.rc/updater64.rc but I need updater.RES! Crazy! Rename command is enough, yes but not helpful as standard.

5. I have changed the file portable_settings.txt from plink.exe with path to only plink.exe and it works great as portable edition but not possible with your gui. Yes I can change the field in the gui to plink.exe but not the best solution like a checkbox for no path or auto detect.

portable_settings.txt (first line, plink.exe in the heidisql.exe directory):
PlinkExecutable<|||>1<|||>plink.exe

It was my first try with Delphi XE5 and HeidiSQL. I hate Delphi because no linux edition possible without wine and I hate wine! :-(
ansgar's profile image ansgar posted 4 years ago
Well if you hate Delphi then there is probably no point in helping you. But I'll try:

1. Thanks for the hint!

2. You need cgrc.exe, not brcc32.exe to compile res/icon.rc

3. You can ignore that manifest.xml file for the updater. Just do not include it.

4. There are versions for 32bit and 64bit Windows versions for various files. Just accept that, and copy libmysql64.dll to libmysql.dll for example by hand. At least that's what my build process also does.

5. plink.exe is executed by a CreateProcess() call, which obviously requires a full path. I can change that if you ask for that. I am just unsure if that is what you mean.
ansgar's profile image ansgar posted 4 years ago
By the way, the compile instructions I had were outdated. They were very complex and were frequently changed. There were also very few people reading them, so I finally gave up updating these.
For questions regarding compiling, there is this forum, and you asked in the right place here.


Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.
thecoder2012's profile image thecoder2012 posted 4 years ago
Thanks for your fast answer!

Well if you hate Delphi then there is probably no point in helping you.


The reason is only linux, not really delphi as language. Is Kylix as CrossKylix under windows no solution? Too old? Like https://crosskylix.untergrund.net/

1. Thanks for the hint!


Thanks for the small update but can you add the sshuser lines (-l "loginuser") for plink.exe as option?
It's better than loginuser@host in my eyes.

plink.exe command:
-l user connect with specified username
Source: http://the.earth.li/~sgtatham/putty/0.64/htmldoc/Chapter7.html#plink

Like the solution for the file dbconnection.pas:
if FConnection.Parameters.SSHUser <> '' then
PlinkParameters := PlinkParameters + ' -l "' + FConnection.Parameters.SSHUser + '"';


2. You need cgrc.exe, not brcc32.exe to compile res/icon.rc


Oh okay, thanks!

4. There are versions for 32bit and 64bit Windows versions for various files. Just accept that, and copy libmysql64.dll to libmysql.dll for example by hand. At least that's what my build process also does.


Okay but it's not possible to build both in one build process?

5. plink.exe is executed by a CreateProcess() call, which obviously requires a full path. I can change that if you ask for that. I am just unsure if that is what you mean.


I use it without the full path without any problems, if plink.exe is in the heidisql directory. My target is a portable edition without full paths for usb drives.

Any edit or preview button in this forum available?
ansgar's profile image ansgar posted 4 years ago
HeidiSQL already uses the username@host_or_ip syntax. What's the point in using the -l parameter for the user name?

About plink.exe without a path: I just successfully removed the path from the session setting in the "SSH tunnel" tab. Works as expected, so I guess CreateProcess does not need a full path. But where's then the problem?
thecoder2012's profile image thecoder2012 posted 4 years ago

HeidiSQL already uses the username@host_or_ip syntax. What's the point in using the -l parameter for the user name?


It is cleaner, more formally accurate and allowes the use of special characters.

About plink.exe without a path: I just successfully removed the path from the session setting in the "SSH tunnel" tab. Works as expected, so I guess CreateProcess does not need a full path. But where's then the problem?


The problem is the path selection with the file system dialogue. I can't select
plink.exe in the directory of heidisql without the path and using only the keyboard for editing.
ansgar's profile image ansgar posted 4 years ago

The problem is the path selection with the file system dialogue. I can't select
plink.exe in the directory of heidisql without the path and using only the keyboard for editing.


Well, but you can manually edit the input box, without using the folder button and the file selection dialog, can't you? The file selection cannot work without paths.
thecoder2012's profile image thecoder2012 posted 4 years ago

Well, but you can manually edit the input box, without using the folder button and the file selection dialog, can't you? The file selection cannot work without paths.


Sure but you could delete the path automatically if the directory was the same as heidisql.
ansgar's profile image ansgar posted 4 years ago
Done in r4957.

Also applies to the other file selectors, like startup script and the ssl certificate files in the "Advanced" tab.

Please login to leave a reply, or register at first.