0

I use Esky/cx_freeze to package a python program for different OS. When I have to do it for windows, I use Windows 7 on VirtualBox.

However, I find this method pretty unpleasant and heavy. So I wonder, is there a way to package programs for Windows through Wine ?

I would basically need to install all the libraries I need, then run some commands like "python setup.py bdist_esky".

I know the cx_freeze doc doesn't advice this, but I'm trying to find a better way to package my software. I wonder if someone has a better option.

JPFrancoia
  • 4,866
  • 10
  • 43
  • 73
  • Might be overkill for small projects but you could set up a build server that handles downloading your code to VMs of all platforms you're interested in and doing the build. I don't really see any reliable ways of producing binaries for Windows that doesn't involve a Windows machine. – Asad Saeeduddin Jul 12 '15 at 21:41
  • One of my current project is not small, that's interesting. Could it also be done for Mac OS ? Do you have any link to start ? – JPFrancoia Jul 12 '15 at 21:44
  • Pyinstaller seems to be working with wine: https://groups.google.com/d/msg/pyinstaller/veq3BlA_Bns/YlmKUofUfbgJ – Elhana Jul 12 '15 at 21:52
  • No, PyInstaller is not a solution. It doesn't handle python 3. And I don't think it's compatible with Esky. – JPFrancoia Jul 12 '15 at 21:55
  • @Rififi Well there's a few options, but before you start down this route: are you really interested in producing binaries or do you just want a way to package your applications in a cross platform way (while still having the deployment contain the source)? – Asad Saeeduddin Jul 12 '15 at 22:03
  • I don't want the deployment to contain the sources, but I'm open to any cross-platform solution otherwise. – JPFrancoia Jul 12 '15 at 22:05
  • 1
    [Pynsist](http://pynsist.readthedocs.org/en/latest/) can build Windows installers from Linux/Mac, without involving Wine at all. But it doesn't support hiding the source code, and it targets Windows only. – Thomas K Jul 16 '15 at 17:15
  • Good suggestion @Thomas K. I think it can be a good alternative for small projects, maybe the ones which don't require deployment on Mac OS. But it might fall short for important projects. – JPFrancoia Jul 17 '15 at 16:09
  • My feeling is kind of the other way round: I've found that freezing tools are increasingly brittle with larger projects, and I've built Pynsist to be more reliable and easier to understand, so I think it could be more suitable for larger projects (though it's still quite young, so caveat emptor). I think Windows/Linux/Mac are different enough that it's better to use separate tools to package for each system, rather than one tool that tries to deal with everything. – Thomas K Jul 17 '15 at 20:31

0 Answers0