Editing CHDK CFG Files
I've rewritten my PC-based Editor for CHDK configuration files (CHDK.CFG) that lets you browse and edit configuration files, displaying values in readable form. In fact there are now two editors - one lets you edit all entries, the other just OSD entries. Both are table-driven (by the same table) so that when new features are added to CHDK all that is needed is updating the table. Both editors are written in pure java and should run under Windows, Mac OSX and Linux.
The main editor looks like this:
Note: the CHDK version now displays Scale entries which contain 2 numeric values. A new specialized edit box (not shown) allows these to be edited.
and the OSD Editor looks like this:
To run these programs download this zip file and unzip it. You'll get a folder called CHDKCFG containing the two editors (chdkcfg.jar and chdkosd.jar) and the shared table they both use (chdktable.properties). To run either editor just double-click the appropriate jar file.
Exporting and Importing Entries:
The "Save OSD values in a text file ..." button of the OSD Editor lets you save OSD entries in a text file. They can then be imported into a CFG file using the "Merge saved OSD items ..." buttons of the OSD and CFG Editors. While you can edit the values in the text file, you are strongly advised not to create an import file from scratch, but to edit one produced by the OSD Editor.
Each line is either a comment, starting with an asterisk or an update line having the form:
nnn : item description = xx,yy
- is the numeric identifier of an OSD entry (these 'ids' are defined in the CHDK source file conf.c)
- this colon is a required separator, without it the line will be rejected
- 'item description'
- is the 'title' of the OSD item - its value is ignored when importing
- this equals sign is a required separator, without it the line will be rejected
- is the new x co-ordinate of the top left of the item
- is the new y co-ordinate of the top left of the item
Note that if 'nnn', 'xx' or 'yy' are not simple integers, the line will be rejected.
- recompile all classes to support older versions of java - October 2017
- fix bug preventing modified CFG files being saved - November 2015
- table updated to build 3966 (to support CHDK versions 1.3 and 1.4 as well as 1.2) - February 2015
- table updated to build 2904 - June 27th 2013
- export/import of OSD items added - April 14th 2013
- table updated to build 2606 - February 27th 2013
- table updated to build 2186 - October 2nd 2012
- first release August 2012
Both editors have some extra features that can be enabled by changing their properties file, "chdkcfgeditor.properties" or "chdkosd.properties", (which you will find in the same folder as once you've run them). These features are:
- the font name, size and boldness used for text.
By default the properties file contains the lines:
fontname=SansSerif fontsize=12 fontbold=NO
but fontname can be set to "Serif", "Monospaced", or the name of any of the installed fonts, such as "Century Schoolbook". You can see the names in the Font Preferences menu of a Text Editor (such as "TextEdit" or "WordPad").
- the table to be used ('cfgtable=...'). By default both use 'chdktable.properties'.
- The properties files also remember the size ('xsize=...' and 'ysize=...') and position ('xpos=...' and 'ypos=...') of the windows.
The editors output a debug log when they terminate (chdkeditlog.txt or chdkosdlog.txt).
See here for details of the format of the table used by the editors.
Comments, suggestions and bug reports welcome - Dave@zenoshrdlu.com
All my apps are freeware, but if you've found them useful and would like to thank the author, you can make a donation (for example £1, €1 or $1) to show your appreciation for the many hours spent working on them!
See here for other KAP and CHDK stuff of mine.