-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
45 lines (36 loc) · 1.2 KB
/
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
# -*- coding: utf-8 -*-
# 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.
#
# SimpleTkApp.py is a very simple type of Tkinter application
#
# Run the build process by running the command 'python setup.py build'
#
# If everything works well you should find a subdirectory in the build
# subdirectory that contains the files needed to run the application
import sys
import os
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
includeFiles = ['BorderTypeCombination.csv', 'FieldPointsType.csv', 'FieldPointsTypeCombination.csv',
'mySave.pkl', 'arrow-up-double-2.gif', 'arrow-down-double-2.gif', 'colorSettings.pkl']
build_exe_options = {
'include_files': includeFiles
}
executables = [
Executable(targetName='football.exe',
script='main.py',
base=base,
icon='icon.ico')
]
os.environ['TCL_LIBRARY'] = r'tcl86t.dll'
os.environ['TK_LIBRARY'] = r'tk86t.dll'
setup(name='simple_Tkinter',
version='0.1',
description='Sample cx_Freeze Tkinter script',
options = {'build_exe': build_exe_options},
executables=executables
)