Go Down

Topic: Changing location of Libraries folder on a Mac (Read 573 times) previous topic - next topic

mmcnama4

Is there a way to to tell the Arduino IDE on a Mac to look for libraries and examples in a dropbox folder as opposed to the default /documents/arduino?

I'm trying to run the Arduino IDE out of dropbox so my project files and libraries are always in sync. I'm in a Mac and Windows environment and the libraries for a Windows pc are in the same folder as the application, but on a Mac they are not.


Thanks!

perhof

I haven't used a Mac but on other platforms you can put your custom libraries in a "libraries" folder within your sketchbook.
If you can do this and place your sketchbook in your dropbox folder you should be ok.


James C4S


I'm in a Mac and Windows environment and the libraries for a Windows pc are in the same folder as the application, but on a Mac they are not.

This isn't entirely correct.

Mac, Windows, and Linux have a "libraries" folder for the libraries included with the Arduino IDE.  That's what you see when you unzip on Windows.  On Mac this folder is inside the Arduino.app bundle. 

This is not the location for user contributed libraries.

The correct place for user contributed libraries on all three operating systems is the "libraries" folder inside of your "sketchbook" folder.  The reason you want user-contributed libraries here is that when you upgrade to a newer version of the IDE, the libraries you added won't be affected by the change.

Your sketchbook folder is defined in preferences.  So you can just point your sketchbook folder to a folder inside your Dropbox folder.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

For those comfortable with a Unix shell on the Mac  I just expected them to go into ~/lib but found that the arduiono 1.1 installers just tossed everything in Downloads. 

/Users/daveclark5/Downloads/arduino-1.0.1

This seems sloppy.  Downloads is this compost pile of various applications - and files that will never be used again.   I don't recall having the option of dropping 'Arduino' into the Application folder.  That added step in the dmg might make sense.    But heck - it works on better on a Mac than a pc so i'm not complaining.
 
With Downloads/arduino-1.0.1 are the arduino.exe executables, drivers, java, reference, and lib which includes lib/preferences.txt that was put there by the installer.  Note that there is also a preferences.txt in /Users/daveclark5/Library/Arduino.   This is a totally different preferences file.

So - I wanted to look through the wired libraries - here is the folder that I was looking for.
/Users/daveclark5/Downloads/arduino-1.0.1/libraries

And I cd into the directored "Wire" and find the Wire.cpp and Wire.h that I wanted to use.

I'm guessing that to install new libraries I would need to create a directory (folder) and that the permissions would have to be 755
/Users/dclark/Downloads/arduino-1.0.1/libraries/my_new_library


Louis Davis

Here is some helpful information about using libraries:
http://arduino.cc/en/Guide/Libraries

James C4S


but found that the arduiono 1.1 installers just tossed everything in Downloads. 

What installers?  And where did you get 1.1 from?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up