Platform tools in(to) install directory

Hello all:

I have been using Arduino for years, like many others, but do most of my development using C (and ++) using native environments.

That said... I use a Windows VM for this, where Arduino is in C:\MCU\Arduino, together with all the stuff it comes with. Security-wise, the software gets installed as Administrator, and the entire tree is granted proper rights for a 'Development' group, which certain users belong. This all works fine.

Now... I recently had to install a load of add-on packs (board packs for Adafruit, Sparkfun etc) and platforms (ESP and ESP32, etc.) This also works well, but, to my horrors, all of these get installed per-user in the user's profile (ADDPDATA/Arduino15.)

For me, after 25+ years of administering computer networks, this is baffling. Why is this not handled per Windows "software install guidelines" ?

(which translates to: if an Administrator-level user does the install, said package installs for everyone unless told otherwise; else it gets installed for the current user only.)

So, for example, the ESP8266 pack "should" have been added to the C:\MCU\Arduino, in my case, and same for the other stuff.

Now, I had to do this several times, once for each user....

Is there a way to "move" this stuff after the fact, or is this how this will be?

Thanks for any insights...

Fred N. van Kempen

Hi @waltje. Arduino IDE installs boards platforms in the packages subfolder of the "Arduino data folder". The path of the data folder used by Arduino IDE can be configured via the directories.data configuration key of a configuration file.

The configuration file is located at this path:

C:\Users\<username>\.arduinoIDE\arduino-cli.yaml

For this sort of system administration work, you might prefer an automated/programmatic approach to working with this configuration file. Arduino provides a command line tool named "Arduino CLI" that can be used for that purpose:

https://arduino.github.io/arduino-cli/latest/

The arduino-cli.yaml configuration file can be generated and the data in the file adjusted using the arduino-cli config commands:

https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_config/

arduino-cli.yaml is written in the common YAML language. This means that, in case you find arduino-cli config to not be suitable or convenient for your application, you can also use any of the many general purpose tools available for working with data in this format. I can recommend the excellent yq:

Sure. After configuring a new path in arduino-cli.yaml, just copy the folder from the previous path to the new one.

I just noticed this was posted in the IDE 1.x category. The information I shared above is only applicable for Arduino IDE 2.x.

For Arduino IDE 1.x, you can use a portable installation:

https://docs.arduino.cc/software/ide-v1/tutorials/PortableIDE/

I will play with this setup for a while.

It is not actually a solution (one cannot use the installer, for one, nor 'normal' update procedures), but it is a start.

Since the IDE apparently "knows" to act different on finding a 'portable' directory, why not extend that to afford the same on having 'packages' at that level, for "installation-wide" installs, c.f. user-level installs of such?

The portable stuff would/should refer to user files. I do not consider cores and libraries (just) user files, they could also be considered system files if installed ("made available for all") by the administrator installing it.

I do. The reason is that these are project dependencies and so one user's project might require a different specific version of a dependency from another user's project. I want control over the updates of my dependencies. If the new version of a dependency introduces changes that break my project (e.g., the 3.0.0 release of the "esp32" boards platform), I want control over if and when I update to that version.