try adding icon to the EXE

On Tuesday, 8 March 2022 at 17:00:51 UTC+8 [email protected] wrote:

> I see this issue discussed elsewhere, but various suggestions haven't 
> helped me. 
>
> I have a working script that I've successfully converted to a windows .exe.
>
> Because I'll eventually need to add many hidden imports and data files, 
> I'm using a spec file, which is as follows. However, for simplicity, I'll 
> provide a stripped down version with nothing added:
>
> block_cipher = None
> a = Analysis(['my_script.py'],
>              pathex=[],
>              binaries=[],
>              datas=[],
>              hiddenimports=[],
>              hookspath=[],
>              hooksconfig={},
>              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='my_script',
>           debug=False,
>           bootloader_ignore_signals=False,
>           strip=False,
>           upx=True,
>           upx_exclude=[],
>           runtime_tmpdir=None,
>           console=False,
>           disable_windowed_traceback=False,
>           target_arch=None,
>           codesign_identity=None,
>           entitlements_file=None )
>
> app = BUNDLE(name='my_script.exe',icon=
> C:\Users\MyName\Desktop\my_icon.ico',bundle_identifier=None,
> info_plist={
>         'LSEnvironment': {
>             'LANG': 'de_DE.UTF-8',
>             'LC_CTYPE': 'de_DE.UTF-8'
>         }})
>
> For some reason, I'm only getting the pyinstaller default icon. 
>
> Suggestions?
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/de720b45-752a-4f1c-9e07-0697bcf84ca6n%40googlegroups.com.

Reply via email to