diff options
-rw-r--r-- | refreshexecutableunit.pas | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/refreshexecutableunit.pas b/refreshexecutableunit.pas index 02e2414..272c108 100644 --- a/refreshexecutableunit.pas +++ b/refreshexecutableunit.pas @@ -44,7 +44,7 @@ begin tmpDir:=mkTemp('-d /tmp/fpc.'+extractfilename(paramstr(0))+'.XXXXXX'); mkdir(tmpDir+'/lib'); - setlength(args,13+length(dirs)); + setlength(args,18+length(dirs)); args[0]:='-MObjFPC'; args[1]:='-Scghi'; args[2]:='-Cg'; @@ -55,15 +55,20 @@ begin args[7]:='-l'; args[8]:='-vewnhibq'; args[9]:='-Fi'+tmpDir+'/lib'; - args[10]:='-FU'+tmpDir+'/lib'; - args[11]:=dirs[0]+extractFileName(paramstr(0)); - if fileexists(args[11]+'.lpr') then - args[11]:=args[11]+'.lpr' + args[10]:='-Fu/usr/share/lazarus/lcl/units/x86_64-linux/gtk2'; + args[11]:='-Fu/usr/share/lazarus/lcl/units/x86_64-linux'; + args[12]:='-Fu/usr/share/lazarus/components/lazutils/lib/x86_64-linux'; + args[13]:='-Fu/usr/share/lazarus/packager/units/x86_64-linux'; + args[14]:='-Fl/opt/gnome/lib'; + args[15]:='-FU'+tmpDir+'/lib'; + args[16]:=dirs[0]+extractFileName(paramstr(0)); + if fileexists(args[16]+'.lpr') then + args[16]:=args[16]+'.lpr' else - args[11]:=args[11]+'.pas'; - args[12]:='-o'+tmpDir+'/output'; + args[16]:=args[16]+'.pas'; + args[17]:='-o'+tmpDir+'/output'; for i:=0 to length(dirs)-1 do - args[13+i]:='-Fu'+dirs[i]; + args[18+i]:='-Fu'+dirs[i]; if runCommandInDir(dirs[0],'fpc',args,output) then begin setlength(args,2); |