FGFSPM: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (Robot: Automated text replacement (-\[\[Category:GPL\]\] +Category:GPL software))
m (http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/53804519.3080009%40bham.ac.uk/#msg32375688)
Line 1: Line 1:
[[File:fgfspm.jpg|thumb|200px]]
[[File:fgfspm.jpg|thumb|200px]]
== Status (06/2014) ==
This article is purely kept for reference here, it should be considered deprecated, the feature itself is currently being worked on as part of [[Catalog metadata]].
{{cquote
  |<nowiki>Well, if we make a manual catalog.xml from the current fgdata/Aircraft (which I have parts of a script to do), and we treat the current aircraft zip URLs as canonical, that is possible with current code right now - since it can do the zip download + extraction to a directory of our choice. We could throw an (ugly) PUI UI around that, and then if someone with more talent than me wants to Canvas-GUI-ify it, that will be great.</nowiki><br/><nowiki>
</nowiki><br/><nowiki>
I will attempt to get a prototype version of this working tonight / tomorrow. I don’t promise to produce anything usable but as you say, anything would be an improvement.</nowiki>
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32397779/
    |title=<nowiki>Re: [Flightgear-devel] select/download aircraft</nowiki>
    |author=<nowiki>James Turner</nowiki>
    |date=<nowiki>2014-05-30</nowiki>
  }}
}}
{{cquote
  |<nowiki>Thomas Geymayer and I are working on it, I am not sure where’s he go to with the UI, the backend pieces are mostly there but will need some intensive testing. There is a #define flag you can toggle (in HTTPClient.cxx) to enable the code including the Nasal API; it will download / refresh a catalog, which is generated by the scripts I committed to fgmeta a week ago. Then you can access the package system from pkg.root in the Nasal console, using the API defined at the bottom of HTTPClient.cxx.</nowiki><br/><nowiki>
</nowiki><br/><nowiki>
If you are crazy enough to enable this code, and run it, be aware it downloads zips, unpacks them, makes calls to unlink files, renames directories, and so on. I would recommend some caution, and especially, don’t run it as root - while developing it I had it extract a few zips to ‘/‘ or worse due to screwed up path logic.</nowiki><br/><nowiki>
</nowiki><br/><nowiki>
Equally, I would welcome a code review of the code in simgear/package/Install.cxx to check any security issues or dangerous behaviour. The code /tries/ to be ‘safe’ - extract zip to a temporary folder, and uses rename/unlink to atomically update if the zip extraction succeeds. But it’s only had one pair of eyes on it so far. </nowiki>
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32440549/
    |title=<nowiki>Re: [Flightgear-devel] select/download aircraft</nowiki>
    |author=<nowiki>James Turner</nowiki>
    |date=<nowiki>2014-06-10</nowiki>
  }}
}}
'''FlightGear Package Manager''' ('''FGFSPM''') allows for installation and update (and will allow for uninstallation) of all kinds of [[FlightGear]]-related resources (including [[scenery]] tiles and updates to global objects and shared models, and even FlightGear's binaries). The latest version is .2 alpha, released in October 2008.
'''FlightGear Package Manager''' ('''FGFSPM''') allows for installation and update (and will allow for uninstallation) of all kinds of [[FlightGear]]-related resources (including [[scenery]] tiles and updates to global objects and shared models, and even FlightGear's binaries). The latest version is .2 alpha, released in October 2008.



Revision as of 14:19, 12 June 2014

Fgfspm.jpg

Status (06/2014)

This article is purely kept for reference here, it should be considered deprecated, the feature itself is currently being worked on as part of Catalog metadata.

Cquote1.png Well, if we make a manual catalog.xml from the current fgdata/Aircraft (which I have parts of a script to do), and we treat the current aircraft zip URLs as canonical, that is possible with current code right now - since it can do the zip download + extraction to a directory of our choice. We could throw an (ugly) PUI UI around that, and then if someone with more talent than me wants to Canvas-GUI-ify it, that will be great.

I will attempt to get a prototype version of this working tonight / tomorrow. I don’t promise to produce anything usable but as you say, anything would be an improvement.
— James Turner (2014-05-30). Re: [Flightgear-devel] select/download aircraft.
Cquote2.png
Cquote1.png Thomas Geymayer and I are working on it, I am not sure where’s he go to with the UI, the backend pieces are mostly there but will need some intensive testing. There is a #define flag you can toggle (in HTTPClient.cxx) to enable the code including the Nasal API; it will download / refresh a catalog, which is generated by the scripts I committed to fgmeta a week ago. Then you can access the package system from pkg.root in the Nasal console, using the API defined at the bottom of HTTPClient.cxx.

If you are crazy enough to enable this code, and run it, be aware it downloads zips, unpacks them, makes calls to unlink files, renames directories, and so on. I would recommend some caution, and especially, don’t run it as root - while developing it I had it extract a few zips to ‘/‘ or worse due to screwed up path logic.

Equally, I would welcome a code review of the code in simgear/package/Install.cxx to check any security issues or dangerous behaviour. The code /tries/ to be ‘safe’ - extract zip to a temporary folder, and uses rename/unlink to atomically update if the zip extraction succeeds. But it’s only had one pair of eyes on it so far.
— James Turner (2014-06-10). Re: [Flightgear-devel] select/download aircraft.
Cquote2.png


FlightGear Package Manager (FGFSPM) allows for installation and update (and will allow for uninstallation) of all kinds of FlightGear-related resources (including scenery tiles and updates to global objects and shared models, and even FlightGear's binaries). The latest version is .2 alpha, released in October 2008.

The program is developed in Java and requires Java version 1.6 (or later).

The Package Manager is based on the idea of packages, which are described by an XML document. The person who wants to provide a new resource, must simply pack the data in a ZIP file and create an XML document (a package descriptor) to describe it. When the ZIP file and the XML document are published on the internet, users will simply have to type the XML document's URL inside the program to get the content installed and all its dependencies satisfied.

Updates also get simpler using the Package Manager, as users will simply have to ask the program to check for updates and it will automatically scan the list of installed packages looking for new versions of each on the net.

Usage

The current version (a preliminary alpha release) of this program can be found at https://sourceforge.net/projects/fgfspm/

Installation

  1. Unzip the file somewhere on your computer.
  2. Launch dist/fgfspm.jar.
  3. You will be asked to set the FlightGear root. This must be your FlightGear/data directory.

Downloading new packages

  1. Launch the package manager and go to Packages > Install new package.
  2. Fill in the URL of the package descriptor file, mark URL, and click OK to install.
    • The statuswindow seems to be down at the moment, so don't quit if you think nothing happens.

Updating packages

  1. Launch the package manager and go to Packages > Update selected if you just want to update a single package, or Packages > Update everything if you like to update all packages in once.
    • In order for the update feature to work, you must have installed the package from an XML descriptor on the Internet. If the XML file you used was stored on your local machine, you'll have to act as if you wanted to install a new package in order to update it.

Related content