Oct-23-2018, 04:27 AM
Im about to finalize a Python3 program on my Mac and the program includes a GUI. By using Pyinstaller Im trying to convert my program into a single file that is easy to distribute to other Mac-users. But I have one last problem that I dont seem to be able to solve.
My first attempt to create a stand-alone program was with the following command:
pyinstaller gui_example.py
It worked but from what I understand the program is still depending on the folders that it is contained in.
My Second attempt was made with the following command:
pyinstaller example_gui.py —onefile
This worked even better. This gave me a singel file that worked on its own and that is easy to export to others. But it still includes the white ”command window”.
I dont want this ”command window” when I start my finished program so this led me to my third attempt. I used the following command:
pyinstaller gui_example.py —onefile —noconsole
The result of this is a single file without the ”command window”. Nice! But there is just one problem. The resolution of my GUI has now changed and does not look as good as before.
Im told that this has something to to with the program not working correcly with a retina-screen and that this problem can be solved by changing/adding something to the program ”specfile”. Is this true? If so, could someone show me how to do it?
My first attempt to create a stand-alone program was with the following command:
pyinstaller gui_example.py
It worked but from what I understand the program is still depending on the folders that it is contained in.
My Second attempt was made with the following command:
pyinstaller example_gui.py —onefile
This worked even better. This gave me a singel file that worked on its own and that is easy to export to others. But it still includes the white ”command window”.
I dont want this ”command window” when I start my finished program so this led me to my third attempt. I used the following command:
pyinstaller gui_example.py —onefile —noconsole
The result of this is a single file without the ”command window”. Nice! But there is just one problem. The resolution of my GUI has now changed and does not look as good as before.
Im told that this has something to to with the program not working correcly with a retina-screen and that this problem can be solved by changing/adding something to the program ”specfile”. Is this true? If so, could someone show me how to do it?