Giter VIP home page Giter VIP logo

sdl2-android's Introduction

SDL2-Android

Bash script to download and build:

SDL2
SDL2_image
SD2_mixer
SDL2_net
SDL2_ttf
SDL2_gfx

libraries for Android devices. Requires NDK only, no "gradlew" or java, C/C++ only.
How it works. Script gets SDL projects from

https://www.libsdl.org/release/
https://www.libsdl.org/projects/

and SDL2_gfx from

https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/

Script downloads and unpacks archives to directory, sample command:

./build.sh --prefix=/home/user/build --ndkdir=/home/user/NDK --api=16 --arch=armeabi-v7a

Where "--prefix" sets build directory, "--ndkdir" sets NDK directory, "--api" sets minimal Android API level and "--arch" sets architecture of our librares. Available android API levels you can check in NDK "platforms" directory and architecture list:

armeabi-v7a
arm64-v8a
x86
x86_64

build.sh script is a wrapper to "ndk-build" script from NDK directory. If you plan improve script - NDK guides may be very helpfull.

 
https://developer.android.com/ndk/guides/android_mk

If you get an error when downloading, verify SDL archives versions first and then links in the script, version can be found in the begining and links at the end of script. To skip download phase you can get all archives manually and put in folder, also fix versions of archives in the build.sh if necessary. Here version of packages tested with build.sh:

android-ndk-r16b
android-ndk-r21b
SDL2-2.0.12
SDL2_image-2.0.5
SDL2_mixer-2.0.4
SDL2_net-2.0.1
SDL2_ttf-2.0.15
SDL2_gfx-1.0.4

Download ready libraries with minimal support android-16:
https://github.com/AlexanderAgd/SDL2-Android/releases
Build an example with SDL2:
https://github.com/AlexanderAgd/SDL2-Android-Example
Enjoy :)

sdl2-android's People

Contributors

alexanderagd avatar ryanbashgaming avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.