View Single Post
Old 05-08-2008, 09:29 AM   #1
Martijn
Connoisseur
Martijn has learned how to read e-booksMartijn has learned how to read e-booksMartijn has learned how to read e-booksMartijn has learned how to read e-booksMartijn has learned how to read e-booksMartijn has learned how to read e-booksMartijn has learned how to read e-books
 
Martijn's Avatar
 
Posts: 68
Karma: 855
Join Date: Jan 2007
Location: Netherlands
Device: iLiad
iliad-regutils: Easy editing of the iLiad registry

Here's iliad-regutils 0.1 complete with an installer.

The iliad-regutils package contains some utilities to make it easier to edit the registry of the iLiad.
It's primarily aimed at facilitating the installation and de-installation of applications, but it is relatively easy to expand it for other functions as well.

Anyway, these are the four utilities currently included in the package:
Code:
Usage: registry-application-remove [OPTION...] APPLICATION
This program removes APPLICATION and its associated file types from the
registry, where APPLICATION matches the type attribute in the registry.
  -f, --file=FILE            Read/modify FILE instead of the registry
  -v, --verbose              Produce verbose output
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version


Usage: registry-application-install [OPTION...] APPLICATION [EXTENSION, ...]
This program installs APPLICATION in the registry and associates it as the
default application for the file EXTENSIONs.
  -c, --appCategory=CATEGORY The application category
  -e, --execute=EXECUTABLE   The executable of the application
  -f, --file=FILE            Read/modify FILE instead of the registry
  -i, --appIconPath=ICON     The icon path of the application
  -I, --exticon=ICON     The icon associated with the file extensions that
                             are supported by the application
  -m, --argMask=MASK         The argument mask for the application
  -p, --ipcChannel=CHANNEL   The IPC channel of the application
  -v, --verbose              Produce verbose output
  -x, --xResourceName=RESOURCE   The x resource name of the application
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version


Usage: registry-extension [OPTION...] EXTENSION
This program updates the settings for file extension EXTENSION in the registry,
or prints the current settings.
  -a, --get-app              Print the application associated with the
                             extension
  -A, --set-app=APP          Set the application associated with the extension
                             to APP
  -d, --delete               Remove the extension from the registry
  -f, --file=FILE            Read/modify FILE instead of the registry
  -i, --get-icon             Print the icon associated with the extension
  -I, --set-icon=ICON        Set the icon associated with the extension to ICON
                            
  -v, --verbose              Produce verbose output
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version


Usage: regutil [OPTION...] XPATH
This program evaluates the XPATH expression on the registry and prints the
result. Alternatively, the options can be used to alter the nodes indicated by
the XPATH expression.
  -d, --delete               Delete the nodes in the XPATH from the registry
  -f, --file=FILE            Read/modify FILE instead of the registry
  -s, --set=VALUE            Set the nodes in the XPATH to VALUE
  -v, --verbose              Produce verbose output
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version
WARNING: This program does not check your modifications, you may screw up your
registry. The other regutil programs can be used to alter the registry in a
safer way.
The installer installs these in internal memory. The utilities consist of a single executable (of 20K) and some symlinks, so not much of the internal memory is wasted.
The utilities use the libxml2 library on the iLiad to access the registry, so they may break in case of a firmware update (if libxml gets removed or the registry layout changes), but this is unlikely IMO.

Note that all the utilities support a --file argument, you can use this for testing purposes to modify a copy of the registry. (I highly recommend you use it for testing, since the utilities may still contain bugs.)

The utilities do not handle the associateOrder fields yet. If there are multiple applications associated with a file extension then they avoid modifying those entries in the registry.
I'll try to fix that in a future version.

So to change the icon associated with the extension "pdf":
1) enter the command line (via mrxvt or ssh)
2) type something like: registry-extension pdf --set-icon /usr/share/contentlister/Icon_misc.png
3) restart your iLiad

The primary goal of these utilities is, however, to make it easier to write installers and uninstallers for iLiad software. So I hope they will be useful in that area as well
Attached Files
File Type: zip iliad-regutils-0.1.zip (64.6 KB, 922 views)
Martijn is offline   Reply With Quote