Hello, everyone!
I am excited to introduce LRS Editor, a native desktop utility designed to simplify how we view, manage, and edit Lazarus Resource (.lrs) files.
While .lrs files are essential for embedding resources directly into component source code, handling multiple resources within a single file can sometimes be cumbersome. LRS Editor provides a clean, dedicated workspace to inspect, extract, and modify these resources efficiently without manually digging through Pascal source files.
LRS Editor features a clean, native desktop layout designed for a seamless workflow, featuring a top toolbar, a resource list on the middle-left, and a dual content view for image and code.
Managing your files is straightforward through the menus, which lets you create a New file, Open existing ones, Reopen recent files, Revert file from disk, and save your progress via Save or Save As. The Resource menu gives you full control over individual entries, allowing you to Add, Delete, Rename, and Save As LRS, alongside flexible extraction options including Extract, Extract Selected, and Extract All. For handling code, it provides standard utility actions like Copy and Select All, while there is also a Dark Mode toggle for comfortable, low-light editing.
Under the Hood
When you add a resource, you can select any file on your system, which LRS Editor automatically encodes into the required string value for the Lazarus Resource format. Beneath the surface, the actual binary content of the file is kept efficiently in memory using a TMemoryStream, which ensures lossless fidelity so it can always be extracted back to its exact original file format.
In the user interface, the resource list is implemented using a standard TListView component containing a TListItem for each individual resource. To keep things clean and maintainable, every TListItem is directly linked to an instance of a class called TResourceData, which encapsulates all the necessary metadata alongside the underlying TMemoryStream binary content.
For editing and interface polish, the app leverages powerful components from SynEdit for syntax handling and BS Controls for custom UI styling.
Freeware with Source & Licensing
I am releasing LRS Editor as a complete giveaway—freeware with full source code included. To maintain consistency with my other work like BS Controls, I am applying the zlib License.
This is simply my way of giving back and expressing my deepest gratitude for the amazing Free Pascal and Lazarus ecosystem, and the brilliant, helpful people in this community.
I would love to hear your thoughts, feedback, or suggestions as you try it out!
Cheers,