I have never installed Lazarus without first removing any existing version.
Ok, good. I didn't know.
I don't know what you mean when you say that the installer is broken. I'm using the same new Lazarus version
that everyone uses and it works fine with all my other programs so I don't see how the installation could be broken.
If you had just installed without uninstalling, then that could have created a mix of old and new, and that mix would not work.
I added LazUtilsStrConsts to the uses section but no luck.
Now there is something unexpected.
I just looked at a 2.2.6 install (as well as a 4.0 install).
The unit LazFileUtils (which contains GetAppConfigDirUTF8 ) already has LazUtilsStrConsts in its uses clause.
So if you added it, then it should be there twice, and that would give an error.
So, then did you somehow got a different version of that file?
To be sure (just a habit, to check the obvious too): The file that you added it to is "LazFileUtils" ?
You did not include
{$I lazfileutils.inc}
in some other unit? In some unit of your own?
Does UtF8 have anything to do with LazUTF8, which is in the uses section?
LazUtf8 contains some helper function to deal with Utf8 encoded unicode text.
The function GetAppConfigDirUTF8 returns the directory in utf8 encoding. (translated from the unicode utf16 wide string that Windows itself provides)
Windows can handle filenames either as Unicode (widestring) or Ansi (local encoding, limited to chars in the local encoding).
Lazarus provides access to the Widestring name, but re-encoded as utf8.
Maybe the person who wrote that winlazfileutils.inc code could help me.
The reason I'm concerned and am willing to gladly pay for a solution is because the computer which runs the early
Lazarus version is very old and it won't last forever.
All fine and good. I offer you the bits of knowledge I have for free. And I guess some other will do too.
If someone else can do better and wants to charge for it... That is between you and them.
I did not write that unit. But I do build the windows installer. So I have some background.
On the other hand, based on the info from your description, I have not enough details to
- know what it is
- know if I can find out
So best I can offer right now, is to ask question, hoping some answer will bring forward some detail that gives me a clue.
So
- other projects work
- Configure build Lazarus "did not work"
=> it gave you an error?
=> it did somethinge, without error / but did not fix the issue?
My "unit LazUtilsStrConsts;"
c:\lazarus/components\lazutils\lazutilsstrconsts.pas
has the declaration:
lrsUnableToCreateConfigDirectoryS = 'Unable to create config directory "%s"';
On line 37.
Does yours too?
Rather unlikely, but by any chance in your project folder or any subfolder of you project (not c:\lazarus - but where your own code is) is there a file named lazutilsstrconsts.ppu ?
It should not be there.
Does your project cross compile (target a different OS, or bitness, or CPU )?
I just wonder, the package LazUtils is precompiled. Normally if you build your project this package should not need to be compiled.
But if you get compilation errors in it, then it did get compiled...