@mytec: WebGL works

This commit is contained in:
2026-02-06 22:17:24 +02:00
parent 81e078e92a
commit acfd9b8f7b
31 changed files with 4427 additions and 156 deletions

View File

@@ -29,7 +29,23 @@ if getattr(sys, 'frozen', False):
print(f"[RFCP] Frozen mode, base dir: {base_dir}", flush=True)
# Fix uvicorn TTY detection — redirect None streams to a log file
log_path = os.path.join(base_dir, 'rfcp-server.log')
# Use RFCP_LOG_PATH from Electron, or fallback to user-writable location
log_dir = os.environ.get('RFCP_LOG_PATH')
if not log_dir:
if sys.platform == 'win32':
appdata = os.environ.get('APPDATA', os.path.expanduser('~'))
log_dir = os.path.join(appdata, 'rfcp-desktop', 'logs')
else:
log_dir = os.path.join(os.path.expanduser('~'), '.rfcp', 'logs')
try:
os.makedirs(log_dir, exist_ok=True)
log_path = os.path.join(log_dir, 'rfcp-server.log')
except Exception:
# Fallback to temp directory if all else fails
import tempfile
log_path = os.path.join(tempfile.gettempdir(), 'rfcp-server.log')
log_file = open(log_path, 'w')
if sys.stdout is None:
sys.stdout = log_file