python - compiling .py into windows AND mac executables on Ubuntu -


i have been trying hours figure out how going through pyinstaller's docs, haven't had luck.

i have single .py file, , need made .exe file executable in windows 7, , .app (or ever works) executable in os x lion. problem when ever use

python pyinstaller.py my_code.py 

it compiles linux executable.

from pyinstaller faq:

can package windows binaries while running under linux?

no, not supported. please use ​wine this, pyinstaller runs fine in wine. may want have @ ​this thread in mailinglist. in version 1.4 had build in support this, showed work half. require windows system on partition , work pure python programs. want decent gui (gtk, qt, wx), need install windows libraries anyhow. it's easier use wine.

in other words, cannot run command in linux build windows executable (or mac executable matter) trying do. workaround have provided windows (and windows) install wine.

wine program allows windows programs run on linux. creates environment replicates windows environment. idea install python (using windows python installer), other libraries need (such pyinstaller), environment. then, still in environment, run python pyinstaller.

i haven't done of this, mailing list thread mentioned in faq start. here example use:

pydir="c:/python27"  python="wine $pydir/python.exe"  winpwd=$(winepath -w $(pwd))  cd pyinstaller   $python configure.py  $python makespec.py -p $winpwd $winpwd/diceroller.py  $python build.py diceroller/diceroller.spec  

it looks uses old "configure.py", "makespec.py" , "build.py", whereas nowadays "pyinstaller.py" script tries of you.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -