diff --git a/hcatitles.py b/hcatitles.py index 2ebf63f..98c335b 100644 --- a/hcatitles.py +++ b/hcatitles.py @@ -5,7 +5,6 @@ from pathlib import Path from PIL import Image, ImageDraw, ImageEnhance, ImageFilter, ImageFont, ImageOps from io import BytesIO - def resource_path(relative_path): """ Get absolute path to resource, works for dev and for PyInstaller """ try: @@ -108,9 +107,10 @@ def main(): original = Image.open(image_path) image = update_image(original, title, subtitle) thumbnail = update_thumbnail(image) - + icon_file=resource_path('projector.ico') + 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 while True: diff --git a/hcatitles.spec b/hcatitles.spec index 5e6680a..de66232 100755 --- a/hcatitles.spec +++ b/hcatitles.spec @@ -1,48 +1,44 @@ -# -*- mode: python ; coding: utf-8 -*- - - -block_cipher = None - - -a = Analysis( - ['hcatitles.py'], - pathex=[], - binaries=[], - datas=[ - ('blank_title.png','.'), - ('tahoma.ttf','.'), - ('tahomabd.ttf','.'), - ], - 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='hcatitles', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, -) +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['hcatitles.py'], + pathex=[], + binaries=[], + datas=[ + ('blank_title.png','.'), + ('tahoma.ttf','.'), + ('tahomabd.ttf','.'), + ('projector.ico','.'), + ], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='hcatitles', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=['projector.ico'], +) diff --git a/projector.ico b/projector.ico new file mode 100755 index 0000000..66e8104 Binary files /dev/null and b/projector.ico differ