diff --git a/package.json b/package.json index c15471e5..184d5c9a 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,10 @@ "vite-preview": "vite preview", "tauri": "tauri", "tauri-dev": "tauri dev", + "task-kill": "python task_kill.py", "clean": "python clean.py", - "dev": "npm run build-python && npm run dev-ui", - "dev-cuda": "npm run build-python-cuda && npm run dev-ui", + "dev": "npm run task-kill && npm run build-python && npm run dev-ui", + "dev-cuda": "npm run task-kill && npm run build-python-cuda && npm run dev-ui", "dev-ui": "npm-run-all --parallel vite tauri-dev", "build": "npm run clean && npm run build-python && npm run vite-build && npm run tauri build", "build-cuda": "npm run clean && npm run build-python-cuda && npm run vite-build && npm run tauri build", diff --git a/task_kill.py b/task_kill.py new file mode 100644 index 00000000..ee869511 --- /dev/null +++ b/task_kill.py @@ -0,0 +1,12 @@ +import subprocess + +# VRCT-sidecar.exe を強制終了 +try: + subprocess.run( + ["taskkill", "/IM", "VRCT-sidecar.exe", "/F"], + check=False, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL + ) +except Exception: + pass \ No newline at end of file