![]() |
|
SitemapRunning InstallerPython Archives Standalones The MEInc.Dist package Frequently Asked Questions Extensions |
Self-extracting executablesThe COFF executable format (Windows and Linux) allows arbitrary data to be concatenated to the end of the executable without disturbing it's functionality. For this reason, a CArchive's Table of Contents is at the end of the archive. The executable can then look at argv[0] to get it's file name, open that file, seek to the end and 'open' the CArchive (see figure 3). This trick is used on both Windows and Linux. WindowsFor Windows, I have created enhanced versions of python.exe and pythonw.exe that do precisely this (and a bit more).
LinuxLoading an .so on Linux is a much more sophisticated process than loading a .dll on Windows. For this reason, Linux does not support self-extracting executables (also, it's not culturally appropriate). So all the shared modules your executable will use need to be available in the executable's directory when it starts. On Windows, all of Python lives in python's dll, so I felt it important to have the Windows version use a completely stock python dll. On Linux, much more (maybe even all) of Python tends to be statically linked to the executable. Also, compilers tend to be readily available on Linux. For these reasons, the embedding app is built (just once) based on your Python configuration. Since we're rebuilding anyway, I took the liberty of overriding Other than that, what happens at runtime is very similar to the Windows process outlined above. |
copyright 1999-2001 McMillan Enterprises, Inc. |