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.
Recently, we switched from
PyInstaller
tocx_freeze
on Windows.Some parts of Tribler logic rely on the
is_frozen
function, which checks the presence of thesys._MEIPASS
attribute as a sign that Tribler runs as a binary.Unfortunately,
sys._MEIPASS
is a PyInstaller-only attribute, andcx_freeze
does not set it. As a result, for Tribler binaries on Windows,is_frozen
currently returnsFalse
, which affects some important parts of the logic.The correct logic of
is_frozen
should also check the presence of thesys.frozen
attribute that is set to True incx_freeze
-generated binaries.