-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
84 lines (71 loc) · 2.35 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# coding=utf-8
import sys
import json
import os
from cx_Freeze import setup, Executable
# --- for resolving KeyError: 'TCL_LIBRARY' ---
import os.path
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')
# ------
name = "s2speak"
version = "0.5"
description = 'Offline Speech Synthesis'
author = 'Hiroaki Kawashima'
url ='https://github.com/memakura/s2speak'
# 変更しない
upgrade_code = '{91FA8218-8094-4AF4-875E-4CBF25CF01AD}'
# ----------------------------------------------------------------
# セットアップ
# ----------------------------------------------------------------
shortcut_table = [
("DesktopShortcut", # Shortcut
"DesktopFolder", # Directory_
"s2speak", # Name
"TARGETDIR", # Component_
"[TARGETDIR]s2speak.exe",# Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
"TARGETDIR", # WkDir
)
]
# Now create the table dictionary
msi_data = {"Shortcut": shortcut_table}
build_exe_options = {"packages": ['asyncio', 'idna'],
"excludes": [],
"includes": [],
"include_files": ['jtalk/','htsvoices/','images/','00scratch/', 'ThirdPartyLicenses.txt']
}
# "compressed": True
bdist_msi_options = {'upgrade_code': upgrade_code,
'add_to_path': False,
'data': msi_data
}
options = {
'build_exe': build_exe_options,
'bdist_msi': bdist_msi_options
}
# exeの情報
base = None #'Win32GUI' if sys.platform == 'win32' else None
icon = 'images/icon_256x256.ico'
# exe にしたい python ファイルを指定
exe = Executable(script='s2speak.py',
targetName='s2speak.exe',
base=base,
icon=icon
)
# copyDependentFiles = True
# セットアップ
setup(name=name,
version=version,
author=author,
url=url,
description=description,
options=options,
executables=[exe]
)