sdl = [ 'SDL2', 'GLESv2', 'log' ] png = 'png16' else: sdl = [ 'SDL2' ] png = 'png' steam_sdk = os.environ.get("RENPY_STEAM_SDK", None) steam_platform = os.environ.get("RENPY_STEAM_PLATFORM", "") if steam_sdk: setuplib.library_dirs.append("{}/redistributable_bin/{}".format(steam_sdk, steam_platform)) setuplib.include_dirs.append("{}/public".format(steam_sdk)) # Modules directory. cython( "_renpy", [ "IMG_savepng.c", "core.c", "subpixel.c"], sdl + [ png, 'z', 'm' ]) FRIBIDI_SOURCES = """ fribidi-src/lib/fribidi.c fribidi-src/lib/fribidi-arabic.c fribidi-src/lib/fribidi-bidi.c fribidi-src/lib/fribidi-bidi-types.c fribidi-src/lib/fribidi-deprecated.c fribidi-src/lib/fribidi-joining.c fribidi-src/lib/fribidi-joining-types.c fribidi-src/lib/fribidi-mem.c fribidi-src/lib/fribidi-mirroring.c fribidi-src/lib/fribidi-run.c fribidi-src/lib/fribidi-shape.c renpybidicore.c
def anglecython(name, source=[]): cython(name, libs=angle_libs, compile_if=has_angle, define_macros=[ ( "ANGLE", None ) ], source=source)
# our path. glib_flags = subprocess.check_output(["pkg-config", "--cflags", "glib-2.0"]) setuplib.extra_compile_args.extend(glib_flags.split()) except: pass steam_sdk = os.environ.get("RENPY_STEAM_SDK", None) steam_platform = os.environ.get("RENPY_STEAM_PLATFORM", "") if steam_sdk: setuplib.library_dirs.append("{}/redistributable_bin/{}".format(steam_sdk, steam_platform)) setuplib.include_dirs.append("{}/public".format(steam_sdk)) # Modules directory. cython( "_renpy", [ "IMG_savepng.c", "core.c", "subpixel.c"], sdl + [ png, 'z', 'm' ]) if has_fribidi and not android: cython( "_renpybidi", [ "renpybidicore.c" ], ['fribidi'], define_macros=[ ("FRIBIDI_ENTRY", "") ]) cython("_renpysteam", language="c++", compile_if=steam_sdk, libs=["steam_api"]) # Sound. pymodule("pysdlsound.__init__") sound = [ "avformat", "avcodec", "avutil", "z" ] macros = [ ]
sdl = [ 'sdl2', 'GLESv2', 'log' ] else: sdl = [ 'SDL2' ] if has_fribidi: try: # Some versions of fribidi require glib, and it doesn't hurt to include it in # our path. glib_flags = subprocess.check_output(["pkg-config", "--cflags", "glib-2.0"]) setuplib.extra_compile_args.extend(glib_flags.split()) except: pass # Modules directory. cython( "_renpy", [ "IMG_savepng.c", "core.c", "subpixel.c"], sdl + [ 'png', 'z', 'm' ]) if has_fribidi and not android: cython( "_renpybidi", [ "renpybidicore.c" ], ['fribidi'], define_macros=[ ("FRIBIDI_ENTRY", "") ]) # Sound. pymodule("pysdlsound.__init__") if not android: sound = [ "avformat", "avcodec", "avutil", "z" ] macros = [ ]
if android: sdl_libs = [ 'SDL2' ] else: parse_cflags([ "sh", "-c", "sdl2-config --cflags" ]) sdl_libs = parse_libs([ "sh", "-c", "sdl2-config --libs" ]) pymodule("pygame_sdl2.__init__") pymodule("pygame_sdl2.compat") pymodule("pygame_sdl2.threads.__init__") pymodule("pygame_sdl2.threads.Py25Queue") pymodule("pygame_sdl2.sprite") pymodule("pygame_sdl2.sysfont") pymodule("pygame_sdl2.version") cython("pygame_sdl2.error", libs=sdl_libs) cython("pygame_sdl2.color", libs=sdl_libs) cython("pygame_sdl2.rect", libs=sdl_libs) cython("pygame_sdl2.rwobject", libs=sdl_libs) cython("pygame_sdl2.surface", libs=sdl_libs) cython("pygame_sdl2.display", libs=sdl_libs) cython("pygame_sdl2.event", libs=sdl_libs) cython("pygame_sdl2.locals", libs=sdl_libs) cython("pygame_sdl2.key", libs=sdl_libs) cython("pygame_sdl2.mouse", libs=sdl_libs) cython("pygame_sdl2.joystick", libs=sdl_libs) cython("pygame_sdl2.time", libs=sdl_libs) cython("pygame_sdl2.image", libs=['SDL2_image'] + sdl_libs) cython("pygame_sdl2.transform", libs=['SDL2_gfx'] + sdl_libs) cython("pygame_sdl2.gfxdraw", libs=['SDL2_gfx'] + sdl_libs) cython("pygame_sdl2.draw", libs=sdl_libs)
if android: png = "png16" else: png = "png" pymodule("pygame_sdl2.__init__") pymodule("pygame_sdl2.compat") pymodule("pygame_sdl2.threads.__init__") pymodule("pygame_sdl2.threads.Py25Queue") pymodule("pygame_sdl2.sprite") pymodule("pygame_sdl2.sysfont") pymodule("pygame_sdl2.time") pymodule("pygame_sdl2.version") cython("pygame_sdl2.error", libs=sdl_libs) cython("pygame_sdl2.color", libs=sdl_libs) cython("pygame_sdl2.controller", libs=sdl_libs) cython("pygame_sdl2.rect", libs=sdl_libs) cython("pygame_sdl2.rwobject", libs=sdl_libs) cython("pygame_sdl2.surface", source=["src/alphablit.c"], libs=sdl_libs) cython("pygame_sdl2.display", libs=sdl_libs) cython("pygame_sdl2.event", libs=sdl_libs) cython("pygame_sdl2.locals", libs=sdl_libs) cython("pygame_sdl2.key", libs=sdl_libs) cython("pygame_sdl2.mouse", libs=sdl_libs) cython("pygame_sdl2.joystick", libs=sdl_libs) cython("pygame_sdl2.pygame_time", libs=sdl_libs) cython("pygame_sdl2.image", source=["src/write_jpeg.c", "src/write_png.c"], libs=["SDL2_image", "jpeg", png] + sdl_libs) cython("pygame_sdl2.transform", source=["src/SDL2_rotozoom.c"], libs=sdl_libs) cython("pygame_sdl2.gfxdraw", source=["src/SDL_gfxPrimitives.c"], libs=sdl_libs)
def anglecython(name, source=[]): cython(name, libs=angle_libs, compile_if=has_angle, define_macros=[("ANGLE", None)], source=source)
glib_flags = subprocess.check_output( ["pkg-config", "--cflags", "glib-2.0"]) setuplib.extra_compile_args.extend(glib_flags.split()) except: pass steam_sdk = os.environ.get("RENPY_STEAM_SDK", None) steam_platform = os.environ.get("RENPY_STEAM_PLATFORM", "") if steam_sdk: setuplib.library_dirs.append("{}/redistributable_bin/{}".format( steam_sdk, steam_platform)) setuplib.include_dirs.append("{}/public".format(steam_sdk)) # Modules directory. cython("_renpy", ["IMG_savepng.c", "core.c", "subpixel.c"], sdl + [png, 'z', 'm']) if has_fribidi: cython("_renpybidi", ["renpybidicore.c"], ['fribidi'], define_macros=[("FRIBIDI_ENTRY", "")]) cython("_renpysteam", language="c++", compile_if=steam_sdk, libs=["steam_api"]) # Sound. sound = ["avformat", "avcodec", "avutil", "z"] macros = [] if has_swresample: sound.insert(3, "swresample")
sdl = ['sdl', 'GLESv2', 'log'] else: sdl = ['SDL'] if has_fribidi: try: # Some versions of fribidi require glib, and it doesn't hurt to include it in # our path. glib_flags = subprocess.check_output( ["pkg-config", "--cflags", "glib-2.0"]) setuplib.extra_compile_args.extend(glib_flags.split()) except: pass # Modules directory. cython("_renpy", ["IMG_savepng.c", "core.c", "subpixel.c"], sdl + ['png', 'z', 'm']) if has_fribidi and not android: cython("_renpybidi", ["renpybidicore.c"], ['fribidi'], define_macros=[("FRIBIDI_ENTRY", "")]) # Sound. pymodule("pysdlsound.__init__") if not android: sound = ["avformat", "avcodec", "avutil", "z"] macros = [] if has_avresample: sound.insert(0, "avresample")
png = 'png' steam_sdk = os.environ.get("RENPY_STEAM_SDK", None) steam_platform = os.environ.get("RENPY_STEAM_PLATFORM", "") if steam_sdk: setuplib.library_dirs.append("{}/redistributable_bin/{}".format( steam_sdk, steam_platform)) setuplib.include_dirs.append("{}/public".format(steam_sdk)) cubism = os.environ.get("CUBISM", None) if cubism: setuplib.include_dirs.append("{}/Core/include".format(cubism)) # Modules directory. cython("_renpy", ["IMG_savepng.c", "core.c"], sdl + [png, 'z', 'm']) FRIBIDI_SOURCES = """ fribidi-src/lib/fribidi.c fribidi-src/lib/fribidi-arabic.c fribidi-src/lib/fribidi-bidi.c fribidi-src/lib/fribidi-bidi-types.c fribidi-src/lib/fribidi-deprecated.c fribidi-src/lib/fribidi-joining.c fribidi-src/lib/fribidi-joining-types.c fribidi-src/lib/fribidi-mem.c fribidi-src/lib/fribidi-mirroring.c fribidi-src/lib/fribidi-run.c fribidi-src/lib/fribidi-shape.c renpybidicore.c """.split()
if android: png = "png16" else: png = "png" pymodule("pygame_sdl2.__init__") pymodule("pygame_sdl2.compat") pymodule("pygame_sdl2.threads.__init__") pymodule("pygame_sdl2.threads.Py25Queue") pymodule("pygame_sdl2.sprite") pymodule("pygame_sdl2.sysfont") pymodule("pygame_sdl2.time") pymodule("pygame_sdl2.version") cython("pygame_sdl2.error", libs=sdl_libs) cython("pygame_sdl2.color", libs=sdl_libs) cython("pygame_sdl2.controller", libs=sdl_libs) cython("pygame_sdl2.rect", libs=sdl_libs) cython("pygame_sdl2.rwobject", libs=sdl_libs) cython("pygame_sdl2.surface", source=["src/alphablit.c"], libs=sdl_libs) cython("pygame_sdl2.display", libs=sdl_libs) cython("pygame_sdl2.event", libs=sdl_libs) cython("pygame_sdl2.locals", libs=sdl_libs) cython("pygame_sdl2.key", libs=sdl_libs) cython("pygame_sdl2.mouse", libs=sdl_libs) cython("pygame_sdl2.joystick", libs=sdl_libs) cython("pygame_sdl2.power", libs=sdl_libs) cython("pygame_sdl2.pygame_time", libs=sdl_libs) cython("pygame_sdl2.image", source=["src/write_jpeg.c", "src/write_png.c"],