From: Tony C. <cap...@gm...> - 2007-11-20 02:24:55
|
I've used py2exe for several command-line apps before, but not for a Pythoncard app. Would someone post the contents of setup.py for a Pythoncard app? How do you get py2exe to put the script.rsrc.py file inside the .exe ? thanks |
From: tjerk h. <tj...@br...> - 2007-11-20 09:43:32
|
Try using standalonebuilder..it takes care of all these details. ----- Original Message ----- From: "Tony Cappellini" <cap...@gm...> To: <pyt...@li...> Sent: Tuesday, November 20, 2007 12:24 AM Subject: [Pythoncard-users] py2exe (setup.py) for pythoncard apps > I've used py2exe for several command-line apps before, but not for a > Pythoncard app. > > Would someone post the contents of setup.py for a Pythoncard app? > > How do you get py2exe to put the script.rsrc.py file inside the .exe ? > > thanks > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Brian D. <deb...@ho...> - 2007-11-21 02:17:14
|
# This is an example setup.py file # run it from the windows command line like so: #> C:\Python2.4\python.exe setup.py py2exe =20 from distutils.core import setup from Common import * =20 import py2exe, shutil, os # extra files/dirs copied to the project extra_data =3D ['data','gfx','conf','help','pyPlan.rsrc.py','pyEstados.rsrc= .py','Parametros.rsrc.py','ParamFin.rsrc.py','pyPlan.exe.manifest'] opts =3D {=20 "py2exe": {=20 # if you import .py files from subfolders of your project, then those ar= e # submodules. You'll want to declare those in the "includes" "compressed": 1, "optimize": 2, "includes":[] }=20 }=20 =20 setup( version =3D APP_VERSION, description =3D APP_DESC, name =3D APP_NAME, author =3D APP_AUTHOR, =20 #this is the file that is run when you start the game from the command li= ne. =20 windows=3D[{"script": "pyPlan.py","icon_resources": [(1, "pyplan.ico")]}]= , #options as defined above options=3Dopts, #data files - these are the non-python files, like images and sounds #the glob module comes in handy here. #data_files =3D [], =20 #this will pack up a zipfile instead of having a glut of files sitting #in a folder. zipfile=3D"lib/shared.zip" ) #also need to hand copy the extra files here def installfile(name): dst =3D os.path.join('dist') print 'copying', name, '->', dst if os.path.isdir(name): dst =3D os.path.join(dst, name) if os.path.isdir(dst): shutil.rmtree(dst) shutil.copytree(name, dst) elif os.path.isfile(name): shutil.copy(name, dst) else: print 'Warning, %s not found' % name for data in extra_data: installfile(data) _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Space= s. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=3Dcreate&wx_url=3D/friends.= aspx&mkt=3Den-us= |
From: Phil E. <ph...@li...> - 2007-11-20 09:46:27
|
Tony Cappellini wrote: > I've used py2exe for several command-line apps before, but not for a > Pythoncard app. > > Would someone post the contents of setup.py for a Pythoncard app? > > How do you get py2exe to put the script.rsrc.py file inside the .exe ? > Hi Tony: Take a look at the standaloneBuilder tool which comes with the PythonCard distribution. My brief notes on the process of converting PythonCard apps to executables can be found here: http://pythoncard.sourceforge.net/standalone.html Although this is based around using pyInstaller, the standaloneBuilder app supports py2exe as well. I've attached copies of the setup.py and associated data files that standaloneBuilder generates for a py2exe build, hope this helps. Essentially, the resource files stay as they are, i.e. they don't get packed into the EXE in any way. I've often thought it would be useful to write some sort of helper class which would allow resource files to be bundled up into a module that the app could import, along similar lines to the img2py stuff which comes with the wxPython demo. -- Regards Phil Edwards Brighton, UK |
From: Tony C. <cap...@gm...> - 2007-11-20 17:44:14
|
Thanks, but unfortunately, we have requirements where I work to use py2exe for all projects On Nov 20, 2007 1:43 AM, tjerk hoekstra <tj...@br...> wrote: > Try using standalonebuilder..it takes care of all these details. > > > ----- Original Message ----- > From: "Tony Cappellini" <cap...@gm...> > To: <pyt...@li...> > Sent: Tuesday, November 20, 2007 12:24 AM > Subject: [Pythoncard-users] py2exe (setup.py) for pythoncard apps > > > > I've used py2exe for several command-line apps before, but not for a > > Pythoncard app. > > > > Would someone post the contents of setup.py for a Pythoncard app? > > > > How do you get py2exe to put the script.rsrc.py file inside the .exe ? > > > > thanks > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Pythoncard-users mailing list > > Pyt...@li... > > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > > |
From: Kevin A. <al...@se...> - 2007-11-20 21:55:23
|
On Nov 20, 2007, at 9:44 AM, Tony Cappellini wrote: > Thanks, but unfortunately, we have requirements where I work to use > py2exe for all projects > Standalonebuilder supports py2exe. In addition, minimalStandalone and other samples and tools have examples of using py2exe. You may also want to search this topic in the archives, just follow the links from the PythonCard home page to the archives and then do a search. ka |