Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
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, 494 views)
Martijn is offline   Reply With Quote
Old 05-08-2008, 09:53 AM   #2
yokos
Pac-Man catched my iLiad.
yokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with othersyokos plays well with others
 
yokos's Avatar
 
Posts: 720
Karma: 2571
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: 1st gen iRex iLiad with 2nd ed. battery/case
This is cool for hacking maniacs. I will test it/have a look at src.

Thanks Martijn for the unintended reminder to finish my "Setting volume" project. very OT: Xfce sound mixer app is running.
Quote:
Originally Posted by registry.xml
<sound>
<enable>true</enable>
<volume>75</volume>
</sound>

Last edited by yokos; 05-08-2008 at 09:58 AM. Reason: hyperlink
yokos is offline   Reply With Quote
 
Enthusiast
Old 05-08-2008, 10:05 AM   #3
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,695
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
Brilliant!

I'll have to look into this as well. This could be *very* useful for application installers. You don't mind it being distributed with other packages, right?

Edit: I just saw it's GPL'd. Great!
Adam B. is offline   Reply With Quote
Old 05-08-2008, 12:16 PM   #4
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
Indeed, I don't mind if it is redistributed, that's why I released it under the GPL.

The source code is not the cleanest around, but I hope it is readable. The majority is actually used to define all the different utilities and glue them together into one executable.
The actual work of updating the registry is being done by the regutil_*_main functions, and the functions in regutil.c.
Most of those function are about error handling (of which there is still not enough as shown by the FIXMEs in the code).

BTW Yokos, to control the sound settings in the registry you can use the regutil program like this:
regutil /iLiadRegistry/userSetting/sound/enable --set true
regutil /iLiadRegistry/userSetting/sound/volume --set 75
I can easily wrap this into a registry-sound utility if you like

The utilities only update the settings in the xml file though. I don't know how make the iLiad re-read the registry (other than rebooting).
Maybe there's some kind of API call for that? If anybody knows about it, please let me know and I'll incorporate it into the utilities.
Martijn is offline   Reply With Quote
Old 06-04-2008, 01:02 AM   #5
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
Thank you so much. I can finally read html files with FBReader easily!
nekokami is offline   Reply With Quote
Old 07-24-2008, 12:02 PM   #6
artur
Enthusiast
artur is on a distinguished road
 
Posts: 47
Karma: 56
Join Date: Jul 2008
Device: (broken) iLiad 2, DR800S, Sony 505
Does regutils really works? I have written

registry-extension --set-app=BROWSER txt1

and after switching off to make effect, all was cleared,
all my settings were gone.

I had to refill the settings, and of course the extension associations
came back to standard. Now I need to reinstall programs.
artur is offline   Reply With Quote
Old 09-01-2008, 10:40 AM   #7
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
I'm sorry to hear that regutils corrupted your registry.
The last time I tested it it worked OK, but it has been a while and my testing wasn't very extensive.

Next time please make a copy of your registry and use the -f option to modify the copy. This allows you to check the changes made by the utility.
If it corrupts the registry again, I would be interested in the original registry, the command used to modify it, and the corrupted registry.
If you send those to me I can use them to improve the utilities.

Anyway, after next week I should have some more time to start developing software for the iLiad again. So I'll check your command on my registry, and if the same problem occurs I'll fix it.
Martijn is offline   Reply With Quote
Old 09-04-2010, 06:12 AM   #8
Nomac
Junior Member
Nomac began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2010
Device: none
mmm, this is dead link. Post it once more please
Nomac is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
POLL to Iliad owners: Should people buy an Iliad or not? ali iRex 20 01-20-2010 06:11 AM
iLiad open source iLiad V2 easy to handle? hapipiko iRex Developer's Corner 2 09-30-2009 12:12 PM
Form editing with iliad MrPannus iRex 1 03-25-2008 01:10 PM
iLiad Safe and Easy MP3 for your iLiad narve iRex Developer's Corner 20 01-19-2007 11:17 AM
iLiad Easy and safe SSH access to your iLiad narve iRex Developer's Corner 15 11-30-2006 05:14 PM


All times are GMT -4. The time now is 06:16 AM.


MobileRead.com is a privately owned, operated and funded community.