To make the file sharable at Windows you need to apply this patch to lcl proc (and eventually rebuild LCL and Lazarus): After that any program can read/write to the logging file
Index: lclproc.pas
===================================================================
--- lclproc.pas (revision 26528)
+++ lclproc.pas (working copy)
@@ -2051,6 +2051,8 @@
Result := ExpandFileNameUTF8(Result);
end;
+var
+ fm: Byte;
begin
DebugText := nil;
DebugFileName := GetDebugFileName;
@@ -2058,11 +2060,19 @@
(DirPathExists(ExtractFileDir(DebugFileName))) then begin
new(DebugText);
try
+ fm:=Filemode;
+ FileMode:=fmShareDenyNone;
Assign(DebugText^, DebugFileName);
if FileExistsUTF8(DebugFileName) then
Append(DebugText^)
- else
+ else begin
Rewrite(DebugText^);
+ // recreating the file to be sharable!
+ Close(DebugText^);
+ Assign(DebugText^, DebugFileName);
+ Append(DebugText^)
+ end;
+ Filemode:=fm;
except
Freemem(DebugText);
DebugText := nil;
lclproc.patch
Description: Binary data
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
