I guess this is maybe a constraint of the preprocessor, but here's a quick example the illustrates the problem:
@startuml
!$ICONPATH=%getenv("HOME")+"/misc/plantuml-icon-font-sprites"
' doesn't work:
'!include %getenv("HOME")+"/misc/plantuml-icon-font-sprites/common.puml"
' doesn't work:
'!include $ICONPATH+"/common.puml"
' works fine:
!$COMMONPATH=$ICONPATH+"/common.puml"
!include $COMMONPATH
' also works fine!?
!function $fainclude ($p)
!$PPATH = $ICONPATH+$p
!return $PPATH
!endfunction
!include $fainclude("/common.puml")
usecase ($ICONPATH)
'usecase ($COMMONPATH)
usecase ($fainclude("/common.puml"))
@enduml
As you can see, you can't evaluate a built in function in an !include line, nor can you do string concatenation (which, I guess, is just another built in function...). But: !include can evaluate user defined functions. Or am I missing something here? What's the best way to achieve what I want, which is to include a bunch of files from the font-awesome library. I don't want to have to change the executable, I'd rather have the inclusions happen at the top of the file...