Skip to content

Commit e939304

Browse files
committed
Hotfix: Fix PyInstaller stability and freeze_support (v1.1.9)
1 parent 3257000 commit e939304

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build Backend with PyInstaller
5656
run: |
5757
cd backend
58-
pyinstaller --onefile --noconsole api_server.py
58+
pyinstaller --onefile --noconsole --collect-all uvicorn --collect-all fastapi api_server.py
5959
# Move binary to backend root so it's picked up by extraResources
6060
if [ "${{ matrix.os }}" = "windows-latest" ]; then
6161
mv dist/api_server.exe .

backend/api_server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import collections
3+
import multiprocessing
34
import threading
45
from fastapi import FastAPI, WebSocket, WebSocketDisconnect, HTTPException, Request, Query
56
from fastapi.middleware.cors import CORSMiddleware
@@ -1942,6 +1943,7 @@ def get_running_servers():
19421943

19431944

19441945
if __name__ == "__main__":
1946+
multiprocessing.freeze_support()
19451947
import uvicorn
19461948
import argparse
19471949
parser = argparse.ArgumentParser()

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- **Fixed backend restart loop on Windows** — Watchdog now correctly monitors the Electron process using a passed PID, preventing premature restarts during installations.
1717
- **Improved Java version mapping** — Version detection now correctly maps high-version servers (NeoForge/NeoMinecraft 26.x+) to **Java 25**.
1818
- **Fixed Startup Scripts (run.bat/run.sh)** — Implemented **Environment Injection** (JAVA_HOME & PATH) to force startup scripts to use the app's managed Java version instead of the system default.
19+
- **Fixed Portable Executable Stability** — Added `freeze_support()` and improved PyInstaller bundling to prevent the backend from crashing when running from the GitHub-generated `.exe`.
1920
- **Robust Forge version handling** — Versions like "26.1.1" now correctly trigger the Java 25 requirement.
2021

2122
### 🔧 IMPROVEMENTS:

0 commit comments

Comments
 (0)