mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00:00
Merge latest origin/main and resolve conflicts
This commit is contained in:
commit
8171bf20fd
581 files changed
+14773
-4227
No files matched your search
+29
-4
@@ -49,7 +49,7 @@ if ! command -v docker >/dev/null 2>&1; then
|
||||
echo "Docker is required to cross-compile the glibc ARM64 preload libraries." >&2
|
||||
exit 1
|
||||
fi
|
||||
for tool in curl tar zstd shasum unzip python3; do
|
||||
for tool in curl tar zstd shasum unzip python3 go; do
|
||||
if ! command -v "${tool}" >/dev/null 2>&1; then
|
||||
echo "${tool} is required to build the CI-equivalent APK." >&2
|
||||
exit 1
|
||||
@@ -90,8 +90,6 @@ trap 'exit 143' TERM
|
||||
|
||||
cache_dir=${DROIDDECK_BUILD_CACHE:-"${HOME}/.cache/droiddeck-build"}
|
||||
mkdir -p "${cache_dir}"
|
||||
# Steps whose output depends only on tracked sources are kept per input hash in the
|
||||
# shared cache, so a rerun or a fresh worktree copies them instead of rebuilding.
|
||||
inputs_hash() {
|
||||
(cd "${repo_root}" && { printf '%s\n' "$1"; shift; find "$@" -type f ! -name '*.pyc' | LC_ALL=C sort | xargs shasum -a 256; }) \
|
||||
| shasum -a 256 | cut -d' ' -f1
|
||||
@@ -109,7 +107,6 @@ save_step() {
|
||||
part=$(mktemp -d "${stored}.part.XXXXXX")
|
||||
(cd "$3" && tar -cf - .) | tar -xf - -C "${part}"
|
||||
touch "${part}/.complete"
|
||||
# Another checkout may have published the same key meanwhile; its copy is equivalent.
|
||||
if [[ -e "${stored}" ]]; then rm -rf "${part}"; else mv "${part}" "${stored}" || rm -rf "${part}"; fi
|
||||
}
|
||||
|
||||
@@ -186,6 +183,13 @@ if ! restore_step vr "${vr_key}" "${vr_out}"; then
|
||||
save_step vr "${vr_key}" "${vr_out}"
|
||||
fi
|
||||
|
||||
gpuload_out="${linuxfs_dir}/usr/local/lib/droiddeck-gpuload"
|
||||
gpuload_key=$(inputs_hash "${image_id} ${ndk_version} ${VK_INCLUDE:-}" tools/gpuload)
|
||||
if ! restore_step gpuload "${gpuload_key}" "${gpuload_out}"; then
|
||||
DROIDDECK_BUILD_IMAGE="${image_name}" "${repo_root}/tools/gpuload/build.sh" "${gpuload_out}"
|
||||
save_step gpuload "${gpuload_key}" "${gpuload_out}"
|
||||
fi
|
||||
|
||||
github_repo=${DROIDDECK_GITHUB_REPOSITORY:-}
|
||||
if [[ -z "${github_repo}" ]]; then
|
||||
origin_url=$(git -C "${repo_root}" remote get-url origin)
|
||||
@@ -342,6 +346,27 @@ else
|
||||
(cd "${proot_out}" && shasum -a 256 libproot.so libproot-loader.so > .proot-outputs)
|
||||
fi
|
||||
|
||||
syncthing_src="${repo_root}/tools/syncthing/syncthing-android/syncthing/src/github.com/syncthing/syncthing"
|
||||
git -C "${repo_root}" submodule update --init --recursive tools/syncthing/syncthing-android
|
||||
syncthing_inputs=$(printf '%s\n' "$(cd "${repo_root}" && shasum -a 256 tools/syncthing/build.sh \
|
||||
tools/syncthing/syncthing-android/gradle/libs.versions.toml)" \
|
||||
"$(git -C "${syncthing_src}" rev-parse HEAD)" \
|
||||
"$(git -C "${syncthing_src}" diff --binary HEAD | shasum -a 256)" \
|
||||
"$(cd "${syncthing_src}" && git ls-files -z --others --exclude-standard | xargs -0 shasum -a 256)" \
|
||||
"${ndk_version}" | shasum -a 256 | cut -d' ' -f1)
|
||||
if [[ -f "${proot_out}/libsyncthingnative.so" \
|
||||
&& "$(cat "${proot_out}/.syncthing-inputs" 2>/dev/null)" = "${syncthing_inputs}" ]]; then
|
||||
echo "syncthing: sources unchanged, keeping ${proot_out}/libsyncthingnative.so"
|
||||
else
|
||||
syncthing_stage="${staging_dir}/syncthing"
|
||||
if ! restore_step syncthing "${syncthing_inputs}" "${syncthing_stage}"; then
|
||||
"${repo_root}/tools/syncthing/build.sh" "${syncthing_stage}"
|
||||
save_step syncthing "${syncthing_inputs}" "${syncthing_stage}"
|
||||
fi
|
||||
install -m755 "${syncthing_stage}/libsyncthingnative.so" "${proot_out}/"
|
||||
echo "${syncthing_inputs}" > "${proot_out}/.syncthing-inputs"
|
||||
fi
|
||||
|
||||
bundle_dir="${staging_dir}/pulseaudio-bundle"
|
||||
mkdir -p "${bundle_dir}"
|
||||
zstd -dc "${bundle_asset}" | tar -xf - -C "${bundle_dir}"
|
||||
|
||||
Reference in new issue
Block a user