forked from roxana-lafuente/ResearchLogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
66 lines (58 loc) · 1.94 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
# A very simple setup script to create an executable.
#
# Run the build process by entering 'setup.py py2exe' or
# 'python setup.py py2exe' in a console prompt.
#
# If everything works well, you should find a subdirectory named 'dist'
# containing some files, among them keylogger.exe and keylogger_debug.exe.
from distutils.core import setup
import sys
if len(sys.argv) > 1 and sys.argv[1] == 'py2exe':
import py2exe
import version
setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
name=version.name,
version=version.version,
description=version.description,
url=version.url,
license=version.license,
author=version.author,
author_email=version.author_email,
platforms=[version.platform],
# The following doesn't work - for some reason bundling everything into one
# exe causes the program to crash out on start.
# ~ options = {'py2exe': {'bundle_files': 1}},
# ~ zipfile = None,
data_files=[("", [version.name + ".ini",
version.name + ".val",
version.name + "icon.ico",
version.name + "icon.svg",
version.name + "icon_big.gif",
"doc/CHANGELOG.TXT",
"doc/LICENSE.txt",
"doc/README.txt",
"doc/TODO.txt"])],
# targets to build
console=[
{
"script": "keylogger.pyw",
"dest_base": version.name+"_debug",
"icon_resources": [(0, version.name+"icon.ico")]
}
],
windows=[
{
"script": "keylogger.pyw",
"dest_base": version.name,
"icon_resources": [(0, version.name+"icon.ico")]
}
],
options={
"py2exe": {
"excludes": ["gtk"] # don't need this under windows
}
}
)