- 优化Windows打包

This commit is contained in:
jxxghp 2023-10-10 20:06:52 +08:00
parent 2f0f58783e
commit 85396df221

View File

@ -62,13 +62,12 @@ def start_frontend():
"""
if not SystemUtils.is_frozen():
return
if SystemUtils.is_windows():
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx.exe'
else:
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx'
nginx_path = settings.ROOT_PATH / 'nginx'
nginx = 'nginx.exe' if SystemUtils.is_windows() else 'nginx'
if Path(nginx_path).exists():
import subprocess
subprocess.Popen(f"./{nginx_path}", shell=True)
subprocess.Popen(f"cd {nginx_path}; start {nginx}",
shell=True)
def stop_frontend():