umen
June 18th, 2009, 06:19 AM
I am trying to understand how various ebook applications compile their output into a self-contained executable file with no dependencies when you run the exe. How can it be done? Do they use real embedded compiler?
|
Click to See Complete Forum and Search --> : How does ebook to exe application compile to self-contained executable umen June 18th, 2009, 06:19 AM I am trying to understand how various ebook applications compile their output into a self-contained executable file with no dependencies when you run the exe. How can it be done? Do they use real embedded compiler? JVene June 21st, 2009, 01:36 AM There is a generic solution used for a variety of embedded data applications, and it doesn't require a unique compiler. Solutions vary some, but the general idea is the same. The data is embedded in the data section of the compiled code. Sometimes there's a utility which creates a header file and/or a C/CPP file which holds the definition of a buffer and the data to be embedded. The data is often encoded as a series of bytes, often as a series of hex values. When the program is compiled using a standard compiler, the data ends up as any 'global' data would in the compiled program. The data could be anything. Wave data, video, a book, 3d model information, images - anything. There are other formalized methods. In Windows data can be embedded as resource information, loaded just like icons and dialog data. The type of data may be more limited, to that supported by the resource editors, but the concept is still similar. There may be some means of creating a 'blank' executable, whereby a 'patch' like program could mate data to a 'stock' executable. umen June 21st, 2009, 02:06 AM There is a generic solution used for a variety of embedded data applications, and it doesn't require a unique compiler. Solutions vary some, but the general idea is the same. The data is embedded in the data section of the compiled code. Sometimes there's a utility which creates a header file and/or a C/CPP file which holds the definition of a buffer and the data to be embedded. The data is often encoded as a series of bytes, often as a series of hex values. When the program is compiled using a standard compiler, the data ends up as any 'global' data would in the compiled program. The data could be anything. Wave data, video, a book, 3d model information, images - anything. There are other formalized methods. In Windows data can be embedded as resource information, loaded just like icons and dialog data. The type of data may be more limited, to that supported by the resource editors, but the concept is still similar. There may be some means of creating a 'blank' executable, whereby a 'patch' like program could mate data to a 'stock' executable. Hello and thanks for the replay this is to abstract answer for me can you please give me links to examples code ? Thanks JVene June 21st, 2009, 02:44 AM Not for an ebook - I don't know of one. The sample code for PowerVR from Imagination Technologies regarding their OpenGL ES graphics chips shows an example. For a book, let's say the format of the book's text can be stored in a file in an XML format. Simply make the XML text a static string so it's accessible when the program launches. For more complex data, the bytes can be encoded individually as numeric data. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |