Go Down

Topic: Uploading to github with other peoples libs - is it ok? (Read 594 times) previous topic - next topic

johnnygueggu

Dec 11, 2015, 04:48 pm Last Edit: Dec 11, 2015, 05:17 pm by johnnygueggu
Hi everyone

I'm thinking about uploading my stuff to github.

For me it's an advantage of version tracking / diffs etc and backup, and other people can see my stuff and maybe benefit from it.

To really be useful, I'd have to upload everything. That is not just the .ino file, but also all libraries I use.

Here's the thing: Am I allowed to do that? Am I allowed to publish libraries that other people wrote? I mostly have libs from adafruit and other open source stuff.

The thing is, on my local disk I have several folders for a Project, usually a structure like this:


Project_Folder_LOLShield_Pong
¦
¦----->Code-subFolder
¦
¦----->Library-subFolder
¦
¦----->Instructions-and-Notes-subFolder


So basically, uploading just my own code (which I invented and own) doesn't help me (or others) at all.

I need to be able to publish the whole Project-Folder with all resources in order to be able to work on it cross-platform, maybe even with other people.

In fact it's essential to bring the library with, because if others use another version of the library, the commands may have changed in the meantime and the whole code (.ino) file becomes useless to them.

So am a complicated question in short: Is it OK to upload other peoples Libraries?


###### Edit #####

So I looked into all libraries (CMUCam, Lolshield etc) and they're all under an open License like GPL. So I guess it should be ok.

keeper63@cox.net

So I looked into all libraries (CMUCam, Lolshield etc) and they're all under an open License like GPL. So I guess it should be ok.
Yeah - if they're under an open license, then it should be ok.

Where it gets tricky (if you are in the USA) is if there isn't any license noted. In the US, this actually means the license is "standard copyright" - meaning you can't technically copy it without the author's permission. The sad thing is, many people seem to think that if no license is given, then it is "public domain" - which is false. For a work to be "in the public domain" - it must specifically be licensed as such - with a note in the code or elsewhere that reads (more or less) "This work is released to the Public Domain".

Something to keep in mind:

If you are wanting to release this project as something that someone can easily download and use, without much if any "browsing for libraries" and "installing libraries" (ie - all those you have used) - then including them into your repo is perfectly fine.

However, you should note somewhere - or keep whatever documentation that came with the library - where that library came from (if you recall). Especially if it was found on GitHub (or there is a GitHub repo) - link over to it. That extra bit of documentation can help immensely for some people.

Better would be a system (which I doubt exists?) that would allow you to just have the includes, but then when you compile (or you run it through a pre-processor), it would pull down the library code, plus any other dependencies, etc - install them in the proper place, then compile the whole shebang. With something like this (a great example can be found in Google Go), you wouldn't need to worry about keeping the libraries around, up to date, etc - no duplication of code, or code getting out of date (and maybe even diverging over time).

The Arduino project isn't there, yet - and maybe never will be. But it is nice to dream...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

pert

One option you could consider is git submodules. This allows you to create links to other repositories. This can be targeted on a certain tag or commit so you don't have to worry about incompatibilities caused by using a different version. The downside is they're kind of a hassle to work with and if someone tries to just use the Download ZIP button to get your project the folders where the submodules are supposed to be will just be empty.

Project_Folder_LOLShield_Pong
¦
¦----->Code-subFolder
¦
¦----->Library-subFolder
It's generally better to install libraries in the libraries folder of your sketchbook so one copy of the library can be used by multiple projects. I'd just make a section of the documentation of your project that lists all the required libraries with links to the specific version of each library that you want used with your project. If your project requires modifications to the libraries and you can't get them merged into the original repository then I think it's better to fork the original library repository instead of just uploading a copy.

Go Up