diff --git a/.gitignore b/.gitignore index 08457f2..4266a10 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ #use glob syntax syntax: glob +__pycache__ *.pyc build/* *.egg-info diff --git a/hippolyzer/apps/proxy.py b/hippolyzer/apps/proxy.py index 3c5e127..c9d4924 100644 --- a/hippolyzer/apps/proxy.py +++ b/hippolyzer/apps/proxy.py @@ -186,3 +186,8 @@ def _windows_timeout_killer(pid: int): def main(): multiprocessing.set_start_method("spawn") start_proxy() + + +if __name__ == "__main__": + multiprocessing.freeze_support() + main() diff --git a/hippolyzer/apps/proxy_gui.py b/hippolyzer/apps/proxy_gui.py index 4eff290..7fd1248 100644 --- a/hippolyzer/apps/proxy_gui.py +++ b/hippolyzer/apps/proxy_gui.py @@ -802,3 +802,8 @@ def gui_main(): extra_addon_paths=window.getAddonList(), proxy_host=http_host, ) + + +if __name__ == "__main__": + multiprocessing.freeze_support() + gui_main() diff --git a/setup_cxfreeze.py b/setup_cxfreeze.py new file mode 100644 index 0000000..1861b99 --- /dev/null +++ b/setup_cxfreeze.py @@ -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, +)