From a5cd7bc2607a0c583c49a021c5bf92eee9c42a88 Mon Sep 17 00:00:00 2001 From: Cody Northrop Date: Mon, 14 Aug 2017 11:22:55 -0600 Subject: [PATCH] docs: Update CONTRIBUTING.md for Windows and macOS --- CONTRIBUTING.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb72b25d4..c3318271c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,6 +51,10 @@ cd build-android cmake -DBUILD_ANDROID=On -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=23 .. make ``` +On Windows, you need to specify the 'generator' type to the cmake invocation. The exact parameter will depend on your bash shell, but options are e.g. -G "MSYS Makefiles" or -G "MinGW Makefiles", i.e.: +``` +cmake -DBUILD_ANDROID=On -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=23 -G"MSYS Makefiles" .. +``` # Code of Conduct @@ -171,8 +175,8 @@ export ANDROID_SDK= export ANDROID_NDK= export JAVA_HOME= ``` -Otherwise, below are steps to acquire the tools for Ubuntu. - +Otherwise, below are steps to acquire the tools for each platform. +#### Ubuntu The Java Development Kit can be installed with: ``` sudo apt-get install openjdk-8-jdk @@ -180,8 +184,12 @@ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ``` The Android SDK and NDK can be set up with the following steps. They are also mirrored in our Travis-CI [setup script](scripts/travis/android_setup.sh) for Android. We are currently targeting build-tools 26.0.1 and NDK r14b. + +SDK links are pulled from [here](https://developer.android.com/studio/index.html). + +NDK links are pulled from [here](https://developer.android.com/ndk/downloads/older_releases.html). ``` -# Set up Android SDK and NDK +# Set up Android SDK export ANDROID_SDK= pushd $ANDROID_SDK wget http://dl.google.com/android/repository/sdk-tools-linux-3859397.zip @@ -196,6 +204,51 @@ wget http://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip unzip android-ndk-r14b-linux-x86_64.zip export ANDROID_NDK=$ANDROID_SDK/android-ndk-r14b ``` +#### macOS +JDK can be installed with brew: +``` +brew cask install java +export JAVA_HOME="$(/usr/libexec/java_home)" +``` +Android NDK and SDK: +``` +# Set up Android SDK +export ANDROID_SDK= +pushd $ANDROID_SDK +wget https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip +unzip sdk-tools-darwin-3859397.zip +cd tools/bin/ +./sdkmanager --sdk_root=$ANDROID_SDK "build-tools;26.0.1" "platforms;android-23" +# Accept the license + +# Set up Android NDK +pushd $ANDROID_SDK +wget https://dl.google.com/android/repository/android-ndk-r14b-darwin-x86_64.zip +unzip android-ndk-r14b-darwin-x86_64.zip +export ANDROID_NDK=$ANDROID_SDK/android-ndk-r14b +``` +#### Windows +JDK can be installed from the following [link](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). +``` +set JAVA_HOME= +``` +Android NDK and SDK: +``` +# Set up the Android SDK +set ANDROID_SDK= +cd %ANDROID_SDK% +wget https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip +unzip sdk-tools-windows-3859397.zip +cd tools\bin +sdkmanager --sdk_root=%ANDROID_SDK% "build-tools;26.0.1" "platforms;android-23" +# Accept the license + +# Set up the Android NDK +cd %ANDROID_SDK% +wget http://dl.google.com/android/repository/android-ndk-r14b-windows-x86_64.zip +unzip android-ndk-r14b-windows-x86_64.zip +set ANDROID_NDK=%ANDROID_SDK%\android-ndk-r14b +``` # Where to Start