A new version of the Advanced Resource Embedder is now available. The tool allows to embed files in binaries by producing C, Ada or Go source files that contain the file to embed.
Advanced Resource Embedder 1.2.0
By Stephane Carrez2022-01-23 09:04:00
The new release contains the following fixes:
- Fix Ada generator to be able to use other binary content types such as
System.Storage_Elements.Storage_Array
- Fix Ada generator to escape special characters in strings
Since the previous version, Fabien Chouteau asked to be able to use an Ada system type to represent a binary content. This is now possible by using the following XML extract for the description to tell the resource embedder how to integrate the file and generate the Ada source code:
<package>
<resource name='Resources.Help'
format='binary'
type='access constant System.Storage_Elements.Storage_Array'>
<install mode='copy'>
<fileset dir="help">
<include name="**/*.txt"/>
</fileset>
</install>
</resource>
...
</package>
With the above description, the Ada code generator produces the following package specification:
with System.Storage_Elements;
package Resources.Help is
type Content_Access is access constant System.Storage_Elements.Storage_Array;
type Name_Access is access constant String;
type Name_Array is array (Natural range <>) of Name_Access;
Names : constant Name_Array;
function Get_Content (Name : String)
access constant System.Storage_Elements.Storage_Array;
private
...
end Resources.Help;
This example is available in Embedding help and documentation in Ada (binary). If you prefer to use String
instead of a Storage_Array
, have a look at the Embedding help and documentation in Ada. Both examples are similar but they are exposing the file using different Ada types.
To install the tool, follow the instructions given in the initial announcement: Advanced Resource Embedder for Ada, C and Go.
If you want to know more about the tool, have a look at its documentation:
- Resource Embedder Guide PDF
- Man page: are (1)
and if you have ideas for improvements, fork the project and submit a pull request!
Tags
- Facelet
- NetBSD
- framework
- Mysql
- generator
- files
- application
- gcc
- ReadyNAS
- Security
- binutils
- ELF
- JSF
- Java
- bacula
- Tutorial
- Apache
- COFF
- collaboration
- planning
- project
- upgrade
- AWA
- C
- EL
- J2EE
- UML
- php
- symfony
- Ethernet
- Ada
- FreeBSD
- Go
- KVM
- MDE
- Proxy
- STM32
- Servlet
- backup
- lvm
- multiprocessing
- web
- Bean
- Jenkins
- release
- OAuth
- ProjectBar
- REST
- Rewrite
- Sqlite
- Storage
- USB
- Ubuntu
- bison
- cache
- crash
- Linux
- firefox
- performance
- interview
Add a comment
To add a comment, you must be connected. Login