From: Josh E. <jos...@gm...> - 2010-03-14 03:39:55
|
I'm still working on my PortableApp issues. I have a setup script that builds my program, but still buts everything into a zip file. Part of my app starts by looking for the required files and creating them as necessary, but those files are being searched for inside the zip file. I suspect at this point the exe isn't doing anything but running a pyd or pyo file inside the zip file, and that's where my script is starting as the base. So, is it possible using py2exe to put everything in the exe and skip the zipfile? If that means having a 7MB exe, that's fine. -- Josh English Jos...@gm... http://joshenglish.livejournal.com |
From: <py...@bd...> - 2010-03-14 16:36:34
|
Josh, > So, is it possible using py2exe to put everything in the exe and skip the zipfile? If that means having a 7MB exe, that's fine. My understanding is that py2exe can append your library.zip file to the end of your executable to give you a single file. You still need to distribute the Microsoft VC runtime files which can not be embedded in your executable. I can't remember what the setup.py recipe is for this type of output - perhaps someone else can chime in? Malcolm ----- Original message ----- From: "Josh English" <jos...@gm...> To: "py2exe-users" <py2...@li...> Date: Sat, 13 Mar 2010 19:39:48 -0800 Subject: [Py2exe-users] Bundling everything into the application I'm still working on my PortableApp issues. I have a setup script that builds my program, but still buts everything into a zip file. Part of my app starts by looking for the required files and creating them as necessary, but those files are being searched for inside the zip file. I suspect at this point the exe isn't doing anything but running a pyd or pyo file inside the zip file, and that's where my script is starting as the base. So, is it possible using py2exe to put everything in the exe and skip the zipfile? If that means having a 7MB exe, that's fine. -- Josh English Jos...@gm... http://joshenglish.livejournal.com ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Py2exe-users mailing list Py2...@li... https://lists.sourceforge.net/lists/listinfo/py2exe-users |
From: Daryl T. <dt-...@ha...> - 2010-03-14 19:48:42
|
py...@bd... wrote: > I can't remember what the setup.py recipe is for this type of output - > perhaps someone else can chime in? bundle_files = 1, zipfile = None. See - Section: 'Using "bundle_files" and "zipfile"' <http://www.py2exe.org/index.cgi/SingleFileExecutable> -- Regards, Daryl Tester Member of the Amalgamated Australian Association Against Apostrophe Abuse. (formerly the 6A's - no, wait ...). |
From: <py...@bd...> - 2010-03-14 20:06:54
|
Thanks Daryl! Malcolm ----- Original message ----- From: "Daryl Tester" <dt-...@ha...> To: "py2exe" <py2...@li...> Date: Mon, 15 Mar 2010 06:18:17 +1030 Subject: Re: [Py2exe-users] Bundling everything into the application py...@bd... wrote: > I can't remember what the setup.py recipe is for this type of output - > perhaps someone else can chime in? bundle_files = 1, zipfile = None. See - Section: 'Using "bundle_files" and "zipfile"' <http://www.py2exe.org/index.cgi/SingleFileExecutable> -- Regards, Daryl Tester Member of the Amalgamated Australian Association Against Apostrophe Abuse. (formerly the 6A's - no, wait ...). ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Py2exe-users mailing list Py2...@li... https://lists.sourceforge.net/lists/listinfo/py2exe-users |
From: Josh E. <jos...@gm...> - 2010-03-14 23:32:13
|
Great. Thank you. I can't find things on the wiki, which I guess is the only documentation py2exe has outside the source code. Compiles like I want it to, but launching the exe gives me an error: The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. This is a windows error, it looks like, and not part of my application. Josh On Sun, Mar 14, 2010 at 12:48 PM, Daryl Tester <dt-...@ha...> wrote: > py...@bd... wrote: > >> I can't remember what the setup.py recipe is for this type of output - >> perhaps someone else can chime in? > > bundle_files = 1, zipfile = None. See - > > Section: 'Using "bundle_files" and "zipfile"' > <http://www.py2exe.org/index.cgi/SingleFileExecutable> > > > -- > Regards, > Daryl Tester > -- Josh English Jos...@gm... http://joshenglish.livejournal.com |
From: <py...@bd...> - 2010-03-14 23:42:07
|
Josh, What version of Python? Are you distributing the MS VC runtime files with your executable? Malcolm |
From: Daryl T. <dt-...@ha...> - 2010-03-14 23:47:51
|
Josh English wrote: > Compiles like I want it to, but launching the exe gives me an error: > > The application has failed to start because the application > configuration is incorrect. Reinstalling the application may fix this > problem. > > This is a windows error, it looks like, and not part of my application. Yes, I struck this "descriptive" error message only last week on a non- python related project. You are probably missing the run time DLL which needs to be bundled outside of the exe. Look in your dist directory for something like "MSVCR71.dll", then put that in your destination directory with your Python executable. I'll attempt to update the wiki with this info. -- Regards, Daryl Tester Member of the Amalgamated Australian Association Against Apostrophe Abuse. (formerly the 6A's - no, wait ...). |
From: Daryl T. <dt-...@ha...> - 2010-03-15 00:03:35
|
Daryl Tester wrote: > I'll attempt to update the wiki with this info. Hey Wiki admins! I signed up for an account, then updated the appropriate page. Both times, the POST took quite a while, eventually resulting in an "Internal Server Error", but the changes appeared OK. You might want to look into that. -- Regards, Daryl Tester Member of the Amalgamated Australian Association Against Apostrophe Abuse. (formerly the 6A's - no, wait ...). |
From: Josh E. <jos...@gm...> - 2010-03-15 00:08:49
|
I have them in the same folder as my executable. There's nothing about them in the setup.py script, so I hand copied them. It's my (probably mis-)understanding that I need the same MZVCR**.dll files that Python was compiled with, and for me I think thats MSVCR90.dll version 9.0.21022.8. I've seen this page (http://koobmeej.blogspot.com/2009/08/python-26-py2exe-and-vc-runtime-issues.html) that says I can get around the whole shebang, but I haven't tried it yet. Still climbing that learning curve... Josh On Sun, Mar 14, 2010 at 4:47 PM, Daryl Tester <dt-...@ha...> wrote: > > > Yes, I struck this "descriptive" error message only last week on a non- > python related project. You are probably missing the run time DLL which > needs to be bundled outside of the exe. Look in your dist directory for > something like "MSVCR71.dll", then put that in your destination directory > with your Python executable. > > I'll attempt to update the wiki with this info. > > Daryl Tester > > Member of the Amalgamated Australian Association Against Apostrophe Abuse. > (formerly the 6A's - no, wait ...). > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py2exe-users > -- Josh English Jos...@gm... http://joshenglish.livejournal.com |
From: Daryl T. <dt-...@ha...> - 2010-03-15 00:39:44
|
Josh English wrote: > I have them in the same folder as my executable. Ah, my bad - I was thinking you couldn't run the exe on your destination system. All comments below are in the context of not being able to run the exe on the system you're compiling it on. > There's nothing about > them in the setup.py script, so I hand copied them. There shouldn't be any mention of them in the setup script. And you shouldn't need to copy them in manually either; my build script removes the build/ & dist/ directories so that they're rebuilt from scratch for each compile (i.e. I believe py2exe is supposed to locate the appropriate DLL and copy that into dist/ for you). > It's my (probably mis-)understanding that I need the same MZVCR**.dll > files that Python was compiled with, and for me I think thats > MSVCR90.dll version 9.0.21022.8. Yes. And I believe if you're running on anything more recent than XP (i.e. Vista, Windows 7) then other issues come into play wrt assemblies and manifests and tigers, oh my. I don't know how well py2exe copes with this as this is an environment I haven't had to play in yet. -- Regards, Daryl Tester Member of the Amalgamated Australian Association Against Apostrophe Abuse. (formerly the 6A's - no, wait ...). |
From: Werner F. B. <wer...@fr...> - 2010-03-15 07:48:55
|
On 15/03/2010 01:39, Daryl Tester wrote: > Josh English wrote: > >> I have them in the same folder as my executable. > > Ah, my bad - I was thinking you couldn't run the exe on your > destination system. All comments below are in the context of > not being able to run the exe on the system you're compiling > it on. > >> There's nothing about >> them in the setup.py script, so I hand copied them. > > There shouldn't be any mention of them in the setup script. And you > shouldn't need to copy them in manually either; my build script > removes the build/& dist/ directories so that they're rebuilt from > scratch for each compile (i.e. I believe py2exe is supposed to locate > the appropriate DLL and copy that into dist/ for you). > >> It's my (probably mis-)understanding that I need the same MZVCR**.dll >> files that Python was compiled with, and for me I think thats >> MSVCR90.dll version 9.0.21022.8. > > Yes. And I believe if you're running on anything more recent than XP > (i.e. Vista, Windows 7) then other issues come into play wrt assemblies > and manifests and tigers, oh my. I don't know how well py2exe copes > with this as this is an environment I haven't had to play in yet. It works very well. I dev on Windows 7 and deploy to Win 7, Vista, XP, Win 2000 without any problem. However I do not use bundle-file=1 or 2 only 3! With Python 2.6 you need to copy/install the sxs stuff yourself, a setup.py which works for me with Py 2.6 and wxPython 2.8.10 can be seen here. http://wiki.wxpython.org/py2exe Werner |
From: Werner F. B. <wer...@fr...> - 2010-03-15 07:55:18
|
On 15/03/2010 00:32, Josh English wrote: > Great. Thank you. I can't find things on the wiki, which I guess is > the only documentation py2exe has outside the source code. > > Compiles like I want it to, but launching the exe gives me an error: > > The application has failed to start because the application > configuration is incorrect. Reinstalling the application may fix this > problem. That error is often caused by the sxs stuff (MS C run time dll's) not being found and using bundle_files = 1 is one of the reason for that. As mentioned many times but quite a few people on here and on the wxPython list the option 1 and 2 are not working well. Werner > > This is a windows error, it looks like, and not part of my application. > > Josh > > On Sun, Mar 14, 2010 at 12:48 PM, Daryl Tester > <dt-...@ha...> wrote: >> py...@bd... wrote: >> >>> I can't remember what the setup.py recipe is for this type of output - >>> perhaps someone else can chime in? >> >> bundle_files = 1, zipfile = None. See - >> >> Section: 'Using "bundle_files" and "zipfile"' >> <http://www.py2exe.org/index.cgi/SingleFileExecutable> >> >> >> -- >> Regards, >> Daryl Tester >> > > |
From: Daryl T. <dt-...@ha...> - 2010-03-15 08:19:11
|
Werner F. Bruhin wrote: >> Yes. And I believe if you're running on anything more recent than XP >> (i.e. Vista, Windows 7) then other issues come into play wrt assemblies >> and manifests and tigers, oh my. I don't know how well py2exe copes >> with this as this is an environment I haven't had to play in yet. > It works very well. I dev on Windows 7 and deploy to Win 7, Vista, XP, > Win 2000 without any problem. > > However I do not use bundle-file=1 or 2 only 3! Then that's not the single file exe that the OP was after, so that can't really be considered "works very well". > As mentioned many times but quite a few people on here and on the > wxPython list the option 1 and 2 are not working well. Under differing conditions. For instance, I am currently shipping two executables (one GUI client, the other a Windows service) that both work fine as bundle_files = 1. But I am not using anything beyond Python 2.5.x. This stuff really needs to be updated on the wiki by someone more familiar with the issues than I. -- Regards, Daryl Tester Member of the Amalgamated Australian Association Against Apostrophe Abuse. (formerly the 6A's - no, wait ...). |
From: Werner F. B. <wer...@fr...> - 2010-03-15 09:53:43
|
On 15/03/2010 09:18, Daryl Tester wrote: > Werner F. Bruhin wrote: > >>> Yes. And I believe if you're running on anything more recent than XP >>> (i.e. Vista, Windows 7) then other issues come into play wrt assemblies >>> and manifests and tigers, oh my. I don't know how well py2exe copes >>> with this as this is an environment I haven't had to play in yet. > >> It works very well. correction - it works very well for me:) I dev on Windows 7 and deploy to Win 7, Vista, XP, >> Win 2000 without any problem. >> >> However I do not use bundle-file=1 or 2 only 3! > > Then that's not the single file exe that the OP was after, so that can't > really be considered "works very well". I still don't understand why having a multiple files in a distribution is a show stopper for anyone. I can only suggest to the OP to try to get things working with option "3" and when he got this then he can always try with 1 or 2. > >> As mentioned many times but quite a few people on here and on the >> wxPython list the option 1 and 2 are not working well. > > Under differing conditions. For instance, I am currently shipping two > executables (one GUI client, the other a Windows service) that both > work fine as bundle_files = 1. But I am not using anything beyond > Python 2.5.x. > > This stuff really needs to be updated on the wiki by someone more > familiar with the issues than I. Agree, it won't be me either as I can barely spell C++ or C:) It seems that py2exe is a "bit on hold", i.e. no updates have been done for a long time. Maybe the OP should try e.g. cx_freeze. Werner |
From: . <rem...@gm...> - 2010-03-15 14:09:54
|
Is there any way to bundle in the C runtime DLL??? On Mon, Mar 15, 2010 at 6:31 AM, Werner F. Bruhin <wer...@fr...>wrote: > On 15/03/2010 10:53, Werner F. Bruhin wrote: > > On 15/03/2010 09:18, Daryl Tester wrote: > >> Werner F. Bruhin wrote: > ... > >>> > >>> However I do not use bundle-file=1 or 2 only 3! > Sorry, I only have problems with 1, I most of the time actually use 2. > > Werner > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py2exe-users > |
From: Werner F. B. <wer...@fr...> - 2010-03-15 14:52:16
|
On 15/03/2010 15:09, . wrote: > Is there any way to bundle in the C runtime DLL??? I don't know, but then again I don't mind/care:). The MS recommendation and some think that the MS C Runtime license actually requires you to use the MS provided installer for it. I "bundle" it using InnoSetup, see here: http://wiki.wxpython.org/Deployment Werner |
From: . <rem...@gm...> - 2010-03-16 20:28:48
|
Okay well what about OTHER data files / directories? It seems only python dependencies can be bundled.. not actual data files.. :/ On Tue, Mar 16, 2010 at 1:56 PM, Daniel Pryden <da...@pr...> wrote: > On 3/15/2010 7:09 AM, . wrote: > > Is there any way to bundle in the C runtime DLL??? > > > > Nope, because the stub executable py2exe uses is compiled against the > same version of the C runtime as Python. So the bootstrapper executable > needs the C runtime before it can even begin unpacking the resources > bundled into the executable file. > > This problem isn't unique to Python or py2exe -- in fact, any > programming language with a runtime library and dynamic linkage will run > into the same issue. This is the reason installers were invented in the > first place. > > - Daniel. > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py2exe-users > |
From: Timo <tim...@gm...> - 2010-03-17 08:59:53
|
On 16-03-10 21:28, . wrote: > Okay well what about OTHER data files / directories? It seems only > python dependencies can be bundled.. not actual data files.. :/ You should take a look at Emesene. They have a Windows version of their program which is only one exe. I think they used py2exe to generate the executable and then (if I'm correct) NSIS to bundle it up to one file. I found this once on their forum when I was looking how they did the one file thing. Cheers, Timo |
From: Werner F. B. <wer...@fr...> - 2010-03-17 11:41:57
|
On 16/03/2010 21:28, . wrote: > Okay well what about OTHER data files / directories? It seems only > python dependencies can be bundled.. not actual data files.. :/ That what the data_files option is for. See here for a sample to copy e.g. the MS C runtime into the dist folder http://wiki.wxpython.org/py2exe Werner |
From: . <rem...@gm...> - 2010-03-16 21:16:48
|
Yeah I tried the data_files option, it doesn't do what you think. You'd expect it to put the files into the zipfile or the exe (if you bundle and use zipfile=None), but, it simply doesn't. :( On Tue, Mar 16, 2010 at 4:04 PM, Daniel Pryden <da...@pr...> wrote: > Sounds like you may want the data_files option. It's documented in the > wiki here: http://py2exe.org/index.cgi/data_files . Alternatively, you > might be interested in this: http://py2exe.org/index.cgi/CustomDataInExe . > > Others on the list will probably need to provide more information, > though, since I've never actually used this approach. (I always just > use an installer instead.) > > - Daniel. > > On 3/16/2010 1:28 PM, . wrote: > > Okay well what about OTHER data files / directories? It seems only > > python dependencies can be bundled.. not actual data files.. :/ > > > > On Tue, Mar 16, 2010 at 1:56 PM, Daniel Pryden <da...@pr... > > <mailto:da...@pr...>> wrote: > > > > On 3/15/2010 7:09 AM, . wrote: > > > Is there any way to bundle in the C runtime DLL??? > > > > > > > Nope, because the stub executable py2exe uses is compiled against the > > same version of the C runtime as Python. So the bootstrapper > executable > > needs the C runtime before it can even begin unpacking the resources > > bundled into the executable file. > > > > This problem isn't unique to Python or py2exe -- in fact, any > > programming language with a runtime library and dynamic linkage will > run > > into the same issue. This is the reason installers were invented in > the > > first place. > > > > - Daniel. > > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Py2exe-users mailing list > Py2...@li... > https://lists.sourceforge.net/lists/listinfo/py2exe-users > |
From: Werner F. B. <wer...@fr...> - 2010-03-17 11:45:20
|
On 16/03/2010 22:16, . wrote: > Yeah I tried the data_files option, it doesn't do what you think. You'd > expect it to put the files into the zipfile or the exe (if you bundle > and use zipfile=None), but, it simply doesn't. :( No it doesn't, that is not it's intend. This is still Python, so it is pretty easy to append stuff into the zip file if that is what you want. E.g. something like this: # post compile code # add some amara specific files to the zip archive import zipfile distFolder = os.path.join(os.path.join(baseFolder, 'Program'), distDir) f = zipfile.ZipFile(os.path.join(os.path.join(distFolder, 'lib'), 'library.zip'), 'a') for fitem in amaradata: head, tail = os.path.split(fitem) sName = os.path.join('Share', tail) f.write(fitem, sName) f.close() Werner |
From: Werner F. B. <wer...@fr...> - 2010-03-15 11:32:02
|
On 15/03/2010 10:53, Werner F. Bruhin wrote: > On 15/03/2010 09:18, Daryl Tester wrote: >> Werner F. Bruhin wrote: ... >>> >>> However I do not use bundle-file=1 or 2 only 3! Sorry, I only have problems with 1, I most of the time actually use 2. Werner |
From: Daniel P. <da...@pr...> - 2010-03-16 18:56:38
|
On 3/15/2010 7:09 AM, . wrote: > Is there any way to bundle in the C runtime DLL??? > Nope, because the stub executable py2exe uses is compiled against the same version of the C runtime as Python. So the bootstrapper executable needs the C runtime before it can even begin unpacking the resources bundled into the executable file. This problem isn't unique to Python or py2exe -- in fact, any programming language with a runtime library and dynamic linkage will run into the same issue. This is the reason installers were invented in the first place. - Daniel. |
From: Daniel P. <da...@pr...> - 2010-03-16 21:05:18
|
Sounds like you may want the data_files option. It's documented in the wiki here: http://py2exe.org/index.cgi/data_files . Alternatively, you might be interested in this: http://py2exe.org/index.cgi/CustomDataInExe . Others on the list will probably need to provide more information, though, since I've never actually used this approach. (I always just use an installer instead.) - Daniel. On 3/16/2010 1:28 PM, . wrote: > Okay well what about OTHER data files / directories? It seems only > python dependencies can be bundled.. not actual data files.. :/ > > On Tue, Mar 16, 2010 at 1:56 PM, Daniel Pryden <da...@pr... > <mailto:da...@pr...>> wrote: > > On 3/15/2010 7:09 AM, . wrote: > > Is there any way to bundle in the C runtime DLL??? > > > > Nope, because the stub executable py2exe uses is compiled against the > same version of the C runtime as Python. So the bootstrapper executable > needs the C runtime before it can even begin unpacking the resources > bundled into the executable file. > > This problem isn't unique to Python or py2exe -- in fact, any > programming language with a runtime library and dynamic linkage will run > into the same issue. This is the reason installers were invented in the > first place. > > - Daniel. > |