import os
import sys
import ctypes

def check_dependencies():
    print("Python executable:", sys.executable)
    print("Python version:", sys.version)
    print("\nChecking installed packages:")
    try:
        import fuse
        print("fusepy: Installed")
    except ImportError:
        print("fusepy: Not installed")

    try:
        from PIL import Image
        print("Pillow: Installed")
    except ImportError:
        print("Pillow: Not installed")

    try:
        import numpy
        print(f"numpy: Installed (version {numpy.__version__})")
    except ImportError:
        print("numpy: Not installed")

    print("\nChecking WinFSP DLL:")
    dll_path = r"C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll"
    if os.path.exists(dll_path):
        try:
            ctypes.CDLL(dll_path)
            print(f"WinFSP DLL loaded successfully: {dll_path}")
        except OSError as e:
            print(f"Failed to load WinFSP DLL: {e}")
    else:
        print(f"WinFSP DLL not found at: {dll_path}")

if __name__ == "__main__":
    check_dependencies()
