Where do I place my script files?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
thomaspreston Offline
Junior Member
Posts: 1
Joined: Jul 2013
Reputation: 0
Post: #1
I'm new to developing for XBMC and I'm trying to write a script that interfaces with peripherals on a Raspberry Pi using Python. I'm testing on my laptop (Debian).

I've generated the Add-on file structure as described here: http://wiki.xbmc.org/index.php?title=Add-on_development

It looks like this:

Code:
script.service.helloworld/
    changelog.txt
    helloworld.py
    helloworld.xml
    icon.png
    LICENSE.txt

helloworld.xml:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon
   id="script.service.helloworld"
   name="Hello World"
   version="0.0.1"
   provider-name="Thomas Preston">
  <requires>
    <import addon="xbmc.python"                 version="2.1.0"/>
    <import addon="xbmc.addon"                  version="12.0.0"/>
    <import addon="script.common.plugin.cache"  version="1.3.0"/>
  </requires>
  <extension point="xbmc.python.script"         library="helloworld.py">
    <provides>executable</provides>
  </extension>
  <extension point="xbmc.service" library="service.py" start="login"/>
  <extension point="xbmc.addon.metadata">
    <summary lang="en">My first program.</summary>
    <description lang="en">My first program (long desc).</description>
    <disclaimer lang="en">Feel free to use this script however you like.</disclaimer>
    <language>en</language>
    <platform>linux</platform>
    <license>GNU GENERAL PUBLIC LICENSE. Version 3</license>
    <forum></forum>
    <website></website>
    <email></email>
    <source></source>
  </extension>
</addon>

helloworld.py
Code:
print "Hello, World!"

And I've placed it in /home/tom/.xbmc/addons/ but I can't seem to find it anywhere in XBMC and the documentation seems to point me in all sorts of directions (and loops). Also, nothing happens when I restart XBMC.
find quote
divingmule Offline
Skilled Python Coder
Posts: 1,297
Joined: Oct 2008
Reputation: 61
Post: #2
helloworld.xml needs to be renamed addon.xml, every thing else looks okay.
find quote
sphere Offline
Team-XBMC Member
Posts: 1,179
Joined: Jul 2009
Reputation: 49
Location: Germany
Post: #3
(2013-07-30 14:59)divingmule Wrote:  helloworld.xml needs to be renamed addon.xml, every thing else looks okay.

correct. And you have to restart XBMC then (to have it visible, for further changes in the code you don't need to).

My GitHub. My Add-ons:
[Image: IOoywq0.jpg]
find quote