Thanks it works, it copies the fonts!
{$IFDEF LINUX}
CopyFileToHomeDir('VictorMono-Bold.otf', '.fonts');
CopyFileToHomeDir('VictorMono-Regular.otf', '.fonts');
{$ENDIF}
Thanks =)
Good! However, I just asked Open AI...
I need a function for free pascal.
It receives 2 strings. 1) a file 2) a folder
For the file, it chesks for it's existence in the folder the application is being run from. This file with the application directory path is prepended to the file as the source file.
For the folder, it checks for it's existence in the user's home directory (home directory must be prepended).
If the folder does exist, it creates it.
This folder in the user's home directory is the destination folder.
If the source file exists, the the existence of the same file is checked or in the destination folder. If it does not exist in the destionation folder it is copied there.
It did not calculate a source path correctly so I added SearchPath on my own, and the call to it.
Apart from that, the rest is verbatim from OpenAI's reply...
Hmmm... I see it auto corrected a typo of mine (if the directory exists, create it... it knew to add not exists...)