Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use cx_freeze in linux to create a package to be used in windows

how to use cx_freeze in linux to create a one package to be used in windows like .exe or .bin file. I tested cx_freeze in linux but that make package for linux and in windows is unknown.

for example :

$ cxfreeze gui.py

and this is file that maked :

gui

that is running only in linux.

Is there any way to use cx_freeze for making exe or bin package ?

Or any alternative way instead of cx_freeze to make one bin file to execute in other platform independent?

I use python3(3.x).

like image 476
alireza Avatar asked Jun 24 '13 13:06

alireza


1 Answers

I've been trying to get cx_freeze properly working on windows in every way possible but with no luck...I was trying to do what you are doing now using Ubuntu but I found this, sadly: https://cx_freeze.readthedocs.org/en/latest/faq.html#problems-with-running-frozen-programs

" Freezing for other platforms

cx_Freeze works on Windows, Mac and Linux, but on each platform it only makes an executable that runs on that platform. So if you want to freeze your program for Windows, freeze it on Windows; if you want to run it on Macs, freeze it on a Mac.

At a pinch, you can try to make a Windows executable using Wine. Our experience is that you need to copy some files in manually after cx_Freeze has run to make the executable work. We don’t recommend this option. " I guess the only option is to try doing it with wine? Have you had any luck?

like image 72
LuckyLuc Avatar answered Nov 16 '22 01:11

LuckyLuc