pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Pkgdata rework

Open yunline opened this issue 2 years ago • 0 comments
trafficstars

  • Deprecte getResource() Reasons:
    • pkg_resources lib is out dated.
    • Most of use cases in our c code only need the resource path. Why not return a path directly instead of a file object?
  • Add get_resource_path() Get the pygame resource path by its filename Example:
    >>> get_resource_path("pygame_icon.bmp") 
    'C:\\Users\\yunline\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pygame_ce-2.4.0.dev3-py3.10-win-amd64.egg\\pygame\\pygame_icon.bmp'
    
  • Add load_pygame_icon() Load the default pygame icon
  • Update C code and Python code to use load_pygame_icon() and get_resource_path()
  • All these should work with pyinstaller

yunline avatar Nov 07 '23 02:11 yunline