forked from Gaoyongxian666/CountBoard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cx_setup.py
50 lines (43 loc) · 1.29 KB
/
cx_setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Based on https://github.com/marcelotduarte/cx_Freeze/blob/main/cx_Freeze/samples/Tkinter/setup.py
#
# A simple setup script to create an executable using Tkinter. This also
# demonstrates the method for creating a Windows executable that does not have
# an associated console.
import sys
from cx_Freeze import setup, Executable
from pathlib import Path
icon_path = Path('favicon.ico')
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [Executable("Main_window.py", base=base)]
options = {
'build_exe': {
'include_files': [
icon_path
], # additional plugins needed by qt at runtime
'zip_include_packages': [
'encodings',
'markdown2',
'PIL',
'sqlitedict',
'tkhtmlview'
], # reduce size of packages that are used
'excludes': [
'unittest',
'pydoc',
'pdb'
]
}
}
setup(
name="CountBoard",
version="1.1.0.2",
description="CountBoard 是一个基于 Tkinter 简单的,开源的桌面日程倒计时应用。",
executables=executables,
options=options
)
# Use cx-freeze package to freeze application.
#
# pip install cx-freeze
# Use python cx_setup.py bdist_msi command to create windows msi install file.