Skip to content

Commit

Permalink
Added icon
Browse files Browse the repository at this point in the history
- Added .ico for the application file
- Added .png for the window because I couldn't get .ico to work
- Added the pyinstaller_build.sh script to the repository
  • Loading branch information
thelabcat committed Apr 24, 2024
1 parent cd42785 commit b91bb5e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Binary file added bookworm_wordlist_editor.ico
Binary file not shown.
Binary file added bookworm_wordlist_editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions bookworm_wordlist_editor.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import platform
import sys
import time #For debug

OP_PATH = __file__[:__file__.rfind(os.sep)] #The path of the script file
ICON_PATH = OP_PATH + os.sep + "bookworm_wordlist_editor.png"

NO_WORD="(no word selected)"
DEFFIELD_SIZE=(15, 5)

Expand Down Expand Up @@ -58,6 +61,8 @@ class Editor(Tk):
def build(self):
"""Construct GUI"""

self.iconphoto(True, PhotoImage(file = ICON_PATH)) #Set the window icon

self.bind("<Control-s>", self.save_files)

#Menubar
Expand Down
3 changes: 3 additions & 0 deletions pyinstaller_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pyinstaller -F --icon=bookworm_wordlist_editor.ico --add-data bookworm_wordlist_editor.png:. bookworm_wordlist_editor.pyw
rm -rf build
rm bookworm_wordlist_editor.spec

0 comments on commit b91bb5e

Please sign in to comment.