Batchcopy in-use libraries to private in VScode

Hy, i am looking for a way to copy all used libraries to ./lib/ so i can copy the whole project to another machine without missing any dependencies.

Is there a way to automate this?

Have you modified any underlying libraries? Then why not just copy the project without them, if they are in lib_deps they will get re-downloaded automatically, alongside with any missing compiler you might need. Is your use case a completely off-line machine?

If they’re not installed in the global library storage (via pio lib install ..) they should all be in the project folder in the hidden folder .pioenvs/. Moving them to lib/ should mostly do what you want. That also has the disadvantage that you’re now stuck with using that library version locally in the project, without receiving automatic updates via the internet.

1 Like

yes the machine is offline so redownloading them on location unfortunately isn’t an option. The librarbys i need are installed with pio library manager on the original system i only need to copy those, any other library i use i have added as private library from the start.

I just took a look at .pioenvs\nanoatmega328
the used librarys are there but only as compiled filename.cpp.o files so i am not sure if that would work. Even if it did i really would prefer source files.

No automatic library updates would actually be an improvement for this project :slight_smile:

Sorry that was the wrong folder name. .piolibdeps are where the libraries are at. pioenvs are the compiled object files and the final firmware binary.

hmm… my project has no .piolibdeps folder for some reason.

Then you’ve either installed them globally via pio lib install or something’s wrong. You have the lib_deps = .. lines in your platformio.ini?

1 Like

That might have done the trick. I didn’t have the lib_deps line so i added that and platformio created .piolibdeps folder and copied all libraries to it.

Thank you <3

1 Like