apportable / openal-soft

GNU Lesser General Public License v3.0
50 stars 33 forks source link

build.xml build process appears to be deprecated #6

Open mcclure opened 6 years ago

mcclure commented 6 years ago

Hello. I have checked out openal soft and I am attempting to build it. My current process is I have a gradle build and I am attempting to add openal-soft to my build with

ant.importBuild '../openal-soft/build.xml'

This fails with

Caused by: /Users/mcc/work/h/oculus/lovrapp-temp-git2/deps/openal-soft/build.xml:83: Cannot find /Developer/android-sdk/tools/ant/build.xml imported from /Users/mcc/work/h/oculus/lovrapp-temp-git2/deps/openal-soft/build.xml

Checking Google, I find many people reporting that build.xml has in fact now been removed from the Android SDK, and you have to build with an older SDK if you need that SDK build.xml file. But I cannot downgrade my SDK so this is not an option. I do not understand the details but this appears to be no longer a supported build method.

How should I proceed?

Also: Is this project still supported? Does apportable still exist?

mcclure commented 6 years ago

This is my best attempt at a build.gradle file for openal-soft. I do not know enough about gradle to know if it is adequate. The build.gradle I used in my own project was slightly different (I put it in a directory adjacent to the openal-soft directory, and I left out the "res" and "java" dirs because they didn't seem to do anything appropriate for a shared object library).

apply plugin: 'com.android.library'

android {
  compileSdkVersion 21
  buildToolsVersion '27.0.3'

  defaultConfig {
    minSdkVersion 21
    targetSdkVersion 21

    // override app plugin abiFilters for both 32 and 64-bit support
    externalNativeBuild {
        ndk {
                abiFilters 'armeabi-v7a','arm64-v8a'
        }
        ndkBuild {
                abiFilters 'armeabi-v7a','arm64-v8a'
        }
    } 
  }

  sourceSets {
    main {
      manifest.srcFile 'AndroidManifest.xml' // Use Lovr-specific manifest with no activity information
      res.srcDirs = ['res']   // Not wanted when building as library
      java.srcDirs = ['src']  // Not wanted when building as library
    }
  }

  externalNativeBuild {
    ndkBuild {
        path 'jni/Android.mk'
    }
  }
}
marcsalem commented 6 years ago

This version is a fork of openal-soft version 1.12.854, heavily modified to run with mostly fixed-point math on ARMv5 devices.

I think you're better off using a newer version from upstream that has been updated to use clang intrinsics for using the vector unit of the platform you are compiling for.

Eg: https://github.com/takeitallsource/openal-android-sample

mcclure commented 6 years ago

Thank you… please excuse me but can you clarify, is the takeitallsource openal actually an "upstream"? It describes itself as using openal4android which appears to be from 2011.

I am pretty much just trying to find whichever Android-compatible openal I can drop into an existing openal-using open source project, while getting the newest code possibility and maximizing the possibility of future patches…

mcclure commented 6 years ago

Oh, I'm sorry, I understand now. The "kcat" OpenAL soft supports Android, therefore I don't need this apportable version or openal4android, and you were offering the takeitallsource as an example of a gradle script to build openal with?

Cool