Making an installable zipped script

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
CSB! Offline
Junior Member
Posts: 34
Joined: Jun 2011
Reputation: 0
Post: #1
Hi all,

I have written a script, which works of course, but when I try to package it for distribution as a zip file, it simply will not install. There is no output to the log, even at debug level.

Is there a published spec for what is required in the zip file, I can't seem to find one.
find quote
giftie Offline
Skilled Python Coder
Posts: 2,072
Joined: Mar 2010
Reputation: 36
Post: #2
The zip needs to contain the complete folder of the script.

So:

script.test <- foldername
---->addon.xml
---->addon.py <- or what ever you have in addon.xml for library=
---->changelog <- not necessary but nice to have
---->icon.png
---->LICENCE.txt <- also not necessary but needed for the offical repo
---->resourses <- sub folder containing more of your script if needed.

Also, you need to make sure that XBMC has permission to over write the files in the addons folder(sometimes permissions get changed when you manually copy)

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
CSB! Offline
Junior Member
Posts: 34
Joined: Jun 2011
Reputation: 0
Post: #3
giftie Wrote:The zip needs to contain the complete folder of the script.

So:

script.test <- foldername
---->addon.xml
---->addon.py <- or what ever you have in addon.xml for library=
---->changelog <- not necessary but nice to have
---->icon.png
---->LICENCE.txt <- also not necessary but needed for the offical repo
---->resourses <- sub folder containing more of your script if needed.

Also, you need to make sure that XBMC has permission to over write the files in the addons folder(sometimes permissions get changed when you manually copy)

Is it OK to have more stuff in the top level folder, or do they need to be put into resources?
find quote
CSB! Offline
Junior Member
Posts: 34
Joined: Jun 2011
Reputation: 0
Post: #4
Spent a lot of time poking it, to no avail. Getting log output now, at least... something could be wrong with my addon.xml, but it looks valid to me...

Code:
15:32:52 T:3045308272 M:3489304576   DEBUG: ------ Window Deinit (FileBrowser.xml) ------
15:32:52 T:2786036592 M:3489304576   DEBUG: FileManager: copy /home/xbmc/script.subseek.zip->special://home/addons/packages/script.subseek.zip
15:32:52 T:2786036592 M:3489529856   DEBUG: FileManager, processing folder: zip://special%3a%2f%2fhome%2faddons%2fpackages%2fscript%2esubseek%2ezip/script.subseek/
15:32:52 T:2786036592 M:3489529856   DEBUG:   -- zip://special%3a%2f%2fhome%2faddons%2fpackages%2fscript%2esubseek%2ezip/script.subseek/addon.xml
15:32:52 T:2786036592 M:3489529856   DEBUG:   -- zip://special%3a%2f%2fhome%2faddons%2fpackages%2fscript%2esubseek%2ezip/script.subseek/default.py
15:32:52 T:2786036592 M:3489529856   DEBUG:   -- zip://special%3a%2f%2fhome%2faddons%2fpackages%2fscript%2esubseek%2ezip/script.subseek/icon.png
15:32:52 T:2786036592 M:3489529856   DEBUG: FileManager: create folder special://home/addons/script.subseek
15:32:52 T:2786036592 M:3489529856   DEBUG: FileManager: copy zip://special%3a%2f%2fhome%2faddons%2fpackages%2fscript%2esubseek%2ezip/script.subseek/addon.xml->special://home/addons/script.subseek/addon.xml
15:32:52 T:2786036592 M:3489529856   ERROR: Could not read addon description of script.subseek
15:32:52 T:2828008304 M:3489529856   DEBUG: thread start, auto delete: 1
15:32:52 T:2786036592 M:3489529856   DEBUG: FileManager, processing folder: special://home/addons/script.subseek/
15:32:52 T:3045308272 M:3489529856   DEBUG: CGUIMediaWindow::GetDirectory ()
15:32:52 T:3045308272 M:3489529856   DEBUG:   ParentPath = []
15:32:52 T:3045308272 M:3489529856   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
15:32:52 T:2877291376 M:3489529856   DEBUG: thread start, auto delete: 0
15:32:52 T:2877291376 M:3489529856   DEBUG: Thread 2877291376 terminating
15:32:58 T:3045308272 M:3488714752   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
15:33:22 T:2828008304 M:3487571968   DEBUG: Thread 2828008304 terminating (autodelete)
15:33:22 T:2786036592 M:3487571968   DEBUG: Thread 2786036592 terminating (autodelete)

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.subseek"
       name="SubSeek"
       version="1.0.0"
       provider-name="CSB">
  <requires>
    <import addon="xbmc.python" version="1.0"/>
  </requires>
  <extension point="xbmc.python.subtitles"
             library="default.py" />
  <extension point="xbmc.addon.metadata">
    <summary>SubSeek</summary>    
    <description>Innovative seeking interface for XBMC</description>
    <platform>all</platform>
  </extension>
</addon>
find quote
vikjon0 Offline
---
Posts: 2,430
Joined: Apr 2009
Reputation: 7
Location: Sweden
Post: #5
The lack of logging is an issue... I had some problem and it turned to be the addon.xml

make a new copy of a working addon.xml and only change the bare minimum making sure not introducing any windows line breaks or anything else. To be safe edit it in linux (if feasable)
find quote
CSB! Offline
Junior Member
Posts: 34
Joined: Jun 2011
Reputation: 0
Post: #6
vikjon0 Wrote:The lack of logging is an issue... I had some problem and it turned to be the addon.xml

make a new copy of a working addon.xml and only change the bare minimum making sure not introducing any windows line breaks or anything else. To be safe edit it in linux (if feasable)

I copied the addon.xml from XBMC Subtitles, changing only the "addon id" part, and I get no log output whatsoever now. Awesome.
find quote