Re: Resources and Euphoria (Opening a new thread)
- Posted by David Cuny <dcuny at DSS.CA.GOV> Jun 03, 1998
- 715 views
Jesus wrote: >So I was proposing to have a single file with a dual contents. At the >beginning, the normal .EXE. After the .EXE, a kind of "resource" file = that >would consist on an array (or sequence) of headers that would describe = the >later contents. A header should have a couple of pointers -where the >resource begins and its length-, a name -to identify it-, a descriptor = -to >know what kind of resource is-, etc. I think this would be a great thing for Robert to include in Euphoria. = I've been wanting something like that for a while. Something along the = lines of: datafile <handle> <filename> or datafile <handle> =3D <path> Like include files, it could have two different behaviors. When = non-bound, it would seek out the data file at the given location. When = bound, it would have attached the data file to the EXE. Reading the data = file would be the same as reading a normal file: you would still have to = open it with the standard declarations. I'm not that big a fan of being able to edit the thing once it's = created. You might also have the option of instead creating an INI file, with the = same name as the EXE. It would not be that difficult to write a pre-processor that could do = this for you. Something along the lines of DOT, that recursively scans = all the include files, but then builds a single resulting file. All the = references to datafiles would be replaced with a reference to the INI = file with the correct offset. Of course, it would need to rename all the = non-global functions, procedures and types in the bundled file so there = wouldn't be local namespace collisions. Anyone interested? If so, I'll try to put it together. But I'd still = prefer Robert include it as a feature in Euphoria. -- David Cuny