Changeset 164 for trunk


Ignore:
Timestamp:
Aug 20, 2024, 1:01:48 AM (4 months ago)
Author:
chronos
Message:
  • Fixed: Put compiled files into application data directory if source is in read only directory.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LazFuck.lpr

    r154 r164  
    2626
    2727  Application.Scaled:=True;
    28   Application.Title:='LazFuck IDE';
     28  Application.Title:='LazFuck';
    2929  RequireDerivedFormResource := True;
    3030  Application.Initialize;
  • trunk/Target.pas

    r161 r164  
    533533    CompiledDir + DirectorySeparator + Name + DirectorySeparator +
    534534    ExtractFileNameOnly(ProjectFileName) + SourceExtension;
     535  if not DirectoryIsWritable(ExtractFilePath(Result)) then
     536    Result := GetAppConfigDir(False) + CompiledDir + DirectorySeparator + Name +
     537      DirectorySeparator + ExtractFileNameOnly(ProjectFileName) + SourceExtension;;
    535538end;
    536539
     
    545548    CompiledDir + DirectorySeparator + Name + DirectorySeparator +
    546549    ExtractFileNameOnly(ProjectFileName) + CompiledExtension;
     550  if not DirectoryIsWritable(ExtractFilePath(Result)) then
     551    Result := GetAppConfigDir(False) + CompiledDir + DirectorySeparator + Name +
     552      DirectorySeparator + ExtractFileNameOnly(ProjectFileName) + CompiledExtension;
    547553end;
    548554
Note: See TracChangeset for help on using the changeset viewer.