Added Program Icon

This commit is contained in:
Fredrick W. Warren 2024-05-24 15:08:52 -07:00
parent d515b2a031
commit e5a9a5bce3
3 changed files with 47 additions and 51 deletions

View File

@ -5,7 +5,6 @@ from pathlib import Path
from PIL import Image, ImageDraw, ImageEnhance, ImageFilter, ImageFont, ImageOps from PIL import Image, ImageDraw, ImageEnhance, ImageFilter, ImageFont, ImageOps
from io import BytesIO from io import BytesIO
def resource_path(relative_path): def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """ """ Get absolute path to resource, works for dev and for PyInstaller """
try: try:
@ -108,9 +107,10 @@ def main():
original = Image.open(image_path) original = Image.open(image_path)
image = update_image(original, title, subtitle) image = update_image(original, title, subtitle)
thumbnail = update_thumbnail(image) thumbnail = update_thumbnail(image)
icon_file=resource_path('projector.ico')
layout = build_layout(title, subtitle, thumbnail) layout = build_layout(title, subtitle, thumbnail)
window = sg.Window('Harvest Christian Assembly Message Title', layout) window = sg.Window('Harvest Christian Assembly Message Title', layout, icon=icon_file)
# image contains the final image # image contains the final image
while True: while True:

View File

@ -1,48 +1,44 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
block_cipher = None a = Analysis(
['hcatitles.py'],
pathex=[],
a = Analysis( binaries=[],
['hcatitles.py'], datas=[
pathex=[], ('blank_title.png','.'),
binaries=[], ('tahoma.ttf','.'),
datas=[ ('tahomabd.ttf','.'),
('blank_title.png','.'), ('projector.ico','.'),
('tahoma.ttf','.'), ],
('tahomabd.ttf','.'), hiddenimports=[],
], hookspath=[],
hiddenimports=[], hooksconfig={},
hookspath=[], runtime_hooks=[],
hooksconfig={}, excludes=[],
runtime_hooks=[], noarchive=False,
excludes=[], optimize=0,
win_no_prefer_redirects=False, )
win_private_assemblies=False, pyz = PYZ(a.pure)
cipher=block_cipher,
noarchive=False, exe = EXE(
) pyz,
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) a.scripts,
a.binaries,
exe = EXE( a.datas,
pyz, [],
a.scripts, name='hcatitles',
a.binaries, debug=False,
a.zipfiles, bootloader_ignore_signals=False,
a.datas, strip=False,
[], upx=True,
name='hcatitles', upx_exclude=[],
debug=False, runtime_tmpdir=None,
bootloader_ignore_signals=False, console=False,
strip=False, disable_windowed_traceback=False,
upx=True, argv_emulation=False,
upx_exclude=[], target_arch=None,
runtime_tmpdir=None, codesign_identity=None,
console=False, entitlements_file=None,
disable_windowed_traceback=False, icon=['projector.ico'],
argv_emulation=False, )
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

BIN
projector.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB