-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SDL3
bootstrap (alongside SDL3
, SDL3_ttf
, SDL3_mixer
, SDL3_image
recipes) for Kivy 3.0.0
#3125
base: develop
Are you sure you want to change the base?
Conversation
SDL3
bootstrap (and allow kivy to build with it)
SDL3
bootstrap (and allow kivy to build with it)SDL3
bootstrap (alongside SDL3
, SDL3_ttf
, SDL3_mixer
, SDL3_image
recipes) for Kivy 3.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incredible work again 👏
Made some minor suggestions, but nothing blocking, feel free to address in some follow up or never.
Thanks for the hard work, I can't wait to see it merged
sdl2_recipe = Recipe.get_recipe("sdl2", self.ctx) | ||
sdl2_build_dir = sdl2_recipe.get_jni_dir() | ||
src_dir = join(sdl2_build_dir, "SDL", "android-project", | ||
if self.name in ["sdl2", "sdl3"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to have a variable for all supported SDL?
SDL_BOOTSTRAPS = ("sdl2", "sdl3")
@@ -541,7 +541,7 @@ def make_package(args): | |||
"debug": "debug" in args.build_mode, | |||
"native_services": args.native_services | |||
} | |||
if get_bootstrap_name() == "sdl2": | |||
if get_bootstrap_name() in ["sdl2", "sdl3"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_sdl_bootstrap()
maybe?
class LibSDL3Recipe(BootstrapNDKRecipe): | ||
version = "3.2.8" | ||
url = "https://github.com/libsdl-org/SDL/releases/download/release-{version}/SDL3-{version}.tar.gz" | ||
# md5sum = 'a344eb827a03045c9b399e99af4af13d' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe fix the sum or remove the code?
url = "https://github.com/libsdl-org/SDL/releases/download/release-{version}/SDL3-{version}.tar.gz" | ||
# md5sum = 'a344eb827a03045c9b399e99af4af13d' | ||
|
||
dir_name = "SDL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conflicts = ['sdl2']
Same thing for the SDL2GradleBootstrap
bootstrap, it could also have the conflicts = ['sdl3']
import sh | ||
|
||
|
||
class LibSDL3Recipe(BootstrapNDKRecipe): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a follow up maybe we could inherit from a base LibSDLBootstrapNDKRecipe
since 2 and 3 have quite a lot in commun.
class LibSDL3Recipe(LibSDLBootstrapNDKRecipe):
class SDL3GradleBootstrap(Bootstrap): | ||
name = 'sdl3' | ||
|
||
conflicts = ['sdl2'] | ||
|
||
recipe_depends = list( | ||
set(Bootstrap.recipe_depends).union({'sdl3'}) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also almost an exact copy of SDL2GradleBootstrap, maybe we can have a SDLGradleBootstrap
and inherit from it
-cdef extern JNIEnv *SDL_AndroidGetJNIEnv() | ||
+cdef extern JNIEnv *SDL_GetAndroidJNIEnv() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not too clear to me why we changed it SDL3 and not SDL2, why is this needed?
sdl3
bootstrap (alongsidesdl3
,sdl3_ttf
,sdl3_mixer
,sdl3_image
recipes)kivy
recipe to build withsdl3
support (but keepssdl2
support)android
andpyjnius
recipe to build withsdl3
support (but keepssdl2
support)sdl2
boostrap but tries to buildsdl3
which is incompatible)Similar to kivy/kivy-ios#961