Skip to content

Latest commit

 

History

History
184 lines (146 loc) · 6.43 KB

BUILDING.md

File metadata and controls

184 lines (146 loc) · 6.43 KB

Building GAPID

To build GAPID, Android SDK, Android NDK, and JDK 8 are needed. The do script will try to deduce their locations and populate the default paths via the environment variable ANDROID_HOME, ANDROID_NDK_ROOT, and JAVA_HOME, respectively. If these environment variables are not defined, you will need to manually specify the locations for the *DKs during the do config step. When manually specifying locations, please note that the do script cannot resolve paths containing environment variables currently.

Please see the following for detailed steps on each platform.

Windows

Install Go 1.8.3

Install Mingw-w64 Toolchain

  • Install msys2.
  • Open the MSYS2 MinGW 64-bit terminal.
  • Type: pacman -Syu --noconfirm and press enter.
  • Close and reopen the msys2 terminal.
  • Note that pacman may need to update itself before updating other packages, so repeat the above two steps until pacman no longer updates anything.
  • Type: pacman -S mingw-w64-x86_64-gcc --noconfirm and press enter.
  • Close the msys2 terminal

Install Android SDK

  • Unzip the Android SDK to a directory of your choosing.
  • Using the unzipped tools\android.bat download:
    • Android 5.0.1 (API 21)
      • SDK Platform
    • Android SDK Build-tools 21.1.2

Install the Android NDK

  • Unzip the Android NDK to a directory of your choosing.

Install CMake.

Install Ninja

Install Python 3.6

Install JDK 8

Get the source

In a terminal type:

go get github.com/google/gapid

This may take a while. After it completes you'll get the message:

package github.com/google/gapid: no buildable Go source files in {path}.

This is normal.

Configure build

In a terminal type:

cd %GOPATH%\src\github.com\google\gapid
do config

And follow the instructions to configure the build.

Building

In a terminal type:

cd %GOPATH%\src\github.com\google\gapid
do build

The build output will be in the directory you specified with do config.


MacOS

Install Go 1.8.3

  • Note that some older 1.8 versions have had problems if used with Xcode 8.3 (bug)

Install Android SDK

  • Unzip the Android SDK to a directory of your choosing.
    • Instead, if you have Homebrew, you can install via brew install android-sdk and the default installation location would be $HOMEBREW_PREFIX/opt/android-sdk, where $HOMEBREW_PREFIX can be found using brew config.
  • Using tools/android download:
    • Android 5.0.1 (API 21)
      • SDK Platform
    • Android SDK Build-tools 21.1.2

Install Android NDK

  • Unzip the Android NDK to a directory of your choosing.
    • Instead, if you have Homebrew, you can install via brew install android-ndk and the default installation location would be $HOMEBREW_PREFIX/opt/android-ndk, where $HOMEBREW_PREFIX can be found using brew config.

Install CMake

  • Instead, if you have Homebrew, you can install via brew install cmake.

Install Ninja

  • Unzip the Ninja executable to a directory of your choosing.
    • Instead, if you have Homebrew, you can install via brew install ninja.

Install Python 3.6

  • Instead, if you have Homebrew, you can install via brew install python3.

Install JDK 8

  • You can inspect JDK home locations via the /usr/libexec/java_home utility.
    • For JDK 8, the command is /usr/libexec/java_home -v 1.8.

Get the source

In a terminal type:

go get github.com/google/gapid

This may take a while. After it completes you'll get the message:

package github.com/google/gapid: no buildable Go source files in {path}.

This is normal.

Configure build

In a terminal type:

cd $GOPATH/src/github.com/google/gapid
./do config

And follow the instructions to configure the build.

Building

In a terminal type:

cd $GOPATH/src/github.com/google/gapid
./do build

The build output will be in the directory you specified with do config.


Linux

Install Go 1.8.3

Install Android SDK

  • Unzip the Android SDK to a directory of your choosing.
  • Using tools/android download:
    • Android 5.0.1 (API 21)
      • SDK Platform
    • Android SDK Build-tools 21.1.2

Install Android NDK

  • Unzip the Android NDK to a directory of your choosing.

Install CMake.

Install Ninja

Install Python 3.6

Install JDK 8

Get the source

In a terminal type:

go get github.com/google/gapid

This may take a while. After it completes you'll get the message:

package github.com/google/gapid: no buildable Go source files in {path}.

This is normal.

Configure build

In a terminal type:

cd $GOPATH/src/github.com/google/gapid
./do config

And follow the instructions to configure the build.

Building

In a terminal type:

cd $GOPATH/src/github.com/google/gapid
./do build

The build output will be in the directory you specified with do config.