PixInsight Update Repository Reference Documentation

Juan Conejero

PixInsight Staff
Sep 2, 2004
8,719
714
58
Valencia, Spain
pixinsight.com
Hi all,

I have uploaded a reference document describing PixInsight update repositories, update packages and the XRI (XML Repository Information) document format:

http://pixinsight.com/doc/docs/PIRepositoryReference/PIRepositoryReference.html

The information given in this document is of interest to all developers working on the PixInsight platform, either with the PixInsight Class Library (PCL) or the PixInsight JavaScript Runtime (PJSR).

I'll be glad to help all developers interested in creating their own PixInsight update repositories, so please don't hesitate to contact me or ask any doubts or questions here on the forum.

Also don't forget to check out this excellent tutorial by Sean Houghton:

http://www.cerebiggum.com/2010/12/building-an-automated-build-and-release-server-for-pixinsight/

Enjoy!
 

enzodb

PixInsight Ambassador
Hi Juan,

I have been experimenting, and I have a couple of questions: where you specify the deployment directory? (my script ended in the PI root directory :p ) And, if the filename is ever the same (PJSR), is it necessary implement a <remove> or the file is overwritten?

Best regards,

Enzo.
 

Juan Conejero

PixInsight Staff
Sep 2, 2004
8,719
714
58
Valencia, Spain
pixinsight.com
Hi Enzo,

is it necessary implement a <remove> or the file is overwritten?
No, you don't need to include a <remove>...</remove> element in your updates.xri, unless you really need to cleanup some installed files. In general, better forget about <remove> :)

When an existing file is updated, it is replaced with the new version. Existing files are never kept by the update system; they are always overwritten.

where you specify the deployment directory? (my script ended in the PI root directory
You "specify" the deployment directories implicitly with your update package. For example, if your update must replace a "foo.js" script file, your update package should contain the following:

Code:
<src>
  |
  + <scripts>
      |
      + foo.js
where I have written directories between <> for clarity.

In this way, when the updater program applies your update package, it will overwrite the "foo.js" file on the src/scripts directory, in case that file already exists, or it will create the file otherwise. In other words, the contents of your update package will be transported exactly as they are to the user's PI installation directory.

Also take into account that if your update package includes directories that still don't exist on the user's PI installation, they will be created. In general though, you should only include already existing directories. Only include a new directory if you have an extremely good and well founded reason to do so.

Finally, please take into account that file systems are case sensitive on all platforms with the exception of Windows. So if you create a package with the following contents:

Code:
<src>
  |
  + <Scripts>
      |
      + foo.js
it will work fine on Windows ONLY, but it will create a new "src/Scripts" directory on FreeBSD, Linux and Mac OS X, and obviously your script will not be automatically installed on these platforms (not to mention the fact that you'd stuff the user's installation with unnecessary files).

I'm going to update the reference document to make all of these points clearer.