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,9 +1,6 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis( a = Analysis(
['hcatitles.py'], ['hcatitles.py'],
pathex=[], pathex=[],
@ -12,24 +9,22 @@ a = Analysis(
('blank_title.png','.'), ('blank_title.png','.'),
('tahoma.ttf','.'), ('tahoma.ttf','.'),
('tahomabd.ttf','.'), ('tahomabd.ttf','.'),
('projector.ico','.'),
], ],
hiddenimports=[], hiddenimports=[],
hookspath=[], hookspath=[],
hooksconfig={}, hooksconfig={},
runtime_hooks=[], runtime_hooks=[],
excludes=[], excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False, noarchive=False,
optimize=0,
) )
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) pyz = PYZ(a.pure)
exe = EXE( exe = EXE(
pyz, pyz,
a.scripts, a.scripts,
a.binaries, a.binaries,
a.zipfiles,
a.datas, a.datas,
[], [],
name='hcatitles', name='hcatitles',
@ -45,4 +40,5 @@ exe = EXE(
target_arch=None, target_arch=None,
codesign_identity=None, codesign_identity=None,
entitlements_file=None, entitlements_file=None,
icon=['projector.ico'],
) )

BIN
projector.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB