I'm trying to figure out what would be the easiest way to create an Installer using Wix Toolset.
I'm building my app in Python and then creating an installer using PyInstaller as a One Folder (not one file) and then want to package it into .msi file. I saw elsewhere that I have to use heat.exe to create a list of all the files, but when I did that I got like 15,000 lines xml file that lists every single file. Not sure if that's the optimal solution or then could be some other way of properly packaging it.
You can start by using auto-py-to-exe to convert your project into an exe file:
pip install auto-py-to-exe
A .py to .exe converter using a simple graphical interface and PyInstaller in Python.
After this you can use any tool to generate the *.msi file such as Wix Toolset or Advanced Installer or other.
Related
I am using Python to create a program for university, however, I included the PyMySQL library as a reference and have a .Ico file for the Icon of the program. Is there anything I can use to compile the multiple .py files and libraries with the Icon to a format that won't require the user to install PyMySQL first and that will package everything together.
For those interested; I have tried PyInstaller and another package compiler, yet not had any luck as some didn't let me compile multiple packages along with the library and Icon. Either that or I'm not doing it correctly?
PS. I'm quite new to python and I know Python compiled files are .pyc but I also know you can make them executables so they can't be editted etc.
Thank you.
This is the question: How to create a setup file(.msi) from a .py file? I have a little script but I need an installer to use it with "InstallSimple" program wich will install another applications.
I tried with pyinstaller but it supports 2.3-2.7 versions and I have an script for 3.3 version.
To create an .msi file you need to use distutils. The essential procedure there is to create a setup.py file with information about your script, and you can then run python setup.py bdist_msi and it will create an .msi file for you.
However, using only this will create an .msi-file for your Python script, but it will require you to install Python on the computer first. This is probably not what you want. To solve that you can create an .exe-file from your script with cx_Freeze. cx_Freeze can in turn use distutils to make the .msi file. There is an example here.
Have you tried cx_Freeze ? According to the latest docs cx_Freeze 4.3.1 documentation, it supports python3.
I have been given a project to do. One of the main essential requirements is that this is given to the customer to run as single exe. It does not matter which programming language, however it will be comparing files between a set of default files and the customer’s files.
Is there any way I can do this so that I have one exe?
The py2exe library allows you to create exe files from your python code. I've not used it but it may do the job!
http://www.py2exe.org/
Alternatively, you can try pyinstaller.
See also: py2exe - generate single executable file
You're in luck! You can do just that with Python using the py2exe conversion utility.
You can find it at: http://www.py2exe.org/
I've been using cx_Freeze for a while now and there is one thing I've really wanted to do: put ALL files into ONE executable that I can distribute. It's not really user-friendly to send around a folder filled with 30 files, all in the same directory. How can I accomplish this?
Thanks.
It is not supported in cx_freeze. There was discussion about it on mailing list. As I recall, the author stated that others (PyInstaller, Py2Exe) use some dirty hacks to achieve that. Some anti-virus programs can consider that behavior as a virus also.
I used PyInstaller for some time, but went back to cx_freeze because of Python 2.7 support. I pack everything using Inno Setup, so it is easy to distribute. Depends if you use Windows or not.
Isn't this what bbfreeze does?
Tutorial here: http://www.blog.pythonlibrary.org/2010/08/19/a-bbfreeze-tutorial-build-a-binary-series/
It's actually not that hard to roll your own with Python zipimport http://docs.python.org/library/zipimport.html
You may prefer to use something like UPX which is a more general solution, not Python only. http://upx.sourceforge.net/
You can use 'bdist_msi' instead of 'build'. This will create a dist folder in the directory with a single setup application.
http://cx-freeze.readthedocs.io/en/latest/distutils.html
According to the documentation
cx_Freeze does not support building a single file exe, where all of the libraries for your application are embedded in one executable file.
The documentation gives some options to obtain a single file.
A further option under Windows is to use the bdist_msi command to create a single Microsoft Installer file (.msi) for your application, as mentioned by #QuaziRabbi. This command has few cx_Freeze-specific options documented here to customize the installer. This command overloads the bdist_msi command of the distutils package which itself brings some more options to customize the installer. The available options are not documented, one need to look at the source code of the distutils package. Interesting examples are Use cx-freeze to create an msi that adds a shortcut to the desktop and cx_freeze bdist_msi: create registry entries?
Another option is to use another tool to create a more customizable single-file installer for the frozen application after the cx_Freeze build step. The script-based tool NSIS (Nullsoft Scriptable Install System) allows one to create a very customizable installer and the use of a script means that this step can be completely automatized. #Fenisko's answers mentions another tool, and there are many more.
Guys, I have much python code in modules which are resides in several python packages and now I need to create single python executable module or file which will include all these files, so it will be working on windows and on linux servers. What are possible solutions and how this can be done?
For windows use py2exe , for linux use pyinstaller and for Mac use py2app
Using these tools you can have a setup.py which based on os will build the final binary.
I have tried all three and they work well, or you can use cx_freeze they claim to be cross-platform
That's what egg files are for. Read this: What are the advantages of packaging your python library/application as an .egg file?
Maybe py2exe can help you ..
py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.
Tutorial > http://www.py2exe.org/index.cgi/Tutorial
You can kivy for python cross plat form application .
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps