aerys / minko

3D framework for web, desktop and mobile devices.
http://minko.io
Other
904 stars 210 forks source link

Android build instructions out of date #267

Open tellypresence opened 4 years ago

tellypresence commented 4 years ago

The android build instructions date from the Exlipse era and no longer work.

The android NDK has moved on, now

so scripts/install_jni.sh is completely broken.

Please modernize android build instructions for Android Studio and modern NDK

JMLX42 commented 4 years ago

Yes that is correct.

As a workaround, here is the Docker container Dockerfile we use to target Android using CMake:

FROM lakoo/android-ndk:26-27.0.3-r17

# Intall make
RUN apt-get update && apt-get install make

# Install CMake
RUN cd / && \
    wget -q https://cmake.org/files/v3.9/cmake-3.9.6-Linux-x86_64.sh -O cmake.sh && \
    chmod +x ./cmake.sh && \
    ./cmake.sh --skip-license && \
    rm -rf cmake.sh

# Install the platform-tools
RUN cd /opt/android-sdk-linux/tools/bin && \
    echo "y" | ./sdkmanager "platform-tools" && \
    echo "y" | ./sdkmanager "platforms;android-25"

# Install ant
RUN apt-get -y install ant

# Install zipalign
RUN apt-get -y install zipalign

# Install freetype
RUN apt-get -y install libfreetype6

# Install old tool directory
RUN wget -q https://dl.google.com/android/repository/tools_r25.2.5-linux.zip && \
    unzip tools_r25.2.5-linux.zip && \
    rm -rf android-sdk-linux/tools tools_r25.2.5-linux.zip && \
    mv tools android-sdk-linux

CMD ["/bin/bash"]

and then the command lines:

mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=OFF -DWITH_PLUGINS=ON -DWITH_NODEJS_WORKER=ON -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-linux/build/cmake/android.toolchain.cmake ..
make