- 优化Windows打包
This commit is contained in:
parent
2f0f58783e
commit
85396df221
@ -62,13 +62,12 @@ def start_frontend():
|
|||||||
"""
|
"""
|
||||||
if not SystemUtils.is_frozen():
|
if not SystemUtils.is_frozen():
|
||||||
return
|
return
|
||||||
if SystemUtils.is_windows():
|
nginx_path = settings.ROOT_PATH / 'nginx'
|
||||||
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx.exe'
|
nginx = 'nginx.exe' if SystemUtils.is_windows() else 'nginx'
|
||||||
else:
|
|
||||||
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx'
|
|
||||||
if Path(nginx_path).exists():
|
if Path(nginx_path).exists():
|
||||||
import subprocess
|
import subprocess
|
||||||
subprocess.Popen(f"./{nginx_path}", shell=True)
|
subprocess.Popen(f"cd {nginx_path}; start {nginx}",
|
||||||
|
shell=True)
|
||||||
|
|
||||||
|
|
||||||
def stop_frontend():
|
def stop_frontend():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user