diff --git a/build-android.sh b/build-android.sh index 8bc70f18..9656b7e2 100755 --- a/build-android.sh +++ b/build-android.sh @@ -109,7 +109,10 @@ else exit 1 fi +# Bootstrap vcpkg checkout_vcpkg "${gator_dir}" "${use_system_binaries}" +# and perfetto +checkout_perfetto "${gator_dir}" # check cmake exe cmake_exe=$(validate_and_return_cmake_exe "${cmake_exe}") diff --git a/build-common.sh b/build-common.sh index 5a6ea76d..10e9c655 100644 --- a/build-common.sh +++ b/build-common.sh @@ -105,6 +105,24 @@ checkout_vcpkg() { fi } +# Fetch perfetto +checkout_perfetto() { + local perfetto_commit="7e8d6801dbf73936a916dbcd8ed06a758c8d989e" # v25.0 + local root="${1}" + # is gator git repo from github? + if [ -d "${root}/.git" ]; then + echo "Fetching perfetto git submodule" + git submodule update --init + # checkout manually? + elif [ ! -d "${root}/ext/perfetto/.git" ]; then + echo "Cloning perfetto git repo into '${root}/ext/perfetto/'" + git clone https://github.com/google/perfetto.git "${root}/ext/perfetto/" + echo "Switching to correct commit" + git -C "${root}/ext/perfetto/" clean -ffxd + git -C "${root}/ext/perfetto/" reset --hard "${perfetto_commit}" + fi +} + # source root gator_dir=`dirname "$0"` gator_dir=`realpath "${gator_dir}"` diff --git a/build-linux.sh b/build-linux.sh index 18dc067b..8b6354c5 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -107,6 +107,8 @@ fi # Bootstrap vcpkg checkout_vcpkg "${gator_dir}" "${use_system_binaries}" +# and perfetto +checkout_perfetto "${gator_dir}" # check cmake exe cmake_exe=$(validate_and_return_cmake_exe "${cmake_exe}")