469,282 Members | 1,944 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Build EXE on Mac OsX 10.4

Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to install
UPX properly. I tried putting the linux UPX folder in my python 2.4
directory, but that didn't work. I am just generally confused right
now. Ha. If anybody can lend me some insight I would really appreciate
it. Thank you for taking the time to read this post.

-b

Jun 13 '07 #1
7 3745
Tempo wrote:
Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to install
UPX properly. I tried putting the linux UPX folder in my python 2.4
directory, but that didn't work. I am just generally confused right
now. Ha. If anybody can lend me some insight I would really appreciate
it. Thank you for taking the time to read this post.
You need to build Mac Apps on Mac, Windows EXE's on Windows, and Linux
ELF's on Linux. You can't build a windows.exe from Mac, just as you
can't build a mac.app from Windows.

--
pkm ~ http://paulmcnett.com
Jun 13 '07 #2
-b
Okay. Great. Thanks for clarifying that for me.

Jun 13 '07 #3
Paul McNett wrote:
Tempo wrote:
>Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to install
UPX properly. I tried putting the linux UPX folder in my python 2.4
directory, but that didn't work. I am just generally confused right
now. Ha. If anybody can lend me some insight I would really appreciate
it. Thank you for taking the time to read this post.

You need to build Mac Apps on Mac, Windows EXE's on Windows, and Linux
ELF's on Linux. You can't build a windows.exe from Mac, just as you
can't build a mac.app from Windows.
Also, use py2app--that's the standard on the Mac. I don't believe
pyinstaller works on OS X.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
Jun 13 '07 #4
Paul McNett wrote:
Tempo wrote:
>Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to install
UPX properly. I tried putting the linux UPX folder in my python 2.4
directory, but that didn't work. I am just generally confused right
now. Ha. If anybody can lend me some insight I would really appreciate
it. Thank you for taking the time to read this post.

You need to build Mac Apps on Mac, Windows EXE's on Windows, and Linux
ELF's on Linux. You can't build a windows.exe from Mac, just as you
can't build a mac.app from Windows.
Also, use py2app--that's the standard on the Mac. I don't believe
pyinstaller works on OS X.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
Jun 13 '07 #5
En Wed, 13 Jun 2007 17:35:19 -0300, Paul McNett <p@ulmcnett.comescribió:
Tempo wrote:
>Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to install
[...]

You need to build Mac Apps on Mac, Windows EXE's on Windows, and Linux
ELF's on Linux. You can't build a windows.exe from Mac, just as you
can't build a mac.app from Windows.
That's not entirely true. gcc on linux can generate a Windows EXE, and
using: python setup.py bdist_wininst, you can generate a complete binary
installer for Windows. I'm not sure if this can be done on a Mac too.

--
Gabriel Genellina

Jun 14 '07 #6
"Gabriel Genellina" <ga*******@yahoo.com.arwrites:
En Wed, 13 Jun 2007 17:35:19 -0300, Paul McNett <p@ulmcnett.comescribió:
>Tempo wrote:
>>Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to
install [...]

You need to build Mac Apps on Mac, Windows EXE's on Windows, and Linux
ELF's on Linux. You can't build a windows.exe from Mac, just as you
can't build a mac.app from Windows.

That's not entirely true. gcc on linux can generate a Windows EXE, and
using: python setup.py bdist_wininst, you can generate a complete
binary installer for Windows. I'm not sure if this can be done on a
Mac too.
In principle, certainly - there's even a MacPort package for a complete
cygwin installation. I've built a number of packages with it - SDL and
several related libraries, for instance. There are also ELF cross-compiler
MacPort packages, presumably for building Linux binaries.

On the other hand, I *haven't* tried any of those compilers with setup.py,
and I have no idea if it can support those targets in practice. :-(

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Jun 14 '07 #7
Sherm Pendley wrote:
"Gabriel Genellina" <ga*******@yahoo.com.arwrites:
>En Wed, 13 Jun 2007 17:35:19 -0300, Paul McNett <p@ulmcnett.comescribió:
>>Tempo wrote:
Has anyone sucesfully built a *.exe file on a mac operating system
before from a *.py file? I have been trying to do this with
pyinstaller, but I keep getting errors and I don't know how to
install [...]
You need to build Mac Apps on Mac, Windows EXE's on Windows, and Linux
ELF's on Linux. You can't build a windows.exe from Mac, just as you
can't build a mac.app from Windows.
That's not entirely true. gcc on linux can generate a Windows EXE, and
using: python setup.py bdist_wininst, you can generate a complete
binary installer for Windows. I'm not sure if this can be done on a
Mac too.

In principle, certainly - there's even a MacPort package for a complete
cygwin installation. I've built a number of packages with it - SDL and
several related libraries, for instance. There are also ELF cross-compiler
MacPort packages, presumably for building Linux binaries.

On the other hand, I *haven't* tried any of those compilers with setup.py,
and I have no idea if it can support those targets in practice. :-(
There's the rub. In practice, it is hard enough getting my setup.py
correct for building a nice windows.exe from Windows. Plus, the first
thing I want to do after building an exe is *test* it on the target
platform...

--
pkm ~ http://paulmcnett.com
Jun 14 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Douglas Buchanan | last post: by
2 posts views Thread by Rudy Ray Moore | last post: by
3 posts views Thread by Julian | last post: by
reply views Thread by Andrew Ayre | last post: by
5 posts views Thread by eranshuman | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.