Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Oct 10, 2023
1 parent 5f7d93f commit aa90c5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
New-Item -Path "nginx/temp/__keep__.txt" -ItemType File -Force
New-Item -Path "nginx/logs" -ItemType Directory -Force
New-Item -Path "nginx/logs/__keep__.txt" -ItemType File -Force
Rename-Item -Path "nginx/nginx.exe" -NewName "nginx_mp.exe" -Force
shell: pwsh

- name: Pyinstaller
Expand Down
8 changes: 4 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def start_frontend():
if not SystemUtils.is_frozen():
return
if SystemUtils.is_windows():
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx_mp.exe'
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx.exe'
else:
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx_mp'
nginx_path = settings.ROOT_PATH / 'nginx' / 'nginx'
if Path(nginx_path).exists():
import subprocess
subprocess.Popen(f"start {nginx_path}", shell=True)
Expand All @@ -79,9 +79,9 @@ def stop_frontend():
return
import subprocess
if SystemUtils.is_windows():
subprocess.Popen(f"taskkill /f /im nginx_mp.exe", shell=True)
subprocess.Popen(f"taskkill /f /im nginx.exe", shell=True)
else:
subprocess.Popen(f"killall nginx_mp", shell=True)
subprocess.Popen(f"killall nginx", shell=True)


def start_tray():
Expand Down

0 comments on commit aa90c5d

Please sign in to comment.