Skip to content

Commit 8312d6c

Browse files
committed
windows release-ready
1 parent e299e05 commit 8312d6c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# cx_freeze
22
icon.icns
3+
icon.ico
34
build/
45

56
# MNIST

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from cx_Freeze import setup, Executable
55

66
additional_mods = ['numpy.core._methods', 'numpy.lib.format']
7-
include_files = ['src/data/']
7+
include_files = ['src/data/', 'icon.ico']
88

99
base = None
1010
if sys.platform == "win32":
@@ -22,7 +22,7 @@
2222
setup(
2323
name="Digitaizer",
2424
version="1.0",
25-
description="Handwritten Digit Recognition using Neural Network.",
25+
description="Handwritten Digit Recognition using a Neural Network.",
2626
author='Juan Xavier Gomez',
2727
author_email='xendke@gmail.com',
2828
url='https://www.xendke.io/',
@@ -36,5 +36,5 @@
3636
'iconfile': 'icon.icns'
3737
}
3838
},
39-
executables=[Executable("src/main.py", base=base)]
39+
executables=[Executable(script="src/main.py", base=base, icon="icon.ico")]
4040
)

src/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ def __init__(self, parent):
1414
tk.Tk.__init__(self, parent)
1515
self.parent = parent
1616
self.title("digitaizer")
17+
try:
18+
self.iconbitmap(default="icon.ico")
19+
except tk.TclError:
20+
print("icon.ico not found")
1721
self.resizable(0, 0) # prevent resizing
1822
self.after(250, self.center) # center window after window has become visible
1923

0 commit comments

Comments
 (0)