diff --git a/.gitignore b/.gitignore index c97b27b..cd21daa 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,17 @@ backend/venv/ backend/data/ .claude/ CLAUDE.md + +# Desktop build artifacts +desktop/backend-dist/ +desktop/dist/ +desktop/node_modules/ + +# Installer build artifacts +installer/build/ +installer/dist/ + +# PyInstaller +*.spec.bak +__pycache__/ +*.pyc diff --git a/backend/run_server.py b/backend/run_server.py index 8074d90..1c156b4 100644 --- a/backend/run_server.py +++ b/backend/run_server.py @@ -4,8 +4,14 @@ import sys # Set base path for PyInstaller if getattr(sys, 'frozen', False): - # Running as compiled os.chdir(os.path.dirname(sys.executable)) + # Fix uvicorn TTY detection — sys.stdin/stdout/stderr are None when frozen + if sys.stdin is None: + sys.stdin = open(os.devnull, 'r') + if sys.stdout is None: + sys.stdout = open(os.devnull, 'w') + if sys.stderr is None: + sys.stderr = open(os.devnull, 'w') import uvicorn from app.main import app @@ -18,5 +24,6 @@ if __name__ == '__main__': app, host=host, port=port, - log_level='info', + log_level='warning', + access_log=False, )