Hi B,
More than an idea it's just a
trial. I found it would be easier to give a test run chaning the configuration settings than running into RESX (look-a-like) files to store the localized resources. However, I find the size increase way too high only to achieve this goal. Maybe the filesize can be decreased by tweaking
libxml2 precompiler conditions... But I'm not sure how far it will decrease the file size.
I agree with you on registry hives... Maybe because i have a little preference for portable applications and due to the fact some applications leave registry keys around that only decrease startup performance. However, I don't really see a great deal of diference between INI and XML file. IMHO, XML gives more flexibility than INI files since you can make a nicelly structured configuration file. For example, MS Logon data can be stored in a much more organized fashion than inside an INI file. However, INI files are suficient for most configuration needs. The good thing about INI files is that they are supported by Windows' API, making the application weight less... The drawback is that Microsoft has been focusing for years on XML styled configuration files stating in the API documentation it is only available for backward compatibility with Windows 95/98. So I'm not sure of the advantages and disadvantages to any of this methods to store configuration settings.
However, once again, the idea on adding
libxml2 is more focused towards globalization through a kind of resx files. If the lib was included it could also be used for configuration files and I took that as a test. I certainly don't like the file size increase... As you know I use VNC most of the time for remote support and the lighter the executable file the better and it's certainly a great increase for the features it could add. However, I thought sharing the code would be nice since maybe someone finds a way to put on diet libxml2 and make a step forward to simple XML resource files... or even is just interested on investigating a little further.
I used 1.0.9.6 since I was just playing around to see the results. I thought the results would be helpfull to determine if it would be the way to go for information exchange between the repeater and the external site, plus information exchange between the client and the website (Changing JSON in favour of XML+SOAP)... but it bloads the executable
Probably some routers will have libxml2 build into them, as some routers such as pfSense and some Openfirmware linksys make use of libxml2 for the configuration files. That the reason why I tested libxml2 instead of lighter libraries... but for the meanwhile I think i'll stick to JSON as it is much lighter and I guess a Linux port of the repeater would stay at a reasonable size to run inside a router, ReadyNAS or WDTV (Mostly where I usually run a repeater) with JSON statically linked.
My goal is to use JSON or XML to exchange dta from the repeater to an external site, plus an external site to the client (such as telling the client it is not allowed to log in into the repeter and so on)... Instead of modifying the RFB protocol to fit my needs make it use HTTP requests to enhance some features. XML+SOAP seemed a good idea if file size didn't inrease so much.