Forum > General
Path Local (Windows and Linux)
(1/1)
clafab:
this in windows but in linux??
ExtractFilePath(application.exename)
exist a code global for indicate the local path ???
BlueIcaro:
Look this:
--- Quote ---{$ifdef win32}
ConfigFilePath := ExtractFilePath(Application.EXEName) + 'myapp.ini';
{$endif}
{$ifdef Unix}
ConfigFilePath := GetAppConfigFile(False) + '.conf';
{$endif}
--- End quote ---
From here: http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide#Working_with_files_and_folders
/BlueIcaro
Bart:
Better use GetAppConfigFile in both cases (Win/Linux), since on modern Windows (> Win9x) you need administrator rights to write in %ProgramFiles% and subdirectories.
Bart
Navigation
[0] Message Index