WIP cx_Freeze support

This commit is contained in:
Salad Dais
2021-05-03 17:28:42 +00:00
parent aedc2bf48c
commit 1b0272f3b3
4 changed files with 44 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
#use glob syntax #use glob syntax
syntax: glob syntax: glob
__pycache__
*.pyc *.pyc
build/* build/*
*.egg-info *.egg-info

View File

@@ -186,3 +186,8 @@ def _windows_timeout_killer(pid: int):
def main(): def main():
multiprocessing.set_start_method("spawn") multiprocessing.set_start_method("spawn")
start_proxy() start_proxy()
if __name__ == "__main__":
multiprocessing.freeze_support()
main()

View File

@@ -802,3 +802,8 @@ def gui_main():
extra_addon_paths=window.getAddonList(), extra_addon_paths=window.getAddonList(),
proxy_host=http_host, proxy_host=http_host,
) )
if __name__ == "__main__":
multiprocessing.freeze_support()
gui_main()

33
setup_cxfreeze.py Normal file
View File

@@ -0,0 +1,33 @@
import sys
from cx_Freeze import setup, Executable
options = {
"build_exe": {
"packages": [
"passlib",
"_cffi_backend",
"hippolyzer",
],
# exclude packages that are not really needed
"excludes": [
"tkinter",
]
}
}
executables = [
Executable(
"hippolyzer/apps/proxy_gui.py",
base=None,
target_name="hippolyzer_gui"
),
]
setup(
name="hippolyzer_gui",
version="0.1",
description="Hippolyzer GUI",
options=options,
executables=executables,
)