Hi, Apologies for the delay in answering this. I'm just unburying myself from the mound of e-mail that piled up during a rather busy time.
These are the different options: createLibraryZip = True appendScriptToLibrary = True appendScriptToExe = True or False -- creates library.zip, all modules are placed in library.zip createLibraryZip = True appendScriptToLibrary = False appendScriptToExe = True -- creates library.zip, script module appended to executable, all other modules in library.zip createLibraryZip = True appendScriptToLibrary = False appendScriptToExe = False -- creates library.zip, script module placed in <script>.zip, all other modules in library.zip createLibraryZip = False appendScriptToLibrary = True appendScriptToExe = True or False -- exception raised as cannot append to library.zip which is not being created createLibraryZip = False appendScriptToLibrary = False appendScriptToExe = True -- does not create library.zip, all modules appended to executable createLibraryZip = False appendScriptToLibrary = False appendScriptToExe = False -- does not create library.zip all modules placed in <script>.zip I hope that answers your questions. If it still does not, let me know and I should be able to answer your question in considerably less time than two months! Anthony On Fri, Sep 18, 2009 at 11:38 AM, Cor Bos <c...@ceboservice.nl> wrote: > Hi, > Thanks for your answer. > I did some testing on Ubuntu and used the following setup file: > > from cx_Freeze import setup, Executable > > includes = [] > excludes = ['bsddb', 'curses', 'email', '_gtkagg', 'pywin.debugger', > 'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl', > '_tkagg', 'Tkconstants', 'Tkinter'] > packages = [] > path = [] > > Exe_Target_1 = Executable( > script = "Boekhouden.py", > initScript = None, > base = None, > targetDir = r"boekhouden_3.2.1_cx_build14", > targetName = "Boekhouden", > compress = True, > copyDependentFiles = True, > appendScriptToExe = True, > appendScriptToLibrary = False, > icon = r"/home/cor/Boekhouden3.0/bp.ico" > ) > > setup( > version = "3.2.1", > description = "Boekhoudprogramma", > author = "Cebo", > name = "Boekhouden", > options = {"build_exe": {"includes": includes, > "excludes": excludes, > "packages": packages, > "path": path > } > }, > > executables = [Exe_Target_1] > ) > Startcmd: > python -OO setup.py build --build-exe=r"boekhouden_3.2.1_cx_build14" > > I modified appendScriptToExe and appendScriptToLibrary and > got the results shown below: > > appendScriptToExe = True > appendScriptToLibrary = False > Boekhouden executable + library.zip > > appendScriptToExe = False > appendScriptToLibrary = True > Boekhouden executable + library.zip > > appendScriptToExe = True > appendScriptToLibrary = True > Boekhouden executable + library.zip > > appendScriptToExe = False > appendScriptToLibrary = False > Boekhouden executable + boekhouden.zip + library.zip > > The boekhouden.zip is only 2.7kB and contains cx_freeze_init.pyc and > _main_.py > > Did I forget something in the setup file because the zipfile didn't get > attached to the executable and in all cases the library.zip was created. > The only difference was the size of the executable: 671,6kB or 674,4kB > that's +/-2.7kB and 2 file missing from the library.zip > > Cor > > > > Anthony Tuininga schreef: >> Hi, cx_Freezes uses up to three possible sources for the modules, >> checking this order: >> >> 1) the executable itself (tacked on the end of it) >> 2) a file with the same name as the executable with a .zip extension >> in the same directory as the executable >> 3) a file named "library.zip" in the same directory as the executable >> >> The relevant code for this is in Common.c (GetImporter function) >> >> The way to determine which will be used is via the >> --append-script-to-exe option >> --create-shared-zip option >> --include-in-shared-zip option >> >> See the documentation for a little more information on this. If you're >> still having trouble, let me know. Thanks. >> >> Anthony >> >> On Sun, Sep 13, 2009 at 9:36 AM, Cor Bos <c...@ceboservice.nl> wrote: >>> Hi, >>> >>> Is there a way to rename the library.zip to a name derived from the >>> executable like MyApp.exe and MyApp.zip. >>> Py2Exe offers a renaming option but I couldn't find anything alike for >>> CxFreeze. >>> >>> I want to use two separate executables in the same folder. But as both >>> executables use the name "library.zip" and that won't work. >>> >>> I've tried to concatenate the library.zip to the executable but that >>> didn't work and renaming the library.zip gives an zipimport error on >>> Linux. On windows it seems to work with a modified Console.py. >>> >>> Any help would be welcome. >>> >>> Cor >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >>> trial. Simplify your report design, integration and deployment - and focus >>> on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> _______________________________________________ >>> cx-freeze-users mailing list >>> cx-freeze-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users >>> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> cx-freeze-users mailing list >> cx-freeze-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users >> >> > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > cx-freeze-users mailing list > cx-freeze-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ cx-freeze-users mailing list cx-freeze-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cx-freeze-users