disable native mode for frozen builds to avoid pythonnet loader issues

This commit is contained in:
Ross
2025-11-24 12:40:01 +00:00
parent 5f2bcb81a4
commit f0f50381ec
+9
View File
@@ -715,6 +715,15 @@ def launch_app(
logger.debug(f"Work dir: {WORK_DIR}")
# When running as a frozen executable, the native/webview backend
# (which depends on pythonnet) can fail to load inside the bundled
# runtime. Disable native mode automatically for frozen builds so the
# app falls back to launching in the browser and remains usable.
if getattr(sys, "frozen", False):
if native_mode:
logger.debug("Running frozen executable: disabling native mode to avoid pythonnet loader issues")
native_mode = False
if nng:
socket_error = False
try: