Arduino IDE 2.0 Portable

First of all, thank you for the release of version 2.0.
I use different Arduino versions 1.x on different notebooks (syncronized folders).
To make this work I have created a portable folder in all IDEs.
I wanted to ask if it is planned to integrate this in Arduino 2.0? It would be a pity if this excellent function would be removed.

Thanks

Hi,

The IDE already is portable. if you head to the download page for the IDE you can download the ZIP version which you can just extract and run anywhere.
Alternatively you can tell the installer to install to your portable folder and then just create a shortcut to the app on your other device.
Like before changing your sketchbook location to another location is also possible if this is what you meant.

SuperNinja_4965

This is true, the application itself is portable, however all libraries and other boards you install via the IDE are stored in the user profile. If you start the IDE on another computer you have no more libraries installed.

2 Likes

In the "old good" 1.8.19 you can create a folder named "portable", all the sketch, library and other stuff is only in that folder, not in your user profile, like the "new stable" 2.0

1 Like

I was unaware that was a feature. it seems like i misunderstood your question. Perhaps you should consider creating a feature request.

If this is true then the Arduino IDE 2.0 "Portable" (.zip download) version is badly BROKEN! I always use pre 2.0 IDE Portable versions and often keep more than one version installed (unzipped) side-by-side. When I finish a project I can archive the directory with the IDE portable version files and it becomes a snapshot in time that I can always go back to. This is by design. For example, here is the description of the pre-2.0 v1.8.19 portable version which I can verify IS TRULY PORTABLE:

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

Arduino IDE 1 Portable Installation

Why Portable?

Almost in all the schools students don't have administrator privileges, so they don't have write access in some folders. This leads to some problem in using the Arduino Software (IDE) since your preferences and sketchbook are saved in one of those folders. Using a portable version of the IDE you can overcome this problem.

Another scenario can be the following: you want to organize a workshop and you need some additional library or a specific core. Since the portable version stores the sketchbook, the libraries and the hardware folder locally, you can have a starting point equal for all the people who join the workshop just replicating the same folder on all the machines. This is also quite useful if for some reason you don't have an internet connection and want to prepare everything for your project without downloads and delays.

Furthermore, a portable installation could be on a pendrive, allowing you to carry around your personal set of sketches, cores and libraries, to be used on any computer without affecting it with your files.

1 Like

Hi all. The Arduino IDE developers are tracking the request to add a portable mode here:

If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject.

The ZIP package of the Arduino IDE is not in any way intended to be equivalent to the "portable" mode of the Arduino IDE 1.x. It is simply a different package option.

In fact, if you use the Arduino IDE 1.x ZIP package without configuring it to run in portable mode, then you will find it works in the same way, where libraries and boards platforms are installed outside the installation folder.

So it is not at all accurate to claim it is "BROKEN". A missing feature is a distinctly different situation from a broken feature, so let's please try to avoid confusing the two in this discussion.

We know that portable mode is very useful to some users, and it is in our backlog.
We do not plan to give it higher priority for now as our first goal is to release a stable IDE and later focus on more niche uses.

1 Like

Not only is usefull the portable !!
I have a Windows PC with partition C:\ and D:
My C: is windows partition and it is almost full while D: is empty (and for works)
When IDE 2 install all package/board (esp32,esp8266,arduino,etc.) it "stuff" my C: drive with many Gb

1 Like

After a while my "Main" Arduino installation has lot of libraries and different boards ( from atmega to atttint and ESP286 ), which makes it very sluggish.
I'm user of Arduino since versions pre 1 ( with pde files ) now betatesting 2. I Even wrote several libraries for my own use and modified some public ones, for new chips or correcting bugs.

So my solution is to use a portable version, ans load only the libraries and boards I need in that project. That's the way other moderns ides like Michochip Studio 7 or Sloeber uses.
For me, not having portable it's a serious drawback, that prevents me to move from the version 2 beta to the new official 2.0

Other plus for me of portable, is having a complete version of my project, that can zip "as is" because newer versions of IDE or compilers, does not compile well, or don't comunicate well because of overwriten avrdude configuration files I manually edited.
Not to mention the posiblity of working fom a pen drive at any computer I can get.

I hope this can be addressed as a real serious problem and corrected promptly.

Regards

4 Likes

Tried to leave a request at Git, but the Topic was closed. Just recently switched to 2.0 and very disappointed of the storage being moved to the user profile. Huge Problems! Messed up everything as I have had to manage multi versions due to library changes etc. 2.0 simple destroys so much. Further with the restructure the concept of portability is gone. I am total amazed Arduino made this decision! So just to make the request clear - Simple make the new version FULLY configurable by the user allowing for a portable setup allowing the USER to decide where things go. It's the way it was and it's the way it should have stayed. Uninstalling 2.0 until it becomes a useful product. Sorry but the change was a MAjor Mistake.

2 Likes

It seems there is a misunderstanding. This was not a "restructure" or a "decision" or a "change".

Arduino IDE 2.x is a complete rewrite of the Arduino IDE from scratch in a different programming language. None of the Arduino IDE 1.x Java codebase is present in Arduino IDE 2.x. Instead, each feature available in Arduino IDE 1.x had to be created again, one feature at a time. There hasn't been time to add all the features yet. Portable mode is one such feature.

If you would like to see that feature in this free open source software, feel free to submit a pull request on GitHub to add it.

Good point ptillisch! I think it's possible to miss that part if you don't read up on everything about v2.

But since version 2 has gone gold, and is looking pretty stable. I think chances are bigger than ever that we will have a portable mode available in the not so distant future. New commits are done at least 4 days every week so the IDE feels pretty active to me.
If I knew anything else than basic C# and newbie C++ it would be amazing to help out with this but for the moment I can just wait patiently :wink:. It's an amazing free platform so we shouldn't complain.

That issue has been locked because it was deemed " too heated. So, is this the thread to watch for new developments on this request? Can't more beyond 1.x until it's implemented. As is, there are too many ways an seemingly innocuous library or board package update can break existing / working code.

Yes, it is very unfortunate that was necessary due the issue becoming a source of a lot of unproductive "noise" for the developers.

The best way to watch for new developments is by subscribing to the issue on GitHub. You can do that by logging into your GitHub account and then clicking the "Subscribe" button you see on the right side of the issue page.

The Arduino IDE 2.x development team are very careful to update the GitHub issue tracker as bugs and feature requests are resolved. Those subscribed to the issue will receive a notification from GitHub at that time. The team doesn't have the resources to track and maintain all the forum threads, so they will not be updated with new developments. I try to link from the forum to the relevant issue on GitHub though so that those who want to see the status of something discussed here can easily find the relevant issue on GitHub.

Maybe this is already solved, but I stumbled upon a similar problem.
My workPC has no direct internet access, so I wanted a complete portable installation, that I could move via USB stick or so.
I extracted the Arduino IDE ZipFile in D:\Arduino\arduino-Ide_2_0_3_Windows_64bit
Then start it once on an OnlinePC, load my libraries and Boards and then copied the downloaded/updated files to my USB drive:
Copy %USERPROFILE%\AppData\Local\Arduino15 D:\Arduino\UserAppdataLocalArduino15
For my Sketchbook I did the same:
Copy %USERPROFILE%\Documents\Arduino D:\Arduino\UserDocumentsArduino
In D:\Arduino\ I created a BatchFile mklinks.bat:
mklink /D /J %USERPROFILE%\AppData\Local\Arduino15 %CD%\UserAppdataLocalArduino15
mklink /D /J %USERPROFILE%\Documents\Arduino %CD%\UserDocumentsArduino

Then on a new PC I just need to call mklinks.bat and then I can start ArduinoIDE in my known envionment, can update Libraries on an online PC etc.

Maybe this helps you as well.

3 Likes

Thanks for that. I have been contemplating something like that but you have done it for me :+1:

It can use some additional features :wink: The main one for me is to have e.g. separation of board packages. E.g. one for pure AVR, one for ESP8266 etc. So I would have a few copies of the install on the USB (different directories and a few bat files, e.g. IDE_AVR and IDE_ESP8266.

Note:
I would not have thought of creating links, just copying.

Does mklink /D /J create a symlink or a directory junction? I got the impression those flags were mutually exclusive:

Symlinks can only be created on Windows with administrative permissions, so if the commands are creating symlinks then it might cause difficulty for some users, especially in the use cases where a portable installation on a flash drive is more likely to be used.

An alternative is to point Arduino IDE to these paths by defining them in the Arduino CLI configuration file used by Arduino IDE at %USERPROFILE%/.arduinoIDE/arduino-cli.yaml.

You can set any arbitrary location for the folder that is at %USERPROFILE%\AppData\Local\Arduino15 by default via the directories.data field of that file.

You can set any arbitrary location for the sketchbook folder via the directories.user field of that file.

Documentation for the Arduino CLI configuration file here:

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

An excellent command line tool for working with YAML files is yq:

Or you can use the arduino-cli config commands:

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

Arduino CLI is included with the Arduino IDE installation under this subfolder:

resources/app/node_modules/arduino-ide-extension/build/

Goodbye lame-legged IDE 2... :person_with_white_cane: , I'm going back to portable IDE 1... . There are no crutches needed. :running_man:
Thanks

Think I managed to make it portable, only partially tested on windows 11,

  1. Download arduino-cli from GitHub.
  2. In file /configuration/configuration.go, change functions getDefaultArduinoDataDir() and getDefaultUserDir(). Instead of "win32.GetLocalAppDataFolder()", use "os.Getwd()". Also, comment this line β€œgithub.com/arduino/go-win32-utils”.
  3. Build arduino-cli.exe following this guide: How to contribute - Arduino CLI.
  4. Download Arduino IDE portable.
  5. Look in file /resources/app/node_modules/arduino-ide-extension/lib/node/theia/env-variables/env-variables-server.js line 20. Change "os_1.homedir" to "process.cwd".
  6. Copy arduino-cli.exe to /resources/app/node_modules/arduino-ide-extension/build.
  7. Start the application.

ps: delete file /.arduinoIDE/arduino-cli.yaml. when moving or copying