Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    53
  • comments
    56
  • views
    33753

Installer - #5 The File Dictionary

Sign in to follow this  
aidan_walsh

243 views

Since its been a while since I did a proper blog on the installer, I thought I might get some feedback on the direction being taken with one of the data structures in particular - the File Dictionary.

This is the simpliest form a dictionary can take. This contains all wrapper information needed, as well as an entry for a single file in the project.












Step by step, this is what the above means:
* The files element declares the start of the dictionary. It contains two attributes, compressionmethod and hashalgorithm, both which contain a declared name indicating the algorithms used for the respective titular jobs.
* The basedirectory element defines the root directory that the files enclosed in it will be contained in. All path names listed in the inidividual file elements are relative to this path. In the example above, a program variable representing the user defined location that we are going to install to is used. Other base directory tags can be created to install files to other locations on the system, such as Windows\System32.
* The component tag (originally was going to be held back from the first version, but what the heck) groups files by their job in the application. In the example shown, the files are listed as "Program Files", or the files that make up the application being installed.
* The file tag represents a single file in the project.
* The platform tag holds platform specific information for an individual OS. The id attribute allows the installer to determine what OS the information relates to, and is either a named value listed higher in the XML sheet as being a compatible OS, or, as in the case above, the "all" value, which states that the file is the same in all installations. The length attribute tells us the length of the uncompressed file in bytes, and the hashcode attribute gives us a signature hash to compare the uncompressed file against to ensure that it has been recreated correctly.
* The shortcut tag is an optional tag used when you want to create a shortcut to a file. The args attribute specifies any arguments that might be passed to the file - usually only used with executable files. The locations attribute contains one or more high level descriptions of where to create the shortcut, seperated by a comma ( , ) character. This is probably the highest level information shown yet, and the interpretation of which is mainly dependant on the installer run time used. For example, in Windows the location "menu" will create the shortcut in "Start/Programs/$PROGNAME$ - $PROGNAME$ being a specified name for the application.


So what are you thinking right now? Is there anything that you can see that needs improving, or anything that you think is missing that will be needed?
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!