This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
raylib-python-cffi/raylib/static/build_win32.py
2019-05-24 04:31:48 +01:00

17 lines
571 B
Python

# Windows build assumes raylib, OpenGL32, etc are all already installed as system libraries. We dont distribute them.
from cffi import FFI
ffibuilder = FFI()
ffibuilder.cdef(open("../raylib_modified.h").read().replace('RLAPI ', ''))
ffibuilder.set_source("_raylib_cffi",
"""
#include "raylib.h" // THIS MIGHT NEED TO BE CHANGED TO "../raylib.h" IF RAYLIB HEADERS NOT FOUND
""",
extra_link_args=['/NODEFAULTLIB:MSVCRTD'],
libraries=['raylib', 'gdi32', 'shell32', 'user32','OpenGL32', 'winmm'],
)
if __name__ == "__main__":
ffibuilder.compile(verbose=True)