PlatformIO Community

Change library code after installed


I’m using RadioHead in my code, RadioHead by default disables encryption in the header RadioHead.h i can fork the repo and just enable it and then install it from my url. i hate this solution as it’s not maintainable.
I know there is advance scripting i even explored a bit all that “env” has to offer, i can see that it has a memeber in “items” collection that contains the directory where the libs reside, i can make a search for tha radio head installation and change the file i need in post build action.
My question is,

  1. is it good practice ? it’s kind of a patch, but better than the prev solution :slight_smile:
  2. is there a better way then searching myself to get the installation directory of one of my dependencies (the libs that appear in my ‘lib_deps’ section) by name ? or repo ?
  3. is there an action to post pio lib install action one that runs even if i never called lib install but ‘pio run …’ so i can add my actions there ?



How about to fork that library and use direct GIT for lib_deps?


apparently not so possible since they don’t provide the code that way on github. the code is provided using a changing link (the link it’self is available on their site the file the link points to changes it’s name)
I chose to use th e ./lib directory and keep that in my git project…