Skip to content

Commit a84e58e

Browse files
committed
Create binaries for windows
this scripts allows to create binaries for and msi packages for windows (need testing on a system without the libraries)
1 parent 50259e4 commit a84e58e

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.pyc
2+
build/
3+
dist/

build.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python setup.py build
2+
python setup.py bdist_msi

icon.ico

67.1 KB
Binary file not shown.

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 fine tuning.
5+
6+
build_exe_options = {
7+
"packages": ["os"],
8+
"excludes": ["Tkinter", "Tk", "Tcl"],
9+
"include_files": ["icon.ico", "nvdxt.exe", "LICENSE", "README.md", "geovent.bmp"]
10+
}
11+
12+
# GUI applications require a different base on Windows
13+
# (the default is for a console application).
14+
15+
base = None
16+
17+
if sys.platform == "win32":
18+
base = "Win32GUI"
19+
20+
target = Executable( script="pymapconv.py",
21+
base=base,
22+
targetName="pyMapConv.exe",
23+
compress=False,
24+
copyDependentFiles=True,
25+
appendScriptToExe=True,
26+
appendScriptToLibrary=False,
27+
icon="icon.ico",
28+
shortcutName="SMF compiler/decompiler",
29+
shortcutDir="DesktopFolder",
30+
)
31+
32+
setup( name = "pyMapConv",
33+
version = "0.1",
34+
author="Beherith ([email protected])",
35+
description = "SMF compiler/decompiler",
36+
options = {"build_exe": build_exe_options},
37+
executables = [target]
38+
)

0 commit comments

Comments
 (0)