Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_frozen() returns the wrong result when the Tribler binary is built with cx_freeze instead of PyInstaller #8000

Closed
kozlovsky opened this issue Apr 24, 2024 · 0 comments
Assignees

Comments

@kozlovsky
Copy link
Contributor

Recently, we switched from PyInstaller to cx_freeze on Windows.

Some parts of Tribler logic rely on the is_frozen function, which checks the presence of the sys._MEIPASS attribute as a sign that Tribler runs as a binary.

Unfortunately, sys._MEIPASS is a PyInstaller-only attribute, and cx_freeze does not set it. As a result, for Tribler binaries on Windows, is_frozen currently returns False, which affects some important parts of the logic.

The correct logic of is_frozen should also check the presence of the sys.frozen attribute that is set to True in cx_freeze-generated binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant