how to copy Arduino portable program folder from Windows to Raspi?

hi,
I have a complete Windows Arduino program folder containing also a portable subdir.
How can I copy this Arduino program folder from Windows to Raspi so that all system files and all proprietary portable files, packages, and libs will work the same on both platforms?

You can't just copy it over because the executables are compiled for Windows and won't run on the RPi. You can copy over your libraries and sketches but you will need to reinstall the Arduino IDE and hardware packages on the RPi so that you get the executables that are compiled for Linux ARM.

thanks, I suspected that (not sure if I understood that correctly though...)
can I copy instead just the "portable" subdir from the Windows PC then so that it will work on the Pi, and into which Raspi Arduino folder then?

It depends. Hardware packages are installed to the portable folder. If you have installed any hardware packages via Boards Manager, and any of them have their own toolchain, then those tools are compiled for Windows and will not work on the RPi. Hardware package authors provide separate versions of the tools compiled for each operating system and Boards Manager automatically installs the correct version for the operating system.

I recommend you to only copy your sketchbook folder and reinstall everything else on the RPi from scratch. You can find the location of the sketchbook folder at File > Preferences > Sketchbook location. That will contain all the libraries you have installed as well as any sketches you saved to the sketchbook folder. Even the sketchbook folder is not necessarily free from OS-specific files. If you did a manual installation of a hardware package then you installed it to the hardware folder of the sketchbook. Some of those hardware packages include a toolchain. The most common would be the ESP8266 and ESP32 packages.

yes, I have installed several boards: M0, Due, Adafruit itsybitsy M0, Adafruit Feather M4, esp8266, and some more - so it seems the "portable" folder is actually not portable, what a pity :frowning:

Yes, those are all in the packages subfolder of the portable folder and they all use OS-specific tools. If you've updated Arduino AVR Boards via Boards Manager, then you even have that package in the portable folder, where it's used rather than the Arduino AVR Boards version bundled with the Arduino IDE installation (which has tools compiled for the OS of the Arduino IDE version you downloaded.

In your case, the portable folder is only portable between computers that use the same OS type.

ok, thanks for your clarification!

as I don't have a portable folder yet on my Pi:
In which Arduino Pi directory should I create one, to copy my porable Windows libraries into it?
tbh, it's very confusing...

You should copy the libraries to the libraries subfolder of the sketchbook folder. You can find/change the sketchbook folder location in the Arduino IDE at File > Preferences > Sketchbook location. If you are running the IDE in portable mode (by creating a folder named portable inside the Arduino IDE installation folder), you can set the sketchbook folder to be under the portable folder if you like, but it's not required.

tbh, I would prefer to have a portable folder on the Pi, too, because of setup similarity.
But IIUC, i can create a portable folder on the pi also in the sketchbook folder, ind then copy my portable libraries folder into that?

dsyleixa:
IIUC, i can create a portable folder on the pi also in the sketchbook folder, ind then copy my portable libraries folder into that?

You got it backwards. The sketchbook folder would go inside the portable folder, not vice versa.

Here's how the folder structure would look:

{Arduino IDE installation folder}
|_portable
|_sketchbook
|_libraries

You just need to copy the sketchbook folder from one computer to the other. It's super simple.

aha, now I see, thanks! 8)