From 09e2cd0903f194308c30e591571a8ce157c1809e Mon Sep 17 00:00:00 2001 From: Samuel Wilder Date: Thu, 23 May 2019 10:35:11 -0400 Subject: [PATCH] Add Windows Build Script Build Raylib from source (master branch) and put `raylib.lib` somewhere on the path. Then run with `python build_win32.py` to build the extension. A prebuilt extension is provided for Win32 x64 Python37. --- raylib/build_win32.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 raylib/build_win32.py diff --git a/raylib/build_win32.py b/raylib/build_win32.py new file mode 100644 index 0000000..3fc9f0a --- /dev/null +++ b/raylib/build_win32.py @@ -0,0 +1,17 @@ +# 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" // the C header of the library + """, + extra_link_args=['/NODEFAULTLIB:MSVCRTD'], + libraries=['raylib', 'gdi32', 'shell32', 'user32','OpenGL32', 'winmm'], +) + + +if __name__ == "__main__": + ffibuilder.compile(verbose=True)