Re: [cx-freeze-users] freezing to something other than the main file
Brought to you by:
atuining
From: Ralf S. <ra...@br...> - 2006-03-13 16:00:23
|
Anthony Tuininga schrieb: > You're not the first to notice this problem or "feature". It would not > be all that difficult to do. The biggest problem is coming up with the > name of the option and the strategy for modifying sys.path to include > the zip file. :-) So, any suggestions? The only ones I can think of > are as follows: > > -s, --standalone-zip would be the name of the option > > The bootstrap code would perform one of the following: > > 1) look for a zip file with a standard name "modules.zip", > "library.zip" or some other name > 2) look for a zip file with the same base name as the executable. In > other words, if the executable was called "Fred" then look for a > module named fred.zip. > > The only problem with option #1 is that you can't have more than one > frozen executable in the same directory so I lean toward option #2. > > At work we use a heavily modified version of cxfreeze using the first approach. But we save different __main__ modules for different programs under different names. Therefor we can have multiple frozen executables in the same directory. We use the same base executable without problems. One could also combine both options and have common library code in library.zip (when using multiple programs) and load the program's code from fred.zip (or whatever the exe is called). > The only other question I can think of is whether this should be a > different base executable or not. Adding a new one implies coming up > with a name for that one that makes sense. Not adding it implies a > slight potential for bugs when a zip file with that name is located in > the current directory and a slight performance penalty to perform the > lookup. > > I really don't get these objections. You look into the current directory for zip files? |