Generic INI save and restore: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Software | {{Software | ||
|Picture=GenINI.png | |Picture=GenINI.png | ||
|Version=1.8 | |Version=1.8 (Oct 2019) | ||
|Author=[[Peter Moylan]] | |Author=[[Peter Moylan]] | ||
|License= GNU GPL V3 / Open Source | |License= GNU GPL V3 / Open Source | ||
|Download=[ftp://ftp.pmoylan.org/software/ | |Download=[ftp://ftp.pmoylan.org/software/GenINI_1.8.zip GenINI_1.8.zip] | ||
|Website= | |Website=http://www.pmoylan.org/pages/os2/genini.html | ||
}} | }} | ||
A pair of utilities that convert INI files to and from human-readable form. | A pair of utilities that convert INI files to and from human-readable form. |
Revision as of 23:27, 17 December 2019
Generic INI save and restore | |
---|---|
![]() | |
Version | 1.8 (Oct 2019) |
Vendor | |
Author | Peter Moylan |
License | GNU GPL V3 / Open Source |
Download | GenINI_1.8.zip |
Website | http://www.pmoylan.org/pages/os2/genini.html |
A pair of utilities that convert INI files to and from human-readable form.
Many programs need a way to save their configuration data. (Window positions, program options, etc.) OS/2 uses INI files for this purposes. The INI file format is a binary file format that is efficient in terms of rapid access, but it is not human-readable. The present package provides a way of saving INI data in human-readable form. The DumpINI program converts a binary INI file into a corresponding plain-text form. The LoadINI program performs the reverse conversion: it translates human-readable data into the binary INI form.
The original OS/2 design probably envisaged that there would be just two INI files: OS2SYS.INI for the system data, and OS2.INI for the application data. Experience has shown us, however, that it is not a good idea to keep all application data in a central registry. We have evolved towards a more robust design, where each application saves its own configuration data. Some application programmers have chosen to use application-specific configuration files, but many still use INI files for that purpose.
There are two good reasons why you would want to use LoadINI and DumpINI:
- As a matter of principle, you should keep backups of your INI data. Of course there are existing simple solutions (a periodic "copy app.ini app.ini.bak"), but having a human-readable backup might be more robust.
- There is a design bug in OS/2 that causes INI data to be lost under certain "out of memory" conditions. This motivates us to move towards a system that does not depend on the native INI support.
- Requirements
- INIData