Go Down

Topic: Library Bugfix - how? (Read 249 times) previous topic - next topic

DrDiettrich

I think that I found a flaw in the IRemote library, and want to fix it. Unfortunately I'm not allowed to modify the file(s) in place, the library folder may be write protected (Library Manager of IDE 1.6.7).

How can I install the modified library for testing?

Robin2

Unfortunately I'm not allowed to modify the file(s) in place, the library folder may be write protected (Library Manager of IDE 1.6.7).
Why can't you un-write-protect it ?

Just make a copy of the library and give it a somewhat different name and save it in the libraries directory in your sketchbook directory.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

DrDiettrich

I don't know where to start with changing access rights, and it may not be a good idea at all. The file itself is not marked as write-only.

Then I found a link to a Library Guide, explaining manual library installation. You'll find that link after you found the right directory for manually installed libraries <grmpf>, and in fact it's the libraries folder in the sketchbook directory.

In that directory I could install a copy of the library, without write protection. The library manager doesn't allow to uninstall directories, but killing the protected directory worked. I wonder why I can delete a directory, but cannot modify files in that directory.


Robin2

I wonder why I can delete a directory, but cannot modify files in that directory.
What operating system are you using?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

DrDiettrich

I'm using Win8, where the rights management is very obscure :-(

But that's not the problem, provided that the library manager wants to protect the installed libraries. Based on my experiences I'd suggest that the library manager allows to uninstall libraries as well, at least conversion of original (protected, immutable) libraries into mutable ones.

Renaming libraries is not always a good idea, as long as this means that the file names have to be changed, and consequently all #includes, in a project or in multiple projects, have to be modified. This may be okay for the average user, but not when a developer can use a versioning system (git...) to switch among versions of the same library.

Robin2

Renaming libraries is not always a good idea, as long as this means that the file names have to be changed, and consequently all #includes, in a project or in multiple projects, have to be modified. This may be okay for the average user, but not when a developer can use a versioning system (git...) to switch among versions of the same library.
I agree that the renaming can be tedious but without it how can you look at an Arduino program and know whether it uses the original or the modified library. And how could you give a copy of the code to someone else so that they would know that the modified library is needed.

I have been through this recently with the RF24 library. TMRh20 has a newer and better version but unfortunately he used the same name as for the earlier ManiacBug version.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy