Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8aecef0e2d | ||
|
|
d9d454da70 | ||
|
|
955fe51d17 | ||
|
|
72c80cc0f6 | ||
|
|
14ce6d7a66 | ||
|
|
61ecab580e | ||
|
|
3461cc1bc6 | ||
|
|
3ad7e8ee19 | ||
|
|
d55ed0e1f4 | ||
|
|
53efbf0b28 | ||
|
|
aba1996ccd | ||
|
|
c2421a7862 | ||
|
|
1d0b8d7001 | ||
|
|
d192e789d4 | ||
|
|
b6e1c3bfab | ||
|
|
82383c3d5d | ||
|
|
d5a12b5d97 | ||
|
|
5159e7f098 | ||
|
|
2e9be2fc18 | ||
|
|
53f91d4c00 | ||
|
|
df0709e3f4 | ||
|
|
159e0098ea | ||
|
|
61241cd23e | ||
|
|
66824eba50 | ||
|
|
66676ac3d3 | ||
|
|
87c9cd30a2 | ||
|
|
bd0c862387 | ||
|
|
d1ae67efc5 | ||
|
|
e23a6e6bd5 | ||
|
|
dac6b67935 | ||
|
|
d1be47cd59 | ||
|
|
9a1a963056 | ||
|
|
6369cba877 | ||
|
|
1dae6f6c3a | ||
|
|
36d6e6f94e | ||
|
|
63af557410 | ||
|
|
24fd4c88fe | ||
|
|
851759cfd0 | ||
|
|
6e7ae2dd17 | ||
|
|
dd12f56834 | ||
|
|
e098eaa686 | ||
|
|
4147597f6b | ||
|
|
c642c13e21 | ||
|
|
d4b7252dac | ||
|
|
0333d4c12e | ||
|
|
32e7bc5900 | ||
|
|
a78d7d43c4 | ||
|
|
661f620340 | ||
|
|
16161e4482 | ||
|
|
a79ab2ace9 | ||
|
|
9bb025c1ea | ||
|
|
990d722a0f | ||
|
|
edbc3df6de | ||
|
|
3434a9b4f2 | ||
|
|
52940c7ccf | ||
|
|
94fb71e80a | ||
|
|
61d91d59b4 | ||
|
|
486386519c | ||
|
|
e8dece0969 | ||
|
|
7ccb904f89 | ||
|
|
440e2ad60a | ||
|
|
6af10f4305 | ||
|
|
4b93cad051 | ||
|
|
ebc8678539 | ||
|
|
a66e629d89 | ||
|
|
a05c2cc469 | ||
|
|
71ba093935 | ||
|
|
32a4fe7951 | ||
|
|
c443e918c1 | ||
|
|
64a05aa0d7 | ||
|
|
4cc9eb0527 | ||
|
|
df1ea8d2e0 | ||
|
|
ea2ef47384 | ||
|
|
287ae35c6a | ||
|
|
e56a89e02d | ||
|
|
37e356f3a5 | ||
|
|
4eea7ea6a8 | ||
|
|
eb17374052 | ||
|
|
dd4c75fdad | ||
|
|
0eade56b75 | ||
|
|
64207c2ee0 | ||
|
|
960f2970f4 | ||
|
|
179c8856f9 | ||
|
|
381885ac0d | ||
|
|
882c1a5cad | ||
|
|
2f09d2b87d | ||
|
|
9644918631 | ||
|
|
8bcd313c7e | ||
|
|
09ecd923b6 | ||
|
|
823ba12468 | ||
|
|
9d27dca8f6 | ||
|
|
44b6a2fcad | ||
|
|
39c50f66d2 | ||
|
|
922a6f1de1 | ||
|
|
dd09473bcd | ||
|
|
eed7cf217c | ||
|
|
1d09c705bc | ||
|
|
4d1efe0740 | ||
|
|
0cdba05f53 | ||
|
|
a84cd8afa8 | ||
|
|
a99db8da8c | ||
|
|
b2e30beb3b | ||
|
|
d74348c2e2 | ||
|
|
efad4d26f1 | ||
|
|
20c046dd9a | ||
|
|
fcb30aa9cd | ||
|
|
6dc330fa8b | ||
|
|
fc00732f80 | ||
|
|
b90a88ab86 | ||
|
|
4d7481f9ff | ||
|
|
455011da1a | ||
|
|
cfcba405c4 | ||
|
|
ac2152980e | ||
|
|
daf68f0d26 | ||
|
|
b0c165f575 | ||
|
|
2f210aba03 | ||
|
|
1130e9d353 | ||
|
|
7cbd20ce2e | ||
|
|
4229a0d4b7 | ||
|
|
4dcb907a4d | ||
|
|
943e9c3aeb | ||
|
|
b6b5f1bcfe | ||
|
|
b299484555 | ||
|
|
f0a06a89d4 | ||
|
|
ec558927b1 | ||
|
|
c719f5b675 | ||
|
|
d8f2bcd265 | ||
|
|
bc55cc6241 |
No files matched your search
@@ -23,7 +23,8 @@ permissions:
|
||||
concurrency:
|
||||
# A failed Release produces a skipped refresh, which must not cancel a push.
|
||||
group: pages-${{ github.ref }}-${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success' && 'skipped' || 'deploy' }}
|
||||
cancel-in-progress: true
|
||||
# Finish the active deployment; newer pushes replace only the pending refresh.
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -31,6 +32,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
|
||||
env:
|
||||
# Production follows the phone-verified release; previews test new source.
|
||||
USE_RELEASED_WEB: ${{ github.event_name != 'pull_request' || inputs.released_web }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
@@ -71,16 +75,16 @@ jobs:
|
||||
PY
|
||||
|
||||
- name: Install Packages
|
||||
if: ${{ !inputs.released_web }}
|
||||
if: ${{ env.USE_RELEASED_WEB != 'true' }}
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
|
||||
- name: Set Up Emscripten
|
||||
if: ${{ !inputs.released_web }}
|
||||
if: ${{ env.USE_RELEASED_WEB != 'true' }}
|
||||
uses: ./.github/actions/emscripten
|
||||
|
||||
- name: Download Released Web App
|
||||
if: ${{ inputs.released_web }}
|
||||
if: ${{ env.USE_RELEASED_WEB == 'true' }}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
@@ -93,7 +97,7 @@ jobs:
|
||||
test -s build/dist/web/index.wasm
|
||||
|
||||
- name: Web runner diagnostics
|
||||
if: ${{ !inputs.released_web }}
|
||||
if: ${{ env.USE_RELEASED_WEB != 'true' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
lscpu
|
||||
@@ -107,7 +111,7 @@ jobs:
|
||||
- name: Build Site
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ "$RELEASED_WEB" = "true" ]; then
|
||||
if [ "$USE_RELEASED_WEB" = "true" ]; then
|
||||
make package-unpackaged-assets
|
||||
sh site/build.sh
|
||||
else
|
||||
@@ -127,10 +131,9 @@ jobs:
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASED_WEB: ${{ inputs.released_web }}
|
||||
|
||||
- name: Upload Web diagnostics after a failed build
|
||||
if: ${{ failure() && !inputs.released_web }}
|
||||
if: ${{ failure() && env.USE_RELEASED_WEB != 'true' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: inbe-web-diagnostics
|
||||
|
||||
@@ -19,22 +19,95 @@ on:
|
||||
description: OpenStore channel
|
||||
required: false
|
||||
default: focal
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
# Release-created tags/events do not start another workflow with GITHUB_TOKEN.
|
||||
workflow_run:
|
||||
workflows: [Release]
|
||||
types: [completed]
|
||||
branches: [master]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
source:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
|
||||
outputs:
|
||||
revision: ${{ steps.select.outputs.revision }}
|
||||
run: ${{ steps.select.outputs.run }}
|
||||
steps:
|
||||
- name: Select the immutable release source
|
||||
id: select
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
REQUESTED_REVISION: ${{ inputs.revision || github.sha }}
|
||||
OPENSTORE_CHANNEL: ${{ inputs.channel || 'focal' }}
|
||||
run: |
|
||||
python3 - <<'PY'
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
def api(path):
|
||||
return json.loads(subprocess.check_output(["gh", "api", path]))
|
||||
|
||||
def timestamp(value):
|
||||
return datetime.datetime.fromisoformat(value.replace("Z", "+00:00"))
|
||||
|
||||
def finish(revision=""):
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a") as output:
|
||||
output.write(f"revision={revision}\nrun={'true' if revision else 'false'}\n")
|
||||
raise SystemExit(0)
|
||||
|
||||
revision = os.environ["REQUESTED_REVISION"]
|
||||
if os.environ["GITHUB_EVENT_NAME"] == "workflow_run":
|
||||
event = json.loads(Path(os.environ["GITHUB_EVENT_PATH"]).read_text())
|
||||
repo = os.environ["GITHUB_REPOSITORY"]
|
||||
release = api(f"repos/{repo}/releases/latest")
|
||||
if release["draft"] or release["prerelease"] or timestamp(release["published_at"]) < timestamp(event["workflow_run"]["created_at"]):
|
||||
print("This run did not publish a new stable release; no OpenStore update.")
|
||||
finish()
|
||||
match = re.fullmatch(r"v(\d+)\.(\d+)\.(\d+)", release["tag_name"])
|
||||
assert match, "Expected a numeric published release"
|
||||
version = tuple(map(int, match.groups()))
|
||||
store = json.loads(subprocess.check_output([
|
||||
"curl", "--fail", "--silent", "--show-error", "--retry", "3",
|
||||
"https://open-store.io/api/v4/apps/inbe"]))
|
||||
assert store.get("success"), "OpenStore metadata lookup failed"
|
||||
for item in store["data"].get("revisions", []):
|
||||
existing = re.fullmatch(r"(\d+)\.(\d+)\.(\d+)", item.get("version", ""))
|
||||
if item.get("channel") == os.environ["OPENSTORE_CHANNEL"] and item.get("architecture") == "arm64" and existing and tuple(map(int, existing.groups())) >= version:
|
||||
print("OpenStore already has this release or a newer one.")
|
||||
finish()
|
||||
revision = api(f"repos/{repo}/commits/{release['tag_name']}")["sha"]
|
||||
assert re.fullmatch(r"[0-9a-f]{40}", revision), "An exact commit is required"
|
||||
finish(revision)
|
||||
PY
|
||||
|
||||
publish:
|
||||
needs: source
|
||||
if: needs.source.outputs.run == 'true'
|
||||
concurrency:
|
||||
# Skipped source checks and diagnostics cannot replace a pending release.
|
||||
group: openstore-${{ inputs.channel || 'focal' }}-${{ inputs.build_only && 'verify' || 'publish' }}
|
||||
cancel-in-progress: false
|
||||
runs-on: ubuntu-24.04
|
||||
# The published focal channel must use Focal's ARM64 libc and libraries.
|
||||
container: clickable/ci-20.04-arm64@sha256:c6227ffcdb2abb50101a8469dd2a8df3ffd9208e04a3e07e351db63d36bec5d6
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
timeout-minutes: 90
|
||||
|
||||
env:
|
||||
OPENSTORE_API_KEY: ${{ secrets.OPENSTORE_API_KEY }}
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# Ziran runs on the builder; only Click artifacts use the cross compiler.
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
OPENSTORE_APP_ID: inbe
|
||||
OPENSTORE_CHANNEL: ${{ github.event.inputs.channel || 'focal' }}
|
||||
CHANGELOG: ${{ github.event.inputs.changelog || github.event.release.name || github.event.release.tag_name || '' }}
|
||||
@@ -42,14 +115,90 @@ jobs:
|
||||
steps:
|
||||
- name: Require an immutable source
|
||||
env:
|
||||
CANDIDATE: ${{ inputs.revision || github.sha }}
|
||||
CANDIDATE: ${{ needs.source.outputs.revision }}
|
||||
run: |
|
||||
[[ "$CANDIDATE" =~ ^[0-9a-f]{40}$ ]] || { echo 'An exact commit is required'; exit 1; }
|
||||
|
||||
- name: Install the Focal build environment
|
||||
run: |
|
||||
set -euo pipefail
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential binutils-aarch64-linux-gnu ca-certificates ccache \
|
||||
click curl gcc-aarch64-linux-gnu git git-lfs jq make patchelf \
|
||||
perl pkg-config tcl xz-utils zlib1g-dev libbz2-1.0 libffi7 liblzma5 \
|
||||
libsqlite3-0 libssl-dev \
|
||||
libdrm-dev:arm64 libegl1-mesa-dev:arm64 libgbm-dev:arm64 \
|
||||
libgles2-mesa-dev:arm64 libsdl2-dev:arm64 libssl-dev:arm64 zlib1g-dev:arm64
|
||||
apt-get install -y --no-install-recommends libwayland-bin \
|
||||
libwayland-dev:arm64 libxkbcommon-dev:arm64 libpulse-dev:arm64 libdbus-1-dev:arm64
|
||||
|
||||
- name: Set up build Python for Focal
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
with:
|
||||
# Last upstream Actions build that supports Ubuntu 20.04.
|
||||
python-version: '3.12.10'
|
||||
|
||||
- name: Install current build tools
|
||||
run: |
|
||||
# The project uses GNU Make 4.3+ function/comment parsing.
|
||||
python3 -m pip install cmake==3.28.4 fonttools==4.58.5 gnumake==4.4.1
|
||||
make --version
|
||||
|
||||
- name: Build Focal TLS libraries
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# The locked Curl requires OpenSSL 3. Build its current LTS for
|
||||
# Focal instead of importing a newer distribution's libc.
|
||||
tls_source="$RUNNER_TEMP/inbe-openssl"
|
||||
mkdir -p "$tls_source"
|
||||
curl --fail --location --retry 3 \
|
||||
https://github.com/openssl/openssl/releases/download/openssl-3.5.9/openssl-3.5.9.tar.gz \
|
||||
--output "$tls_source/source.tar.gz"
|
||||
printf '%s %s\n' \
|
||||
603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a \
|
||||
"$tls_source/source.tar.gz" | sha256sum --check -
|
||||
tar -xzf "$tls_source/source.tar.gz" -C "$tls_source"
|
||||
cd "$tls_source/openssl-3.5.9"
|
||||
./Configure linux-aarch64 --cross-compile-prefix=aarch64-linux-gnu- \
|
||||
--prefix=/opt/inbe-openssl --libdir=lib --openssldir=/etc/ssl shared no-tests
|
||||
make -j2 build_sw
|
||||
make install_sw
|
||||
cp LICENSE.txt /opt/inbe-openssl/lib/OpenSSL-LICENSE.txt
|
||||
|
||||
- name: Build Focal SDL with Wayland
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sdl_source="$RUNNER_TEMP/inbe-sdl2"
|
||||
mkdir -p "$sdl_source"
|
||||
curl --fail --location --retry 3 \
|
||||
https://github.com/libsdl-org/SDL/releases/download/release-2.32.10/SDL2-2.32.10.tar.gz \
|
||||
--output "$sdl_source/source.tar.gz"
|
||||
printf '%s %s\n' \
|
||||
5f5993c530f084535c65a6879e9b26ad441169b3e25d789d83287040a9ca5165 \
|
||||
"$sdl_source/source.tar.gz" | sha256sum --check -
|
||||
tar -xzf "$sdl_source/source.tar.gz" -C "$sdl_source"
|
||||
unset PKG_CONFIG_PATH
|
||||
export PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
|
||||
cmake_bin="$(python3 -c 'import cmake; print(cmake.CMAKE_BIN_DIR + "/cmake")')"
|
||||
"$cmake_bin" -S "$sdl_source/SDL2-2.32.10" -B "$sdl_source/build" \
|
||||
-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 \
|
||||
-DCMAKE_C_COMPILER=/usr/bin/aarch64-linux-gnu-gcc \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/inbe-sdl2 -DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DSDL_SHARED=ON -DSDL_STATIC=OFF -DSDL_TEST=OFF \
|
||||
-DSDL_WAYLAND=ON -DSDL_WAYLAND_SHARED=ON -DSDL_WAYLAND_LIBDECOR=OFF \
|
||||
-DSDL_X11=ON -DSDL_KMSDRM=OFF -DSDL_OPENGL=OFF -DSDL_OPENGLES=ON \
|
||||
-DSDL_PULSEAUDIO=ON -DSDL_ALSA=OFF
|
||||
grep -q '^#define SDL_VIDEO_DRIVER_WAYLAND 1' "$sdl_source/build/SDL_config.h.intermediate"
|
||||
"$cmake_bin" --build "$sdl_source/build" --parallel 2
|
||||
"$cmake_bin" --install "$sdl_source/build"
|
||||
cp "$sdl_source/SDL2-2.32.10/LICENSE.txt" /opt/inbe-sdl2/lib/SDL2-LICENSE.txt
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.revision || github.sha }}
|
||||
ref: ${{ needs.source.outputs.revision }}
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
|
||||
@@ -59,43 +208,12 @@ jobs:
|
||||
- name: Scan Tracked Files and History
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# The SDK container runs under a different UID from the checkout.
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git ls-files -z >/dev/null
|
||||
python3 scripts/check-secrets.py --working-tree
|
||||
python3 scripts/check-secrets.py --history
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo dpkg --add-architecture arm64
|
||||
# Ubuntu's archive/security mirrors only carry amd64/i386; arm64
|
||||
# lives on ports.ubuntu.com. Pin the stock deb822 sources to amd64
|
||||
# and add a ports source, otherwise apt-get update 404s on
|
||||
# binary-arm64 and the install step fails.
|
||||
sudo sed -i 's/^Types: deb$/Types: deb\nArchitectures: amd64 i386/' /etc/apt/sources.list.d/ubuntu.sources
|
||||
printf 'Types: deb\nURIs: http://ports.ubuntu.com/ubuntu-ports\nSuites: noble noble-updates noble-backports noble-security\nComponents: main universe restricted multiverse\nArchitectures: arm64\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' | sudo tee /etc/apt/sources.list.d/ports-arm64.sources >/dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
binutils-aarch64-linux-gnu \
|
||||
ccache \
|
||||
click \
|
||||
cmake \
|
||||
curl \
|
||||
gcc-aarch64-linux-gnu \
|
||||
jq \
|
||||
make \
|
||||
patchelf \
|
||||
pkg-config \
|
||||
python3-fonttools \
|
||||
tcl \
|
||||
zlib1g-dev \
|
||||
libcurl4-openssl-dev:arm64 \
|
||||
libdrm-dev:arm64 \
|
||||
libegl-dev:arm64 \
|
||||
libgbm-dev:arm64 \
|
||||
libgles-dev:arm64 \
|
||||
libsdl2-dev:arm64 \
|
||||
libssl-dev:arm64 \
|
||||
zlib1g-dev:arm64
|
||||
|
||||
- name: Build Click package
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -105,19 +223,42 @@ jobs:
|
||||
export AARCH64_CC="$(command -v aarch64-linux-gnu-gcc)"
|
||||
export AARCH64_AR="$(command -v aarch64-linux-gnu-ar)"
|
||||
export AARCH64_RANLIB="$(command -v aarch64-linux-gnu-ranlib)"
|
||||
export AARCH64_PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
|
||||
export OPENSSL_ROOT_DIR=/opt/inbe-openssl
|
||||
# Cross builds cannot autodetect the device's CA store.
|
||||
export CMAKE_TOOLCHAIN_FILE="$RUNNER_TEMP/inbe-focal-arm64.cmake"
|
||||
cat > "$CMAKE_TOOLCHAIN_FILE" <<'CMAKE'
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
|
||||
set(OPENSSL_ROOT_DIR /opt/inbe-openssl CACHE PATH "Focal-built TLS")
|
||||
set(CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt CACHE FILEPATH "Device CA bundle")
|
||||
set(CURL_CA_PATH /etc/ssl/certs CACHE PATH "Device CA directory")
|
||||
CMAKE
|
||||
unset PKG_CONFIG_PATH
|
||||
export AARCH64_PKG_CONFIG_PATH=/opt/inbe-openssl/lib/pkgconfig:/opt/inbe-sdl2/lib/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
|
||||
export PKG_CONFIG_LIBDIR="$AARCH64_PKG_CONFIG_PATH"
|
||||
export AARCH64_RAY_SDL_CFLAGS="$(pkg-config --cflags sdl2)"
|
||||
export AARCH64_RAY_SDL_LDLIBS="$(pkg-config --libs sdl2)"
|
||||
export AARCH64_RAY_GL_CFLAGS="$(pkg-config --cflags libdrm gbm egl glesv2)"
|
||||
export AARCH64_RAY_GL_LDLIBS="$(pkg-config --libs libdrm gbm egl glesv2)"
|
||||
export AARCH64_RAY_CFLAGS="$AARCH64_RAY_SDL_CFLAGS $AARCH64_RAY_GL_CFLAGS"
|
||||
export AARCH64_RAY_LDLIBS="$AARCH64_RAY_SDL_LDLIBS $AARCH64_RAY_GL_LDLIBS"
|
||||
export AARCH64_RAY_SDL_INCLUDE_DIR=/usr/include/SDL2
|
||||
export AARCH64_KRYON_CURL_CFLAGS="$(pkg-config --cflags libcurl)"
|
||||
export AARCH64_KRYON_CURL_LDLIBS="$(pkg-config --libs libcurl)"
|
||||
export AARCH64_CLICK_RUNTIME_LIBS="/usr/lib/aarch64-linux-gnu/libSDL2-2.0.so.0 /usr/lib/aarch64-linux-gnu/libcurl.so.4 /usr/lib/aarch64-linux-gnu/libssl.so.3 /usr/lib/aarch64-linux-gnu/libcrypto.so.3 /usr/lib/aarch64-linux-gnu/libdrm.so.2 /usr/lib/aarch64-linux-gnu/libgbm.so.1 /usr/lib/aarch64-linux-gnu/libEGL.so.1 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2 /usr/lib/aarch64-linux-gnu/libz.so.1"
|
||||
make CLICK_ARCH=arm64 click
|
||||
# Search bundled TLS and SDL before the SDK's older system copies.
|
||||
export AARCH64_RAY_LDLIBS="-L/opt/inbe-openssl/lib $AARCH64_RAY_SDL_LDLIBS $AARCH64_RAY_GL_LDLIBS"
|
||||
export AARCH64_RAY_SDL_INCLUDE_DIR="$(pkg-config --variable=includedir sdl2)/SDL2"
|
||||
click_curl_dir="$PWD/vendor-builds/click/arm64/curl"
|
||||
export AARCH64_KRYON_CURL_CFLAGS="-DCURL_STATICLIB -I$click_curl_dir/include"
|
||||
export AARCH64_KRYON_CURL_LDLIBS="$click_curl_dir/lib/libcurl.a -L/opt/inbe-openssl/lib -lssl -lcrypto -lz -lpthread"
|
||||
# The framework supplies graphics libraries for the device's GPU.
|
||||
atomic_runtime="$("$AARCH64_CC" -print-file-name=libatomic.so.1)"
|
||||
export AARCH64_CLICK_RUNTIME_LIBS="$(pkg-config --variable=libdir sdl2)/libSDL2-2.0.so.0 /opt/inbe-sdl2/lib/SDL2-LICENSE.txt /opt/inbe-openssl/lib/libssl.so.3 /opt/inbe-openssl/lib/libcrypto.so.3 /opt/inbe-openssl/lib/OpenSSL-LICENSE.txt $atomic_runtime /usr/lib/aarch64-linux-gnu/libz.so.1"
|
||||
for runtime_file in $AARCH64_CLICK_RUNTIME_LIBS; do
|
||||
test -f "$runtime_file"
|
||||
done
|
||||
# Make otherwise prefers the SDK's older /usr/bin/cmake.
|
||||
export CMAKE="$(python3 -c 'import cmake; print(cmake.CMAKE_BIN_DIR + "/cmake")')"
|
||||
"$CMAKE" --version
|
||||
make CMAKE="$CMAKE" LDFLAGS="-Wl,--gc-sections -s -L/opt/inbe-openssl/lib" CLICK_ARCH=arm64 click
|
||||
python3 scripts/check-click-abi.py build/dist/click/*.click
|
||||
|
||||
- name: Show package contents
|
||||
run: |
|
||||
@@ -143,7 +284,11 @@ jobs:
|
||||
|
||||
- name: Publish to OpenStore
|
||||
if: ${{ !inputs.build_only }}
|
||||
env:
|
||||
OPENSTORE_API_KEY: ${{ secrets.OPENSTORE_API_KEY }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version="$(python3 scripts/check-version.py --print-version)"
|
||||
python3 scripts/check-phone-check.py "$version" --revision "$(git rev-parse HEAD)"
|
||||
click_file="$(ls -t build/dist/click/*.click | head -1)"
|
||||
scripts/publish-openstore.sh "$click_file"
|
||||
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.54] - 2026-10-27
|
||||
|
||||
- Buy Dew through Google Play in the Google Play version.
|
||||
|
||||
## [2.1.53] - 2026-10-27
|
||||
|
||||
- Top up Dew with Bitcoin, USDT and other coins through dew.waozi.xyz.
|
||||
- The Google Play version uses current Android components.
|
||||
|
||||
## [2.1.52] - 2026-10-27
|
||||
|
||||
- Set an account alias with capitals, an @ or spaces; a taken alias now says so.
|
||||
- Restore audio playback and account sync on Ubuntu Touch.
|
||||
|
||||
## [2.1.51] - 2026-10-27
|
||||
|
||||
- Open Link to reliably while choosing a new habit's icon.
|
||||
|
||||
@@ -34,6 +34,8 @@ account to sync across devices.
|
||||
changing your app. Offline commands work without an AI connection.
|
||||
- **Your apps:** arrange Apps as a list or grid, choose colours and icons,
|
||||
listen to ambient Radio, and explore Arcade games and achievements.
|
||||
- **Profile:** compare practice and game rankings with friends in Leaderboard.
|
||||
Only installed apps, ranked practices and installed games appear there.
|
||||
|
||||
## A look inside
|
||||
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.3.18] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.54.
|
||||
|
||||
## [1.3.17] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.53.
|
||||
|
||||
## [1.3.16] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.52.
|
||||
|
||||
## [1.3.15] - 2026-10-26
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.51.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.3.9] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.54.
|
||||
|
||||
## [1.3.8] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.53.
|
||||
|
||||
## [1.3.7] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.52.
|
||||
|
||||
## [1.3.6] - 2026-10-27
|
||||
|
||||
- Open Link to reliably with the expanded icon picker.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.54] - 2026-10-27
|
||||
|
||||
- Bring Lumi 1.5.21, Habits 1.3.9, Practices 1.6.3, Lists 1.1.22, Diary 1.3.18 and Leaderboard 1.0.23 for Inner Breeze 2.1.54.
|
||||
|
||||
## [2.1.53] - 2026-10-27
|
||||
|
||||
- Bring Lumi 1.5.20, Habits 1.3.8, Practices 1.6.2, Lists 1.1.21, Diary 1.3.17 and Leaderboard 1.0.22 for Inner Breeze 2.1.53.
|
||||
|
||||
## [2.1.52] - 2026-10-27
|
||||
|
||||
- Bring Lumi 1.5.19, Habits 1.3.7, Practices 1.6.1, Lists 1.1.20, Diary 1.3.16 and Leaderboard 1.0.21 for Inner Breeze 2.1.52.
|
||||
|
||||
## [2.1.51] - 2026-10-26
|
||||
|
||||
- Bring Lumi 1.5.18, Habits 1.3.6, Practices 1.6.0, Lists 1.1.19, Diary 1.3.15 and Leaderboard 1.0.20 for Inner Breeze 2.1.51.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.23] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.54.
|
||||
|
||||
## [1.0.22] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.53.
|
||||
|
||||
## [1.0.21] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.52.
|
||||
|
||||
## [1.0.20] - 2026-10-26
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.51.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.22] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.54.
|
||||
|
||||
## [1.1.21] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.53.
|
||||
|
||||
## [1.1.20] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.52.
|
||||
|
||||
## [1.1.19] - 2026-10-26
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.51.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.5.21] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.54.
|
||||
|
||||
## [1.5.20] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.53.
|
||||
|
||||
## [1.5.19] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.52.
|
||||
|
||||
## [1.5.18] - 2026-10-26
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.51.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.6.3] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.54.
|
||||
|
||||
## [1.6.2] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.53.
|
||||
|
||||
## [1.6.1] - 2026-10-27
|
||||
|
||||
- Maintenance release for Inner Breeze 2.1.52.
|
||||
|
||||
## [1.6.0] - 2026-10-27
|
||||
|
||||
- Offer a linked habit after the first saved session of a practice.
|
||||
|
||||
+23
-23
@@ -1,66 +1,66 @@
|
||||
{
|
||||
"host_api": 38,
|
||||
"host_api": 39,
|
||||
"oldest_host_api": 12,
|
||||
"package_format": "zx",
|
||||
"module_api": 2,
|
||||
"apps": {
|
||||
"inbe": {
|
||||
"id": "inbe",
|
||||
"version": "2.1.51",
|
||||
"sequence": 48,
|
||||
"version": "2.1.54",
|
||||
"sequence": 51,
|
||||
"bundled": true,
|
||||
"host_api": 38,
|
||||
"release": "2.1.51"
|
||||
"host_api": 39,
|
||||
"release": "2.1.54"
|
||||
},
|
||||
"habits": {
|
||||
"id": "inbe.habits",
|
||||
"version": "1.3.6",
|
||||
"sequence": 29,
|
||||
"version": "1.3.9",
|
||||
"sequence": 32,
|
||||
"bundled": true,
|
||||
"host_api": 38,
|
||||
"oldest_host_api": 30,
|
||||
"release": "2.1.51"
|
||||
"release": "2.1.54"
|
||||
},
|
||||
"practices": {
|
||||
"id": "inbe.practices",
|
||||
"version": "1.6.0",
|
||||
"sequence": 29,
|
||||
"version": "1.6.3",
|
||||
"sequence": 32,
|
||||
"bundled": true,
|
||||
"host_api": 37,
|
||||
"oldest_host_api": 31,
|
||||
"release": "2.1.51"
|
||||
"release": "2.1.54"
|
||||
},
|
||||
"lists": {
|
||||
"id": "inbe.lists",
|
||||
"version": "1.1.19",
|
||||
"sequence": 27,
|
||||
"version": "1.1.22",
|
||||
"sequence": 30,
|
||||
"bundled": true,
|
||||
"host_api": 27,
|
||||
"release": "2.1.51"
|
||||
"release": "2.1.54"
|
||||
},
|
||||
"diary": {
|
||||
"id": "inbe.diary",
|
||||
"version": "1.3.15",
|
||||
"sequence": 32,
|
||||
"version": "1.3.18",
|
||||
"sequence": 35,
|
||||
"bundled": true,
|
||||
"host_api": 21,
|
||||
"release": "2.1.51"
|
||||
"release": "2.1.54"
|
||||
},
|
||||
"lumi": {
|
||||
"id": "inbe.lumi",
|
||||
"version": "1.5.18",
|
||||
"sequence": 36,
|
||||
"version": "1.5.21",
|
||||
"sequence": 39,
|
||||
"bundled": true,
|
||||
"host_api": 20,
|
||||
"release": "2.1.51"
|
||||
"release": "2.1.54"
|
||||
},
|
||||
"leaderboard": {
|
||||
"id": "inbe.leaderboard",
|
||||
"version": "1.0.20",
|
||||
"sequence": 21,
|
||||
"version": "1.0.23",
|
||||
"sequence": 24,
|
||||
"bundled": true,
|
||||
"host_api": 25,
|
||||
"release": "2.1.51"
|
||||
"release": "2.1.54"
|
||||
}
|
||||
},
|
||||
"node_apps": {
|
||||
|
||||
@@ -964,6 +964,16 @@ A release names one fixed commit while peers keep working on master:
|
||||
Subsequent master commits cannot cancel its release. Only the workflow
|
||||
creates the release tag after all required gates pass.
|
||||
|
||||
For a fixed release, publish the `release_commit` from
|
||||
`build/release-candidate.json` at its `release_ref` before dispatching the
|
||||
workflow: `git push origin RELEASE_COMMIT:refs/heads/release-candidates/X.Y.Z`.
|
||||
Keep that reference on the tested commit; do not move an existing candidate
|
||||
to different content. The checkout stays on master. GitHub requires a branch
|
||||
head or tag reference when its release token targets an older commit with
|
||||
different workflow files, so the candidate reference lets the workflow publish
|
||||
that exact tested snapshot with its existing permissions. It does not create
|
||||
a release tag or grant new credentials.
|
||||
|
||||
When an earlier Release run already passed every test, platform and
|
||||
F-Droid reproducibility job for the source, supply its run ID as `reuse_run`.
|
||||
The identical source must also pass CI, including browser add-on smoke tests.
|
||||
|
||||
+23
-2
@@ -22,6 +22,8 @@ if (verificationInstance && gradle.startParameter.taskNames.any {
|
||||
}
|
||||
def buildingAndroidBundle = gradle.startParameter.taskNames.any { it.toLowerCase().contains("bundle") }
|
||||
def kryonDirOverride = (project.findProperty('kryon.dir') ?: System.getenv("KRYON_DIR") ?: '').toString()
|
||||
// The same Kryon checkout CMake builds with; a relative path starts at the repository.
|
||||
def kryonDir = rootProject.file('..').toPath().resolve(kryonDirOverride ?: 'build/packages/kryon').toFile()
|
||||
|
||||
android {
|
||||
useLibrary 'android.test.runner', false
|
||||
@@ -67,8 +69,8 @@ android {
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
testInstrumentationRunner "android.test.InstrumentationTestRunner"
|
||||
versionCode 188
|
||||
versionName "2.1.51"
|
||||
versionCode 191
|
||||
versionName "2.1.54"
|
||||
manifestPlaceholders = [
|
||||
inbeAppLabel: "Inner Breeze",
|
||||
inbeUsesCleartextTraffic: "false"
|
||||
@@ -106,6 +108,12 @@ android {
|
||||
initWith release
|
||||
signingConfig releaseSigning
|
||||
matchingFallbacks = ['release']
|
||||
// Native code sees GOOGLE_PLAY and sells Dew through Play Billing.
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DAPP_EDITION=gplay'
|
||||
}
|
||||
}
|
||||
buildConfigField "boolean", "GPLAY", "true"
|
||||
buildConfigField "boolean", "SELF_UPDATE", "false"
|
||||
buildConfigField "String", "UPDATE_FEED", '""'
|
||||
@@ -143,6 +151,10 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
// Kryon's Play Billing (kryon/play_billing finds it through the
|
||||
// activity's class loader); other editions carry no Google billing.
|
||||
sourceSets.gplay.java.srcDir new File(kryonDir, 'templates/droid/droid/app/src/gplay/java')
|
||||
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
@@ -267,4 +279,13 @@ dependencies {
|
||||
implementation 'com.google.zxing:core:3.3.0'
|
||||
gplayImplementation platform('com.google.firebase:firebase-bom:34.18.0')
|
||||
gplayImplementation 'com.google.firebase:firebase-messaging'
|
||||
gplayImplementation 'com.android.billingclient:billing:9.1.0'
|
||||
// Billing's AndroidX libraries mix Kotlin 1.6 and 1.8 standard
|
||||
// libraries; one Kotlin version keeps their classes from colliding.
|
||||
gplayImplementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.22')
|
||||
// Play services still request Fragment 1.1.0, which Google Play reports
|
||||
// as an outdated SDK; resolve it to a current release instead.
|
||||
constraints {
|
||||
gplayImplementation 'androidx.fragment:fragment:1.8.9'
|
||||
}
|
||||
}
|
||||
Vendored
+3
-1
@@ -5,7 +5,9 @@
|
||||
# Native code looks these up by class or method name through JNI/reflection.
|
||||
-keep class xyz.waozi.inbe.ShareHelper { *; }
|
||||
-keep class xyz.waozi.inbe.GplayPushBridge { *; }
|
||||
-keep class xyz.waozi.inbe.GplayPaymentBridge { *; }
|
||||
-keep class org.kryonlabs.play.PlayBilling {
|
||||
public static java.lang.String call(android.app.Activity, java.lang.String);
|
||||
}
|
||||
|
||||
# Manifest and platform callback entrypoints must keep their public shape.
|
||||
-keep class xyz.waozi.inbe.FcmPushService { *; }
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.widget.Toast;
|
||||
|
||||
final class GplayPaymentBridge {
|
||||
private GplayPaymentBridge() {}
|
||||
|
||||
static String channel() {
|
||||
return "disabled";
|
||||
}
|
||||
|
||||
static void purchaseTokens(final MainActivity activity, final String productId,
|
||||
final String accountId, final String authToken) {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(activity, "Token purchases are not available in this build.", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -98,6 +98,12 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND APP_ZIRAN_DEFINES --define ANDROID_DEBUG)
|
||||
string(APPEND APP_ZIRAN_CHECK_DEFINES " ANDROID_DEBUG")
|
||||
endif()
|
||||
# The Google Play edition (build.gradle's gplay type) buys Dew through Play
|
||||
# Billing (entity/dew_play).
|
||||
if(APP_EDITION STREQUAL "gplay")
|
||||
list(APPEND APP_ZIRAN_DEFINES --define GOOGLE_PLAY)
|
||||
string(APPEND APP_ZIRAN_CHECK_DEFINES " GOOGLE_PLAY")
|
||||
endif()
|
||||
if(ANDROID_ABI STREQUAL "arm64-v8a")
|
||||
set(APP_ZIRAN_ARCH __aarch64__)
|
||||
elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
|
||||
|
||||
@@ -1079,18 +1079,6 @@ public class MainActivity extends NativeActivity {
|
||||
PushBridge.disable(this);
|
||||
}
|
||||
|
||||
public String paymentChannel() {
|
||||
return PaymentBridge.channel();
|
||||
}
|
||||
|
||||
public boolean dewAvailable() {
|
||||
return !BuildConfig.GPLAY;
|
||||
}
|
||||
|
||||
public void purchaseTokens(final String productId, final String accountId, final String authToken) {
|
||||
PaymentBridge.purchaseTokens(this, productId, accountId, authToken);
|
||||
}
|
||||
|
||||
private RadioPlayer radioPlayer;
|
||||
private volatile boolean radioBackgroundActive;
|
||||
private volatile boolean sessionWakeLockRequested;
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.widget.Toast;
|
||||
import java.lang.reflect.Method;
|
||||
import org.json.JSONObject;
|
||||
|
||||
final class PaymentBridge {
|
||||
private static final String DAOCHI_BASE_URL = "https://api.waozi.xyz";
|
||||
|
||||
private PaymentBridge() {}
|
||||
|
||||
static String channel() {
|
||||
String gplayChannel = gplayChannel();
|
||||
if (gplayChannel != null) {
|
||||
return gplayChannel;
|
||||
}
|
||||
return "monero";
|
||||
}
|
||||
|
||||
static void purchaseTokens(final MainActivity activity, final String productId,
|
||||
final String accountId, final String authToken) {
|
||||
if (purchaseGplayTokens(activity, productId, accountId, authToken)) {
|
||||
return;
|
||||
}
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
String body = "{\"app_id\":\"inbe\",\"product_id\":\"" + jsonEscape(productId) + "\"}";
|
||||
String response = SyncNetwork.httpRequest("PAYMENTS", "POST",
|
||||
DAOCHI_BASE_URL + "/api/v1/tokens/purchases/monero/invoices",
|
||||
body, authHeaders(authToken));
|
||||
final Invoice invoice = parseInvoice(response);
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (invoice.ok) {
|
||||
Toast.makeText(activity,
|
||||
"Send " + invoice.atomicAmount + " atomic XMR to " + invoice.address,
|
||||
Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
Toast.makeText(activity, invoice.message, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
showToast(activity, "Monero invoice failed");
|
||||
}
|
||||
}
|
||||
}, "monero-token-invoice").start();
|
||||
}
|
||||
|
||||
private static String gplayChannel() {
|
||||
try {
|
||||
Method method = Class.forName("xyz.waozi.inbe.GplayPaymentBridge").getDeclaredMethod("channel");
|
||||
method.setAccessible(true);
|
||||
return (String) method.invoke(null);
|
||||
} catch (ClassNotFoundException e) {
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
return "disabled";
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean purchaseGplayTokens(MainActivity activity, String productId,
|
||||
String accountId, String authToken) {
|
||||
try {
|
||||
Method method = Class.forName("xyz.waozi.inbe.GplayPaymentBridge").getDeclaredMethod(
|
||||
"purchaseTokens", MainActivity.class, String.class, String.class, String.class);
|
||||
method.setAccessible(true);
|
||||
method.invoke(null, activity, productId, accountId, authToken);
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
showToast(activity, "Token purchases are not available in this build.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static String[] authHeaders(String authToken) {
|
||||
return new String[] {
|
||||
"Content-Type: application/json",
|
||||
"Authorization: Bearer " + (authToken != null ? authToken : "")
|
||||
};
|
||||
}
|
||||
|
||||
private static Invoice parseInvoice(String response) throws Exception {
|
||||
int newline = response.indexOf('\n');
|
||||
int status = newline > 0 ? Integer.parseInt(response.substring(0, newline).trim()) : 0;
|
||||
String body = newline >= 0 ? response.substring(newline + 1) : "";
|
||||
if (status < 200 || status >= 300) {
|
||||
return new Invoice(false, "Monero invoice unavailable", "", 0);
|
||||
}
|
||||
JSONObject json = new JSONObject(body);
|
||||
return new Invoice(true, "", json.optString("address", ""),
|
||||
json.optLong("atomic_amount", 0));
|
||||
}
|
||||
|
||||
private static void showToast(final MainActivity activity, final String message) {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(activity, message, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static String jsonEscape(String value) {
|
||||
if (value == null) return "";
|
||||
return value.replace("\\", "\\\\").replace("\"", "\\\"");
|
||||
}
|
||||
|
||||
private static final class Invoice {
|
||||
final boolean ok;
|
||||
final String message;
|
||||
final String address;
|
||||
final long atomicAmount;
|
||||
|
||||
Invoice(boolean ok, String message, String address, long atomicAmount) {
|
||||
this.ok = ok;
|
||||
this.message = message;
|
||||
this.address = address;
|
||||
this.atomicAmount = atomicAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
- Set an account alias with capitals, an @ or spaces; a taken alias now says so.
|
||||
- Restore audio playback and account sync on Ubuntu Touch.
|
||||
@@ -0,0 +1,2 @@
|
||||
- Top up Dew with Bitcoin, USDT and other coins through dew.waozi.xyz.
|
||||
- The Google Play version uses current Android components.
|
||||
@@ -0,0 +1 @@
|
||||
- Buy Dew through Google Play in the Google Play version.
|
||||
+33
-1
@@ -607,6 +607,9 @@ Adresa zkopírována
|
||||
[open_wallet_button]
|
||||
Peněženka
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Koupit jinou kryptoměnou
|
||||
---
|
||||
[orientation_label]
|
||||
Orientace
|
||||
---
|
||||
@@ -5140,7 +5143,7 @@ Dobít
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Nedostatek Dew. Nejprve dobij přes Monero.
|
||||
Nedostatek Dew. Nejprve si dobij.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5208,6 +5211,30 @@ Získávám tvou adresu Monero…
|
||||
Adresu Monero se nepodařilo získat. Zkus to znovu.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Koupit %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Načítám ceny z Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Nákupy přes Google Play teď nejsou k dispozici.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Připisuji Dew z tvého nákupu na Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Dew bylo připsáno.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play platbu přijal, ale Dew zatím nešlo připsat. Zkusí se to znovu automaticky.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Pošli Monero na tuto adresu. Dew se objeví po %d potvrzeních.
|
||||
---
|
||||
@@ -7497,3 +7524,8 @@ Načítání obrázků
|
||||
---
|
||||
[app_loading_apps]
|
||||
Otevírání aplikací
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Žebříček se nepodařilo aktualizovat.
|
||||
---
|
||||
+33
-1
@@ -607,6 +607,9 @@ Adresse kopiert
|
||||
[open_wallet_button]
|
||||
Wallet
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Mit anderem Coin kaufen
|
||||
---
|
||||
[orientation_label]
|
||||
Ausrichtung
|
||||
---
|
||||
@@ -5134,7 +5137,7 @@ Aufladen
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Nicht genug Dew. Lade zuerst mit Monero auf.
|
||||
Nicht genug Dew. Lade zuerst auf.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5202,6 +5205,30 @@ Deine Monero-Adresse wird abgerufen…
|
||||
Die Monero-Adresse konnte nicht abgerufen werden. Versuche es erneut.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
%s Dew kaufen
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Google-Play-Preise werden geladen…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Käufe über Google Play sind gerade nicht verfügbar.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Das Dew aus deinem Google-Play-Kauf wird gutgeschrieben…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Dein Dew wurde gutgeschrieben.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play hat die Zahlung erhalten, aber das Dew konnte noch nicht gutgeschrieben werden. Es wird automatisch erneut versucht.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Sende Monero an diese Adresse. Dew erscheint nach %d Bestätigungen.
|
||||
---
|
||||
@@ -7491,3 +7518,8 @@ Bilder werden geladen
|
||||
---
|
||||
[app_loading_apps]
|
||||
Apps werden geöffnet
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Die Rangliste konnte nicht aktualisiert werden.
|
||||
---
|
||||
+33
-1
@@ -424,6 +424,9 @@ Address copied
|
||||
[open_wallet_button]
|
||||
Wallet
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Buy with another coin
|
||||
---
|
||||
[orientation_label]
|
||||
Orientation
|
||||
---
|
||||
@@ -5158,7 +5161,7 @@ Top up
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Not enough Dew. Top up with Monero first.
|
||||
Not enough Dew. Top up first.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5226,6 +5229,30 @@ Getting your Monero address…
|
||||
Could not get your Monero address. Try again.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Buy %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Loading Google Play prices…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Google Play purchases are not available right now.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Adding the Dew from your Google Play purchase…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Your Dew has been added.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play took the payment, but the Dew could not be added yet. It tries again automatically.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Send Monero to this address. Dew appears after %d confirmations.
|
||||
---
|
||||
@@ -7515,3 +7542,8 @@ Loading pictures
|
||||
---
|
||||
[app_loading_apps]
|
||||
Opening apps
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Could not refresh the leaderboard.
|
||||
---
|
||||
+33
-1
@@ -607,6 +607,9 @@ Dirección copiada
|
||||
[open_wallet_button]
|
||||
Billetera
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Comprar con otra moneda
|
||||
---
|
||||
[orientation_label]
|
||||
Orientación
|
||||
---
|
||||
@@ -5134,7 +5137,7 @@ Recargar
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
No tienes suficiente Dew. Recarga primero con Monero.
|
||||
No tienes suficiente Dew. Recarga primero.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5202,6 +5205,30 @@ Obteniendo tu dirección de Monero…
|
||||
No se pudo obtener tu dirección de Monero. Inténtalo de nuevo.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Comprar %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Cargando precios de Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Las compras de Google Play no están disponibles en este momento.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Añadiendo el Dew de tu compra en Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Tu Dew se ha añadido.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play recibió el pago, pero el Dew aún no se pudo añadir. Se volverá a intentar automáticamente.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Envía Monero a esta dirección. Dew aparece tras %d confirmaciones.
|
||||
---
|
||||
@@ -7491,3 +7518,8 @@ Cargando imágenes
|
||||
---
|
||||
[app_loading_apps]
|
||||
Abriendo aplicaciones
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
No se pudo actualizar la clasificación.
|
||||
---
|
||||
+33
-1
@@ -607,6 +607,9 @@ Adresse copiée
|
||||
[open_wallet_button]
|
||||
Portefeuille
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Acheter avec une autre crypto
|
||||
---
|
||||
[orientation_label]
|
||||
Orientation
|
||||
---
|
||||
@@ -5122,7 +5125,7 @@ Recharger
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Dew insuffisant. Rechargez d’abord avec Monero.
|
||||
Dew insuffisant. Rechargez d’abord.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5190,6 +5193,30 @@ Récupération de votre adresse Monero…
|
||||
Impossible de récupérer votre adresse Monero. Réessayez.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Acheter %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Chargement des prix Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Les achats Google Play ne sont pas disponibles pour le moment.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Ajout des Dew de votre achat Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Vos Dew ont été ajoutés.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play a reçu le paiement, mais les Dew n’ont pas encore pu être ajoutés. Une nouvelle tentative aura lieu automatiquement.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Envoyez des Monero à cette adresse. Les Dew apparaissent après %d confirmations.
|
||||
---
|
||||
@@ -7479,3 +7506,8 @@ Chargement des images
|
||||
---
|
||||
[app_loading_apps]
|
||||
Ouverture des applications
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Impossible de mettre à jour le classement.
|
||||
---
|
||||
+33
-1
@@ -607,6 +607,9 @@ Alamat disalin
|
||||
[open_wallet_button]
|
||||
Dompet
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Beli dengan koin lain
|
||||
---
|
||||
[orientation_label]
|
||||
Orientasi
|
||||
---
|
||||
@@ -5123,7 +5126,7 @@ Isi saldo
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Dew tidak cukup. Isi terlebih dahulu dengan Monero.
|
||||
Dew tidak cukup. Isi saldo terlebih dahulu.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5191,6 +5194,30 @@ Mengambil alamat Monero…
|
||||
Alamat Monero tidak dapat diambil. Coba lagi.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Beli %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Memuat harga Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Pembelian Google Play sedang tidak tersedia.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Menambahkan Dew dari pembelian Google Play Anda…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Dew Anda telah ditambahkan.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play sudah menerima pembayaran, tetapi Dew belum dapat ditambahkan. Akan dicoba lagi secara otomatis.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Kirim Monero ke alamat ini. Dew muncul setelah %d konfirmasi.
|
||||
---
|
||||
@@ -7480,3 +7507,8 @@ Memuat gambar
|
||||
---
|
||||
[app_loading_apps]
|
||||
Membuka aplikasi-aplikasi
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Papan peringkat tidak dapat diperbarui.
|
||||
---
|
||||
+33
-1
@@ -394,6 +394,9 @@ Indirizzo copiato
|
||||
[open_wallet_button]
|
||||
Portafoglio
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Compra con un'altra moneta
|
||||
---
|
||||
[orientation_label]
|
||||
Orientamento
|
||||
---
|
||||
@@ -5123,7 +5126,7 @@ Ricarica
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Dew insufficiente. Ricarica prima con Monero.
|
||||
Dew insufficiente. Ricarica prima.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5191,6 +5194,30 @@ Recupero del tuo indirizzo Monero…
|
||||
Impossibile recuperare il tuo indirizzo Monero. Riprova.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Acquista %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Caricamento dei prezzi di Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Gli acquisti con Google Play non sono disponibili al momento.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Aggiunta dei Dew dal tuo acquisto su Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
I tuoi Dew sono stati aggiunti.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play ha ricevuto il pagamento, ma non è stato ancora possibile aggiungere i Dew. Verrà riprovato automaticamente.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Invia Monero a questo indirizzo. Dew appare dopo %d conferme.
|
||||
---
|
||||
@@ -7480,3 +7507,8 @@ Caricamento immagini
|
||||
---
|
||||
[app_loading_apps]
|
||||
Apertura delle app
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Impossibile aggiornare la classifica.
|
||||
---
|
||||
+33
-1
@@ -609,6 +609,9 @@ OK
|
||||
[open_wallet_button]
|
||||
ウォレット
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
他のコインで購入
|
||||
---
|
||||
[orientation_label]
|
||||
向き
|
||||
---
|
||||
@@ -5119,7 +5122,7 @@ Dewで前払いします。プランが自動で更新されることはあり
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Dewが不足しています。先にMoneroでチャージしてください。
|
||||
Dewが不足しています。先にチャージしてください。
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5187,6 +5190,30 @@ Moneroアドレスを取得しています…
|
||||
Moneroアドレスを取得できませんでした。もう一度お試しください。
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
%s Dewを購入
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Google Playの価格を読み込んでいます…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
現在、Google Playでの購入はご利用いただけません。
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Google Playでの購入分のDewを追加しています…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Dewが追加されました。
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Playでの支払いは完了しましたが、まだDewを追加できませんでした。自動的に再試行します。
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
このアドレスにMoneroを送金してください。%d回の承認後にDewが反映されます。
|
||||
---
|
||||
@@ -7476,3 +7503,8 @@ Lumi や日記など、Inner Breeze 内のアプリを waozi.xyz から自動で
|
||||
---
|
||||
[app_loading_apps]
|
||||
アプリを読み込み中
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
ランキングを更新できませんでした。
|
||||
---
|
||||
+33
-1
@@ -394,6 +394,9 @@ Up
|
||||
[open_wallet_button]
|
||||
지갑
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
다른 코인으로 구매
|
||||
---
|
||||
[orientation_label]
|
||||
화면 방향
|
||||
---
|
||||
@@ -5129,7 +5132,7 @@ Dew로 미리 결제합니다. 요금제는 자동으로 갱신되지 않습니
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Dew가 부족해요. 먼저 Monero로 충전하세요.
|
||||
Dew가 부족해요. 먼저 충전하세요.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5197,6 +5200,30 @@ Monero 주소를 가져오는 중…
|
||||
Monero 주소를 가져오지 못했습니다. 다시 시도하세요.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
%s Dew 구매
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Google Play 가격을 불러오는 중…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
지금은 Google Play 구매를 사용할 수 없어요.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Google Play 구매로 받은 Dew를 추가하는 중…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Dew가 추가되었어요.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play에서 결제가 완료되었지만 아직 Dew를 추가하지 못했어요. 자동으로 다시 시도해요.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
이 주소로 Monero를 보내세요. %d번 확인 후 Dew가 표시됩니다.
|
||||
---
|
||||
@@ -7486,3 +7513,8 @@ Lumi, 일기 등 Inner Breeze 안의 앱을 waozi.xyz에서 자동으로 업데
|
||||
---
|
||||
[app_loading_apps]
|
||||
앱 불러오는 중
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
순위표를 새로 고칠 수 없습니다.
|
||||
---
|
||||
+33
-1
@@ -607,6 +607,9 @@ Endereço copiado
|
||||
[open_wallet_button]
|
||||
Carteira
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Comprar com outra moeda
|
||||
---
|
||||
[orientation_label]
|
||||
Orientação
|
||||
---
|
||||
@@ -5132,7 +5135,7 @@ Recarregar
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Dew insuficiente. Adicione Dew com Monero primeiro.
|
||||
Dew insuficiente. Recarregue primeiro.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5200,6 +5203,30 @@ Obtendo seu endereço Monero…
|
||||
Não foi possível obter seu endereço Monero. Tente novamente.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Comprar %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Carregando preços do Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
As compras pelo Google Play não estão disponíveis no momento.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Adicionando o Dew da sua compra no Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Seu Dew foi adicionado.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
O Google Play recebeu o pagamento, mas o Dew ainda não pôde ser adicionado. Uma nova tentativa será feita automaticamente.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Envie Monero para este endereço. Dew aparece após %d confirmações.
|
||||
---
|
||||
@@ -7489,3 +7516,8 @@ Carregando imagens
|
||||
---
|
||||
[app_loading_apps]
|
||||
Abrindo aplicativos
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Não foi possível atualizar a classificação.
|
||||
---
|
||||
+33
-1
@@ -397,6 +397,9 @@ OK
|
||||
[open_wallet_button]
|
||||
Кошелёк
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
Купить за другую монету
|
||||
---
|
||||
[orientation_label]
|
||||
Ориентация
|
||||
---
|
||||
@@ -5128,7 +5131,7 @@ Lumi остаётся без сети, пока вы не примете её у
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Недостаточно Dew. Сначала пополни баланс через Monero.
|
||||
Недостаточно Dew. Сначала пополни баланс.
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5196,6 +5199,30 @@ Lumi остаётся без сети, пока вы не примете её у
|
||||
Не удалось получить адрес Monero. Попробуй ещё раз.
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
Купить %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
Загружаем цены Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Покупки через Google Play сейчас недоступны.
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
Зачисляем Dew за твою покупку в Google Play…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
Dew зачислены.
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play принял оплату, но Dew пока не удалось зачислить. Попробуем снова автоматически.
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
Отправь Monero на этот адрес. Dew появится после %d подтверждений.
|
||||
---
|
||||
@@ -7485,3 +7512,8 @@ Inner Breeze обновлён до версии %s.
|
||||
---
|
||||
[app_loading_apps]
|
||||
Открытие приложений
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
Не удалось обновить таблицу лидеров.
|
||||
---
|
||||
+33
-1
@@ -607,6 +607,9 @@ Wim Hof 呼吸
|
||||
[open_wallet_button]
|
||||
钱包
|
||||
---
|
||||
[dew_other_coin_button]
|
||||
用其他币购买
|
||||
---
|
||||
[orientation_label]
|
||||
方向
|
||||
---
|
||||
@@ -5134,7 +5137,7 @@ Dew余额
|
||||
---
|
||||
|
||||
[profile_dew_funds]
|
||||
Dew不足,请先使用Monero充值。
|
||||
Dew不足,请先充值。
|
||||
---
|
||||
|
||||
[profile_dew_retry]
|
||||
@@ -5202,6 +5205,30 @@ Dew不足,请先使用Monero充值。
|
||||
无法获取你的Monero地址。请重试。
|
||||
---
|
||||
|
||||
[profile_dew_play_pack]
|
||||
购买 %s Dew
|
||||
---
|
||||
|
||||
[profile_dew_play_loading]
|
||||
正在加载Google Play价格…
|
||||
---
|
||||
|
||||
[profile_dew_play_unavailable]
|
||||
Google Play购买目前不可用。
|
||||
---
|
||||
|
||||
[profile_dew_play_verifying]
|
||||
正在添加你在Google Play购买的Dew…
|
||||
---
|
||||
|
||||
[profile_dew_play_credited]
|
||||
你的Dew已添加。
|
||||
---
|
||||
|
||||
[profile_dew_play_failed]
|
||||
Google Play已收到付款,但暂时无法添加Dew。系统会自动重试。
|
||||
---
|
||||
|
||||
[profile_dew_topup_send]
|
||||
将Monero发送到此地址。%d次确认后Dew即会到账。
|
||||
---
|
||||
@@ -7491,3 +7518,8 @@ Inner Breeze 已更新至 %s 版本。
|
||||
---
|
||||
[app_loading_apps]
|
||||
正在打开各个应用
|
||||
|
||||
---
|
||||
[leaderboard_refresh_failed]
|
||||
无法刷新排行榜。
|
||||
---
|
||||
+27
-2
@@ -23,6 +23,30 @@ GENERATED_CLICK_C = $(shell find $(CLICK_GEN_DIR) -type f -name '*.c' 2>/dev/nul
|
||||
CLICK_APP_INCLUDE = $(filter-out -iquote$(KRY_GEN_DIR)%,$(APP_INCLUDE)) \
|
||||
-iquote$(CLICK_GEN_DIR) \
|
||||
$(foreach dir,$(sort $(dir $(ZI_SRCS))),-iquote$(CLICK_GEN_DIR)/$(dir))
|
||||
CLICK_CURL_BUILD_DIR := $(VENDOR_BUILD_DIR)/click/$(CLICK_ARCH)/curl
|
||||
CLICK_CURL_A := $(CLICK_CURL_BUILD_DIR)/lib/libcurl.a
|
||||
|
||||
# Focal's system curl predates WebSocket support. Build the locked curl for
|
||||
# the same target as the app rather than borrowing a newer distribution's ABI.
|
||||
$(CLICK_CURL_A): $(KRYON_CURL_DIR)/CMakeLists.txt mk/packaging.mk
|
||||
$(CMAKE) -S $(KRYON_CURL_DIR) -B $(CLICK_CURL_BUILD_DIR) \
|
||||
-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 \
|
||||
-DCMAKE_C_COMPILER=$(AARCH64_CC) \
|
||||
-DCMAKE_AR=$(AARCH64_AR) -DCMAKE_RANLIB=$(AARCH64_RANLIB) \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DCMAKE_INSTALL_PREFIX=$(abspath $(CLICK_CURL_BUILD_DIR)) \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON \
|
||||
-DCURL_USE_OPENSSL=ON -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF \
|
||||
-DCURL_USE_GSSAPI=OFF -DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF \
|
||||
-DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_SMB=ON \
|
||||
-DENABLE_CURL_MANUAL=OFF -DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DBUILD_TESTING=OFF \
|
||||
$(KRYON_CURL_EXTRA_CMAKE_FLAGS)
|
||||
$(CMAKE) --build $(CLICK_CURL_BUILD_DIR) --target libcurl_static --parallel 2
|
||||
$(CMAKE) --install $(CLICK_CURL_BUILD_DIR)
|
||||
@sh $(CLICK_CURL_BUILD_DIR)/bin/curl-config --protocols | grep -Eq '(^|[[:space:]])WS([[:space:]]|$$)'
|
||||
@sh $(CLICK_CURL_BUILD_DIR)/bin/curl-config --protocols | grep -Eq '(^|[[:space:]])WSS([[:space:]]|$$)'
|
||||
|
||||
$(CLICK_GEN_STAMP): Makefile mk/packaging.mk ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES) $(GAME2D_MODULES) $(DAOCHI_CLIENT_MODULES) $(wildcard build/packages/entity/src/*.zi) $(ZIRAN_STD_MODULES) $(SYNC_RETRY_SOURCE) | build-laws zi-check
|
||||
rm -rf $(CLICK_GEN_DIR)
|
||||
@@ -78,8 +102,9 @@ $(CLICK_LIBOQS_A): $(LIBOQS_DIR)/CMakeLists.txt mk/sync.mk Makefile
|
||||
-DOQS_MINIMAL_BUILD="$(KRYON_LIBOQS_MINIMAL_BUILD)"
|
||||
$(CMAKE) --build $(CLICK_LIBOQS_BUILD_DIR) --target oqs
|
||||
|
||||
$(CLICK_BIN): Makefile mk/packaging.mk $(APP_SRCS) $(CLICK_GEN_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) $(CLICK_RAYLIB_A) $(CLICK_LIBOQS_A) | $(CLICK_BIN_DIR)
|
||||
$(CLICK_BIN): Makefile mk/packaging.mk $(APP_SRCS) $(CLICK_GEN_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) $(CLICK_RAYLIB_A) $(CLICK_LIBOQS_A) $(CLICK_CURL_A) | $(CLICK_BIN_DIR)
|
||||
$(AARCH64_CC) $(CLICK_CFLAGS) \
|
||||
-DCURL_STATICLIB -I$(CLICK_CURL_BUILD_DIR)/include \
|
||||
$(CLICK_APP_INCLUDE) \
|
||||
$(KRYON_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
@@ -97,7 +122,7 @@ $(CLICK_BIN): Makefile mk/packaging.mk $(APP_SRCS) $(CLICK_GEN_STAMP) $(SQLITE_S
|
||||
$(CLICK_RAYLIB_A) \
|
||||
$(CLICK_LIBOQS_A) \
|
||||
$(AARCH64_RAY_LDLIBS) \
|
||||
$(AARCH64_KRYON_CURL_LDLIBS) \
|
||||
$(CLICK_CURL_A) -lssl -lcrypto \
|
||||
-lm -lpthread -ldl -lrt -latomic -lz \
|
||||
$(LDFLAGS)
|
||||
@if command -v patchelf >/dev/null; then \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Package: inbe.waozi
|
||||
Version: 2.1.51
|
||||
Version: 2.1.54
|
||||
Architecture: arm64
|
||||
Maintainer: Waozi <[email protected]>
|
||||
Click-Version: 0.4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"policy_groups": [],
|
||||
"policy_groups": ["audio", "networking"],
|
||||
"policy_version": 20.04
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.51" date="2026-10-27"/>
|
||||
<release version="2.1.54" date="2026-10-27"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "inbe",
|
||||
"title": "Inner Breeze",
|
||||
"version": "2.1.51",
|
||||
"version": "2.1.54",
|
||||
"architecture": "arm64",
|
||||
"framework": "ubuntu-sdk-20.04",
|
||||
"description": "Syncable breathing, meditation, and habit practice app.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 3,
|
||||
"name": "Inner Breeze",
|
||||
"short_name": "Inbe",
|
||||
"version": "2.1.51",
|
||||
"version": "2.1.54",
|
||||
"description": "Breathing, meditation, habit tracking, and encrypted sync.",
|
||||
"permissions": [
|
||||
"contextMenus"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.51" date="2026-10-27"/>
|
||||
<release version="2.1.54" date="2026-10-27"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -22,7 +22,7 @@
|
||||
<binary>inbe</binary>
|
||||
</provides>
|
||||
<releases>
|
||||
<release version="2.1.51" date="2026-10-27"/>
|
||||
<release version="2.1.54" date="2026-10-27"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1"/>
|
||||
</component>
|
||||
@@ -6,7 +6,7 @@ description: |
|
||||
meditation, and habit tracking with visual and audio cues, meditation
|
||||
timers, habit counters, session history, and optional sync.
|
||||
|
||||
version: '2.1.51'
|
||||
version: '2.1.54'
|
||||
license: BSD-3-Clause
|
||||
base: core22
|
||||
confinement: strict
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"schema": 2,
|
||||
"version": "2.1.52",
|
||||
"app_tree": "620ced935953a53f8a23e862779c23b7baa9c97b2e0694ba4bc5ca9d91927353",
|
||||
"source_commit": "82383c3d5dc3dba4e3800f209037796805c19e67",
|
||||
"uncommitted": [],
|
||||
"apk": {
|
||||
"sha256": "5f0595f74d1e3e9b53186ac0769f846fbc5a3ccab6efbf642a652cc455e9fb0b",
|
||||
"package": "xyz.waozi.inbe.verification",
|
||||
"version_code": 189,
|
||||
"version_name": "2.1.52"
|
||||
},
|
||||
"device": {
|
||||
"model": "moto e6 play",
|
||||
"android": "9"
|
||||
},
|
||||
"practice": {
|
||||
"name": "Wim Hof",
|
||||
"seconds": 59.49,
|
||||
"frames": 3435,
|
||||
"refresh_hz": 58.4,
|
||||
"fps": 57.7,
|
||||
"late_percent": 0.03,
|
||||
"p95_frame_ms": 17.4,
|
||||
"worst_frame_ms": 34.6,
|
||||
"resume_layout_shift": 0.7
|
||||
},
|
||||
"limits": {
|
||||
"minimum_refresh_share": 0.94,
|
||||
"maximum_late_percent": 3.0,
|
||||
"maximum_frame_ms": 250.0,
|
||||
"maximum_resume_layout_shift": 2.0
|
||||
},
|
||||
"checks": [
|
||||
"installed without clearing existing data",
|
||||
"launch",
|
||||
"Wim Hof frame timing",
|
||||
"background and resume"
|
||||
],
|
||||
"passed": true,
|
||||
"checked_at": "2026-10-27T08:24:36+00:00"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"schema": 2,
|
||||
"version": "2.1.53",
|
||||
"app_tree": "9002e8bbfb8b2277fec2444c8726f319a8ca146ff368065d6765b6cf9039b16c",
|
||||
"source_commit": "14ce6d7a66c6e2c8e58dae4a6bfbee558e30deb9",
|
||||
"uncommitted": [],
|
||||
"apk": {
|
||||
"sha256": "8ab1c1d43b346abb5d5b8dee38789f2bbbf5abc6be0c8d687df99526317dfa8d",
|
||||
"package": "xyz.waozi.inbe.verification",
|
||||
"version_code": 190,
|
||||
"version_name": "2.1.53"
|
||||
},
|
||||
"device": {
|
||||
"model": "moto e6 play",
|
||||
"android": "9"
|
||||
},
|
||||
"practice": {
|
||||
"name": "Wim Hof",
|
||||
"seconds": 59.39,
|
||||
"frames": 3428,
|
||||
"refresh_hz": 58.4,
|
||||
"fps": 57.7,
|
||||
"late_percent": 0.06,
|
||||
"p95_frame_ms": 17.4,
|
||||
"worst_frame_ms": 34.7,
|
||||
"resume_layout_shift": 0.7
|
||||
},
|
||||
"limits": {
|
||||
"minimum_refresh_share": 0.94,
|
||||
"maximum_late_percent": 3.0,
|
||||
"maximum_frame_ms": 250.0,
|
||||
"maximum_resume_layout_shift": 2.0
|
||||
},
|
||||
"checks": [
|
||||
"installed without clearing existing data",
|
||||
"launch",
|
||||
"Wim Hof frame timing",
|
||||
"background and resume"
|
||||
],
|
||||
"passed": true,
|
||||
"checked_at": "2026-10-27T19:51:49+00:00"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"schema": 2,
|
||||
"version": "2.1.54",
|
||||
"app_tree": "7244aee11fb78d71e1b8b0f01cb147cdf0a41f9a358d49b23931141fe9b1883a",
|
||||
"source_commit": "d9d454da70030a395b7aec8526b416dd93a3f28c",
|
||||
"uncommitted": [],
|
||||
"apk": {
|
||||
"sha256": "7f67f516f70463d82defc3068f16d9d38196fd77c7cafab42b172bfac050cdb2",
|
||||
"package": "xyz.waozi.inbe.verification",
|
||||
"version_code": 191,
|
||||
"version_name": "2.1.54"
|
||||
},
|
||||
"device": {
|
||||
"model": "moto e6 play",
|
||||
"android": "9"
|
||||
},
|
||||
"practice": {
|
||||
"name": "Wim Hof",
|
||||
"seconds": 59.91,
|
||||
"frames": 3460,
|
||||
"refresh_hz": 58.4,
|
||||
"fps": 57.7,
|
||||
"late_percent": 0.0,
|
||||
"p95_frame_ms": 17.4,
|
||||
"worst_frame_ms": 17.9,
|
||||
"resume_layout_shift": 0.7
|
||||
},
|
||||
"limits": {
|
||||
"minimum_refresh_share": 0.94,
|
||||
"maximum_late_percent": 3.0,
|
||||
"maximum_frame_ms": 250.0,
|
||||
"maximum_resume_layout_shift": 2.0
|
||||
},
|
||||
"checks": [
|
||||
"installed without clearing existing data",
|
||||
"launch",
|
||||
"Wim Hof frame timing",
|
||||
"background and resume"
|
||||
],
|
||||
"passed": true,
|
||||
"checked_at": "2026-10-27T21:58:21+00:00"
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Reject Click binaries that require a newer runtime than their framework."""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
|
||||
def verify(package):
|
||||
with tempfile.TemporaryDirectory(prefix="click-abi-") as temporary:
|
||||
root = Path(temporary)
|
||||
subprocess.run(["dpkg-deb", "-x", str(package), str(root)], check=True)
|
||||
subprocess.run(["dpkg-deb", "-e", str(package), str(root / "DEBIAN")], check=True)
|
||||
manifest = json.loads((root / "DEBIAN/manifest").read_text())
|
||||
if manifest["framework"] != "ubuntu-sdk-20.04" or manifest["architecture"] != "arm64":
|
||||
raise ValueError("expected the ARM64 ubuntu-sdk-20.04 package")
|
||||
policy_file = manifest["hooks"]["inbe"]["apparmor"]
|
||||
policy = json.loads((root / policy_file).read_text())
|
||||
if not {"audio", "networking"}.issubset(policy.get("policy_groups", [])):
|
||||
raise ValueError("Ubuntu Touch audio and account sync require audio/networking policies")
|
||||
for name in ("libEGL.so.1", "libGLESv2.so.2", "libGLdispatch.so.0"):
|
||||
if (root / "usr/lib" / name).exists():
|
||||
raise ValueError(f"{name}: use the framework's device graphics driver")
|
||||
if not (root / "usr/lib/libatomic.so.1").is_file():
|
||||
raise ValueError("package must include the target compiler's libatomic runtime")
|
||||
checked = 0
|
||||
for path in sorted(root.rglob("*")):
|
||||
if not path.is_file() or path.is_symlink():
|
||||
continue
|
||||
with path.open("rb") as stream:
|
||||
if stream.read(4) != b"\x7fELF":
|
||||
continue
|
||||
relative = path.relative_to(root)
|
||||
header = subprocess.check_output(["readelf", "-h", str(path)], text=True)
|
||||
if not re.search(r"Machine:\s+AArch64\b", header):
|
||||
raise ValueError(f"{relative}: expected an AArch64 ELF")
|
||||
versions = subprocess.check_output(["readelf", "--version-info", str(path)], text=True)
|
||||
required = [tuple(map(int, match.split(".")))
|
||||
for match in re.findall(r"\bGLIBC_(\d+\.\d+(?:\.\d+)?)\b", versions)]
|
||||
newest = max(required, default=(0, 0))
|
||||
if newest > (2, 31):
|
||||
raise ValueError(f"{relative}: GLIBC_{'.'.join(map(str, newest))} exceeds Focal's 2.31")
|
||||
print(f"{relative}: ARM64, newest GLIBC_{'.'.join(map(str, newest))}")
|
||||
checked += 1
|
||||
if not checked:
|
||||
raise ValueError("package contains no ELF executables or libraries")
|
||||
print(f"Click ABI: {checked} ELF files match the Focal ARM64 framework")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("package", type=Path)
|
||||
verify(parser.parse_args().package.resolve())
|
||||
+10
-2
@@ -35,7 +35,12 @@ import tempfile
|
||||
import time
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
READY_STAMP = ROOT / "build/release-ready/stamp.json"
|
||||
# RELEASE_READY_OUTPUT names a separate release-ready run's outputs, as in
|
||||
# scripts/release-ready.sh.
|
||||
READY_OUTPUT = os.environ.get("RELEASE_READY_OUTPUT", "build/release-ready")
|
||||
if not re.fullmatch(r"build/release-ready(-[a-z0-9][a-z0-9-]*)?", READY_OUTPUT):
|
||||
raise SystemExit("RELEASE_READY_OUTPUT must be build/release-ready-NAME")
|
||||
READY_STAMP = ROOT / READY_OUTPUT / "stamp.json"
|
||||
SUBJECT = "Release Inner Breeze {version}"
|
||||
# What ./update_version.sh writes; only these may join the release commit.
|
||||
VERSION_FILES = ("droid/app/build.gradle", "src/core/version.h", "src/core/version.zi", "windows/inbe.rc",
|
||||
@@ -279,7 +284,8 @@ def fixed_release_commit(base, version, details):
|
||||
output = ROOT / "build/release-candidate.json"
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
output.write_text(json.dumps(dict(version=version, source_commit=base,
|
||||
release_commit=release, master_commit=target), indent=2) + "\n")
|
||||
release_commit=release, master_commit=target,
|
||||
release_ref=f"refs/heads/release-candidates/{version}"), indent=2) + "\n")
|
||||
return release
|
||||
raise Refused("master advanced repeatedly; the immutable release object is saved and no peer work was changed")
|
||||
|
||||
@@ -320,6 +326,8 @@ def release_fixed(args):
|
||||
release = fixed_release_commit(revision, version, details)
|
||||
gate.validate(ROOT, version, release)
|
||||
print("Fixed release commit prepared; master and peer working files are preserved. Nothing was pushed.")
|
||||
print(f"Before dispatching Release, publish its immutable candidate reference: "
|
||||
f"git push origin {release}:refs/heads/release-candidates/{version}")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,10 @@ export async function verifyMusicAcrossTabs({ evaluate, click, scroll, resize, c
|
||||
await settle();
|
||||
const scrollableAction = action === 0 || action === 1 || (action >= 2 && action <= 5) || action === 8;
|
||||
let point;
|
||||
for (let attempt = 0; attempt < 4; attempt++) {
|
||||
// The last attempt never scrolls: a click must use a position read after
|
||||
// the list's last move. Apps the node offers can lengthen the list.
|
||||
const attempts = 6;
|
||||
for (let attempt = 0; attempt < attempts; attempt++) {
|
||||
// Entering Audio can suspend the first draw while cue files decode.
|
||||
// Wait for that draw and its actual control before choosing a position.
|
||||
const deadline = Date.now() + 10000;
|
||||
@@ -136,7 +139,7 @@ export async function verifyMusicAcrossTabs({ evaluate, click, scroll, resize, c
|
||||
await delay(600);
|
||||
continue;
|
||||
}
|
||||
if (point.rawX < 0 || point.rawY < 0 ||
|
||||
if (point.rawX < 0 || point.rawY < 0 || attempt === attempts - 1 ||
|
||||
(!scrollableAction || point.y <= point.bottom * 0.75)) break;
|
||||
await scroll(point.x, point.bottom * 0.6, point.y - point.bottom * 0.65 + 100);
|
||||
await delay(600);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#import, file "route_types.zi";
|
||||
#import, file "exercise_types.zi";
|
||||
#import, file "../platform/environment.zi";
|
||||
#import, file "../platform/dew_payment.zi";
|
||||
#import "android_device"
|
||||
#import, file "../platform/android/graphics_context.zi";
|
||||
#import, file "fonts.zi";
|
||||
@@ -352,6 +353,7 @@ app_init :: (vapp: *void) {
|
||||
app.break_sounds_enabled = 0
|
||||
}
|
||||
data_init()
|
||||
DewPaymentStart()
|
||||
TelegramAccountFlowStart()
|
||||
if !AppsStart(app) {
|
||||
TraceLog(LOG_ERROR, "APP: required Lists, Habits or Practice bundle failed validation")
|
||||
|
||||
+23
-1
@@ -2,6 +2,8 @@
|
||||
// keys and specialized screens behind its native host services.
|
||||
Entity :: #import "entity/model";
|
||||
#import "entity/dew_model"
|
||||
#import "entity/leaderboard_model"
|
||||
#import, file "../screens/leaderboard_screen.zi";
|
||||
Provider :: #import "entity/native_management";
|
||||
#import "kryon/app_context_host"
|
||||
Portable :: #import "kryon/app_protocol";
|
||||
@@ -51,6 +53,7 @@ entity_inner_breeze: bool;
|
||||
entity_reload_after_route: bool;
|
||||
entity_account_route: bool;
|
||||
entity_snapshot: string;
|
||||
entity_leaderboard_route: bool;
|
||||
|
||||
InbeEntityRead :: (app: *InnerBreeze) -> string {
|
||||
Entity.EntityFree(entity_document)
|
||||
@@ -138,7 +141,7 @@ EntityHostAllows :: (context: *void, name: string) -> bool {
|
||||
return name == "ReadStoreHost" || name == "WriteStoreHost" ||
|
||||
name == "AppLocaleHost" || name == "ClipboardCopyHost" ||
|
||||
name == "AppServiceHost" || name == "entity.management" || name == "entity.text_height" ||
|
||||
name == "entity.achievements" || name == "entity.activity" || (name == "entity.dew" && DewAvailable())
|
||||
name == "entity.achievements" || name == "entity.activity" || name == LEADERBOARD_SERVICE || (name == "entity.dew" && DewAvailable())
|
||||
}
|
||||
|
||||
// The node-confirmed Dew account and Inner Breeze's own summaries for the
|
||||
@@ -245,6 +248,10 @@ EntityHostText :: (text: string) -> HostValue {
|
||||
}
|
||||
|
||||
EntityHostLocale :: (key: string) -> string {
|
||||
if key == "leaderboard_title" || key == "leaderboard_refresh_failed" || key == "profile_friends_title" ||
|
||||
key == "profile_no_leaderboard_data" || key == "profile_updating_status" {
|
||||
return LocaleText(key)
|
||||
}
|
||||
if key == "achievements_title" || (key.count >= 12 && key[:12] == "achievement_") {
|
||||
return LocaleText(key)
|
||||
}
|
||||
@@ -310,6 +317,10 @@ EntityHostCall :: (context: *void, module: *u8, function: *u8,
|
||||
arguments: *HostValue, count: s32, result: *HostValue) -> s32 {
|
||||
app := cast(*InnerBreeze)context
|
||||
name := TextFromCString(function)
|
||||
if name == "AppServiceHost" && count == 2 && AppArgumentText(arguments[0]) == LEADERBOARD_SERVICE {
|
||||
result.* = EntityHostText(InbeLeaderboardSnapshot(app, AppArgumentText(arguments[1])))
|
||||
return 1
|
||||
}
|
||||
if AchievementEntityCall(cast(*void)app, name, arguments, count, result) {
|
||||
return 1
|
||||
}
|
||||
@@ -396,6 +407,11 @@ EntityHostFrame :: (app: *InnerBreeze, bounds: Rectangle) -> bool {
|
||||
unused AppContextRun(*entity_context, Portable.APP_COMMAND)
|
||||
}
|
||||
entity_account_route = account_route
|
||||
if entity_leaderboard_route {
|
||||
entity_context.command = "leaderboard"
|
||||
unused AppContextRun(*entity_context, Portable.APP_COMMAND)
|
||||
entity_leaderboard_route = false
|
||||
}
|
||||
entity_context.session = app.ui.session
|
||||
entity_context.bounds = bounds
|
||||
entity_context.dark = app.dark_mode != 0
|
||||
@@ -457,4 +473,10 @@ EntityHostReset :: () {
|
||||
entity_inner_breeze = false
|
||||
entity_account_route = false
|
||||
entity_reload_after_route = true
|
||||
entity_leaderboard_route = false
|
||||
}
|
||||
|
||||
#program_export
|
||||
EntityHostOpenLeaderboard :: () {
|
||||
entity_leaderboard_route = true
|
||||
}
|
||||
@@ -7,19 +7,19 @@ using AppNavRoute;
|
||||
|
||||
// Storage follows the app catalog; there is no separate favorites quota.
|
||||
// The bundled apps, then one route for each slot of an app the node offers.
|
||||
LAUNCHER_APP_COUNT :: 14
|
||||
LAUNCHER_APP_COUNT :: 13
|
||||
|
||||
LauncherRoutes :: () -> [LAUNCHER_APP_COUNT]s32 {
|
||||
// Leaderboard comes last of the bundled apps, so adding it moved none.
|
||||
// The leaderboard belongs to the permanent Profile control.
|
||||
return .{APP_NAV_ROUTE_DIARY, APP_NAV_ROUTE_HABITS,
|
||||
APP_NAV_ROUTE_ELIST, APP_NAV_ROUTE_LUMI, APP_NAV_ROUTE_PRACTICE,
|
||||
APP_NAV_ROUTE_LEADERBOARD, AppNavNodeRoute(0), AppNavNodeRoute(1),
|
||||
AppNavNodeRoute(0), AppNavNodeRoute(1),
|
||||
AppNavNodeRoute(2), AppNavNodeRoute(3), AppNavNodeRoute(4),
|
||||
AppNavNodeRoute(5), AppNavNodeRoute(6), AppNavNodeRoute(7)}
|
||||
}
|
||||
|
||||
// A new profile pins Lumi, Habits and Practice in this order. Lists and
|
||||
// Leaderboard are also preinstalled and appear below the pinned section.
|
||||
// Diary are also preinstalled and appear below the pinned section.
|
||||
LauncherDefaults :: (routes: []s32) -> s32 {
|
||||
defaults: [3]s32 = .{APP_NAV_ROUTE_LUMI,
|
||||
APP_NAV_ROUTE_HABITS, APP_NAV_ROUTE_PRACTICE}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Generated from apps/versions.json. This host runs packages built for host
|
||||
// interfaces from the oldest to the current one; module interfaces must match.
|
||||
PackageHostAPI :: 38
|
||||
PackageHostAPI :: 39
|
||||
PackageHostAPIOldest :: 12
|
||||
PackageModuleAPI :: 2
|
||||
@@ -380,6 +380,17 @@ NodeInstalledVisible :: (entry: *NodeInstalledLeaf) -> bool {
|
||||
return NodeTreeState(null, NodeTreeAccount(), *entry.identity, *state) && state.installed
|
||||
}
|
||||
|
||||
// A retained game score does not prove its app is still installed.
|
||||
NodeAppInstalledIdentity :: (root: string, id: string) -> bool {
|
||||
for entry: node_installed_leaves {
|
||||
if TextUntilNul(entry.root[:]) == root && TextUntilNul(entry.identity.id[:]) == id &&
|
||||
NodeInstalledVisible(*entry) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Keep independent verified copies for each installed root, and project one
|
||||
// visible definition per identity. Removing one root never hides another.
|
||||
NodeInstalledRepresentative :: (at: s64) -> bool {
|
||||
|
||||
@@ -59,6 +59,8 @@ using HostValueKind;
|
||||
// its own instance and never overwrites a live slot or persists its handles.
|
||||
node_tree_hosts: [NodeAppSlots * 2]AppHost;
|
||||
node_tree_validating: bool;
|
||||
node_tree_profile_requested: bool;
|
||||
node_tree_profile_account: [65]u8;
|
||||
node_tree_widget_node: *AppNode;
|
||||
NodeTreeImage :: struct {
|
||||
path: string
|
||||
@@ -164,7 +166,7 @@ NodeTreeAllows :: (context: *void, node: *AppNode, name: string) -> bool {
|
||||
return false
|
||||
}
|
||||
if name == "AppServiceHost" || name == "entity.records" || name == "entity.dew" || name == PublicationsService || name == "leaderboard" ||
|
||||
name == "arcade.navigation" || name == "tile_map.sampling" { return true }
|
||||
name == "arcade.navigation" || name == "entity.profile" || name == "tile_map.sampling" { return true }
|
||||
if name == "AppRecordHost" || name == "SaveAppRecordHost" || name == "AppLocaleHost" ||
|
||||
name == "SmoothFramesHost" || name == "ClipboardCopyHost" || name == "ReadStoreHost" ||
|
||||
name == "WriteStoreHost" || name == "AppNowHost" || name == "AppLocalOffsetHost" ||
|
||||
@@ -193,6 +195,12 @@ NodeTreeCall :: (context: *void, node: *AppNode, module: *u8, function: *u8,
|
||||
}
|
||||
if name == "AppServiceHost" && count == 2 && HostScalarValid(arguments[0], "string", cast(s32)HostString) &&
|
||||
HostScalarValid(arguments[1], "string", cast(s32)HostString) {
|
||||
if AppArgumentText(arguments[0]) == "entity.profile" && AppArgumentText(arguments[1]) == "open" &&
|
||||
!node_tree_validating && !node_snapshot_scanning {
|
||||
node_tree_profile_requested = CopyCString(NodeTreeAccount(), node_tree_profile_account[:])
|
||||
result.* = NodeAppString(ifx node_tree_profile_requested then "queued" else "unavailable")
|
||||
return 1
|
||||
}
|
||||
if AppArgumentText(arguments[0]) == "arcade.navigation" && AppArgumentText(arguments[1]) == "back" &&
|
||||
!node_tree_validating && !node_snapshot_scanning && runner.nested != null {
|
||||
// Queue the parent transition until the guest frame returns.
|
||||
@@ -519,6 +527,13 @@ NodeTreeRuntime :: (slot: s32) -> *AppRuntime {
|
||||
return AppHostActiveRuntime(node_runners[slot].nested)
|
||||
}
|
||||
|
||||
// Consume only after the guest VM returns; Profile must never re-enter it.
|
||||
NodeTreeTakeProfile :: () -> bool {
|
||||
requested := node_tree_profile_requested && TextUntilNul(node_tree_profile_account[:]) == NodeTreeAccount()
|
||||
node_tree_profile_requested = false
|
||||
return requested
|
||||
}
|
||||
|
||||
NodeTreeRunMessage :: (slot: s32, message: Legacy.AppMessage) -> Legacy.AppMessage {
|
||||
message.succeeded = false
|
||||
host := node_runners[slot].nested
|
||||
|
||||
@@ -3,7 +3,7 @@ PackageBundledVersion :: (index: s32) -> string {
|
||||
if index < 0 || index >= 7 {
|
||||
return ""
|
||||
}
|
||||
versions: [7]string = .["2.1.51", "1.1.19", "1.3.6", "1.6.0", "1.3.15", "1.5.18", "1.0.20"]
|
||||
versions: [7]string = .["2.1.54", "1.1.22", "1.3.9", "1.6.3", "1.3.18", "1.5.21", "1.0.23"]
|
||||
return versions[index]
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ PackageBundledSequence :: (index: s32) -> s32 {
|
||||
if index < 0 || index >= 7 {
|
||||
return 0
|
||||
}
|
||||
sequences: [7]s32 = .[48, 27, 29, 29, 32, 36, 21]
|
||||
sequences: [7]s32 = .[51, 30, 32, 32, 35, 39, 24]
|
||||
return sequences[index]
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
#define APP_VERSION_MAJOR 2
|
||||
#define APP_VERSION_MINOR 1
|
||||
#define APP_VERSION_PATCH 51
|
||||
#define APP_VERSION_STRING "2.1.51"
|
||||
#define APP_VERSION_PATCH 54
|
||||
#define APP_VERSION_STRING "2.1.54"
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// Generated by update_version.sh from CHANGELOG.md. Do not edit by hand.
|
||||
VersionMajor :: 2
|
||||
VersionMinor :: 1
|
||||
VersionPatch :: 51
|
||||
VersionString :: "2.1.51"
|
||||
VersionPatch :: 54
|
||||
VersionString :: "2.1.54"
|
||||
+13
-26
@@ -1,34 +1,21 @@
|
||||
// Dew works in every build: the balance, storage plans, practice unlocks and
|
||||
// app rewards are paid in Dew. Only topping Dew up with Monero is left out of
|
||||
// the Play build, whose activity reports it.
|
||||
#if #defined(ANDROID_BUILD) {
|
||||
#import "android_jni"
|
||||
}
|
||||
// Dew works in every edition: the balance, storage plans, practice unlocks
|
||||
// and app rewards are paid in Dew. The direct and F-Droid editions top Dew up
|
||||
// with Monero; the Google Play edition (the GOOGLE_PLAY define) sells Dew
|
||||
// packs through Google Play (entity/dew_play) once Play Billing answers.
|
||||
#import "entity/dew_play"
|
||||
|
||||
dew_channel_known: bool;
|
||||
dew_channel_available: bool;
|
||||
dew_play: DewPlay;
|
||||
|
||||
// Called once at start, before the first frame asks for Dew.
|
||||
DewPaymentStart :: () {
|
||||
dew_play.enabled = DewPlayEdition()
|
||||
}
|
||||
|
||||
DewAvailable :: () -> bool { return true }
|
||||
|
||||
DewTopUpAvailable :: () -> bool {
|
||||
#if #defined(ANDROID_BUILD) {
|
||||
if !dew_channel_known {
|
||||
session: AndroidJniSession
|
||||
if AndroidJniAttachCurrent(*session) == 0 {
|
||||
return false
|
||||
}
|
||||
method := AndroidJniMethod(*session, "dewAvailable", "()Z")
|
||||
if method != null {
|
||||
dew_channel_available = session.env.functions.CallBooleanMethodA(
|
||||
session.env, session.activity, method, null) != 0
|
||||
if session.env.functions.ExceptionCheck(session.env) != 0 {
|
||||
dew_channel_available = false
|
||||
}
|
||||
}
|
||||
AndroidJniDetachCurrent(*session)
|
||||
dew_channel_known = true
|
||||
}
|
||||
return dew_channel_available
|
||||
if dew_play.enabled {
|
||||
return dew_play.available
|
||||
}
|
||||
return true
|
||||
}
|
||||
+124
-107
@@ -1,6 +1,9 @@
|
||||
#import, file "../../apps/leaderboard/leaderboard_achievements.zi";
|
||||
// Leaderboard ranks you with your friends. Saved and fetched results are
|
||||
// parsed and ranked once when they change, never on every frame.
|
||||
#import "entity/leaderboard_model"
|
||||
EntityProfile :: #import "entity/model";
|
||||
#import, file "../apps/node_app_snapshot.zi";
|
||||
#import "keys"
|
||||
#import "bundle_host"
|
||||
#import "byte_text_linux"
|
||||
@@ -566,117 +569,131 @@ LeaderboardUiCall :: (context: *void, module: *u8, function: *u8,
|
||||
return 0
|
||||
}
|
||||
|
||||
// Opening the app shows saved results at once and fetches fresh ones.
|
||||
// The old route remains a redirect for saved navigation and older packages.
|
||||
// Profile owns the screen; Inner Breeze supplies its installed boards/data.
|
||||
leaderboard_projection: string;
|
||||
EntityHostOpenLeaderboard :: () #foreign c;
|
||||
|
||||
InbeLeaderboardSnapshot :: (app: *InnerBreeze, request: string) -> string {
|
||||
page: ProfileLeaderboard
|
||||
account: AccountKeys
|
||||
if sync_account_load(*account) != 0 {
|
||||
unused AppCopyText(TextUntilNul(account.public_id[:]), page.owner[:])
|
||||
}
|
||||
if page.owner[0] == cast(u8)0 {
|
||||
unused AppCopyText("local", page.owner[:])
|
||||
}
|
||||
installed := LeaderboardInstalledPractices()
|
||||
LeaderboardListApps(app, installed)
|
||||
for index: cast(s32)0..leaderboard_app_count - 1 {
|
||||
name := TextUntilNul(leaderboard_app_names[index][:])
|
||||
title := TextUntilNul(leaderboard_app_titles[index][:])
|
||||
if name == "practices" {
|
||||
for item: cast(s32)0..installed.practice_count - 1 {
|
||||
if page.board_count >= LEADERBOARD_BOARDS { break }
|
||||
practice := installed.practices[item]
|
||||
board := *page.boards[page.board_count]
|
||||
unused AppCopyText(name, board.app[:])
|
||||
unused AppCopyText(title, board.app_title[:])
|
||||
unused AppCopyText(LeaderboardPracticeId(practice), board.id[:])
|
||||
key := ifx practice == EXERCISE_MEDITATION then "exercise_meditation" else "exercise_wim_hof"
|
||||
unused AppCopyText(LocaleText(key), board.title[:])
|
||||
unused AppCopyText(LocaleText("profile_metric_streak"), board.primary[:])
|
||||
unused AppCopyText(LocaleText(ifx practice == EXERCISE_MEDITATION then "profile_metric_avg_time" else "profile_metric_avg_hold"), board.average[:])
|
||||
page.board_count += 1
|
||||
}
|
||||
} else {
|
||||
games: [GAME_SCORES_MAX]s32
|
||||
count := GameScoresFor(name, games[:])
|
||||
for item: cast(s32)0..count - 1 {
|
||||
score := *game_scores[games[item]]
|
||||
game := TextUntilNul(score.game[:])
|
||||
if page.board_count >= LEADERBOARD_BOARDS || !NodeAppInstalledIdentity(name, game) { continue }
|
||||
board := *page.boards[page.board_count]
|
||||
unused AppCopyText(name, board.app[:])
|
||||
unused AppCopyText(title, board.app_title[:])
|
||||
unused AppCopyText(game, board.id[:])
|
||||
unused AppCopyText(TextUntilNul(score.title[:]), board.title[:])
|
||||
unused AppCopyText(LocaleText("leaderboard_levels"), board.primary[:])
|
||||
page.board_count += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
current := ifx LeaderboardAppName(app) == "practices" then LeaderboardPracticeId(app.leaderboard_practice) else LeaderboardBoardName(app)
|
||||
page.selected = ProfileBoardFind(*page, current)
|
||||
if page.selected < 0 && page.board_count > 0 { page.selected = 0 }
|
||||
owner: [97]u8
|
||||
board_id: [65]u8
|
||||
metric := ReadNumber(request, FieldAt(request, 0, "metric"))
|
||||
if ReadStringText(request, FieldAt(request, 0, "owner"), owner[:]) > 0 &&
|
||||
TextUntilNul(owner[:]) == TextUntilNul(page.owner[:]) &&
|
||||
ReadStringText(request, FieldAt(request, 0, "board"), board_id[:]) > 0 &&
|
||||
metric.valid && (metric.value == 0 || metric.value == 1) {
|
||||
chosen := ProfileBoardFind(*page, TextUntilNul(board_id[:]))
|
||||
if chosen >= 0 {
|
||||
page.selected = chosen
|
||||
app.leaderboard_metric = ifx page.boards[chosen].average[0] != cast(u8)0 then cast(s32)metric.value else 0
|
||||
}
|
||||
}
|
||||
if page.selected >= 0 {
|
||||
board := *page.boards[page.selected]
|
||||
chosen := TextUntilNul(board.id[:])
|
||||
changed := chosen != current
|
||||
if board.average[0] == cast(u8)0 {
|
||||
app.leaderboard_metric = LEADERBOARD_STREAK
|
||||
}
|
||||
unused AppCopyText(TextUntilNul(board.app[:]), app.leaderboard_app[:])
|
||||
if TextUntilNul(board.app[:]) == "practices" {
|
||||
for item: cast(s32)0..installed.practice_count - 1 {
|
||||
practice := installed.practices[item]
|
||||
if LeaderboardPracticeId(practice) == chosen { app.leaderboard_practice = practice }
|
||||
}
|
||||
} else {
|
||||
unused AppCopyText(chosen, app.leaderboard_game[:])
|
||||
}
|
||||
// Refresh only the selected, currently installed board.
|
||||
LeaderboardListApps(app, installed)
|
||||
if changed || request == "refresh" {
|
||||
if changed { app.leaderboard_metric = LEADERBOARD_STREAK }
|
||||
LeaderboardLoadCache(app)
|
||||
app_request_social_refresh(app)
|
||||
}
|
||||
if app.leaderboard_loaded == 0 || leaderboard_built_revision != app.leaderboard_revision ||
|
||||
leaderboard_built_practice != app.leaderboard_practice || leaderboard_built_metric != app.leaderboard_metric ||
|
||||
TextUntilNul(leaderboard_built_app[:]) != LeaderboardAppName(app) ||
|
||||
TextUntilNul(leaderboard_built_board[:]) != LeaderboardBoardName(app) {
|
||||
LeaderboardRebuild(app)
|
||||
}
|
||||
page.metric = app.leaderboard_metric
|
||||
page.loading = app_social_refresh_loading() != 0
|
||||
page.row_count = leaderboard_count
|
||||
for index: cast(s32)0..leaderboard_count - 1 {
|
||||
source := *leaderboard_entries[index]
|
||||
row := *page.rows[index]
|
||||
unused AppCopyText(TextUntilNul(source.name[:]), row.name[:])
|
||||
unused AppCopyText(TextUntilNul(source.streak[:]), row.value[:])
|
||||
unused AppCopyText(TextUntilNul(source.average[:]), row.average[:])
|
||||
row.own = source.own
|
||||
if row.own && TextUntilNul(board.app[:]) == "practices" {
|
||||
AchievementLeaderboardViewed(chosen)
|
||||
}
|
||||
}
|
||||
}
|
||||
EntityProfile.EntityFree(leaderboard_projection)
|
||||
leaderboard_projection = ProfileLeaderboardEncode(*page)
|
||||
return leaderboard_projection
|
||||
}
|
||||
|
||||
#program_export
|
||||
leaderboard_screen_enter :: (app: *InnerBreeze) {
|
||||
if app == null {
|
||||
return
|
||||
}
|
||||
load_friends_cache(app)
|
||||
LeaderboardListApps(app, LeaderboardInstalledPractices())
|
||||
unused LeaderboardKeepInstalled(app, LeaderboardInstalledPractices())
|
||||
LeaderboardLoadCache(app)
|
||||
app_request_social_refresh(app)
|
||||
if app == null { return }
|
||||
app_open_profile_tab(app, PROFILE_TAB_OVERVIEW)
|
||||
EntityHostOpenLeaderboard()
|
||||
}
|
||||
|
||||
#program_export
|
||||
leaderboard_screen_draw :: (app: *InnerBreeze) {
|
||||
if app == null {
|
||||
return
|
||||
}
|
||||
installed := LeaderboardInstalledPractices()
|
||||
LeaderboardListApps(app, installed)
|
||||
if LeaderboardKeepInstalled(app, installed) {
|
||||
LeaderboardLoadCache(app)
|
||||
app_request_social_refresh(app)
|
||||
}
|
||||
if app.leaderboard_practice < 0 || app.leaderboard_practice >= EXERCISE_COUNT {
|
||||
app.leaderboard_practice = EXERCISE_WIM_HOF
|
||||
app.leaderboard_loaded = 0
|
||||
}
|
||||
if app.leaderboard_metric != LEADERBOARD_STREAK &&
|
||||
(app.leaderboard_metric != LEADERBOARD_AVERAGE || !LeaderboardHasAverage(app.leaderboard_practice)) {
|
||||
app.leaderboard_metric = LEADERBOARD_STREAK
|
||||
}
|
||||
if app.leaderboard_loaded == 0 || leaderboard_built_revision != app.leaderboard_revision ||
|
||||
leaderboard_built_practice != app.leaderboard_practice ||
|
||||
leaderboard_built_metric != app.leaderboard_metric ||
|
||||
TextUntilNul(leaderboard_built_app[:]) != LeaderboardAppName(app) ||
|
||||
TextUntilNul(leaderboard_built_board[:]) != LeaderboardBoardName(app) {
|
||||
LeaderboardRebuild(app)
|
||||
}
|
||||
leaderboard_ui.session = app.ui.session
|
||||
leaderboard_ui.width = app.ui.view_width
|
||||
leaderboard_ui.height = app.ui.view_height
|
||||
leaderboard_ui.bottom = app_content_bottom_reserved(app)
|
||||
leaderboard_ui.scale = MetricsScale()
|
||||
leaderboard_ui.font = AppFontSize()
|
||||
leaderboard_ui.app_count = leaderboard_app_count
|
||||
for index: cast(s32)0..leaderboard_app_count - 1 {
|
||||
if TextUntilNul(leaderboard_app_names[index][:]) == LeaderboardAppName(app) {
|
||||
leaderboard_ui.app_index = index
|
||||
}
|
||||
}
|
||||
leaderboard_ui.board_count = leaderboard_board_count
|
||||
leaderboard_ui.board_index = 0
|
||||
for index: cast(s32)0..leaderboard_board_count - 1 {
|
||||
if TextUntilNul(game_scores[leaderboard_boards[index]].game[:]) == LeaderboardBoardName(app) {
|
||||
leaderboard_ui.board_index = index
|
||||
}
|
||||
}
|
||||
state := LeaderboardMessage.{.action = LEADERBOARD_FRAME,
|
||||
.practice = app.leaderboard_practice, .metric = app.leaderboard_metric,
|
||||
.row_count = leaderboard_count, .signed_in = leaderboard_signed_in,
|
||||
.loading = app_social_refresh_loading() != 0,
|
||||
.has_average = LeaderboardAppName(app) == "practices" && LeaderboardHasAverage(app.leaderboard_practice),
|
||||
.app = LeaderboardAppName(app), .board = LeaderboardBoardName(app),
|
||||
.practices_listed = true, .practice_count = installed.practice_count,
|
||||
.practices = installed.practices}
|
||||
WidgetHostBegin(app.ui.session, HostedAssetAllowed)
|
||||
AppsUiBegin(LeaderboardUiCall, cast(*void)app)
|
||||
state = LeaderboardRun(state)
|
||||
AppsUiEnd()
|
||||
WidgetHostEnd()
|
||||
if !state.succeeded {
|
||||
return
|
||||
}
|
||||
if state.app != LeaderboardAppName(app) {
|
||||
for index: cast(s32)0..leaderboard_app_count - 1 {
|
||||
if state.app == TextUntilNul(leaderboard_app_names[index][:]) {
|
||||
unused AppCopyText(state.app, app.leaderboard_app[:])
|
||||
app.leaderboard_metric = LEADERBOARD_STREAK
|
||||
leaderboard_ui.scroll = 0
|
||||
LeaderboardLoadCache(app)
|
||||
app_request_social_refresh(app)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if state.board != LeaderboardBoardName(app) {
|
||||
for index: cast(s32)0..leaderboard_board_count - 1 {
|
||||
if state.board == TextUntilNul(game_scores[leaderboard_boards[index]].game[:]) {
|
||||
unused AppCopyText(state.board, app.leaderboard_game[:])
|
||||
leaderboard_ui.scroll = 0
|
||||
LeaderboardLoadCache(app)
|
||||
app_request_social_refresh(app)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if state.practice != app.leaderboard_practice && state.practice >= 0 &&
|
||||
state.practice < EXERCISE_COUNT {
|
||||
app.leaderboard_practice = state.practice
|
||||
app.leaderboard_metric = LEADERBOARD_STREAK
|
||||
leaderboard_ui.scroll = 0
|
||||
LeaderboardLoadCache(app)
|
||||
app_request_social_refresh(app)
|
||||
return
|
||||
}
|
||||
if state.metric == LEADERBOARD_STREAK ||
|
||||
(state.metric == LEADERBOARD_AVERAGE && LeaderboardHasAverage(app.leaderboard_practice)) {
|
||||
app.leaderboard_metric = state.metric
|
||||
}
|
||||
if state.refresh {
|
||||
app_request_social_refresh(app)
|
||||
}
|
||||
if app == null { return }
|
||||
app_open_profile_tab(app, PROFILE_TAB_OVERVIEW)
|
||||
EntityHostOpenLeaderboard()
|
||||
}
|
||||
@@ -447,5 +447,8 @@ node_app_screen_draw :: (app: *InnerBreeze) {
|
||||
}
|
||||
if clip.opened { unused End(app.ui.session) }
|
||||
WidgetHostEnd()
|
||||
if NodeTreeTakeProfile() {
|
||||
app_open_profile_tab(app, PROFILE_TAB_OVERVIEW)
|
||||
}
|
||||
NodeScreenMediaPicker(app)
|
||||
}
|
||||
@@ -19,6 +19,8 @@
|
||||
#import "segmented_control_widget"
|
||||
#import "layout"
|
||||
#import "tree"
|
||||
#import "kryon/play_billing"
|
||||
#import "entity/dew_play"
|
||||
#import, file "../storage/dew.zi";
|
||||
#import, file "../storage/sync_async.zi";
|
||||
#import, file "../storage/sync_node_storage.zi";
|
||||
@@ -169,7 +171,8 @@ ProfileDewContent :: (app: *InnerBreeze, x: s32, y: *s32, width: s32,
|
||||
unused AppCopyText("—", value[:])
|
||||
}
|
||||
busy := dew_operation.active
|
||||
// Top-ups belong to the balance they fill; the Play build sells no Dew.
|
||||
// Top-ups belong to the balance they fill; the Google Play edition
|
||||
// shows its button once Google Play answers.
|
||||
if dew_account.known && DewReady() && DewTopUpAvailable() {
|
||||
label := LocaleText("profile_dew_topup")
|
||||
button_w := AppTextWidth(label, AppFontSize()) + AppScale(32)
|
||||
@@ -494,11 +497,76 @@ ProfileTopUpAddressText :: (output: []u8) {
|
||||
}
|
||||
}
|
||||
|
||||
// What the Google Play window says under its Dew packs, or "".
|
||||
ProfileTopUpPlayNotice :: (billing: *PlayBillingState, shown: s32) -> string {
|
||||
status := TextUntilNul(dew_play.status[:])
|
||||
if status == "verifying" {
|
||||
return LocaleText("profile_dew_play_verifying")
|
||||
}
|
||||
if status == "credited" {
|
||||
return LocaleText("profile_dew_play_credited")
|
||||
}
|
||||
if status == "failed" {
|
||||
return LocaleText("profile_dew_play_failed")
|
||||
}
|
||||
if shown > 0 {
|
||||
return ""
|
||||
}
|
||||
error := TextUntilNul(billing.error[:])
|
||||
if error != "" && error != "cancelled" {
|
||||
return LocaleText("profile_dew_play_unavailable")
|
||||
}
|
||||
return LocaleText("profile_dew_play_loading")
|
||||
}
|
||||
|
||||
// The Google Play edition sells Dew packs at Google Play's price in the
|
||||
// buyer's currency. Play's own sheet takes the payment, and the Dew arrives
|
||||
// once the node has credited the purchase (entity/dew_play).
|
||||
ProfileTopUpPlayContent :: (app: *InnerBreeze, x: s32, y: *s32, width: s32, draw: bool) {
|
||||
billing: PlayBillingState
|
||||
unused PlayBillingRead(TextUntilNul(dew_play.state[:]), *billing)
|
||||
busy := dew_operation.active || TextUntilNul(dew_play.status[:]) == "verifying"
|
||||
packs: [4]string = .["dew_100", "dew_500", "dew_1000", "dew_5000"]
|
||||
shown: s32 = 0
|
||||
for pack: packs {
|
||||
product: *PlayBillingProduct = null
|
||||
for index: cast(s32)0..7 {
|
||||
if index >= billing.product_count {
|
||||
break
|
||||
}
|
||||
candidate := *billing.products[index]
|
||||
if TextUntilNul(candidate.id[:]) == pack {
|
||||
product = candidate
|
||||
}
|
||||
}
|
||||
if product == null {
|
||||
continue
|
||||
}
|
||||
label: [96]u8
|
||||
arguments: [1]FormatArg = .[FormatArg.{.text = pack[4:], .is_text = true}]
|
||||
unused FormatTemplate(LocaleText("profile_dew_play_pack"), arguments[:], label[:])
|
||||
price := TextUntilNul(product.price[:])
|
||||
if ProfileDewButton(app, TextUntilNul(label[:]), x, y, width, busy, draw, price) {
|
||||
unused DewPlayBuy(*dew_play, pack)
|
||||
}
|
||||
shown += 1
|
||||
}
|
||||
notice := ProfileTopUpPlayNotice(*billing, shown)
|
||||
if notice != "" {
|
||||
ProfileDewText(app, notice, x, y, width, AppSmallFontSize(), draw)
|
||||
}
|
||||
}
|
||||
|
||||
// Topping up is the one place Dew shows its money value: the balance's
|
||||
// worth and the node's exchange rate.
|
||||
// worth and the node's exchange rate, or Google Play's prices.
|
||||
ProfileTopUpContent :: (app: *InnerBreeze, x: s32, y: *s32, width: s32, draw: bool) {
|
||||
line: [384]u8
|
||||
ProfileDewFormatDew(dew_account.balance, LocaleText("profile_dew_balance_line"), line[:])
|
||||
if dew_play.enabled {
|
||||
ProfileDewText(app, TextUntilNul(line[:]), x, y, width, AppSmallFontSize(), draw)
|
||||
ProfileTopUpPlayContent(app, x, y, width, draw)
|
||||
return
|
||||
}
|
||||
DewAppendWorth(dew_account.balance, line[:])
|
||||
ProfileDewText(app, TextUntilNul(line[:]), x, y, width, AppSmallFontSize(), draw)
|
||||
if ProfileDewExchangeText(line[:]) {
|
||||
@@ -579,11 +647,23 @@ ProfileTopUpContent :: (app: *InnerBreeze, x: s32, y: *s32, width: s32, draw: bo
|
||||
unused OpenUri(TextUntilNul(uri[:]))
|
||||
}
|
||||
y.* = copy_y
|
||||
// Bitcoin, USDT and other coins go through dew.waozi.xyz, which hands
|
||||
// the payment to Trocador for this account's own address.
|
||||
if ProfileDewButton(app, LocaleText("dew_other_coin_button"), x, y, width, false, draw) {
|
||||
link: [160]u8
|
||||
unused AppCopyText("https://dew.waozi.xyz/?account=", link[:])
|
||||
unused AppAppendText(TextUntilNul(dew_identity[:]), link[:])
|
||||
unused OpenUri(TextUntilNul(link[:]))
|
||||
}
|
||||
}
|
||||
|
||||
ProfileTopUpModalDraw :: (app: *InnerBreeze) {
|
||||
ProfileTopUpPump()
|
||||
DewRatesRefresh()
|
||||
// Monero needs this account's address and the node's rates; Google Play
|
||||
// has its own prices.
|
||||
if !dew_play.enabled {
|
||||
ProfileTopUpPump()
|
||||
DewRatesRefresh()
|
||||
}
|
||||
width := app.ui.view_width - AppScale(32)
|
||||
if width > AppScale(480) {
|
||||
width = AppScale(480)
|
||||
|
||||
+18
-1
@@ -2,6 +2,7 @@
|
||||
// payment confirmations and expiry; a device never grants itself credit.
|
||||
#import "auth"
|
||||
#import "entity/dew_model"
|
||||
#import "entity/dew_play"
|
||||
#import "json_scan"
|
||||
#import "text_buffer"
|
||||
#import "byte_text_linux"
|
||||
@@ -15,6 +16,7 @@ Clock :: #import "date_time";
|
||||
#import, file "sync_nodes.zi";
|
||||
#import, file "sync_node_storage.zi";
|
||||
#import, file "../platform/network_transport.zi";
|
||||
#import, file "../platform/dew_payment.zi";
|
||||
#import, file "../app/text_buffers.zi";
|
||||
|
||||
DewNow :: () -> s64 {
|
||||
@@ -25,6 +27,7 @@ DewRead :: 1
|
||||
DewUpgrade :: 2
|
||||
DewAddress :: 3
|
||||
DewGift :: 4
|
||||
DewPlayCredit :: 5
|
||||
|
||||
// Where a gift to a friend stands, for the window that sends it.
|
||||
DewGiftNone :: 0
|
||||
@@ -156,7 +159,7 @@ DewBegin :: (action: s32, path: string, body: string) -> bool {
|
||||
dew_response = .{}
|
||||
dew_action = action
|
||||
method := "GET"
|
||||
if action == DewUpgrade || action == DewGift {
|
||||
if action == DewUpgrade || action == DewGift || action == DewPlayCredit {
|
||||
method = "POST"
|
||||
}
|
||||
if !BeginStoredRequest(*dew_operation, DewNode, NetworkTransport(*dew_transfer),
|
||||
@@ -330,6 +333,8 @@ DewTick :: (visible: bool, now: float64) {
|
||||
if !DewParseAddress(json) {
|
||||
dew_notice = "profile_dew_error"
|
||||
}
|
||||
} else if dew_action == DewPlayCredit {
|
||||
refresh_soon = DewPlayVerified(*dew_play, true, dew_operation.request.status, json)
|
||||
} else {
|
||||
received: DewAccount
|
||||
if DewParseAccount(json, TextUntilNul(dew_identity[:]), *received) {
|
||||
@@ -358,6 +363,9 @@ DewTick :: (visible: bool, now: float64) {
|
||||
dew_notice = "profile_dew_error"
|
||||
}
|
||||
}
|
||||
} else if dew_action == DewPlayCredit {
|
||||
refresh_soon = DewPlayVerified(*dew_play, false, dew_operation.request.status,
|
||||
TextUntilNul(dew_response[:]))
|
||||
} else if dew_action == DewGift {
|
||||
status := dew_operation.request.status
|
||||
if status == 402 {
|
||||
@@ -395,6 +403,15 @@ DewTick :: (visible: bool, now: float64) {
|
||||
dew_gift_retry_at = now + 15.0
|
||||
return
|
||||
}
|
||||
// A Google Play purchase goes to the node next; Play keeps it until the
|
||||
// node has credited its Dew.
|
||||
if DewPlayTick(*dew_play, DewReady() && !dew_operation.active) {
|
||||
if !DewBegin(DewPlayCredit, DEW_PLAY_VERIFY_PATH, TextUntilNul(dew_play.body[:])) {
|
||||
// Offline: the purchase waits and goes again later.
|
||||
unused DewPlayVerified(*dew_play, false, 0, "")
|
||||
}
|
||||
return
|
||||
}
|
||||
// One read soon after launch keeps the balance current before Profile
|
||||
// opens; a few background tries, then only while Profile shows it.
|
||||
background := !dew_account_fresh && dew_background_reads < 3
|
||||
|
||||
@@ -17,11 +17,6 @@ host_load_friends_cache :: (app: *void) {
|
||||
unused app
|
||||
}
|
||||
|
||||
#program_export "leaderboard_screen_enter"
|
||||
host_enter_leaderboard :: (app: *void) {
|
||||
unused app
|
||||
}
|
||||
|
||||
#program_export "node_app_screen_enter"
|
||||
host_enter_node_app :: (app: *void) {
|
||||
unused app
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#import "entity/dew_model"
|
||||
#import "entity/dew_play"
|
||||
// Real account keys, authentication and persistence; only HTTP is synthetic.
|
||||
#import, file "../src/storage/dew.zi";
|
||||
#import, file "../src/storage/practice_unlocks.zi";
|
||||
@@ -21,6 +22,7 @@
|
||||
#import, file "../src/storage/sync_state.zi";
|
||||
#import, file "../src/storage/storage_settings.zi";
|
||||
#import, file "../src/app/text_buffers.zi";
|
||||
#import, file "../src/platform/dew_payment.zi";
|
||||
|
||||
owner: AccountKeys;
|
||||
response_status: s32 = 200;
|
||||
@@ -40,6 +42,9 @@ gift_balance: s64;
|
||||
// Answers a gift as if for another request, which settles nothing.
|
||||
gift_reply_foreign: bool;
|
||||
last_gift_body: [256]u8;
|
||||
play_requests: s32;
|
||||
last_play_body: [512]u8;
|
||||
TestPlayPurchase :: "{\"ready\":true,\"package\":\"xyz.waozi.inbe\",\"error\":\"\",\"products\":[],\"purchases\":[{\"product\":\"dew_500\",\"token\":\"abcdefghijklmnop.Token-1_2\",\"order\":\"GPA.1\"}]}"
|
||||
TestFriend :: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
TestAddress :: "8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
|
||||
@@ -125,6 +130,12 @@ FakeStart :: (context: *void, request: HttpRequest, output: []u8) -> bool {
|
||||
check_true("unlocks are read with an authenticated GET", request.method == "GET" && request.body.count == 0)
|
||||
return AppCopyText("{\"unlocks\":[{\"product\":\"inbe.practice.taichi\",\"receipt_id\":\"r1\",\"created_at\":1}],\"products\":[{\"product\":\"inbe.practice.taichi\",\"price_units\":1000000,\"regular_price_units\":10000000,\"trial_until\":1807801200}]}", output)
|
||||
}
|
||||
if request.url == "https://api.waozi.xyz/api/v1/tokens/purchases/google/verify" {
|
||||
play_requests += 1
|
||||
check_true("Google Play purchases are sent with an authenticated POST", request.method == "POST")
|
||||
unused AppCopyText(request.body, last_play_body[:])
|
||||
return AppCopyText("{\"credited\":true}", output)
|
||||
}
|
||||
if request.url == "https://api.waozi.xyz/api/v1/tokens/gifts" {
|
||||
gift_requests += 1
|
||||
check_true("gifts are sent with an authenticated POST", request.method == "POST")
|
||||
@@ -422,6 +433,32 @@ Check :: () -> s32 {
|
||||
Finish()
|
||||
check_true("a refused request is not repeated", dew_gift_notice == "dew_gift_failed" && dew_gift_attempt[0] == cast(u8)0)
|
||||
response_status = 200
|
||||
|
||||
// The Google Play edition sends each purchase Play lists to the node, and
|
||||
// Play forgets it only once the node has credited its Dew.
|
||||
check_true("other editions sell no Dew through Google Play", !dew_play.enabled && DewTopUpAvailable())
|
||||
dew_play.enabled = true
|
||||
check_true("the Play edition tops up once Google Play answers", !DewTopUpAvailable())
|
||||
unused AppCopyText(TestPlayPurchase, dew_play.state[:])
|
||||
response_status = 503
|
||||
DewTick(false, 200.0)
|
||||
check_true("a Google Play purchase goes to the node", dew_operation.active && dew_action == DewPlayCredit)
|
||||
Finish()
|
||||
check_int("one Google Play verify request", play_requests, 1)
|
||||
check_true("the verify request names the package, pack and token", TextUntilNul(last_play_body[:]) ==
|
||||
"{\"app_id\":\"entity\",\"package_name\":\"xyz.waozi.inbe\",\"product_id\":\"dew_500\",\"purchase_token\":\"abcdefghijklmnop.Token-1_2\"}")
|
||||
check_true("an uncredited purchase stays with Play and waits", TextUntilNul(dew_play.status[:]) == "failed" &&
|
||||
dew_play.wait > 0 && dew_play.state[0] == #char "{" && !dew_operation.active)
|
||||
DewTick(false, 201.0)
|
||||
check_true("the waiting purchase is not sent at once", !dew_operation.active && play_requests == 1)
|
||||
response_status = 200
|
||||
dew_play.wait = 1
|
||||
DewTick(false, 202.0)
|
||||
Finish()
|
||||
check_int("the purchase is sent again", play_requests, 2)
|
||||
check_true("a credited purchase is done", TextUntilNul(dew_play.status[:]) == "credited" &&
|
||||
dew_play.state[0] == cast(u8)0 && !dew_operation.active)
|
||||
dew_play = .{}
|
||||
storage_set_setting_text("sync_public_id", "another-account")
|
||||
DewContext()
|
||||
check_true("account change clears the old balance", !dew_account.known && dew_address[0] == cast(u8)0)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// The habit editor's leave check, for tests that reach navigation without
|
||||
// linking the editor: leaving is always allowed.
|
||||
|
||||
#program_export "habit_edit_request_leave"
|
||||
host_habit_edit_request_leave :: (app: *void, route: s32) -> bool {
|
||||
unused app
|
||||
unused route
|
||||
return true
|
||||
}
|
||||
@@ -21,7 +21,7 @@ mkdir -p "$work/generated"
|
||||
--module-path "$root/build/packages/daochi-client" \
|
||||
--entry habit_form_behavior:Check \
|
||||
-o "$work/generated" "$root/tests/habit_form_behavior.zi" \
|
||||
"$root/tests/sync_test_host.zi" "$root/tests/app_hooks_host.zi"
|
||||
"$root/tests/sync_test_host.zi" "$root/tests/app_hooks_host.zi" "$root/tests/leaderboard_hooks_host.zi"
|
||||
cat > "$work/generated/main.c" <<'C'
|
||||
#include "habit_form_behavior.h"
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -22,7 +22,7 @@ mkdir -p "$work/generated"
|
||||
--entry habit_sessions_behavior:Check \
|
||||
-o "$work/generated" "$root/tests/habit_sessions_behavior.zi" \
|
||||
"$root/tests/sync_test_host.zi" \
|
||||
"$root/tests/app_hooks_host.zi"
|
||||
"$root/tests/app_hooks_host.zi" "$root/tests/leaderboard_hooks_host.zi"
|
||||
cat > "$work/generated/main.c" <<'C'
|
||||
#include "habit_sessions_behavior.h"
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -23,9 +23,9 @@ Answer :: () -> s32 {
|
||||
}
|
||||
// Every app round-trips by name; unknown and repeated names drop out.
|
||||
read: [LAUNCHER_APP_COUNT]s32
|
||||
if LauncherOrderRoutes("diary,chess,lumi,,diary,leaderboard,lists", read[:]) != 4 ||
|
||||
if LauncherOrderRoutes("diary,chess,lumi,,diary,leaderboard,lists", read[:]) != 3 ||
|
||||
read[0] != APP_NAV_ROUTE_DIARY || read[1] != APP_NAV_ROUTE_LUMI ||
|
||||
read[2] != APP_NAV_ROUTE_LEADERBOARD || read[3] != APP_NAV_ROUTE_ELIST {
|
||||
read[2] != APP_NAV_ROUTE_ELIST {
|
||||
return 22
|
||||
}
|
||||
if LauncherOrderRoutes("", read[:]) != 0 || LauncherOrderText(read[:], 0, order[:]) != 0 ||
|
||||
@@ -37,11 +37,11 @@ Answer :: () -> s32 {
|
||||
PackageSetNodeApp(0, "chess")
|
||||
every := LauncherRoutes()
|
||||
length = LauncherOrderText(every[:], cast(s32)every.count, order[:])
|
||||
if TextView(order[:length]) != "diary,habits,lists,lumi,practices,leaderboard,chess" ||
|
||||
LauncherOrderRoutes(TextView(order[:length]), read[:]) != 7 {
|
||||
if TextView(order[:length]) != "diary,habits,lists,lumi,practices,chess" ||
|
||||
LauncherOrderRoutes(TextView(order[:length]), read[:]) != 6 {
|
||||
return 24
|
||||
}
|
||||
for index: cast(s32)0..6 {
|
||||
for index: cast(s32)0..5 {
|
||||
if read[index] != every[index] { return 25 }
|
||||
}
|
||||
PackageSetNodeApp(0, "")
|
||||
@@ -96,9 +96,8 @@ Answer :: () -> s32 {
|
||||
count = LauncherPlaceFavorite(favorites[:], count, APP_NAV_ROUTE_PRACTICE, count)
|
||||
if count != LAUNCHER_APP_COUNT || favorites[count - 1] != APP_NAV_ROUTE_PRACTICE ||
|
||||
favorites[0] != APP_NAV_ROUTE_DIARY { return 14 }
|
||||
// Leaderboard is listed after the apps that existed before it, and the
|
||||
// slots of the apps the node offers after the bundled apps.
|
||||
if LauncherRoutes()[5] != APP_NAV_ROUTE_LEADERBOARD || LauncherRoutes()[6] != AppNavNodeRoute(0) ||
|
||||
// Leaderboard is reached through Profile; node app slots follow the five bundled apps.
|
||||
if LauncherRoutes()[5] != AppNavNodeRoute(0) ||
|
||||
LauncherRoutes()[LAUNCHER_APP_COUNT - 1] != AppNavNodeRoute(7) { return 21 }
|
||||
count = LauncherToggleFavorite(favorites[:], count, APP_NAV_ROUTE_HABITS)
|
||||
count = LauncherPlaceFavorite(favorites[:], count, APP_NAV_ROUTE_HABITS, 1)
|
||||
|
||||
@@ -782,7 +782,8 @@ with contextlib.ExitStack() as stack:
|
||||
wait_setting(profile, "package_updates_allowed", 0)
|
||||
driver.wait_gone(label="Don't allow", role="button")
|
||||
assert not driver.find(label="More apps"), "The old section heading remains"
|
||||
for label in ("Lists", "Diary", "Leaderboard"):
|
||||
assert not any(card["label"] == "Leaderboard" for card in cards()[1]), "Leaderboard still has its own app card"
|
||||
for label in ("Lists", "Diary"):
|
||||
card = next(node for node in cards()[1] if node["label"] == label)
|
||||
assert corner(card, driver.tree())["label"] == "App options", f"{label} is not preinstalled"
|
||||
# Practice is the third pinned card in the same grid as the rest.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// The leaderboard route, for tests whose program does not link the
|
||||
// leaderboard screen. Profile's host links it, so tests that reach Profile
|
||||
// use the real one.
|
||||
|
||||
#program_export "leaderboard_screen_enter"
|
||||
host_enter_leaderboard :: (app: *void) {
|
||||
unused app
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Leaderboard opens as its own unpinned app, offers every installed practice
|
||||
and ranks saved friend results."""
|
||||
"""Profile owns the leaderboard, offers installed ranked boards and preserves friend results."""
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
@@ -94,6 +93,20 @@ def choose(label):
|
||||
driver.wait_idle(frames=2, timeout=2)
|
||||
|
||||
|
||||
def open_leaderboard():
|
||||
driver.press(label="Apps", role="button")
|
||||
driver.wait(label="Pinned")
|
||||
driver.press(focus_id=6792, role="button")
|
||||
driver.wait(label="Change picture", role="button")
|
||||
for _ in range(12):
|
||||
if driver.find(label="Leaderboard", role="button", visible=True):
|
||||
break
|
||||
driver.pointer(WIDTH // 2, HEIGHT // 2, wheel=-3)
|
||||
driver.wait_idle(frames=2, timeout=2)
|
||||
driver.press(label="Leaderboard", role="button")
|
||||
driver.wait(label="Leaderboard", role="text")
|
||||
|
||||
|
||||
def stop(process):
|
||||
if process.poll() is None:
|
||||
process.terminate()
|
||||
@@ -151,11 +164,9 @@ with tempfile.TemporaryDirectory(prefix="inbe-leaderboard-") as directory:
|
||||
"apps_setup_done": 1, "app_used_leaderboard": 1, "main_tab": 5, "tutorial_seen": 1,
|
||||
"habits_guide_seen": 1, "lumi_guides_seen": 127, "launcher_guide_seen": 1, "package_updates_allowed": 0,
|
||||
"apps_last_update_check": 1900000000,
|
||||
# Pinned here, so the page has no "back to Apps" bar and
|
||||
# the controls keep fixed positions.
|
||||
"launcher_favorite_count": 4, "launcher_favorite_0": 12,
|
||||
# Profile remains a permanent control; Leaderboard has no app pin.
|
||||
"launcher_favorite_count": 3, "launcher_favorite_0": 12,
|
||||
"launcher_favorite_1": 1, "launcher_favorite_2": 2,
|
||||
"launcher_favorite_3": LEADERBOARD_ROUTE,
|
||||
# Astral Projection first in the saved Practice order.
|
||||
"practice_order": 1503124}
|
||||
for key, value in settings.items():
|
||||
@@ -196,6 +207,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-leaderboard-") as directory:
|
||||
shutil.copyfile(root / "build/practice-content/taichi.zx", packages / "practice-taichi.zx")
|
||||
app, window = launch(profile, "board")
|
||||
try:
|
||||
open_leaderboard()
|
||||
# Only Wim Hof and Meditation are ranked, in Practice's order, side by side on phones.
|
||||
expected = [["Wim Hof Breathing", "Meditation"]]
|
||||
grid = practice_grid(expected)
|
||||
@@ -227,6 +239,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-leaderboard-") as directory:
|
||||
shutil.copyfile(root / "build/practice-content/sunsalutation.zx", packages / "practice-sunsalutation.zx")
|
||||
app, window = launch(profile, "with-sun-salutation")
|
||||
try:
|
||||
open_leaderboard()
|
||||
expected = [["Wim Hof Breathing", "Meditation"]]
|
||||
grid = practice_grid(expected)
|
||||
assert grid == expected, f"after download: {grid}"
|
||||
@@ -252,5 +265,5 @@ with tempfile.TemporaryDirectory(prefix="inbe-about-") as directory:
|
||||
assert about.returncode == 0 and shot.exists(), stdout[-4000:] + stderr[-2000:]
|
||||
assert "out of bounds" not in stdout + stderr, stdout[-4000:]
|
||||
driver_directory.cleanup()
|
||||
print("Leaderboard: preinstalled and unpinned, only Wim Hof and Meditation ranked, saved ranks, average hold, "
|
||||
print("Leaderboard: shared Profile route, only Wim Hof and Meditation ranked, saved ranks, average hold, "
|
||||
"meditation time, only ranked apps offered, a downloaded practice staying unranked and About passed")
|
||||
@@ -21,7 +21,7 @@ mkdir -p "$work/generated"
|
||||
--module-path "$root/build/packages/daochi-client" \
|
||||
--entry session_results_behavior:Check \
|
||||
-o "$work/generated" "$root/tests/session_results_behavior.zi" \
|
||||
"$root/tests/app_hooks_host.zi" "$root/tests/clock_host.zi"
|
||||
"$root/tests/app_hooks_host.zi" "$root/tests/habit_edit_hooks_host.zi" "$root/tests/clock_host.zi"
|
||||
cat > "$work/generated/main.c" <<'C'
|
||||
#include "session_results_behavior.h"
|
||||
#include <stdio.h>
|
||||
|
||||
+4
-4
@@ -6,8 +6,8 @@ IDI_APP_ICON ICON "inbe.ico"
|
||||
IDI_NOTIFICATION_ICON ICON "inbe.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,1,51,0
|
||||
PRODUCTVERSION 2,1,51,0
|
||||
FILEVERSION 2,1,54,0
|
||||
PRODUCTVERSION 2,1,54,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -24,11 +24,11 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "waozi"
|
||||
VALUE "FileDescription", "Inner Breeze"
|
||||
VALUE "FileVersion", "2.1.51"
|
||||
VALUE "FileVersion", "2.1.54"
|
||||
VALUE "InternalName", "breeze"
|
||||
VALUE "OriginalFilename", "breeze-windows-x86_64.exe"
|
||||
VALUE "ProductName", "Inner Breeze"
|
||||
VALUE "ProductVersion", "2.1.51"
|
||||
VALUE "ProductVersion", "2.1.54"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
+30
-30
@@ -1,14 +1,6 @@
|
||||
{
|
||||
"format": 1,
|
||||
"packages": [
|
||||
{
|
||||
"commit": "dc1cfe389905c63c0bb453727d06d72afc1fa0b0",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "pa7d5e0ee3b284d04"},
|
||||
"id": "p00b93f1ddcd2802f",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "b31299434c785d0f2bd82f36b5bfd2fd36ba1216",
|
||||
"dependencies": {},
|
||||
@@ -28,7 +20,7 @@
|
||||
},
|
||||
{
|
||||
"commit": "1cb9df183089a77c8a16448a556186f30b261a98",
|
||||
"dependencies": {"kryon": "pa7d5e0ee3b284d04"},
|
||||
"dependencies": {"kryon": "p974af619ca377b85"},
|
||||
"id": "p1b13dda539ed2a39",
|
||||
"name": "Kss",
|
||||
"ref": "master",
|
||||
@@ -36,12 +28,20 @@
|
||||
},
|
||||
{
|
||||
"commit": "bad2caaa84ef3eae61e40c99bf572d2b060d0ca2",
|
||||
"dependencies": {"kryon": "pa7d5e0ee3b284d04"},
|
||||
"dependencies": {"kryon": "p974af619ca377b85"},
|
||||
"id": "p20eb23d3e6db3711",
|
||||
"name": "Game2D",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/game2d.git"
|
||||
},
|
||||
{
|
||||
"commit": "b1e4ed4b0f7283e2b7a8ae7740f283d5729b3b04",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p974af619ca377b85"},
|
||||
"id": "p4158fd507db6061e",
|
||||
"name": "Apps",
|
||||
"ref": "b1e4ed4b0f7283e2b7a8ae7740f283d5729b3b04",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "e1f480f382d9443c4412133b55948374c77a5c21",
|
||||
"dependencies": {},
|
||||
@@ -86,6 +86,14 @@
|
||||
"source": true,
|
||||
"url": "https://github.com/waozixyz/practices.git"
|
||||
},
|
||||
{
|
||||
"commit": "3fad22341997f7c58ed1b11b1e88217358e51af5",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "p974af619ca377b85",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "25d9f649c43a8de44a5fea602d2835e33e6ca999",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
|
||||
@@ -94,17 +102,9 @@
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/daochi-client.git"
|
||||
},
|
||||
{
|
||||
"commit": "bab522f4edf3dee69827fbd09fafb2639311e1c6",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "pa7d5e0ee3b284d04",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "3f888653b6b97010163d824c4cc72476be3214f3",
|
||||
"dependencies": {"kryon": "pa7d5e0ee3b284d04"},
|
||||
"dependencies": {"kryon": "p974af619ca377b85"},
|
||||
"id": "pab5377a2950368a2",
|
||||
"name": "plot",
|
||||
"ref": "master",
|
||||
@@ -118,6 +118,14 @@
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/crypto.git"
|
||||
},
|
||||
{
|
||||
"commit": "224a08fe845cc277255af68b7c3c27ecfa0f2cc0",
|
||||
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "p974af619ca377b85", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "pd2e439f031fa79fe",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
},
|
||||
{
|
||||
"commit": "9ef1a3a130450d603abd029772422abd40cfcde0",
|
||||
"dependencies": {},
|
||||
@@ -143,23 +151,15 @@
|
||||
"ref": "master",
|
||||
"source": true,
|
||||
"url": "https://github.com/sqlite/sqlite.git"
|
||||
},
|
||||
{
|
||||
"commit": "e05dbce942cdc40e9ae4878018966a88b2b76b9f",
|
||||
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "pa7d5e0ee3b284d04", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "pf12aee7fe9383c11",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"apps": "p00b93f1ddcd2802f", "crypto": "pc23fbf455e97614d", "curl": "pd4bcd11b7d623073", "daochi_client": "p9972fcdd2d5ba999", "entity": "pf12aee7fe9383c11", "game2d": "p20eb23d3e6db3711", "kryon": "pa7d5e0ee3b284d04", "kss": "p1b13dda539ed2a39", "liboqs": "p4b0a50b49959e674", "mingcute": "pe1027b9d16704793", "monocypher": "p809b4d31a48625a3", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "practices": "p9079dde0fcc11248", "qrcode": "p0dfa70137405b096", "rini": "p09fa77e94b0dfc6c", "sqlite": "peaa43c4b7ef72edf"},
|
||||
"dependencies": {"apps": "p4158fd507db6061e", "crypto": "pc23fbf455e97614d", "curl": "pd4bcd11b7d623073", "daochi_client": "p9972fcdd2d5ba999", "entity": "pd2e439f031fa79fe", "game2d": "p20eb23d3e6db3711", "kryon": "p974af619ca377b85", "kss": "p1b13dda539ed2a39", "liboqs": "p4b0a50b49959e674", "mingcute": "pe1027b9d16704793", "monocypher": "p809b4d31a48625a3", "oqs": "p7098ac9cd92f7e5f", "plot": "pab5377a2950368a2", "practices": "p9079dde0fcc11248", "qrcode": "p0dfa70137405b096", "rini": "p09fa77e94b0dfc6c", "sqlite": "peaa43c4b7ef72edf"},
|
||||
"name": "Inbe"
|
||||
},
|
||||
"toolchain": {
|
||||
"commit": "5efa24f818485cf265bdd5c066a4e2150175ac0e",
|
||||
"ref": "master",
|
||||
"commit": "5a1ce92f921be670c9777b7d46fa86ead3062519",
|
||||
"ref": "5a1ce92f921be670c9777b7d46fa86ead3062519",
|
||||
"url": "https://github.com/ziranlang/ziran.git"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -5,7 +5,7 @@ module_roots = ["src", "src/apps", "src/app", "src/core", "src/habits", "src/pra
|
||||
|
||||
[toolchain]
|
||||
git = "https://github.com/ziranlang/ziran.git"
|
||||
ref = "master"
|
||||
ref = "5a1ce92f921be670c9777b7d46fa86ead3062519"
|
||||
|
||||
[dependencies.kryon]
|
||||
git = "https://github.com/kryonlabs/kryon.git"
|
||||
@@ -74,7 +74,7 @@ ref = "master"
|
||||
|
||||
[dependencies.apps]
|
||||
git = "https://github.com/waozixyz/apps.git"
|
||||
ref = "master"
|
||||
ref = "b1e4ed4b0f7283e2b7a8ae7740f283d5729b3b04"
|
||||
|
||||
# The practices' pictures, course data and recordings (scripts/practice_media.py).
|
||||
[dependencies.practices]
|
||||
|
||||
Reference in new issue
Block a user