Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building an executable application for windows .exe on mac

I'm trying to build an application written in python, which can run on Windows without the need to install python or associated libraries(standalone), and I want to do that on my mac. I tried Pyinstaller, but it seems to generate files executable only in a platform that is building the application(in this case, osx). Is there easy way out like Pyinstaller or do I have to do that in a very complex way? Since I'm not the expert, the latter option might be impossible for me to do. Would it be more wise just to try to build the app on windows than mac using pyinstaller?

like image 260
Hoon Avatar asked Feb 06 '17 02:02

Hoon


People also ask

How do I run an EXE file on a Mac without wine?

You can also open EXE files on Mac using virtual machines like VirtualBox and Parallels Desktop. Virtual machines require a full Windows installation, so they're ideal for Mac users who run Windows apps almost every day.


1 Answers

For pyinstaller, they have clearly mentioned that packaging Windows binaries while running under OS X is NOT supported, and recommended to use Wine for this.

1. Can I package Windows binaries while running under Linux?

No, this is not supported. Please use Wine for this, PyInstaller runs fine in Wine. You may also want to have a look at this thread in the mailinglist. In version 1.4 we had build in some support for this, but it showed to work only half. It would require some Windows system on another partition and would only work for pure Python programs. As soon as you want a decent GUI (gtk, qt, wx), you would need to install Windows libraries anyhow. So it's much easier to just use Wine.

2. Can I package Windows binaries while running under OS X?

No, this is not supported. Please try Wine for this.

3. Can I package OS X binaries while running under Linux?

This is currently not possible at all. Sorry! If you want to help out, you are very welcome.

like image 184
Shane Avatar answered Oct 20 '22 05:10

Shane