'Images not shown when an executable is run from a launcher

I used pyinstaller to create an executable for the linux environment. If I run it from the terminal (commandline) in addition to working correctly I also see all the images that are recalled by the various scripts. But when I run it from a launcher (Adeskbar) I only see the text part but not the images Also, in addition to jpg images there are also png images, but I don't know how to insert them on []. Below is my .spec file

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['index.py'],
             pathex=['/opt/myprogram'],
             binaries=[],
             datas=[('/opt/myprogram/*.jpg', '.'),],
             hiddenimports=['sip'],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [],
          name='index',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          upx_exclude=[],
          runtime_tmpdir=None,
          console=False )

and this is the batch for pyinstaller

#! /bin/sh
pyinstaller --onefile --windowed --hidden-import=sip index.spec

I tried with --onedir but nothing



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source