Pages: [1]   Go Down
Author Topic: distributing my source -- with libraries?  (Read 360 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
http://sc-fa.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, what's the right way to pack up my code along with the hardware abstraction libraries by Alexander Brevig into a tidy package?  

My code is for my drum and midi sequencer as seen here:
http://beatseqr.com

I'm making extensive use of the hardware abstraction libraries found on the playground since they have radically sped up my development time.  I want to start selling instances of my project and I'm hoping there's some kind of easy (?) way to change the way I'm including the libraries in my code so I can throw the library files inline with my code files and have the compiler locate them ok when my customers want to update their code. Is this possible?  

for reference, here's the library home page on the playground:
http://www.arduino.cc/playground/Code/HardwareAbstraction
Logged

Norway@Oslo
Offline Offline
Edison Member
*
Karma: 13
Posts: 2033
loveArduino(true);
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you move all HAL libraries into a folder by the name of your project, and additionally have a header file in that folder which includes all used HAL libraries. You could distribute that folder alone.

Imaginative folder structure:
/ProjectName
+Button.h
+Button.cpp
+LED.h
+LED.cpp
+ProjectName.h


Make ProjectName.h look like:
Code:
#ifndef PROJECTNAME_H
#define PROJECTNAME_H

#include "Button.h"
#include "LED.h"

#endif

Now all your code can include ProjectName.h

[ I do not know if this works with the Arduino IDE, but it ought to ]

Great looking project! Glad you found the HALs useful  smiley-grin
Logged

Pages: [1]   Go Up
Jump to: