Skip to content
Unverified Commit 25c61165 authored by hyrulelinks's avatar hyrulelinks Committed by GitHub
Browse files

Update launch.py

Add runtime environment check - execute `prepare_environment()` if running from source code, skip it if running from a pyinstaller packaged app.

- Check if sys.frozen attribute exists to determine if it's a packaged app or source code execution
- Use getattr(sys, 'frozen', False) to check for this attribute
- Inside prepare_environment(), return early if running as a packaged app
- Otherwise execute the dependency installation logic as usual
- This avoids failing pip installs and retries when running the packaged app
- Keeps the prepare_environment() logic unchanged for source code execution
- Print log message when skipping to indicate it's running as an app
parent 4538a470
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment