Reputation: 71
I used Pyinstaller to make a standalone portable application for windows from python code, and it works normally.
I understand that to create an executable for a certain OS it must be done on that specific OS.
Is there a way to create executables for other platforms directly from windows without running a virtual machine.
Thank you.
Upvotes: 7
Views: 8041
Reputation: 467
if you have docker-expertise, you could try to get the docker-containers in the following link to do the job for you (creating the executable for windows/linux by setting up a docker-container for each target-system) and starting up the Docker-Containers for Building the Executables from within your Windows-OS. I have not tryed it out though, but the Readme of the project sounds promising.
https://github.com/cdrx/docker-pyinstaller
If the project does what it says, you would only need to execute the following two commands in your project-folder to create the executables for Windows and Linux, when you have gotten everything setted up:
docker run -v "$(pwd):/src/" cdrx/pyinstaller-windows
docker run -v "$(pwd):/src/" cdrx/pyinstaller-linux
Upvotes: 1
Reputation: 2953
Since pyinstaller is not a cross-compiler (which means with pyinstaller you cannot create an executable for any other system than the one you are on), you will have to look for other tools.
On the official github FAQ, they recommend using Wine for this specific purpose.
Link to FAQ.
Since you don't want to look for other systems to compile your code on, this seems to be the only option.
Upvotes: 3
Reputation: 1
In order to make executable files for Mac and Linux, you need to build it on the same systems For example, in order to make your Linux work, you need to collect the rpm package
Upvotes: 0