Skip to content
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

Building for Android #262

Open
cecilios opened this issue Nov 2, 2020 · 2 comments
Open

Building for Android #262

cecilios opened this issue Nov 2, 2020 · 2 comments

Comments

@cecilios
Copy link
Member

cecilios commented Nov 2, 2020

First of all let me say that I don't have ANY experience in Android.

By January of current year I started to consider the possibility of porting my application to Android and explored what was needed.

One idea I was testing was how to create a Lomse monolithic build, so that lose library would include all its dependencies. Some of the dependencies can be built with cmake, like zlib, libpng or freetype. Others need to be built with configure. So I started to develop an script for this, based on having all sources for the dependencies in a 'lomse-deps' folder at the same level than lomse folder. The script will create the build folders:

  <projects>
    ├── lomse
    │     ├── ...
    │     ├── scripts
    │     │     └── this-script.sh
    │     │
    │     └── z_deps-armv7   <- dependencies for armv7 architecture
    │           │
    │           ├── sysroot   <- sysroot with the dependencies
    │           │     ├── usr
    │           │     ┆
    │           │
    │           └── build   <- build folder for dependencies
    │                 ├── zlib
    │                 ├── libpng
    │                 ┆
    │                 
    ├── lomse-deps   <- sources for dependencies
    ┆     ├── zlib
          ├── libpng
          ┆

Although the script worked (but needs more testing and is not finished) I could not continue with this because I had more urgent things to do. And this issue of Android is stopped since them. I attach the script, change the extension to .sh and feel free to do with it whatever you like:
z_build-dependencies.txt

Another deterrent was the need for a MIDI synthesizer usable in Android. My best bet was to use FluidSynth. It has been ported to Android and uses the Oboe library. Only libraries libfluidsynth.so and libfluidsynth-assetloader.so would be needed. See https://github.com/FluidSynth/fluidsynth/blob/master/doc/android/README.Android.md. But I was not sure I could manage all this, due to my lack of experience in Android.

Any collaboration to include in the library scripts, guidelines and help documentation to build and use Lomse in Android is welcome.

@npiegdon
Copy link

npiegdon commented Oct 7, 2022

Getting things running on Android is painful in general, but for the MIDI synth piece of the puzzle, I've had a lot of success in my own projects by using Un4seen's BASS and BASSMIDI libraries.

For free apps it's free to use. The developer--Ian--has always had a response time to my questions measured in minutes or hours instead of days. It's got this really joyful C API. It's well-documented. And it's a drop-in solution for any/all platforms. It worked so well on Android, I've actually started using it on Windows and iPad, too, (without needing to change a single line of code). The output quality easily exceeds Microsoft's own MIDI synth built into Windows.

The source isn't available, but by providing pre-compiled binaries for each platform, he's actually removed steps from my build process instead of adding them.

@cecilios
Copy link
Member Author

cecilios commented Oct 7, 2022

Thanks for the links and the information. It can be very useful for those who are exploring the possibility of building Android applications with Lomse. Unfortunately, at the moment I don't have time to migrate my application to Android so for my part this issue will have to keep waiting.

Thanks again for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants