Pages: [1]   Go Down
Author Topic: Changing location of Libraries folder on a Mac  (Read 422 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 63
Posts: 6049
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Austin, TX
Offline Offline
God Member
*****
Karma: 12
Posts: 524
carpe diem
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Austin, TX
Offline Offline
Faraday Member
**
Karma: 63
Posts: 6049
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

but found that the arduiono 1.1 installers just tossed everything in Downloads. 
What installers?  And where did you get 1.1 from?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Pages: [1]   Go Up
Jump to: