Graphics.UnderstandingPackageFiles - lordmundi/wikidoctest GitHub Wiki
Understanding Package Files
« Generic Troubleshooting Guide | EDGE User’s Guide | Building A Mapplugin »
Description
Package files are files normally ending in ".pkg" that are basically a collection of other files. The easiest way to think of them is like tar files. Like tar files, they contain files including directory layout information.
Files referenced in config files can be located both on the filesystem, or within the package files referenced within the config file. It is very important to note that files on the filesystem take precedence over files inside a package. That means EDGE will look on the filesystem first for a referenced file. If not found, it will then look in the package files specified in the config file.
Listing files in a package
To list the files in a package, do the following (substitude Linux_FC3 for your VR_HOST_CPU if different):
setenv LD_LIBRARY_PATH lib_Linux_FC3
./bin_Linux_FC3/dsp_package <package_file>
Note: The following alias works well for csh:
alias pkg 'setenv LD_LIBRARY_PATH lib_Linux_FC3 ; ./bin_Linux_FC3/dsp_package \!*'
Extracting files from a package
To extract files from a package, do the following (substitude Linux_FC3 for your VR_HOST_CPU if different):
setenv LD_LIBRARY_PATH lib_Linux_FC3
./bin_Linux_FC3/dsp_package <package_file> -x <filename_src> <filename_dest>
Why have them?
Package files provide a great update mechanism in that they can contain all of the files needed for a particular scenario. As this scenario changes, the package files can be updated and the developers have the ability to update everything including scene, models, menus, reconfigs, scripts, etc. that are needed for the scenario. As you can imagine, this becomes extremely important and useful when supporting various missions and flights where each one is different. In this manner, you can have package files for each mission that can be updated easily.
This also explains why it is important to not extract things from the package file, as it will break the update mechanism if the package file is updated. If you need to extract a file from a package, the best way to do it is to extract the file into your userdata directory, rename it (so it is obvious it has been customized), and then change your user.cfg to point to the new file. In this way, it is obvious from both the filename, and from the config file that you are using a customized version of a package file. Also, by placing it in your userdata directory it is contained within all of your other customizations.
« Generic Troubleshooting Guide | EDGE User’s Guide | Building A Mapplugin »