What tool can I run on Linux, create an installer for the Python program, and install it on Windows?

I have a Python program that runs on Linux.

My clients may want to run a Python program on Windows.

Suppose they do not want to install Python, PyGTK or Linux.

Is there a tool, preferably free ("open source"), that can run on Linux, take my Python program and create an installer that installs it on Windows?

(Features: My program is in Python 2.6.6, with PyGTK, on ​​Ubuntu 10.10, on VirtualBox, on Windows. I do not have administrator rights on my Windows machine, so I am limited to what I can install on Windows.)

+4
source share
3 answers

py2exe will provide you with a win32 exe file as well as several pyd files and a zip archive. You can zip the entire dist folder and expand it that way. However, if you need a simple custom GUI installer, you will need to create it in a separate step.

Options:

  • create a zip archive, manually extract

  • DOS type BAT file for copying specific files to predefined locations

  • Create an MSI style installer using WiX . This can be done by running Mono for Windows under Wine .

  • Bite the bullet, access the Windows window (real or virtual) and use py2exe together with NSIS or Inno Setup . There are some good examples on the vi2exe wiki that show how to combine the installation of a py2exe script with the automatic creation and generation of an Innosetup script. One command on the command line, python setup.py py2exe and out issues an exe installer.

As mentioned above, py2exe is not ready for Python 3.x.

+1
source

You can look into NSIS and see if you can script to use its dependencies. I'm not quite sure what your features are, but I don't know anything that offers a one-click solution.

0
source

Use py2exe . The .exe file should be generated from Windows (Wine is fine), but that's it. You are satisfied with Python 2.7 (there is no 3.x support yet).

0
source

Source: https://habr.com/ru/post/1333530/


All Articles