Files
PhoneViewer/build-apk.sh
T
admin f70913481e Rename app to EasyView and make APK build cross-platform
- App display name -> EasyView (Android label, PWA manifest, page titles,
  about/guide text, APK artifact name)
- scripts/build-apk.mjs: auto-detect JDK/SDK/Gradle toolchain instead of
  hardcoded Windows paths; pick highest build-tools; platform 34 fallback;
  path.delimiter classpaths; npm run build without cmd.exe on POSIX
- Add build-apk.sh one-shot Linux build wrapper (loads ven env + keystore)
- Signing keystore renamed to easyview.jks (alias easyview),
  env vars EASYVIEW_KEYSTORE_PASS / EASYVIEW_KEY_PASS
2026-10-26 19:38:42 +08:00

25 lines
755 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 一键构建 EasyView APK(Linux / 本工作区 ven 工具链)
# 用法:./build-apk.sh
set -euo pipefail
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ven="$(cd "$here/../ven" && pwd)"
source "$ven/node-env.sh"
export npm_config_cache="$ven/npm"
export ANDROID_HOME="$ven/android-sdk"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
# 签名口令:优先取 android/keystore/.env.keystore(已 gitignore)
if [[ -f "$here/android/keystore/.env.keystore" ]]; then
set -a
# shellcheck disable=SC1091
. "$here/android/keystore/.env.keystore"
set +a
fi
: "${EASYVIEW_KEYSTORE_PASS:?未设置签名口令:请在 android/keystore/.env.keystore 中写入 EASYVIEW_KEYSTORE_PASS}"
cd "$here"
node scripts/build-apk.mjs