Making PlatformIO portable (or at least duplicatable to other machines)


#1

Hi there. I’m using PlatformIO under VS Code and Windows.
Sometimes I want to develop on a PC which doesn’t have any internet connection.
Since VS Code working in portable mode I wanted to try to get all my libs and build-environments I’ve already installed on my PC at home to (esp, avr, stm etc).
So I followed the instructions from VS Code (extract zip create data, user-data and extensions). Without PlatformIO it is working just fine.
Than I copied all the contents of my %USERPROFILE%.platformio to user-data as whell as the extensions (including platformio.platformio-ide-1.2.0) to the extensions folder.
On the PC I installed Python 2.7 manually.
When I start VS Code PlatformIO tried to install but Failed with “Failed to install PlatformIO IDE.”
So after I took a look at the PCs User profile folder, it created a .platformio folder (even I put the original one in the user-data folder…)
Okay so I thought I try to copy my original .platformio to the targets PC User profile folder, so maybe platformio recognizes that it is already installed. But I got the same error. Then I tried to edit the .platformio\homestate.json file and corrected all paths to the new username. But it still fails.

Is there any way to get all my platformio stuff to a differnt machine to run without having to install everything over internet?


#2

You can’t copy %USERPROFILE%\.platformio\penv and %USERPROFILE%\.platformio\python27 to another machine.

  1. Please install VSCode and PlatformIO IDE on another machine (you will need internet)
  2. Copy from %USERPROFILE%\.platformio “libs”, “platforms”, “packages”.

#3

Unfortunately the machine doesn’t have any internet for security reasons


#4

We plan to refactor an installation logic in PlatformIO Core 4.0. Please stay with us on https://twitter.com/PlatformIO_Org for the further updates.