Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to include icons in application when using Pyinstaller 2.0 ,PySide 1.1.2 Bindings and Qt 4.8
    primarykey
    data
    text
    <p>what script looks like <img src="https://i.stack.imgur.com/6gT1N.png" alt="what_it_looks_like"></p> <p>what working app should look like</p> <p><img src="https://i.stack.imgur.com/Da4qe.png" alt="enter image description here"></p> <p>Before posting I have looked at the following question and tried to use it as a guide to make my script work properly but it was of marginal use</p> <p><a href="https://stackoverflow.com/questions/11534293/pyinstaller-wont-load-the-pyqts-images-to-the-gui">PyInstaller won&#39;t load the PyQt&#39;s images to the GUI</a></p> <p>the best it did was include my icons in the resulting directory as follows</p> <p>(icons included image here)</p> <p>and the following one I have no idea what it is even saying but I feel it can solve my problem if I knew what it was actually doing, <a href="https://stackoverflow.com/questions/7674790/bundling-data-files-with-pyinstaller-onefile">Bundling data files with PyInstaller (--onefile)</a> </p> <p>I have rtfm and most of it goes above my head unfortunately. The following section which I think pertains to my question</p> <p><a href="http://www.pyinstaller.org/wiki/Recipe/CollectDatafiles" rel="nofollow noreferrer">http://www.pyinstaller.org/wiki/Recipe/CollectDatafiles</a></p> <p>I have no idea how to actually implemet it in my spec file</p> <p>same goes for the following <a href="http://www.pyinstaller.org/export/v2.0/project/doc/Manual.html?format=raw#accessing-data-files" rel="nofollow noreferrer">http://www.pyinstaller.org/export/v2.0/project/doc/Manual.html?format=raw#accessing-data-files</a></p> <p><img src="https://i.stack.imgur.com/H188a.png" alt="Access Data Files"></p> <p>I have done the following and variations of it including using the -F parameter </p> <p>I converted my mainWindow.ui file using pyside-uic.exe to convert it into mainGui.py file</p> <p>then converted icons.qrc into icons_rc.py using the pyside-rcc.exe to make the conversion</p> <p>(note: I converted the file after putting a copy of the exe originally in the PySide folder into my C:\Python27\Scripts folder which is in my Path so that I can call it from anywhere)</p> <p>I store my icons in the icons folder </p> <p>to make the executable in my console using Pyinstaller I have used the following command to make my spec file</p> <p>C:\Pyinstaller-2.0> python utils\Makespec.py --windowed --name="16TangoTest" C:\Exmake\16MainWindowVideo.py</p> <p>Once spec file is made I cut it from the pyinstaller folder and add it to my Exmake folder</p> <p>then I modify it to include my icons folder using</p> <p>Tree(C:\Exmake\icons), and append it to collect in the line above a.binaries</p> <p>The manual and the first answer above indicate that I have to modify my spec file so that pyinstaller sees / finds my icons as I've done in the picture below <img src="https://i.stack.imgur.com/w3P8R.png" alt="modified_spec"></p> <p>all it did was include my icons in the dist directory with the application still not displaying them as in the 1st picture above</p> <p>Then I make the executable by running the following in the console C:\Pyinstaller-2.0>python pyinstaller.py C:\Exmake\16TangoTest.spec and that makes the folder that you see in the first picture, the icons are included but the folder but not the application when it is run</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload