1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-15 07:56:36 +00:00
freebsd-ports/cad/zcad/files/patch-cad__source_zcad_uzclog.pas
Jose Alonso Cardenas Marquez a9bf1282b2 - Update to 0.9.8.5
PR:		251365
Submitted by:	acm
Approved by:	danfe (timeout)
2020-12-14 20:39:44 +00:00

27 lines
1.2 KiB
ObjectPascal

--- cad_source/zcad/uzclog.pas 2020-10-08 18:33:43.730231000 -0500
+++ cad_source/zcad/uzclog.pas 2020-10-08 18:36:24.422328000 -0500
@@ -21,10 +21,11 @@
{$mode objfpc}{$H+}
interface
uses UGDBOpenArrayOfByte,gzctnrvectordata,gzctnrstl,LazLoggerBase,
+{$IFDEF UNIX}uzbpaths,{$ENDIF}
LazLogger,strutils,sysutils{$IFNDEF DELPHI},LazUTF8{$ENDIF};
const {$IFDEF DELPHI}filelog='log/zcad_delphi.log';{$ENDIF}
{$IFDEF FPC}
- {$IFDEF LINUX}filelog='../../log/zcad_linux.log';{$ENDIF}
+ {$IFDEF UNIX}filelog='zcad_unix.log';{$ENDIF}
{$IFDEF WINDOWS}filelog='../../log/zcad_windows.log';{$ENDIF}
{$ENDIF}
lp_IncPos=1;
@@ -135,7 +136,9 @@
begin
if assigned(SplashTextOut) then
SplashTextOut(s,true);
- logname:={$IFNDEF DELPHI}SysToUTF8{$ENDIF}(ExtractFilePath(paramstr(0)))+filelog+'hard';
+ logname:={$IFNDEF DELPHI}SysToUTF8{$ENDIF}
+ ({$IFDEF UNIX}UserPath{$ELSE}ExtractFilePath(paramstr(0)){$ENDIF})
+ +filelog+'hard';
FileHandle:=0;
if not fileexists({$IFNDEF DELPHI}UTF8ToSys{$ENDIF}(logname)) then
FileHandle:=FileCreate({$IFNDEF DELPHI}UTF8ToSys{$ENDIF}(logname))