Creating new Add-ons

Hello!

I’m new here, so forgive me if this has already been asked. I’ve been searching for a few days though, here and there, and come up with nothing. So I figured I’d ask directly.

How exactly does one create an add-on for OSMC? I have an idea for an add-on that I’d like to take on as a personal project (even better if it requires C, I’m really looking for an excuse to polish up my C programming) but as of yet I’ve found no guides or entries on the Wiki/FAQ about how to contribute to the add-on repository.

I know that the repository is not exactly “public” yet, so my add-on may not get added unless submitted to an approved maintainer. But I should be able to compile an add-on and test it locally on my copy of OSMC, right? How exactly would I go about doing that?

For reference, I’m still kind of a linux newbie. I’m familiar with the concept of packages and general Debian administration tasks, but I know I have a lot left to learn. So I’d like to take this on as a pet project to expand not only my programming skills, but my linux knowledge as well. Plus, this will help me score some serious brownie points with my better half, since she really wants to use the Pi (running OSMC) for one specific task, but there is not an add-on out there that can do it yet.

Any help or guidance would be greatly appreciated.

Yours,
3d12

http://kodi.wiki/view/Add-on_development

Ah, I see. It’s on the Kodi wiki. Thank you so much for pointing me in the right direction. This seems to have pretty much all the information I was looking for. :smile:

Is there any documentation on OSMC-specific AddOn development? For example, whether AddOns can make system-level changes like installing a systemd service without sudo troubles?

You can do with OSMC pretty much what you can do with any other Debian-based OS that doesn’t include a windowing environment like X. It would be unusual to interact with systemd through Kodi but there are people here who could advise if you describe what you have in mind.

If you want to develop an add-on, I’d keep things simple and use Python. It will be easier to iterate over changes and save you a compile each time. Unless you need a deep integration in to Kodi and must have a binary add-on, I don’t see the benefit of using C++.

If you want to change settings on the system, you could look at parameterised systemd targets. This is something I’ve been intending to do for a long time to avoid some of the cludgy hacks (and secure the system more so we have more sanitised inputs to changes like hostname etc); but I’ve been holding off on this until we get a first fixing on the next version of My OSMC.