Go Down

Topic: portable Version IMac (Read 3353 times) previous topic - next topic

kepar

Hello,

arduino.app is in /Volumes/Samsung_SSD/Arduino-1.8.5/

the Sketchbook path is changed to /Volumes/Samsung_SSD/arduino-1.8.5/Sketch

I do not find a way that Arduino IDE has the preferences.txt file in
   /Volumes/Samsung_SSD/arduino-1.8.5/portable

At the start it creates a folder Macintosh HD/Users/kepar/Library/Arduino15 with the preferences.txt file.
To copy this file to /portable and restart doesn't change anything

What do I wrong?


Thanks, Peter

pert

I notice https://www.arduino.cc/en/Guide/PortableIDE says:
Quote
This document explains how to make a portable installation of the Arduino Software (IDE) on Windows and Linux machines.
So I guess that could be interpreted to mean that it's not possible to use portable mode on macOS? It would be nice if they specifically stated that limitation instead of being vague. Maybe there are some permissions limitations that makes it not possible to implement portable mode on that OS?

The only thing I can think of is that you need to create the portable folder under the arduino.app folder. I don't have any experience with Mac.

kepar

Hello pert,

thanks a lot!

I copied the folder
 
/Volumes/Samsung_SSD/arduino-1.8.5/portable
to
/Volumes/Samsung_SSD/arduino-1.8.5/Arduino.app/Contents/Java/portable

and it worked.

To read the instruction in https://www.arduino.cc/en/Guide/PortableIDE twice, had saved me a lot of time
To enhance https://www.arduino.cc/en/Guide/PortableIDE, it might be helpfull to change arduino-1.6.10 to arduino-1.6.10.app

Most of the time it is around midnight when I sit in front of my computer and then my brain got tired too ...

Peter

westfw

Quote
I guess that could be interpreted to mean that it's not possible to use portable mode on macOS?
I've got "many" portable installs on my Mac.  They all have a preferences.txt in the appropriate place (".../Java/portable/preferences.txt)

Make sure you:
  • create the .../Java/portable directory before running the executable the first time.
  • it is .../Java/portable - a level "deeper" than on a PC install.



pert

Thanks for the updates kepar and westfw! I have submitted an issue report to improve the portable mode documentation for macOS:
https://github.com/arduino/Arduino/issues/7423
Any suggestions to improve that proposal are welcome.

westfw

#5
Apr 06, 2018, 07:23 am Last Edit: Apr 06, 2018, 07:27 am by westfw
On MacOSX, you will download a file called something like "arduino-1.6.5-macosx.zip"
Uncompressing this will give you an "Arduino.app" MacOS application (.app may or may not show up in the finder, depending on your finder options.)  The .app files are Apple's way of hiding information that the user does not need to be aware of; they are actually directories.
Rename and/or copy the Arduino.app to wherever you want the portable version to live.
Open the directory by right-clicking or ctrl-clicking on the "file" and selecting "Show Package Contents"

This will reveal the internal structure, which includes several sub-directories.

Note that unlike Windows/Linux, major arduino content like "examples", "hardware", and "libraries" are not in this first-level directory, and the "portable" directory doesn't go there either.   They're one more level "down", inside the "Java" directory.  Open the "Java" directory and create a new directory called "portable" inside the Java directory.

Now you can start the IDE by double-clicking the .app file in it's original spot, and it should create the various working directories and files (like "preferences.txt") inside the "portable" directory.





pert

Great work westfw! That's way better. I have updated the issue to recommend your detailed instructions be used instead of what I had previously proposed.

pert

Someone commented on my issue report that they have an error when trying to start the Arduino IDE in portable mode on macOS:
Quote
Arduino cannot run because it could not create a folder to store your sketchbook.
Do either of you have an idea about that problem?

It seems like it could be a permissions issue because the default sketchbook location (at least on Windows, IDE 1.8.5) is inside the portable folder so it needs to create the folder there.

I find that on Window 10 if I have the IDE installed under the Program Files (x86) folder I get the same message unless I do a "Run as Administrator". Even after the folder is created, when I start the IDE it just dies after the splash screen unless it's run as administrator. I didn't have that happen on Windows 7 that I can recall.

Is there a "Run as Administrator" equivalent on macOS? Interestingly they also had no luck with sudo open Arduino.app.

westfw

Quote
Arduino cannot run because it could not create a folder to store your sketchbook.
Hmm.  With the usual "drag the Arduino.app to it's desired location", it looks like it (and all the sub-directories) will end up "owned" by the user who did the install, with everyone else having "read only" access to the sub-directories.   That means if a DIFFERENT user tries to use it, it won't be able to create the sketchbook directory  (I can duplicate this.)
I'm not sure how this interacts with various "portable" media like flash drives - it probably depends on how the flash drive is formatted.

For normal Apple disks, right-click on the "portable" directory and set the sharing permissions so that "everyone" has read/write access (it looks like you only need to do "portable" and not the rest of the hierarchy.)  This does mean that a portable install isn't really very shareable between multiple users - even if you change the sketchbook location to a user-specific dir, that setting will be in the shared preferences.txt, I think.
 

pert

Quote
that setting will be in the shared preferences.txt, I think.
Correct. I think the sketchbook creation issue could be only the first indicator of the permissions problem that is encountered. The Arduino IDE will also want to write to the portable folder to install hardware packages via Boards Manager, stage the downloads of library files during installations via Library Manager, and save preferences.

pert

The final word from the Arduino team is that portable mode on macOS is not officially supported. The instructions have been updated to specifically state this, with a link to westfw's excellent directions.

Although it's unfortunate there is no perfect support for portable mode on macOS, this discussion has resulted in an improvement in the documentation so I'm happy.

Go Up