xpra icon
Bug tracker and wiki

Ticket #1528: cx-freeze-lib.patch

File cx-freeze-lib.patch, 548 bytes (added by Antoine Martin, 3 years ago)

fix cx_freeze to load libraries from the directory it created

  • cx_Freeze/initscripts/Console.py

    diff --git a/cx_Freeze/initscripts/Console.py b/cx_Freeze/initscripts/Console.py
    index c004f16..3008eea 100755
    a b sys.frozen = True 
    1313FILE_NAME = sys.executable
    1414DIR_NAME = os.path.dirname(sys.executable)
    1515
     16LIB_DIR = os.path.join(DIR_NAME, "lib")
     17if os.path.exists(LIB_DIR) and LIB_DIR not in sys.path:
     18    sys.path.append(LIB_DIR)
     19
    1620os.environ["TCL_LIBRARY"] = os.path.join(DIR_NAME, "tcl")
    1721os.environ["TK_LIBRARY"] = os.path.join(DIR_NAME, "tk")
    1822