Skip to content

Commit eb65c56

Browse files
committed
Added setup.py to build an .exe using cx_freeze
Installed cx_freeze with a patch from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_freeze Regarding this issue: https://groups.google.com/forum/#!msg/comp.lang.python/Ubagx7NDtJE/_47ZP2Uj-BUJ
1 parent a5a6a91 commit eb65c56

File tree

2 files changed

+67
-24
lines changed

2 files changed

+67
-24
lines changed

.gitignore

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
1-
# Windows image file caches
2-
Thumbs.db
3-
ehthumbs.db
4-
5-
# Folder config file
6-
Desktop.ini
7-
8-
# Recycle Bin used on file shares
9-
$RECYCLE.BIN/
10-
11-
# Windows Installer files
12-
*.cab
13-
*.msi
14-
*.msm
15-
*.msp
16-
17-
# =========================
18-
# Operating System Files
19-
# =========================
20-
21-
# OSX
22-
# =========================
23-
1+
#cx_freeze
2+
build/
3+
dist/
4+
5+
# Windows image file caches
6+
Thumbs.db
7+
ehthumbs.db
8+
9+
# Folder config file
10+
Desktop.ini
11+
12+
# Recycle Bin used on file shares
13+
$RECYCLE.BIN/
14+
15+
# Windows Installer files
16+
*.cab
17+
*.msi
18+
*.msm
19+
*.msp
20+
21+
# =========================
22+
# Operating System Files
23+
# =========================
24+
25+
# OSX
26+
# =========================
27+
2428
.DS_Store
2529
.AppleDouble
2630
.LSOverride
2731

2832
# Icon must ends with two \r.
29-
Icon
33+
Icon
34+
3035

3136
# Thumbnails
3237
._*

setup.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import sys
2+
from cx_Freeze import setup, Executable
3+
4+
# Dependencies are automatically detected, but it might need
5+
# fine tuning.
6+
copyfiles = [
7+
('C:\Python34\Lib\site-packages\PyQt5\libEGL.dll', 'libEGL.dll')]
8+
buildOptions = dict(packages=[], excludes=[], include_files=copyfiles)
9+
10+
# GUI applications require a different base on Windows (the default is for a
11+
# console application).
12+
base = None
13+
if sys.platform == "win32":
14+
base = "Win32GUI"
15+
16+
executables = [
17+
Executable(
18+
'TardisDiff.py',
19+
base=base,
20+
shortcutName="TardisDiff",
21+
shortcutDir="DesktopFolder",
22+
#icon="tardis.ico" Google for a fancy tardis icon until I've made one myself.
23+
)
24+
]
25+
26+
options = {
27+
'build_exe': {
28+
'include_files': [],
29+
'path': sys.path + ['modules']
30+
}
31+
}
32+
33+
setup(name='TardisDiff',
34+
version='0.1',
35+
description='TardisDiff is a tool to output the time you worked today.',
36+
options=dict(build_exe=buildOptions),
37+
executables=executables
38+
)

0 commit comments

Comments
 (0)