Author Topic: PixInsight Update Repository Reference Documentation  (Read 5768 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6719
    • View Profile
    • http://pixinsight.com/
PixInsight Update Repository Reference Documentation
« on: 2011 January 01 14:46:05 »
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!
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Enzo De Bernardini

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 268
  • Resistance is futile.
    • View Profile
    • Astronomí­a Sur
Re: PixInsight Update Repository Reference Documentation
« Reply #1 on: 2011 January 01 17:45:37 »
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.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6719
    • View Profile
    • http://pixinsight.com/
Re: PixInsight Update Repository Reference Documentation
« Reply #2 on: 2011 January 03 02:06:18 »
Hi Enzo,

Quote
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.

Quote
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:

<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:

<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.
« Last Edit: 2011 January 03 02:19:45 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Enzo De Bernardini

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 268
  • Resistance is futile.
    • View Profile
    • Astronomí­a Sur
Re: PixInsight Update Repository Reference Documentation
« Reply #3 on: 2011 January 03 07:30:54 »
Thanks Juan! It has become clear to me. :)

Enzo.