dangerzone/setup-windows.py
Alex Pyrgiotis f0bb65cb4e
Bypass a cx-freeze issue for fitz._wxcolors
Bypass an issue with `cx-freeze` that fails to include the
`fitz._wxcolors` module in the final Windows artifact.

Refs #1128
2025-04-08 16:34:34 +03:00

32 lines
968 B
Python

#!/usr/bin/env python3
from cx_Freeze import Executable, setup
with open("share/version.txt") as f:
version = f.read().strip()
setup(
name="dangerzone",
version=version,
# On Windows description will show as the app's name in the "Open With" menu. See:
# https://github.com/freedomofpress/dangerzone/issues/283#issuecomment-1365148805
description="Dangerzone",
options={
"build_exe": {
"packages": ["dangerzone", "dangerzone.gui", "pymupdf._wxcolors"],
"excludes": ["test", "tkinter"],
"include_files": [("share", "share"), ("LICENSE", "LICENSE")],
"include_msvcr": True,
}
},
executables=[
Executable(
"install/windows/dangerzone.py",
base="Win32GUI",
icon="share/dangerzone.ico",
),
Executable(
"install/windows/dangerzone-cli.py", base=None, icon="share/dangerzone.ico"
),
],
)