Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad0f17ebb7 | ||
|
|
85330a2390 | ||
|
|
c9904167b2 | ||
|
|
b8ad52294b | ||
|
|
39a1be8b24 | ||
|
|
9130be924f | ||
|
|
f7eec1888c | ||
|
|
8e38e2a6f4 | ||
|
|
3575ba97f0 | ||
|
|
4479ef83e2 | ||
|
|
0e17c333d5 | ||
|
|
f4e3522523 | ||
|
|
bfd8d552d2 | ||
|
|
e3cbeda015 | ||
|
|
1c242eac02 | ||
|
|
3220a032df | ||
|
|
7b6a7aa9db | ||
|
|
c36d80a247 | ||
|
|
eedcbdc38e | ||
|
|
d1307b06f4 | ||
|
|
61f6e2ca41 | ||
|
|
43d9fabfbc | ||
|
|
48ef3929fc | ||
|
|
02774c652c | ||
|
|
8c692e51e5 | ||
|
|
00faaf7e93 | ||
|
|
ac8400e57c | ||
|
|
6eedd34bb0 | ||
|
|
00603e09bb | ||
|
|
9c3cf327b2 | ||
|
|
ebcb99e944 | ||
|
|
ca763d9183 | ||
|
|
c89f5e9b09 | ||
|
|
1d373214f2 | ||
|
|
ca6747894a | ||
|
|
7337178a2b | ||
|
|
c238bc5bd3 | ||
|
|
197fc01897 | ||
|
|
68622fbab8 | ||
|
|
49f929c3f4 | ||
|
|
61f016831d | ||
|
|
90fbe0f049 | ||
|
|
9b25bd887d | ||
|
|
6764286c22 | ||
|
|
8cbb34a62c | ||
|
|
33082cebf4 | ||
|
|
64c1b6b7db | ||
|
|
7e84a69098 | ||
|
|
727eaa1f72 | ||
|
|
0d1a7c12f8 | ||
|
|
e50f8d1e7b | ||
|
|
0024cd84ef | ||
|
|
2c673ada7f | ||
|
|
5efa30658b | ||
|
|
35f7807d40 | ||
|
|
f03acd1d06 | ||
|
|
ba0c1efa73 | ||
|
|
060f7dbc9a | ||
|
|
b862f62ec3 | ||
|
|
9e9d0c49cc | ||
|
|
43ab976379 | ||
|
|
7c1c87ec7a | ||
|
|
ae852f168e | ||
|
|
b253620fb7 | ||
|
|
dee24910bd | ||
|
|
d5fdb4ec28 | ||
|
|
bc29d46e53 | ||
|
|
7ce52bd753 | ||
|
|
dd62b60496 | ||
|
|
f47c5c1345 | ||
|
|
5c3b4945ee | ||
|
|
7224e76310 | ||
|
|
2467615bb3 | ||
|
|
0350f52640 | ||
|
|
d793416c61 | ||
|
|
f390f6f587 | ||
|
|
d924f4125f | ||
|
|
6ec903d67e | ||
|
|
83b08d2d3b | ||
|
|
cba84c24b0 | ||
|
|
babf23e499 | ||
|
|
c45d5db712 | ||
|
|
336e4e95ee | ||
|
|
30a9a56b37 | ||
|
|
c6592f670f | ||
|
|
4380b0211b | ||
|
|
5b5572e822 | ||
|
|
f13ad7eae6 | ||
|
|
7a88e3df9e | ||
|
|
ad2bb49238 | ||
|
|
2cbad01e93 | ||
|
|
c284ce8274 | ||
|
|
79154be186 | ||
|
|
b6fcfc21b7 | ||
|
|
91a6e99df2 | ||
|
|
2b44df84c9 | ||
|
|
c810e52642 | ||
|
|
6647f5fd8e | ||
|
|
acb2fc9b3b | ||
|
|
a965e5a6d4 | ||
|
|
fb3b1118e0 | ||
|
|
5784b9a7b9 | ||
|
|
d5330f3973 | ||
|
|
8773a00523 | ||
|
|
ed5d4875be | ||
|
|
cd3cfe5f3f | ||
|
|
4c4bb6979d | ||
|
|
723fda6258 | ||
|
|
d13060afec | ||
|
|
d13eb27613 | ||
|
|
f07bb2c3ac | ||
|
|
58364d8efb | ||
|
|
af9b733f1d | ||
|
|
1267cc9c92 | ||
|
|
1fd6be3618 | ||
|
|
5cf75b5255 | ||
|
|
4cd969e49c | ||
|
|
82aaa8e4b3 | ||
|
|
7dcaa9987e | ||
|
|
f4fec780c2 | ||
|
|
b097ccc5df | ||
|
|
9e1df485bd | ||
|
|
b14f7cab65 | ||
|
|
01273e63b5 | ||
|
|
de29b9ec3c | ||
|
|
0d6f18475e | ||
|
|
a6e15595ec | ||
|
|
c1f1462331 | ||
|
|
fe9600fe8b | ||
|
|
fa4be7a4b2 | ||
|
|
20ae8b4eca | ||
|
|
61c0d0ea2a | ||
|
|
b13fa53bd9 | ||
|
|
ab21a5ee5d | ||
|
|
46180bdcdd | ||
|
|
45413e3bff | ||
|
|
e9a4c56fe3 | ||
|
|
4fbfa6f30f | ||
|
|
aaaf626ab5 | ||
|
|
064fae5af0 | ||
|
|
ca8b1677f6 | ||
|
|
9c8c06d1ee | ||
|
|
47b529a894 | ||
|
|
48550f0e1c | ||
|
|
33cd6e3157 | ||
|
|
a7fef0f52b | ||
|
|
901805b7d3 | ||
|
|
91c0cdf370 | ||
|
|
98bb53259f | ||
|
|
9466051b66 | ||
|
|
f4c9eda118 | ||
|
|
4051049fd7 | ||
|
|
8dacb6789a | ||
|
|
99105c8655 | ||
|
|
111e0a56db | ||
|
|
6f12159e1a | ||
|
|
deffd1cdba | ||
|
|
7e76bc8a14 | ||
|
|
5417759974 | ||
|
|
5cc65ceb82 | ||
|
|
258e60265f | ||
|
|
4ebb3b2dab | ||
|
|
c8a5d216bb | ||
|
|
6be736192f | ||
|
|
781b1536ca | ||
|
|
3d7445c0ca | ||
|
|
482ca0cd46 | ||
|
|
82ea299405 | ||
|
|
cb09108156 | ||
|
|
6e7b9884f6 | ||
|
|
e79b6b9596 | ||
|
|
460ddbf847 | ||
|
|
1a589b4ff9 | ||
|
|
547fcd754f | ||
|
|
c9aec322ae | ||
|
|
a1db6006ac | ||
|
|
53393b482f | ||
|
|
de34680ee2 | ||
|
|
e10e3e716e | ||
|
|
0eea38fdd0 | ||
|
|
0238933e51 | ||
|
|
7f719c7631 | ||
|
|
3bf4288f64 | ||
|
|
a033748d87 | ||
|
|
ed9ca9ec46 | ||
|
|
8436b66d6b | ||
|
|
9ed8b5e1f5 | ||
|
|
f9dd0209c4 | ||
|
|
d45d224f91 | ||
|
|
08517097e7 | ||
|
|
c171836e86 | ||
|
|
14dc8f46f2 | ||
|
|
124223901e | ||
|
|
1ee1e6223c | ||
|
|
a8bfce26a9 | ||
|
|
78df44e946 | ||
|
|
1b0f0f301a | ||
|
|
5f8492f8f7 | ||
|
|
ef56c59207 | ||
|
|
8c7aaa4183 | ||
|
|
54b0144903 | ||
|
|
ee3cf84e8d | ||
|
|
6d67c320d4 | ||
|
|
15715808b2 | ||
|
|
dbde235112 | ||
|
|
ea9280964d | ||
|
|
97a37e6cc8 | ||
|
|
2887335be1 | ||
|
|
5c49391d3a | ||
|
|
9f7bb76455 | ||
|
|
9e718e8e4b | ||
|
|
52688313d4 | ||
|
|
f5e843de98 | ||
|
|
3696afcffb | ||
|
|
73a54f56c3 | ||
|
|
0ded03a8e3 | ||
|
|
55a60dc61d | ||
|
|
8d1c989312 | ||
|
|
20382dd89d | ||
|
|
ae4e110259 | ||
|
|
58a0a2eb88 | ||
|
|
ff2b4e5b14 | ||
|
|
87d4f6a5c1 | ||
|
|
95e370b634 | ||
|
|
26af3768f0 | ||
|
|
7f4935fe58 | ||
|
|
253f04ee46 | ||
|
|
3c541b087f | ||
|
|
9cc67b287c | ||
|
|
c59af4dc1a | ||
|
|
9ffc7e1490 | ||
|
|
2097f8cb90 | ||
|
|
1c26a83989 | ||
|
|
ae93e11df3 | ||
|
|
9634744036 | ||
|
|
e339f1c616 | ||
|
|
7c1dca9c6b | ||
|
|
7502cb455c | ||
|
|
ffeb534ced | ||
|
|
6d3e76b160 | ||
|
|
eb7db35f0e | ||
|
|
45c89d2b8f | ||
|
|
71f976fa69 | ||
|
|
cb8efebcfd | ||
|
|
dbd68442cf | ||
|
|
3b33b9d3b6 | ||
|
|
70a623b11c | ||
|
|
bd0dcef286 | ||
|
|
e9343dad76 | ||
|
|
80c754c053 | ||
|
|
eab60dd4ac | ||
|
|
2bf0d4920b |
No files matched your search
@@ -1,2 +1,3 @@
|
||||
unpackaged_assets/**/*.ogg filter=lfs diff=lfs merge=lfs -text
|
||||
test-fixtures/audio/*.mp3 filter=lfs diff=lfs merge=lfs -text
|
||||
themes/catalog_*.kss whitespace=-blank-at-eof
|
||||
@@ -1,2 +1,3 @@
|
||||
build-essential
|
||||
ripgrep
|
||||
zlib1g-dev
|
||||
@@ -24,8 +24,14 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Version Consistency
|
||||
run: |
|
||||
python3 scripts/check-version.py
|
||||
python3 tests/version_test.py
|
||||
|
||||
- name: Scan Tracked Files and History
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -71,6 +77,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Test apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -86,6 +97,25 @@ jobs:
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
- name: Check out sync test server
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: kryonlabs/daochi
|
||||
ref: 902230435fba6f64f5067afab551410456fb57d0
|
||||
path: .test-server
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Go for sync test server
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: .test-server/go.mod
|
||||
cache-dependency-path: .test-server/go.sum
|
||||
|
||||
- name: Verify sync and recovery
|
||||
run: |
|
||||
make -C .test-server build
|
||||
make sync-server-test DAOCHI_BIN="$GITHUB_WORKSPACE/.test-server/daochi"
|
||||
|
||||
build-chrome-extension:
|
||||
name: Build Chrome Extension
|
||||
runs-on: ubuntu-latest
|
||||
@@ -102,6 +132,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -114,11 +149,6 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Set up Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -127,12 +157,15 @@ jobs:
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
bash scripts/ensure-emscripten-zlib.sh "$HOME/emsdk/upstream/emscripten/embuilder"
|
||||
|
||||
- name: Build Chrome Extension ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
node --version
|
||||
make package-unpackaged-assets
|
||||
make chrome-web-store
|
||||
test -f build/dist/inbe-chrome-web-store.zip
|
||||
@@ -140,11 +173,13 @@ jobs:
|
||||
- name: Run Web Smoke Test
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
make web-smoke-test
|
||||
|
||||
- name: Run Canvas Web Smoke Test
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
make web-canvas
|
||||
make web-canvas-smoke-test
|
||||
|
||||
@@ -164,6 +199,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -176,11 +216,6 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Set up Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -189,12 +224,15 @@ jobs:
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
bash scripts/ensure-emscripten-zlib.sh "$HOME/emsdk/upstream/emscripten/embuilder"
|
||||
|
||||
- name: Build Firefox Add-on ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
node --version
|
||||
make package-unpackaged-assets
|
||||
make firefox-addons
|
||||
test -f build/dist/inbe-firefox-addons.zip
|
||||
@@ -222,4 +260,5 @@ jobs:
|
||||
LIBGL_ALWAYS_SOFTWARE: '1'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
xvfb-run -a --server-args="-screen 0 1280x1024x24" make web-smoke-test-firefox
|
||||
@@ -10,6 +10,11 @@ on:
|
||||
- master
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
released_web:
|
||||
description: Use the published web app for a website-only update
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -32,11 +37,18 @@ jobs:
|
||||
submodules: recursive
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for the web build
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Install Packages
|
||||
if: ${{ !inputs.released_web }}
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
|
||||
- name: Set Up Emscripten
|
||||
if: ${{ !inputs.released_web }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
|
||||
@@ -44,13 +56,33 @@ jobs:
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Download Released Web App
|
||||
if: ${{ inputs.released_web }}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version=$(sed -n 's/^#define APP_VERSION_STRING "\([^"]*\)"/\1/p' src/core/version.h)
|
||||
test -n "$version"
|
||||
mkdir -p build/released-web build/dist/web
|
||||
gh release download "v$version" --pattern inbe-web.zip --dir build/released-web
|
||||
unzip -q build/released-web/inbe-web.zip -d build/dist/web
|
||||
test -s build/dist/web/index.wasm
|
||||
|
||||
- name: Build Site
|
||||
run: |
|
||||
set -euo pipefail
|
||||
make site
|
||||
if [ "$RELEASED_WEB" = "true" ]; then
|
||||
make package-unpackaged-assets
|
||||
sh site/build.sh
|
||||
else
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
node --version
|
||||
make site
|
||||
fi
|
||||
test -f build/site/index.html
|
||||
test -f build/site/build/web/index.html
|
||||
test -f build/site/build/web/index.js
|
||||
@@ -62,6 +94,7 @@ jobs:
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASED_WEB: ${{ inputs.released_web }}
|
||||
|
||||
- name: Upload Site Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -21,8 +21,14 @@ jobs:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Version Consistency
|
||||
run: |
|
||||
python3 scripts/check-version.py
|
||||
python3 tests/version_test.py
|
||||
|
||||
- name: Scan Tracked Files and History
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -45,6 +51,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Test apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -76,6 +87,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -88,11 +104,6 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Set up Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -101,12 +112,15 @@ jobs:
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
bash scripts/ensure-emscripten-zlib.sh "$HOME/emsdk/upstream/emscripten/embuilder"
|
||||
|
||||
- name: Build Web ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
node --version
|
||||
make package-unpackaged-assets
|
||||
make web
|
||||
mkdir -p build/release/web
|
||||
@@ -135,6 +149,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -155,12 +174,15 @@ jobs:
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
bash scripts/ensure-emscripten-zlib.sh "$HOME/emsdk/upstream/emscripten/embuilder"
|
||||
|
||||
- name: Build Chrome Extension ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
node --version
|
||||
make package-unpackaged-assets
|
||||
make chrome-web-store
|
||||
mkdir -p build/release/chrome-web-store
|
||||
@@ -189,6 +211,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
lfs: true
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Web apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -201,11 +228,6 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
run: .github/scripts/install-apt-packages.sh .github/apt/web-packages.txt
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Set up Emscripten
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -214,12 +236,15 @@ jobs:
|
||||
"$HOME/emsdk/emsdk" activate latest
|
||||
echo "EMSDK=$HOME/emsdk" >> "$GITHUB_ENV"
|
||||
echo "EM_CONFIG=$HOME/emsdk/.emscripten" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk" >> "$GITHUB_PATH"
|
||||
echo "INBE_NODE_BIN=$(dirname "$(command -v node)")" >> "$GITHUB_ENV"
|
||||
echo "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
|
||||
bash scripts/ensure-emscripten-zlib.sh "$HOME/emsdk/upstream/emscripten/embuilder"
|
||||
|
||||
- name: Build Firefox Add-on ZIP
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$INBE_NODE_BIN:$PATH"
|
||||
node --version
|
||||
make package-unpackaged-assets
|
||||
make firefox-addons
|
||||
make firefox-addons-lint
|
||||
@@ -258,6 +283,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Linux apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -359,6 +389,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Linux apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -412,6 +447,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Linux apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -465,6 +505,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Linux apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -515,6 +560,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Linux apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -555,6 +605,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Build FreeBSD .pkg
|
||||
uses: vmactions/freebsd-vm@v1
|
||||
with:
|
||||
@@ -562,7 +617,7 @@ jobs:
|
||||
usesh: true
|
||||
prepare: |
|
||||
for attempt in 1 2 3; do
|
||||
pkg install -y gmake cmake pkgconf sdl2 gtk3 curl sqlite3 mesa-libs libdrm hicolor-icon-theme desktop-file-utils && break
|
||||
pkg install -y node22 python3 gmake cmake pkgconf sdl2 gtk3 curl sqlite3 mesa-libs libdrm hicolor-icon-theme desktop-file-utils && break
|
||||
if [ "$attempt" -eq 3 ]; then
|
||||
exit 1
|
||||
fi
|
||||
@@ -598,6 +653,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Cache Windows apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -656,6 +716,11 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js for Bend proofs
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
@@ -735,9 +800,9 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p build/release/android
|
||||
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
|
||||
VERSION=$(python3 scripts/check-version.py --print-version)
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Could not read INBE_VERSION_STRING"
|
||||
echo "Could not read APP_VERSION_STRING"
|
||||
exit 1
|
||||
fi
|
||||
for apk in "build/android/inbe-$VERSION.apk" "build/android/inbe-$VERSION-gplay.apk"; do
|
||||
@@ -784,12 +849,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout Kryon Appcast Tool
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git submodule update --init --depth 1 vendor/kryon
|
||||
test -f vendor/kryon/scripts/make_appcast.py
|
||||
|
||||
- name: Download Release Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
@@ -801,9 +860,9 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -n "$(find build/release -type f -print -quit)"
|
||||
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
|
||||
VERSION=$(python3 scripts/check-version.py --print-version)
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Could not read INBE_VERSION_STRING"
|
||||
echo "Could not read APP_VERSION_STRING"
|
||||
exit 1
|
||||
fi
|
||||
missing=0
|
||||
@@ -821,9 +880,9 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION=$(sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' src/core/version.h)
|
||||
VERSION=$(python3 scripts/check-version.py --print-version)
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Could not read INBE_VERSION_STRING"
|
||||
echo "Could not read APP_VERSION_STRING"
|
||||
exit 1
|
||||
fi
|
||||
TAG="v$VERSION"
|
||||
@@ -892,7 +951,7 @@ jobs:
|
||||
echo "no release artifacts found for the appcast"
|
||||
exit 1
|
||||
fi
|
||||
python3 vendor/kryon/scripts/make_appcast.py \
|
||||
python3 scripts/make_appcast.py \
|
||||
--version "$VERSION" \
|
||||
--base-url "$BASE" \
|
||||
--notes-url "https://github.com/waozixyz/inbe/releases/tag/$TAG" \
|
||||
|
||||
@@ -1,8 +1,59 @@
|
||||
# Inbe Agent Instructions
|
||||
# Inbe repository rules
|
||||
|
||||
- Never edit files under `vendor/` from this repository.
|
||||
- Kryon changes must be made in the core Kryon repository, committed there, pushed there, and then brought into Inbe by updating the Kryon submodule pointer.
|
||||
- Do not add tests, policy checks, wrappers, compatibility aliases, or generated changes inside `vendor/` from Inbe.
|
||||
- If a task appears to require a vendor change, stop and switch to the upstream project workflow first.
|
||||
- When adding or changing localized strings, translate the content for every locale file being touched. Do not copy English placeholder text into non-English locales.
|
||||
- Run `make no-vendor-edits` or `make test` before handing work back when a task touches Kryon or other vendored code.
|
||||
## Ownership and releases
|
||||
|
||||
- Never edit `vendor/`. Change Kryon in its upstream repository on `master`,
|
||||
commit and push there, then update only Inbe's clean submodule pointer.
|
||||
Run `make no-vendor-edits` after dependency changes.
|
||||
- Add the numeric release to `CHANGELOG.md`, then run `./update_version.sh`.
|
||||
The canonical macros are `APP_VERSION_STRING`, `APP_VERSION_MAJOR`,
|
||||
`APP_VERSION_MINOR`, and `APP_VERSION_PATCH`; do not create aliases.
|
||||
Only the GitHub Actions release workflow creates or pushes release tags.
|
||||
- Translate changed strings in every affected locale; no English placeholders.
|
||||
|
||||
## Machine-checked contracts
|
||||
|
||||
- `make build-laws` is mandatory for native, web, and Windows artifacts;
|
||||
Gradle and CMake enforce the same version and proof checks independently.
|
||||
Never bypass a failed gate or hand-edit generated policy tables.
|
||||
- Retry behavior lives in `laws/sync_retry/main.bend`. Implement changes there
|
||||
and prove `LAWS.bend` in `PROOF.bend`; the app consumes the checked table.
|
||||
Do not weaken laws to make an implementation pass. Contract changes require
|
||||
explicit product intent and separate review from implementation changes.
|
||||
- Run `make proof-test sync-recovery-test version-test` for these contracts.
|
||||
Coverage, trust boundaries, and the next proof migrations are described in
|
||||
[docs/build-laws-plan.md](docs/build-laws-plan.md).
|
||||
|
||||
## Public UI and sync boundaries
|
||||
|
||||
- Use `Text(TextProps)`, `Image(ImageProps)`, and `Button(ButtonProps)` directly.
|
||||
Semantic images use the same `Image` surface. No positional Text, legacy
|
||||
drawing calls, alternate widgets, or thin local forwarding wrappers.
|
||||
Keep meaningful compositions and gestures; use standard Checkbox and Toggle.
|
||||
Run `make clean-text-api-check button-api-check` for UI changes.
|
||||
- If a required widget capability is missing, implement the reusable primitive
|
||||
upstream first. Do not work around it in Inbe or generated code.
|
||||
- Use sync protocol v6 and the clean Kryon API; no new `Ksync` names or wrappers.
|
||||
Keep legacy wire strings only for migration. Migrations must be automatic,
|
||||
resumable, and non-destructive, preserving tombstones and legacy projections
|
||||
while supported older installations can return.
|
||||
|
||||
## Product behavior and readability
|
||||
|
||||
- Desktop focus loss must not pause practices, freeze animation, suppress
|
||||
updates, or enter the mobile background-timer path. Preserve mobile/web
|
||||
lifecycle handling and explicit user pause as separate behavior.
|
||||
- Preserve hover, press, and focus transitions. Session audio controls have
|
||||
44-unit targets (24-unit icons plus 10-unit padding), scaled and spaced.
|
||||
- Lists starts with list tabs, without a separate title bar or dropdown.
|
||||
- Use descriptive names, explicit control flow, and focused helpers. Never
|
||||
compress multiple statements, branches, declarations, or checks onto one line.
|
||||
Format changed source, inspect the final diff, and run `git diff --check`.
|
||||
|
||||
## Bend
|
||||
|
||||
When using Bend:
|
||||
- run `bend guide` to learn it
|
||||
- use `LAWS.bend` to keep important rules
|
||||
- run `bend PROOF.bend` before committing
|
||||
- parallelize the code whenever possible
|
||||
@@ -1,4 +1,84 @@
|
||||
# Changelog
|
||||
## [2.0.6] - 2026-09-22
|
||||
### Fixed
|
||||
- Selected app color themes now keep their backgrounds, cards, and text visible. Theme catalogs are included in every build, and an unavailable palette falls back to readable built-in colors.
|
||||
|
||||
## [2.0.5] - 2026-09-21
|
||||
### Changed
|
||||
- Session details now show the practice name, time, and round count above clearly separated round rows with larger hold times and easier-to-tap edit and delete actions. Editing a round highlights its value and provides a labeled number pad with separate Cancel and Save actions.
|
||||
|
||||
## [2.0.4] - 2026-09-21
|
||||
### Changed
|
||||
- The account screen shows the connected alias, automatic sync progress, and counts for habits, history days, sessions, friends, lists, and list items.
|
||||
- Habits show a distinct mark for days completed through a practice session.
|
||||
- Importing an account key offers Merge or Replace before changing local data, with clear details about each choice.
|
||||
- Profile offers Connect Account, and the sync screen offers Import .key when no account is connected.
|
||||
|
||||
### Fixed
|
||||
- Restoring an existing account now retrieves its username, friends, habits, history, and sessions from the complete account data.
|
||||
- Lists and their items now sync across devices, including completed items and changes made on another device.
|
||||
- Sync status shows the current upload or restore step instead of staying on a generic syncing message.
|
||||
- Connecting an account starts automatic sync without leaving a stale status message behind.
|
||||
|
||||
## [2.0.3] - 2026-09-20
|
||||
### Fixed
|
||||
- Web and browser builds can connect to compatible custom sync servers when you choose one.
|
||||
- Browser extensions no longer request access to the Inner Breeze website.
|
||||
- Chrome break reminders now follow the app's settings and Rest Now action.
|
||||
|
||||
## [2.0.2] - 2026-09-20
|
||||
### Fixed
|
||||
- Habit editor section headings and reminder details now align with their rows.
|
||||
|
||||
## [2.0.1] - 2026-09-20
|
||||
### Fixed
|
||||
- Existing installations reset navigation once to show Lists, Habits, Practice, and Settings in that order. Changes made afterward are kept.
|
||||
|
||||
## [2.0.0] - 2026-09-19
|
||||
### Changed
|
||||
- Added cat, sea turtle, and crescent moon profile pictures in place of three similar tree choices.
|
||||
- Added the new peaceful meditation logo and made it the default app icon, with app icon selection available from Appearance.
|
||||
- Updated Kryon controls, navigation, styling, and text editing throughout the app.
|
||||
- Material is now the default style. Choose Material, TK, or Lightfield in Appearance, with color themes available within each style.
|
||||
- Navigation customization has cleaner spacing and smoother reorder handles.
|
||||
- Desktop development runs keep their settings and sync account separate from the installed app.
|
||||
- Completed list items now move behind a Show Completed toggle instead of staying mixed into the active list.
|
||||
- Practice controls sit closer to the bottom navigation while preserving the image fade.
|
||||
- Session results now show a clearer round chart and a compact summary for single-round practices.
|
||||
- About now uses proper Discord, Telegram, and GitHub icons, and the support dialog has cleaner donation address previews.
|
||||
- Removed the Vanilla style and the startup style-selection screen.
|
||||
|
||||
### Fixed
|
||||
- Existing Android installations now move their private data to the consistent Inner Breeze location while preserving habits, sessions, settings, and sync details.
|
||||
- Desktop, web, and Windows installations now use the same Inner Breeze data location, moving existing data there on first launch instead of leaving it behind.
|
||||
- Backups exported by earlier releases import again, including archives named after the previous app identity.
|
||||
- Restored profile pictures in Settings and Profile. The picture picker now displays its full grid and uses standard scrolling and selection.
|
||||
- Settings row labels and icons now share the same vertical alignment.
|
||||
- Settings now uses one consistent modern screen instead of switching between duplicate layouts.
|
||||
- Sidebar switching is stable at responsive breakpoints instead of jittering between navigation modes.
|
||||
- Guide and modal panels remain visible with Material styling instead of showing text over the underlying screen.
|
||||
- Guide screens and practice previews are placed correctly across phone and desktop sizes.
|
||||
- Guide cards now have a clear heading, and tapping outside a focused control dismisses its focus.
|
||||
- Scrollable Settings pages leave comfortable space above the bottom navigation at larger text scales.
|
||||
- An unnamed local profile now has a neutral label in the navigation card.
|
||||
- Settings navigation opens the Settings overview, with improved bottom navigation and click handling.
|
||||
- Older navigation layouts now place Lists before Habits, Practice, and Settings.
|
||||
- Lightfield buttons and glow settings now update with the selected style, and glow is scoped to styles that support it.
|
||||
- Material sliders keep labels and values readable instead of floating too high or drawing white text on pale slider fills.
|
||||
- Android masked app icons use a gentle blue background instead of black.
|
||||
- Web loading screens and browser icons now show the current meditation logo.
|
||||
- Emptying a list no longer restores the initial sample data.
|
||||
- Improved text selection, keyboard focus, and composition handling when editing text.
|
||||
- Connecting to sync runs in the background so network requests do not block the interface.
|
||||
- Sync retries temporary connection failures automatically without losing queued changes.
|
||||
- Automatic friend-list retries stop when account details need attention, and retry delays recover safely from invalid saved counts.
|
||||
- Profile shows actionable sync status instead of internal repair messages.
|
||||
- Restoring an account key now starts synchronization and retrieves the account alias and existing friendships. Friend lists remain available when leaderboard loading fails.
|
||||
- Restoring a profile now reliably recovers habit history and session data alongside the alias and friends, including on Android.
|
||||
- Sync no longer asks you to upgrade just because the server supports a newer sync protocol.
|
||||
- Sync connection and account errors now display readable, translated messages.
|
||||
- Desktop update links now use the current Inner Breeze release location.
|
||||
|
||||
## [1.9.19] - 2026-09-04
|
||||
### Added
|
||||
- Replaced the legacy pixel UI icons with a cohesive MingCute-based icon set, packed into efficient embedded spritesheets with separate full-color assets for profiles, platforms, payments, languages, and logos.
|
||||
@@ -35,7 +115,7 @@
|
||||
|
||||
## [1.9.16] - 2026-08-29
|
||||
### Changed
|
||||
- Sync now speaks Ksync protocol v5 compatibility mode while keeping existing secure synced data usable.
|
||||
- Sync remains compatible with existing secure account keys and synced data.
|
||||
|
||||
### Fixed
|
||||
- Fixed web sync key import stability in Firefox.
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
APP_NAME := inbe
|
||||
APP_TITLE := Inner Breeze
|
||||
# `make install` installs the production desktop app for this user.
|
||||
PREFIX ?= $(HOME)/.local
|
||||
ANDROID_APP_ID := xyz.waozi.inbe
|
||||
ANDROID_DEBUG_APP_ID := $(ANDROID_APP_ID).debug
|
||||
ANDROID_ACTIVITY := xyz.waozi.inbe.MainActivity
|
||||
@@ -21,7 +23,7 @@ ANDROID_GRADLE_ARGS := $(if $(ANDROID_AAPT2),-Pandroid.aapt2FromMavenOverride="$
|
||||
ANDROID_JAVA_HOME ?= $(shell for dir in /usr/local/openjdk17 /usr/lib/jvm/java-17-openjdk-amd64 /usr/lib/jvm/java-17-openjdk; do if [ -x "$$dir/bin/java" ]; then printf "%s\n" "$$dir"; break; fi; done)
|
||||
ANDROID_GRADLE_ENV := unset ANDROID_HOME; $(if $(ANDROID_JAVA_HOME),JAVA_HOME="$(ANDROID_JAVA_HOME)" PATH="$(ANDROID_JAVA_HOME)/bin:$$PATH")
|
||||
ANDROID_KEYSTORE ?= $(HOME)/.android/kryon-release.keystore
|
||||
ANDROID_KEY_ALIAS ?= inbe-key
|
||||
ANDROID_KEY_ALIAS ?= breathing-key
|
||||
|
||||
BUILD_DIR := build
|
||||
BUILD_OBJ_DIR := $(BUILD_DIR)/obj
|
||||
@@ -149,7 +151,7 @@ WEB_OBJ_DIR := $(BUILD_OBJ_DIR)/web
|
||||
WEB_DIST_DIR := $(BUILD_DIST_DIR)/web
|
||||
CHROME_WEB_STORE_DIR := $(BUILD_DIST_DIR)/chrome-web-store
|
||||
VERSION_FILE := src/core/version.h
|
||||
APP_VERSION := $(shell awk '/INBE_VERSION_STRING/ { print $$3; exit }' $(VERSION_FILE) 2>/dev/null | tr -d '"')
|
||||
APP_VERSION := $(shell awk '/APP_VERSION_STRING/ { print $$3; exit }' $(VERSION_FILE) 2>/dev/null | tr -d '"')
|
||||
SOCIAL_PY ?= $(if $(wildcard .local/social-venv/bin/python),.local/social-venv/bin/python,python3)
|
||||
|
||||
KRYON_DIR ?= vendor/kryon
|
||||
@@ -197,15 +199,27 @@ WIN32_CURL_A := $(WIN32_CURL_BUILD_DIR)/lib/libcurl.a
|
||||
WIN32_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/windows/$(WIN32_ARCH)/liboqs
|
||||
WIN32_LIBOQS_A := $(WIN32_LIBOQS_BUILD_DIR)/lib/liboqs.a
|
||||
WIN32_LIBOQS_INCLUDE := -I$(WIN32_LIBOQS_BUILD_DIR)/include
|
||||
WIN64_RESOURCE := $(BUILD_OBJ_DIR)/windows/$(WIN64_ARCH)/inbe.res
|
||||
WIN32_RESOURCE := $(BUILD_OBJ_DIR)/windows/$(WIN32_ARCH)/inbe.res
|
||||
WIN64_RESOURCE := $(BUILD_OBJ_DIR)/windows/$(WIN64_ARCH)/$(APP_NAME).res
|
||||
WIN32_RESOURCE := $(BUILD_OBJ_DIR)/windows/$(WIN32_ARCH)/$(APP_NAME).res
|
||||
RAYLIB_SOURCES := $(shell find $(RAYLIB_DIR) -type f \( -name '*.c' -o -name '*.h' \))
|
||||
|
||||
KRYON_ICON_DIR := icons
|
||||
KRYON_ICON_FILES := $(shell find $(KRYON_DIR)/$(KRYON_ICON_DIR) -path '*/review/*' -prune -o -type f -name '*.png' -print 2>/dev/null | LC_ALL=C sort)
|
||||
KRYON_ICON_ASSETS_C := $(KRYON_DIR)/src/ui/ui_icon_assets.c
|
||||
KRYON_ICON_STAMP := $(BUILD_OBJ_DIR)/kryon-icons.sha256
|
||||
KRYON_SRCS := $(filter-out $(KRYON_ICON_ASSETS_C),$(shell find $(KRYON_DIR)/src -type f -name '*.c' | LC_ALL=C sort)) $(KRYON_ICON_ASSETS_C)
|
||||
KRYON_ICON_FILES := $(shell find $(KRYON_DIR)/$(KRYON_ICON_DIR) -path '*/review/*' -prune -o -type f \( -name '*.png' -o -name '*.json' \) -print 2>/dev/null | LC_ALL=C sort)
|
||||
KRYON_GENERATED_INCLUDE_DIR := $(BUILD_OBJ_DIR)/kryon/generated/include
|
||||
KRYON_GENERATED_SRC_DIR := $(BUILD_OBJ_DIR)/kryon/generated/src
|
||||
KRYON_RUNTIME_KRY := $(sort $(wildcard $(KRYON_DIR)/runtime/*.kry))
|
||||
KRYON_RUNTIME_C := $(patsubst $(KRYON_DIR)/%.kry,$(KRYON_GENERATED_SRC_DIR)/%.c,$(KRYON_RUNTIME_KRY))
|
||||
KRYON_RUNTIME_H := $(KRYON_RUNTIME_C:.c=.h)
|
||||
KRYON_RUNTIME_STAMP := $(KRYON_GENERATED_SRC_DIR)/runtime/.fresh
|
||||
# Inbe does not host a terminal paste stream, so it has no clipboard protocol callbacks.
|
||||
KRYON_UI_KRY := $(filter-out $(KRYON_DIR)/src/ui/clipboard_protocol.kry,$(sort $(wildcard $(KRYON_DIR)/src/ui/*.kry)))
|
||||
KRYON_UI_C := $(patsubst $(KRYON_DIR)/src/ui/%.kry,$(KRYON_GENERATED_SRC_DIR)/ui/%.c,$(KRYON_UI_KRY))
|
||||
KRYON_UI_H := $(KRYON_UI_C:.c=.h)
|
||||
KRYON_UI_STAMP := $(KRYON_GENERATED_SRC_DIR)/ui/.fresh
|
||||
KRYON_ICON_ASSETS_C := $(KRYON_GENERATED_SRC_DIR)/ui/ui_icon_assets.c
|
||||
KRYON_ICON_NAMES_C := $(KRYON_GENERATED_SRC_DIR)/ui/ui_icon_names.c
|
||||
KRYON_ICON_TYPES_H := $(KRYON_GENERATED_INCLUDE_DIR)/ui_icon_types.h
|
||||
KRYON_SRCS := $(filter-out $(KRYON_DIR)/src/ui/ui_icon_assets.c $(KRYON_DIR)/src/ui/ui_icon_names.c,$(shell find $(KRYON_DIR)/src -type f -name '*.c' | LC_ALL=C sort)) $(KRYON_ICON_ASSETS_C) $(KRYON_ICON_NAMES_C) $(KRYON_RUNTIME_C) $(KRYON_UI_C)
|
||||
KRYON_SYNC_ICONS := $(KRYON_DIR)/scripts/sync-icons.sh
|
||||
WEB_SHARED_ICON_SHEETS := platforms language tiles
|
||||
KRYON_LIBDRAW_SRCS := $(filter $(KRYON_DIR)/src/backend/libdraw_%.c,$(KRYON_SRCS))
|
||||
@@ -220,14 +234,12 @@ KRYON_WEB_SRCS := $(KRYON_SRCS)
|
||||
KRYON_WEB_SRCS := $(filter-out $(KRYON_DIR)/src/backend/dom_%.c,$(KRYON_WEB_SRCS))
|
||||
KRYON_WINDOWS_SRCS := $(filter-out $(KRYON_DIR)/src/file_dialog/file_dialog.c,$(KRYON_SRCS))
|
||||
KRYON_CLICK_SRCS := $(filter-out $(KRYON_DIR)/src/file_dialog/file_dialog.c,$(KRYON_SRCS))
|
||||
KRYON_INCLUDE := -I$(KRYON_DIR)/include
|
||||
KRYON_SYNC_ACCOUNT_C := $(KRYON_DIR)/src/ksync/ksync_account.c
|
||||
KRYON_SYNC_CRYPTO_C := $(KRYON_DIR)/src/ksync/ksync_crypto.c
|
||||
KRYON_SYNC_C := $(KRYON_DIR)/src/ksync/ksync_sync.c
|
||||
KRYON_SYNC_TRANSPORT_C := $(KRYON_DIR)/src/ksync/ksync_transport.c
|
||||
KRYON_SYNC_ACCOUNT_H := $(KRYON_DIR)/include/ksync_account.h
|
||||
KRYON_ALLOW_ICON_REGEN ?= 0
|
||||
KRYON_ICON_ASSETS_DEPS := $(if $(filter 1,$(KRYON_ALLOW_ICON_REGEN)),$(KRYON_ICON_STAMP) $(KRYON_DIR)/scripts/embed-icons.sh,)
|
||||
KRYON_INCLUDE := -I$(KRYON_GENERATED_INCLUDE_DIR) -I$(KRYON_GENERATED_SRC_DIR) -I$(KRYON_DIR)/include -I$(KRYON_DIR)/src/ui -I$(KRYON_DIR)/src/platform -I$(KRYON_DIR)/src/backend -I$(KRYON_GENERATED_SRC_DIR)/runtime -I$(KRYON_DIR)/vendor/utf8proc -DUTF8PROC_STATIC -I$(KRYON_DIR)/vendor/monocypher/src -I$(KRYON_DIR)/vendor/monocypher/src/optional
|
||||
KRYON_SYNC_ACCOUNT_C := $(KRYON_DIR)/src/sync/sync_account.c
|
||||
KRYON_SYNC_CRYPTO_C := $(KRYON_DIR)/src/sync/sync_crypto.c $(KRYON_DIR)/src/sync/monocypher.c $(KRYON_DIR)/src/sync/monocypher_ed25519.c
|
||||
KRYON_SYNC_C := $(KRYON_DIR)/src/sync/sync.c
|
||||
KRYON_SYNC_TRANSPORT_C := $(KRYON_DIR)/src/sync/sync_transport.c
|
||||
KRYON_SYNC_ACCOUNT_H := $(KRYON_DIR)/include/sync/account.h
|
||||
KRYON_VENDOR_BUILD_DIR := $(NATIVE_VENDOR_BUILD_DIR)
|
||||
KRYON_LIBOQS_BUILD_DIR := $(KRYON_VENDOR_BUILD_DIR)/liboqs
|
||||
KRYON_WEB_LIBOQS_BUILD_DIR := $(VENDOR_BUILD_DIR)/web/liboqs
|
||||
@@ -251,7 +263,7 @@ KRYON_CURL_EXTRA_CMAKE_FLAGS := \
|
||||
-DCURL_ZLIB=OFF \
|
||||
-DCURL_BROTLI=OFF \
|
||||
-DCURL_ZSTD=OFF
|
||||
# inbe is a UI-only app: drop the 2D physics subsystem (Box2D) entirely.
|
||||
# breathing is a UI-only app: drop the 2D physics subsystem (Box2D) entirely.
|
||||
# := on purpose: this is a property of the app, not a knob. Setting it to 1
|
||||
# would also require linking $(KRYON_PHYSICS_DEPS) (libbox2d), which this
|
||||
# Makefile does not wire up -- so a ?= here would invite a broken build.
|
||||
@@ -309,6 +321,7 @@ WEB_LIBOQS_A := $(KRYON_WEB_LIBOQS_A)
|
||||
WEB_LIBOQS_INCLUDE := -I$(WEB_LIBOQS_BUILD_DIR)/include
|
||||
TEST_BIN_DIR := $(BUILD_BIN_DIR)/tests
|
||||
STORAGE_IMPORT_TEST := $(TEST_BIN_DIR)/storage_import_test
|
||||
STORAGE_PATHS_TEST := $(TEST_BIN_DIR)/storage_paths_test
|
||||
LOCALE_KEYS_TEST := $(TEST_BIN_DIR)/locale_keys_test
|
||||
SYNC_URL_TEST := $(TEST_BIN_DIR)/sync_url_test
|
||||
SYNC_ACCOUNT_TEST := $(TEST_BIN_DIR)/sync_account_test
|
||||
@@ -321,19 +334,20 @@ HABIT_SESSIONS_TEST := $(TEST_BIN_DIR)/habit_sessions_test
|
||||
BREATH_TIMING_TEST := $(TEST_BIN_DIR)/breath_timing_test
|
||||
BREAK_ENGINE_TEST := $(TEST_BIN_DIR)/break_engine_test
|
||||
ACTIVITY_MONITOR_TEST := $(TEST_BIN_DIR)/activity_monitor_test
|
||||
FRAME_PACING_TEST := $(TEST_BIN_DIR)/frame_pacing_test
|
||||
SETTINGS_KEYS_TEST := $(TEST_BIN_DIR)/settings_keys_test
|
||||
TESTS := $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST) $(SYNC_REVIEW_TEST) $(FONT_LOCALE_TEST) $(FONT_GLYPH_COVERAGE_TEST) $(APP_BOTTOM_NAV_TEST) $(HABIT_MODEL_TEST) $(HABIT_SESSIONS_TEST) $(BREATH_TIMING_TEST) $(BREAK_ENGINE_TEST) $(ACTIVITY_MONITOR_TEST) $(SETTINGS_KEYS_TEST)
|
||||
TESTS := $(STORAGE_IMPORT_TEST) $(STORAGE_PATHS_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST) $(SYNC_REVIEW_TEST) $(FONT_LOCALE_TEST) $(FONT_GLYPH_COVERAGE_TEST) $(APP_BOTTOM_NAV_TEST) $(HABIT_MODEL_TEST) $(HABIT_SESSIONS_TEST) $(BREATH_TIMING_TEST) $(BREAK_ENGINE_TEST) $(ACTIVITY_MONITOR_TEST) $(FRAME_PACING_TEST) $(SETTINGS_KEYS_TEST)
|
||||
TESTS += $(TEST_BIN_DIR)/session_results_test
|
||||
TESTS += $(TEST_BIN_DIR)/habit_form_test
|
||||
TESTS += $(TEST_BIN_DIR)/practice_carousel_test
|
||||
RUNTIME_ASSET_CFLAGS := -DHAS_LIBCURL=1 $(KRYON_CURL_CFLAGS)
|
||||
RUNTIME_ASSET_LDLIBS := $(KRYON_CURL_LDLIBS)
|
||||
STORAGE_CORE_SRCS := src/storage/storage.c src/storage/storage_json_builder.c src/storage/storage_habits.c src/storage/storage_habit_materialize.c src/storage/storage_habit_sync.c
|
||||
STORAGE_CORE_SRCS = $(KRY_GEN_DIR)/src/storage/json.c $(KRY_GEN_DIR)/src/storage/storage_core.c src/storage/storage_json_builder.c $(KRY_GEN_DIR)/src/storage/storage_habits.c $(KRY_GEN_DIR)/src/storage/storage_habit_materialize.c $(KRY_GEN_DIR)/src/storage/storage_habit_sync.c
|
||||
|
||||
APP_SRCS := \
|
||||
src/main.c \
|
||||
src/platform/main_host.c \
|
||||
$(sort $(wildcard src/app/*.c)) \
|
||||
$(STORAGE_CORE_SRCS) \
|
||||
src/storage/sync_client.c \
|
||||
src/third_party/miniz.c \
|
||||
src/platform/inbe_activity_monitor.c \
|
||||
src/storage/storage_json_builder.c \
|
||||
src/platform/android/android_device.c
|
||||
|
||||
ifeq ($(NATIVE_PLATFORM),linux)
|
||||
@@ -345,21 +359,21 @@ DESKTOP_TRAY_PKG := $(shell if pkg-config --exists ayatana-appindicator3-0.1; th
|
||||
ifeq ($(filter ayatana-appindicator3-0.1 appindicator3-0.1,$(DESKTOP_TRAY_PKG)),)
|
||||
# GTK-only tray: resolve GTK at runtime through kryon's gtk_dl shim so neither
|
||||
# libgtk-3 nor its gdk/pango/cairo chain is linked into the binary. GTK maps
|
||||
# only when the tray actually starts (unset INBE_NO_TRAY to skip it entirely).
|
||||
DESKTOP_TRAY_DEFINE := -DINBE_DESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_DESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_TRAY_GTK_DL
|
||||
# only when the tray actually starts (unset APP_NO_TRAY to skip it entirely).
|
||||
DESKTOP_TRAY_DEFINE := -DDESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_DESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_TRAY_GTK_DL
|
||||
else ifeq ($(filter ayatana-appindicator3-0.1,$(DESKTOP_TRAY_PKG)),ayatana-appindicator3-0.1)
|
||||
DESKTOP_TRAY_DEFINE := -DINBE_DESKTOP_TRAY_AYATANA -DKRYON_DESKTOP_TRAY_AYATANA
|
||||
DESKTOP_TRAY_DEFINE := -DDESKTOP_TRAY_AYATANA -DKRYON_DESKTOP_TRAY_AYATANA
|
||||
else
|
||||
DESKTOP_TRAY_DEFINE := -DINBE_DESKTOP_TRAY_APPINDICATOR -DKRYON_DESKTOP_TRAY_APPINDICATOR
|
||||
DESKTOP_TRAY_DEFINE := -DDESKTOP_TRAY_APPINDICATOR -DKRYON_DESKTOP_TRAY_APPINDICATOR
|
||||
endif
|
||||
endif
|
||||
ifeq ($(NATIVE_PLATFORM),freebsd)
|
||||
DESKTOP_TRAY_PKG := $(shell if pkg-config --exists gtk+-3.0; then printf '%s' gtk+-3.0; fi)
|
||||
DESKTOP_TRAY_DEFINE := -DINBE_DESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_DESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_TRAY_GTK_DL
|
||||
DESKTOP_TRAY_DEFINE := -DDESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_DESKTOP_TRAY_GTK_STATUS_ICON -DKRYON_TRAY_GTK_DL
|
||||
endif
|
||||
ifneq ($(strip $(DESKTOP_TRAY_PKG)),)
|
||||
APP_SRCS += src/platform/inbe_desktop_tray.c
|
||||
DESKTOP_TRAY_CFLAGS := $(shell pkg-config --cflags $(DESKTOP_TRAY_PKG)) -DINBE_DESKTOP_TRAY_ENABLED -DKRYON_DESKTOP_TRAY_ENABLED $(DESKTOP_TRAY_DEFINE)
|
||||
|
||||
DESKTOP_TRAY_CFLAGS := $(shell pkg-config --cflags $(DESKTOP_TRAY_PKG)) -DDESKTOP_TRAY_ENABLED -DKRYON_DESKTOP_TRAY_ENABLED $(DESKTOP_TRAY_DEFINE)
|
||||
ifeq ($(filter ayatana-appindicator3-0.1 appindicator3-0.1,$(DESKTOP_TRAY_PKG)),)
|
||||
# Headers only for the GTK-only tray; the gtk_dl shim owns the symbols.
|
||||
DESKTOP_TRAY_LDLIBS :=
|
||||
@@ -375,18 +389,23 @@ SYSTEM_THEME_CFLAGS :=
|
||||
SYSTEM_THEME_LDLIBS :=
|
||||
|
||||
LOCALE_FILES := $(wildcard locales/*.txt)
|
||||
IMAGE_FILES := assets/app/icon.png assets/easteregg/art.png assets/easteregg/waozi.png assets/practices/whm/1.png assets/practices/whm/2.png assets/practices/meditation/1.png assets/pet/egg1.png $(wildcard assets/practices/*/banner.png) assets/practices/sunsalutation/poses_man_sheet.png assets/practices/sunsalutation/poses_woman_sheet.png assets/practices/sunsalutation/transition_01_01_to_02_man_sheet.png assets/practices/sunsalutation/transition_02_02_to_03_man_sheet.png
|
||||
IMAGE_FILES := assets/app/icon.png assets/easteregg/art.png assets/easteregg/waozi.png assets/practices/whm/1.png assets/practices/whm/2.png assets/practices/meditation/1.png assets/pet/egg1.png $(wildcard assets/practices/*/banner*.png) assets/practices/sunsalutation/poses_man_sheet.png assets/practices/sunsalutation/poses_woman_sheet.png assets/practices/sunsalutation/transition_01_01_to_02_man_sheet.png assets/practices/sunsalutation/transition_02_02_to_03_man_sheet.png
|
||||
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
|
||||
FONT_SUBSET_DIR := assets/fonts/subset
|
||||
FONT_SUBSET_CORPUS := locales assets/fonts/input_common.txt
|
||||
FONT_FILES := \
|
||||
$(FONT_SUBSET_DIR)/NotoSans-Inbe-Regular.ttf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansSC-Inbe-Regular.otf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansJP-Inbe-Regular.otf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansKR-Inbe-Regular.otf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansTC-Inbe-Regular.otf
|
||||
$(FONT_SUBSET_DIR)/NotoSans-App-Regular.ttf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansSC-App-Regular.otf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansJP-App-Regular.otf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansKR-App-Regular.otf \
|
||||
$(FONT_SUBSET_DIR)/NotoSansTC-App-Regular.otf
|
||||
EMBEDDED_ASSETS_C := $(BUILD_OBJ_DIR)/$(APP_NAME)_embedded_assets.c
|
||||
EMBEDDED_ASSET_FILES := $(LOCALE_FILES) $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES)
|
||||
STYLE_FILES := $(wildcard $(KRYON_DIR)/styles/kryon/*.kss) \
|
||||
$(wildcard assets/styles/*.kss) \
|
||||
$(wildcard themes/catalog_*.kss)
|
||||
IMAGE_FILES += assets/app/icon-sky-cradle.png assets/app/icon-ink-and-air.png
|
||||
IMAGE_FILES += $(wildcard assets/social/*.png)
|
||||
EMBEDDED_ASSET_FILES := $(STYLE_FILES) $(LOCALE_FILES) $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES)
|
||||
KRY_GEN_DIR := $(BUILD_DIR)/kryon/generated
|
||||
KRY_SRCS := $(shell find src -type f -name '*.kry' 2>/dev/null | LC_ALL=C sort)
|
||||
KRY_GEN_SRCS := $(patsubst %.kry,$(KRY_GEN_DIR)/%.c,$(KRY_SRCS))
|
||||
@@ -395,17 +414,22 @@ KRY_PROJECT_HDR := $(KRY_GEN_DIR)/kryon_project.h
|
||||
KRY_PROJECT_C := $(KRY_GEN_DIR)/kryon_project.c
|
||||
KRY_GEN_STAMP := $(KRY_GEN_DIR)/.fresh
|
||||
SRC := $(APP_SRCS) $(KRY_GEN_SRCS) $(EMBEDDED_ASSETS_C)
|
||||
WINDOWS_SRC := $(filter-out src/platform/inbe_desktop_tray.c,$(SRC)) src/platform/inbe_desktop_tray.c
|
||||
KRYON_HOST_APP_SRCS := $(filter-out src/main.c src/platform/inbe_desktop_tray.c,$(APP_SRCS)) $(KRY_GEN_SRCS) $(KRY_PROJECT_C)
|
||||
WINDOWS_SRC := $(SRC)
|
||||
KRYON_HOST_APP_SRCS := $(filter-out src/platform/main_host.c,$(APP_SRCS)) $(KRY_GEN_SRCS) $(KRY_PROJECT_C)
|
||||
KRYON_HOST_RUNTIME_SRCS := $(KRYON_DIR)/src/core/embedded_assets.c
|
||||
KRYON_HOST_SRC := $(KRYON_HOST_APP_SRCS) $(KRYON_HOST_RUNTIME_SRCS) $(EMBEDDED_ASSETS_C)
|
||||
WEB_APP_SRCS := $(filter-out src/platform/inbe_desktop_tray.c,$(APP_SRCS))
|
||||
WEB_APP_SRCS := $(APP_SRCS)
|
||||
WEB_SRC := $(WEB_APP_SRCS) $(KRY_GEN_SRCS) $(EMBEDDED_ASSETS_C)
|
||||
|
||||
APP_INCLUDE := -Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/practices/sun_salutation -Isrc/storage -Isrc/platform -Isrc/platform/android -Isrc/third_party
|
||||
APP_INCLUDE += $(KRYON_INCLUDE)
|
||||
APP_INCLUDE += -I$(KRY_GEN_DIR)
|
||||
APP_INCLUDE += -I$(KRY_GEN_DIR)/src
|
||||
PROOF_DIR := $(BUILD_DIR)/proofs
|
||||
SYNC_RETRY_HEADER := $(PROOF_DIR)/sync_retry_table.h
|
||||
STORAGE_LAYOUT_HEADER := $(PROOF_DIR)/storage_layout.h
|
||||
APP_INCLUDE += -I$(PROOF_DIR)
|
||||
KRYON_INCLUDE += -I$(PROOF_DIR)
|
||||
RAY_PKGS ?= sdl2 libdrm gbm egl glesv2
|
||||
RAY_SDL_CFLAGS ?= $(shell pkg-config --cflags sdl2 2>/dev/null)
|
||||
RAY_SDL_LDLIBS ?= $(shell pkg-config --libs sdl2 2>/dev/null)
|
||||
@@ -422,12 +446,12 @@ endif
|
||||
KRYON_RAYLIB_AUDIO_PERIOD_CONFIG := $(if $(strip $(KRYON_RAYLIB_AUDIO_PERIOD_FRAMES)),-DAUDIO_DEVICE_PERIOD_SIZE_IN_FRAMES=$(KRYON_RAYLIB_AUDIO_PERIOD_FRAMES),)
|
||||
KRYON_RAYLIB_AUDIO_PERIODS_CONFIG := $(if $(strip $(KRYON_RAYLIB_AUDIO_PERIODS)),-DAUDIO_DEVICE_PERIODS=$(KRYON_RAYLIB_AUDIO_PERIODS),)
|
||||
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=%,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=0 $(KRYON_RAYLIB_AUDIO_PERIOD_CONFIG) $(KRYON_RAYLIB_AUDIO_PERIODS_CONFIG)
|
||||
COMMON_CFLAGS := -Wall -Wextra -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DUI_EMBEDDED_ONLY=1 -DUI_WINDOW_HAVE_SDL
|
||||
COMMON_CFLAGS := -Wall -Wextra -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DNATIVE_WINDOW_HAVE_SDL -DKRYON_WITH_SYNC=1
|
||||
CFLAGS := $(COMMON_CFLAGS) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(DESKTOP_TRAY_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
|
||||
NATIVE_SYSTEM_LDLIBS := $(KRYON_NOTIFICATION_LDLIBS) -lm -lpthread $(if $(filter linux,$(NATIVE_PLATFORM)),-ldl -lrt,) $(SYSTEM_THEME_LDLIBS)
|
||||
WINDOWS_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DUI_EMBEDDED_ONLY=1 -DINBE_DESKTOP_TRAY_ENABLED
|
||||
WEB_CFLAGS := $(filter-out -Os -DUI_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -Oz -std=gnu99
|
||||
CLICK_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DUI_EMBEDDED_ONLY=1 -DINBE_DISABLE_KRYON_FILE_DIALOG -DHAS_LIBCURL=1 $(AARCH64_KRYON_CURL_CFLAGS)
|
||||
NATIVE_SYSTEM_LDLIBS := $(KRYON_NOTIFICATION_LDLIBS) -lz -lm -lpthread $(if $(filter linux,$(NATIVE_PLATFORM)),-ldl -lrt,) $(SYSTEM_THEME_LDLIBS)
|
||||
WINDOWS_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DDESKTOP_TRAY_ENABLED -DKRYON_WITH_SYNC=1
|
||||
WEB_CFLAGS := $(filter-out -Os -DNATIVE_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -Oz -std=gnu99
|
||||
CLICK_CFLAGS := -Wall -Wextra -std=c99 -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DDISABLE_KRYON_FILE_DIALOG -DHAS_LIBCURL=1 -DKRYON_WITH_SYNC=1 $(AARCH64_KRYON_CURL_CFLAGS)
|
||||
LDFLAGS := -Wl,--gc-sections -s
|
||||
WINDOWS_LDFLAGS := -Wl,--gc-sections -static -static-libgcc -mwindows
|
||||
# GNU ld's i686 stdcall fixups synthesize an undecorated glReadPixels alias,
|
||||
@@ -475,18 +499,18 @@ ifeq ($(KRYON_BACKEND),raylib)
|
||||
KRYON_SRCS += $(KRYON_RAYLIB_WRAPPERS_C)
|
||||
KRYON_NATIVE_BACKEND_DEPS := $(RAYLIB_A)
|
||||
KRYON_NATIVE_BACKEND_LIBS := $(RAYLIB_A)
|
||||
KRYON_NATIVE_BACKEND_CFLAGS := $(RAY_CFLAGS)
|
||||
KRYON_NATIVE_BACKEND_CFLAGS := -DKRYON_BACKEND_RAYLIB=1 $(RAY_CFLAGS)
|
||||
KRYON_NATIVE_BACKEND_LDLIBS := $(RAY_LDLIBS)
|
||||
else ifeq ($(KRYON_BACKEND),libdraw)
|
||||
KRYON_SRCS += $(KRYON_LIBDRAW_SRCS)
|
||||
KRYON_NATIVE_CFLAGS := $(filter-out -DUI_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
|
||||
KRYON_NATIVE_CFLAGS := $(filter-out -DNATIVE_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
|
||||
KRYON_NATIVE_BACKEND_CFLAGS := -DKRYON_BACKEND_LIBDRAW=1 -I$(PLAN9PORT_DIR)/include -idirafter $(RAYLIB_DIR)/external
|
||||
KRYON_NATIVE_BACKEND_LDLIBS := -L$(PLAN9PORT_DIR)/lib -ldraw -lmemdraw -lmux -lthread -l9 -lpthread -lm
|
||||
DESKTOP_TRAY_CFLAGS :=
|
||||
DESKTOP_TRAY_LDLIBS :=
|
||||
else ifeq ($(KRYON_BACKEND),termi)
|
||||
KRYON_SRCS += $(KRYON_TERMI_SRCS) $(KRYON_NULL_BACKEND_C)
|
||||
KRYON_NATIVE_CFLAGS := $(filter-out -DUI_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
|
||||
KRYON_NATIVE_CFLAGS := $(filter-out -DNATIVE_WINDOW_HAVE_SDL,$(COMMON_CFLAGS)) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
|
||||
KRYON_NATIVE_BACKEND_CFLAGS := -DKRYON_BACKEND_TERMI=1
|
||||
DESKTOP_TRAY_CFLAGS :=
|
||||
DESKTOP_TRAY_LDLIBS :=
|
||||
@@ -496,6 +520,7 @@ endif
|
||||
KRYON_WINDOWS_SRCS += $(KRYON_RAYLIB_WRAPPERS_C)
|
||||
KRYON_CLICK_SRCS += $(KRYON_RAYLIB_WRAPPERS_C)
|
||||
WEB_CACHE_BUSTER ?= $(shell if git diff --quiet --ignore-submodules HEAD -- 2>/dev/null; then git rev-parse --short HEAD 2>/dev/null; else date +%s; fi)
|
||||
WEB_CACHE_BUSTER := $(WEB_CACHE_BUSTER)
|
||||
WEB_TARGET := $(WEB_DIST_DIR)/index.html
|
||||
WEB_APP_SCRIPT := <script>window.__inbeRenderer="canvas";window.__inbeLoadApp("index.js?v=$(WEB_CACHE_BUSTER)")</script>
|
||||
WEB_JS_TARGET := $(WEB_DIST_DIR)/index.js
|
||||
@@ -538,7 +563,7 @@ ADDONS_LINTER ?= npx --yes addons-linter
|
||||
WEB_ASSET_FILES := $(filter-out web-assets/dl/% web-assets/canvas_index.html,$(shell find web-assets site-icons -type f 2>/dev/null))
|
||||
UNPACKAGED_AUDIO_DIR := unpackaged_assets/audio
|
||||
UNPACKAGED_AUDIO_FILES := $(shell find $(UNPACKAGED_AUDIO_DIR) -type f 2>/dev/null)
|
||||
MEDITATION_AUDIO_ZIP := web-assets/dl/inbe-meditation-audio-v1.zip
|
||||
MEDITATION_AUDIO_ZIP := web-assets/dl/breathing-meditation-audio-v1.zip
|
||||
MEDITATION_AUDIO_TRACKS := \
|
||||
Elijah_K/deep-meditation.ogg \
|
||||
Elijah_K/path-of-meditation.ogg \
|
||||
@@ -547,7 +572,7 @@ MEDITATION_AUDIO_TRACKS := \
|
||||
include $(KRYON_DIR)/mk/package-freebsd.mk
|
||||
|
||||
.PHONY: web-canvas web-canvas-smoke-test web-compare-test web-side-by-side-test all native kryon-host install install-user uninstall stage package-freebsd deb package-deb deb-check rpm package-rpm rpm-check snap package-snap snap-cache-clean flatpak package-flatpak podman-check validate-desktop run tui run-tui run-termi run-termi-direct run-fresh screenshot test ci dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows font-subsets font-bundle-check clean clean-linux clean-native clean-vendor-builds windows-setup windows-setup-check android-avd android-audio-e2e android-check-keystore android-copy-assets android-copy-debug-apks android-copy-release-apks android-copy-bundle android-smoke android-local-properties android-debug android-release android-bundle android-install android-install-release android-clean android-rebuild validate-meditation-audio package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web web-tools-check web-smoke-test web-smoke-test-firefox web-smoke-test-librewolf site site-release-assets-check chrome-web-store chrome-web-store-test firefox-addons firefox-addons-lint firefox-addons-source-zip verify-firefox-addons sync-web-icons social-install social-login social-draft social-x-draft social-post social-x-post social-x-post-dry-run social-post-dry-run
|
||||
.PHONY: no-vendor-edits secret-check secret-check-history hooks-install test-tui-screenshot test-termi-screenshot test-termi-screenshot-direct
|
||||
.PHONY: clean-text-api-check no-vendor-edits secret-check secret-check-history hooks-install test-tui-screenshot test-termi-screenshot test-termi-screenshot-direct
|
||||
.NOTPARALLEL: dist windows windows64 windows32 android-release android-bundle click deb package-deb rpm package-rpm snap package-snap flatpak package-flatpak
|
||||
|
||||
all: native
|
||||
@@ -559,12 +584,32 @@ kryon-host: $(KRYON_HOST_TARGET)
|
||||
# All compiler sources, not just main.c: k2c is multi-file now, and a
|
||||
# single-file prerequisite lets a stale binary silently regenerate with
|
||||
# old behavior (mirrors kryon's own K2C_SRCS).
|
||||
K2C_SRCS := $(sort $(wildcard $(KRYON_DIR)/cmd/k2c/*.c)) \
|
||||
$(KRYON_DIR)/cmd/kir/kir.c $(KRYON_DIR)/cmd/kir/kir_parse.c
|
||||
K2C_SRCS := $(sort $(wildcard $(KRYON_DIR)/cmd/k2c/*.[ch]) \
|
||||
$(wildcard $(KRYON_DIR)/cmd/kir/*.[ch]))
|
||||
$(K2C): $(K2C_SRCS)
|
||||
$(MAKE) -C $(KRYON_DIR) k2c
|
||||
|
||||
$(KRY_GEN_STAMP): Makefile $(K2C) $(KRY_SRCS)
|
||||
# Generate shared widget policies into Inbe's build tree, never vendor sources.
|
||||
$(KRYON_RUNTIME_STAMP): Makefile $(K2C) $(KRYON_RUNTIME_KRY)
|
||||
mkdir -p $(dir $@)
|
||||
$(K2C) --strict --no-main --root $(abspath $(KRYON_DIR)) -o $(abspath $(KRYON_GENERATED_SRC_DIR)) $(abspath $(KRYON_RUNTIME_KRY))
|
||||
touch $@
|
||||
|
||||
$(KRYON_RUNTIME_C) $(KRYON_RUNTIME_H): $(KRYON_RUNTIME_STAMP)
|
||||
@test -f $@
|
||||
|
||||
# Kryon's .kry-backed UI modules generate the public ui/*.h headers that the
|
||||
# retained handwritten src/ui/*.c host services include, plus the generated
|
||||
# implementations for the migrated widgets. Mirror kryon's own --root src pass.
|
||||
$(KRYON_UI_STAMP): Makefile $(K2C) $(KRYON_UI_KRY) $(KRYON_RUNTIME_STAMP)
|
||||
mkdir -p $(dir $@)
|
||||
$(K2C) --no-main --root $(abspath $(KRYON_DIR)/src) -o $(abspath $(KRYON_GENERATED_SRC_DIR)) $(abspath $(KRYON_UI_KRY))
|
||||
touch $@
|
||||
|
||||
$(KRYON_UI_C) $(KRYON_UI_H): $(KRYON_UI_STAMP)
|
||||
@test -f $@
|
||||
|
||||
$(KRY_GEN_STAMP): Makefile $(K2C) $(KRY_SRCS) $(SYNC_RETRY_HEADER) $(STORAGE_LAYOUT_HEADER) $(KRYON_RUNTIME_STAMP) | build-laws
|
||||
rm -rf $(KRY_GEN_DIR)
|
||||
mkdir -p $(KRY_GEN_DIR)
|
||||
$(K2C) --root $(abspath .) -o $(KRY_GEN_DIR) $(abspath $(KRY_SRCS))
|
||||
@@ -574,7 +619,7 @@ $(KRY_GEN_STAMP): Makefile $(K2C) $(KRY_SRCS)
|
||||
PLAN9_DIR := $(BUILD_DIR)/plan9
|
||||
PLAN9_GENERATED := $(PLAN9_DIR)/generated
|
||||
PLAN9_FILE_LIST := $(PLAN9_DIR)/generated-c-files.txt
|
||||
PLAN9_EMBEDDED_ASSETS_C := $(PLAN9_DIR)/inbe_embedded_assets.c
|
||||
PLAN9_EMBEDDED_ASSETS_C := $(PLAN9_DIR)/app_embedded_assets.c
|
||||
|
||||
# Native Plan 9 build inputs: k2c emits 8c-safe C directly, the embedded
|
||||
# table carries the locales, images, and subset fonts (audio stays
|
||||
@@ -587,9 +632,11 @@ kry-c-plan9: $(KRY_GEN_STAMP)
|
||||
--include-dir vendor/kryon/include --include-dir src \
|
||||
--include-dir $(KRY_GEN_DIR) --include-dir vendor-builds/sqlite \
|
||||
-o $(PLAN9_GENERATED) $(KRY_SRCS)
|
||||
cp $(SYNC_RETRY_HEADER) $(PLAN9_GENERATED)/sync_retry_table.h
|
||||
cp $(STORAGE_LAYOUT_HEADER) $(PLAN9_GENERATED)/storage_layout.h
|
||||
find $(PLAN9_GENERATED) -type f -name '*.c' | LC_ALL=C sort > $(PLAN9_FILE_LIST)
|
||||
sh vendor/kryon/scripts/embed-assets.sh $(PLAN9_EMBEDDED_ASSETS_C) \
|
||||
$(LOCALE_FILES) $(IMAGE_FILES) $(FONT_FILES)
|
||||
$(STYLE_FILES) $(LOCALE_FILES) $(IMAGE_FILES) $(FONT_FILES)
|
||||
|
||||
$(KRY_GEN_SRCS) $(KRY_GEN_HDRS) $(KRY_PROJECT_HDR) $(KRY_PROJECT_C): $(KRY_GEN_STAMP)
|
||||
|
||||
@@ -664,18 +711,20 @@ vendor-prebuilds-web: web-tools-check $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMA
|
||||
vendor-prebuilds-windows: $(WIN64_RAYLIB_A) $(WIN32_RAYLIB_A) $(WIN64_CURL_A) $(WIN32_CURL_A) $(WIN64_LIBOQS_A) $(WIN32_LIBOQS_A) $(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H)
|
||||
|
||||
run: $(TARGET)
|
||||
./$(TARGET)
|
||||
@root="$${XDG_DATA_HOME:-$$HOME/.local/share}/inbe-debug"; \
|
||||
APP_DATA_ROOT="$$root" ./$(TARGET)
|
||||
|
||||
tui run-tui run-termi:
|
||||
@$(MAKE) --no-print-directory KRYON_BACKEND=termi run-termi-direct
|
||||
|
||||
run-termi-direct: $(TARGET)
|
||||
@./$(TARGET)
|
||||
@root="$${XDG_DATA_HOME:-$$HOME/.local/share}/inbe-debug"; \
|
||||
APP_DATA_ROOT="$$root" ./$(TARGET)
|
||||
|
||||
run-fresh: $(TARGET)
|
||||
@root=$$(mktemp -d /tmp/inbe-fresh.XXXXXX); \
|
||||
echo "INBE_DATA_ROOT=$$root"; \
|
||||
INBE_FORCE_DARK_MODE=1 INBE_DATA_ROOT="$$root" ./$(TARGET)
|
||||
@root=$$(mktemp -d /tmp/$(APP_NAME)-fresh.XXXXXX); \
|
||||
echo "APP_DATA_ROOT=$$root"; \
|
||||
APP_FORCE_DARK_MODE=1 APP_DATA_ROOT="$$root" ./$(TARGET)
|
||||
|
||||
social-install:
|
||||
python3 -m venv .local/social-venv
|
||||
@@ -720,14 +769,53 @@ test-termi-screenshot-direct: $(TARGET)
|
||||
ci: test web
|
||||
|
||||
## End-to-end desktop window-mode tests on a private Xvfb display: window
|
||||
## close across startup/keep-running/ask modes plus break-HUD dragging.
|
||||
## Requires Xvfb, xfwm4, xdotool, x11-utils, imagemagick and sqlite3.
|
||||
## close across startup/keep-running/ask modes.
|
||||
## Requires Xvfb, xfwm4, xdotool, x11-utils and sqlite3.
|
||||
test-desktop-windows:
|
||||
./scripts/test-desktop-windows.sh "$(TARGET)"
|
||||
|
||||
no-vendor-edits:
|
||||
bash ./scripts/check-no-vendor-edits.sh
|
||||
|
||||
clean-text-api-check:
|
||||
python3 $(KRYON_DIR)/scripts/check-clean-text-api.py src tests
|
||||
|
||||
.PHONY: button-api-check
|
||||
button-api-check:
|
||||
bash scripts/check-button-api.sh
|
||||
|
||||
test: button-api-check
|
||||
|
||||
.PHONY: version-check version-test
|
||||
version-check:
|
||||
python3 scripts/check-version.py
|
||||
|
||||
version-test:
|
||||
python3 tests/version_test.py
|
||||
|
||||
test: version-check version-test
|
||||
|
||||
# Proofs run on every invocation, even with an existing generated header.
|
||||
# The generator replaces the header only when its contents actually change.
|
||||
.PHONY: proofs proof-test build-laws
|
||||
proofs:
|
||||
node scripts/generate-sync-retry.mjs $(SYNC_RETRY_HEADER)
|
||||
node scripts/generate-storage-layout.mjs $(STORAGE_LAYOUT_HEADER)
|
||||
|
||||
proof-test:
|
||||
node --test tests/sync_retry_proof_test.mjs
|
||||
node --test tests/storage_layout_proof_test.mjs
|
||||
|
||||
build-laws: version-check proofs
|
||||
|
||||
$(SYNC_RETRY_HEADER): | proofs
|
||||
@test -f $@
|
||||
|
||||
$(STORAGE_LAYOUT_HEADER): | proofs
|
||||
@test -f $@
|
||||
|
||||
test: proof-test
|
||||
|
||||
secret-check:
|
||||
python3 ./scripts/check-secrets.py --working-tree
|
||||
|
||||
@@ -740,13 +828,25 @@ hooks-install:
|
||||
embedded-image-assets-check: $(EMBEDDED_ASSETS_C)
|
||||
bash ./tests/embedded_image_assets_test.sh
|
||||
|
||||
test: no-vendor-edits secret-check $(TESTS) font-bundle-check audio-test-fixture-check embedded-image-assets-check
|
||||
.PHONY: habits-cards-ui-test
|
||||
habits-cards-ui-test: $(TARGET)
|
||||
bash tests/habits_cards_ui_test.sh "$(abspath $(TARGET))"
|
||||
|
||||
.PHONY: lists-ui-test
|
||||
lists-ui-test: $(TARGET)
|
||||
bash tests/lists_ui_test.sh "$(abspath $(TARGET))"
|
||||
|
||||
.PHONY: storage-literals-check
|
||||
storage-literals-check:
|
||||
bash ./scripts/check-storage-literals.sh
|
||||
|
||||
test: clean-text-api-check no-vendor-edits secret-check storage-literals-check $(TESTS) font-bundle-check audio-test-fixture-check embedded-image-assets-check
|
||||
bash ./tests/screenshot_scene_test.sh
|
||||
echo "== Inbe tests =="; \
|
||||
echo "== BreathSession tests =="; \
|
||||
status=0; \
|
||||
for test_bin in $(TESTS); do \
|
||||
name=$$(basename "$$test_bin"); \
|
||||
log=$$(mktemp /tmp/inbe-test.XXXXXX); \
|
||||
log=$$(mktemp /tmp/$(APP_NAME)-test.XXXXXX); \
|
||||
printf "%-28s" "$$name"; \
|
||||
if "$$test_bin" >"$$log" 2>&1; then \
|
||||
echo "PASS"; \
|
||||
@@ -760,9 +860,9 @@ test: no-vendor-edits secret-check $(TESTS) font-bundle-check audio-test-fixture
|
||||
fi; \
|
||||
done; \
|
||||
if [ "$$status" -eq 0 ]; then \
|
||||
echo "== PASS: all Inbe tests =="; \
|
||||
echo "== PASS: all BreathSession tests =="; \
|
||||
else \
|
||||
echo "== FAIL: Inbe tests =="; \
|
||||
echo "== FAIL: BreathSession tests =="; \
|
||||
fi; \
|
||||
exit "$$status"
|
||||
|
||||
@@ -782,17 +882,21 @@ font-bundle-check:
|
||||
done
|
||||
|
||||
font-subsets:
|
||||
$(MAKE) -C $(KRYON_DIR) font-subsets \
|
||||
FONT_SUBSET_OUT_DIR="$(abspath $(FONT_SUBSET_DIR))" \
|
||||
FONT_SUBSET_SOURCE_DIR="$(abspath $(KRYON_DIR)/fonts/noto)" \
|
||||
FONT_SUBSET_PREFIX=Inbe \
|
||||
FONT_SUBSET_CORPUS="$(abspath locales) $(abspath assets/fonts/input_common.txt)"
|
||||
sh $(KRYON_DIR)/scripts/subset-fonts.sh "$(FONT_SUBSET_DIR)" \
|
||||
"$(KRYON_DIR)/fonts/noto" App locales assets/fonts/input_common.txt
|
||||
|
||||
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/storage/storage.h src/storage/db.h src/storage/import.h $(KRY_GEN_DIR)/src/screens/habits_screen.c $(KRY_GEN_DIR)/src/screens/habits/edit.c $(KRY_GEN_DIR)/src/screens/habits/session.c src/screens/habits_screen.h src/screens/habits/habits.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
|
||||
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/storage/storage.h src/storage/db.h src/storage/import.h src/screens/habits_screen.h src/screens/habits/habits.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/storage_import_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(KRY_GEN_DIR)/src/screens/habits_screen.c $(KRY_GEN_DIR)/src/screens/habits/edit.c $(KRY_GEN_DIR)/src/screens/habits/session.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
tests/storage_import_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_DIR)/src/kry_std/kry_archive.c $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(KRY_GEN_DIR)/src/storage/import.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections $(NATIVE_SYSTEM_LDLIBS)
|
||||
|
||||
$(STORAGE_PATHS_TEST): tests/storage_paths_test.c $(STORAGE_CORE_SRCS) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/storage/data.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/storage/storage.h src/storage/db.h src/storage/import.h src/storage/data.h $(STORAGE_LAYOUT_HEADER) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/storage_paths_test.c $(STORAGE_CORE_SRCS) $(KRYON_DIR)/src/kry_std/kry_archive.c $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/storage/data.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections $(NATIVE_SYSTEM_LDLIBS)
|
||||
|
||||
$(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_DIR)
|
||||
@@ -805,56 +909,87 @@ $(SETTINGS_KEYS_TEST): tests/settings_keys_test.c src/app/app_settings.kry src/a
|
||||
-o $@ \
|
||||
tests/settings_keys_test.c
|
||||
|
||||
$(SYNC_URL_TEST): tests/sync_url_test.c src/storage/sync_client.c src/storage/sync_client.h $(KRYON_SYNC_C) $(KRYON_SYNC_TRANSPORT_C) $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(CURL_PROTOCOL_CHECK) $(LIBOQS_A) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -Wno-unused-function -std=c99 -D_DEFAULT_SOURCE -DINBE_SYNC_CLIENT_TESTS -DHAS_LIBOQS=1 -ffunction-sections -fdata-sections \
|
||||
-Isrc/storage -Isrc -Isrc/core $(KRYON_INCLUDE) $(KRYON_CURL_CFLAGS) $(LIBOQS_INCLUDE) -o $@ \
|
||||
tests/sync_url_test.c src/storage/sync_client.c $(KRYON_SYNC_C) $(KRYON_SYNC_TRANSPORT_C) $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) \
|
||||
$(SYNC_URL_TEST): tests/sync_url_test.c tests/test_locale_stub.c $(KRY_GEN_DIR)/src/storage/sync_transport.c src/storage/sync_client.h $(KRYON_SYNC_C) $(KRYON_SYNC_TRANSPORT_C) $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(CURL_PROTOCOL_CHECK) $(LIBOQS_A) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -Wno-unused-function -std=c99 -D_DEFAULT_SOURCE -DSYNC_CLIENT_TESTS -DHAS_LIBOQS=1 -ffunction-sections -fdata-sections \
|
||||
-Isrc/storage -Isrc -Isrc/core -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(KRYON_INCLUDE) $(KRYON_CURL_CFLAGS) $(LIBOQS_INCLUDE) -o $@ \
|
||||
tests/sync_url_test.c tests/test_locale_stub.c $(KRY_GEN_DIR)/src/storage/sync_transport.c $(KRYON_SYNC_C) $(KRYON_SYNC_TRANSPORT_C) $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) \
|
||||
$(LIBOQS_A) -Wl,--gc-sections $(KRYON_CURL_LDLIBS) $(NATIVE_SYSTEM_LDLIBS)
|
||||
|
||||
$(SYNC_ACCOUNT_TEST): tests/sync_account_test.c tests/test_locale_stub.c $(KRY_GEN_DIR)/src/storage/sync_account.c src/storage/sync_account.h $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(KRYON_SYNC_ACCOUNT_H) $(STORAGE_CORE_SRCS) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/storage/storage.h src/storage/db.h src/storage/import.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(LIBOQS_A) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -DHAS_LIBOQS=1 -ffunction-sections -fdata-sections \
|
||||
$(SYNC_ACCOUNT_TEST): tests/sync_account_test.c tests/test_locale_stub.c $(KRY_GEN_DIR)/src/storage/sync_account.c src/storage/sync_account.h $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(KRYON_SYNC_ACCOUNT_H) $(STORAGE_CORE_SRCS) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/storage/storage.h src/storage/db.h src/storage/import.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(LIBOQS_A) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DHAS_LIBOQS=1 -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(LIBOQS_INCLUDE) $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/sync_account_test.c tests/test_locale_stub.c $(KRY_GEN_DIR)/src/storage/sync_account.c $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(STORAGE_CORE_SRCS) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
tests/sync_account_test.c tests/test_locale_stub.c $(KRY_GEN_DIR)/src/storage/sync_account.c $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(STORAGE_CORE_SRCS) $(KRYON_DIR)/src/kry_std/kry_archive.c $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(SQLITE_SRC) \
|
||||
$(LIBOQS_A) -Wl,--gc-sections $(NATIVE_SYSTEM_LDLIBS)
|
||||
|
||||
$(SYNC_REVIEW_TEST): tests/sync_review_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/storage/storage.h src/storage/db.h src/storage/import.h $(KRY_GEN_DIR)/src/screens/habits_screen.c src/screens/habits_screen.h src/third_party/miniz.c src/third_party/miniz.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -ffunction-sections -fdata-sections \
|
||||
.PHONY: sync-server-test
|
||||
sync-server-test: $(TEST_BIN_DIR)/sync_server_test
|
||||
node scripts/sync-server-test.mjs
|
||||
|
||||
$(TEST_BIN_DIR)/sync_server_test: tests/sync_server_test.c tests/test_locale_stub.c $(KRY_GEN_STAMP) $(STORAGE_CORE_SRCS) $(KRY_GEN_DIR)/src/storage/sync_transport.c $(KRYON_SYNC_C) $(KRYON_SYNC_TRANSPORT_C) $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(LIBOQS_A) $(SQLITE_SRC) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DHAS_LIBOQS=1 -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(LIBOQS_INCLUDE) $(SQLITE_INCLUDE) $(KRYON_CURL_CFLAGS) \
|
||||
-o $@ tests/sync_server_test.c tests/test_locale_stub.c $(KRY_GEN_DIR)/src/storage/sync_transport.c $(KRYON_SYNC_C) $(KRYON_SYNC_TRANSPORT_C) $(KRY_GEN_DIR)/src/storage/sync_account.c $(KRYON_SYNC_ACCOUNT_C) $(KRYON_SYNC_CRYPTO_C) $(STORAGE_CORE_SRCS) $(KRYON_DIR)/src/kry_std/kry_archive.c $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(SQLITE_SRC) \
|
||||
$(LIBOQS_A) -Wl,--gc-sections $(KRYON_CURL_LDLIBS) $(NATIVE_SYSTEM_LDLIBS)
|
||||
|
||||
$(SYNC_REVIEW_TEST): tests/sync_review_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c src/storage/storage.h src/storage/db.h src/storage/import.h $(KRY_GEN_DIR)/src/screens/habits_screen.c src/screens/habits_screen.h $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/practices -Isrc/practices/whm -Isrc/practices/meditation -Isrc/storage -Isrc/platform/android -Isrc/third_party $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/sync_review_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(KRY_GEN_DIR)/src/screens/habits_screen.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
tests/sync_review_test.c tests/test_locale_stub.c $(STORAGE_CORE_SRCS) $(KRYON_DIR)/src/kry_std/kry_archive.c $(KRYON_SYNC_CRYPTO_C) $(KRY_GEN_DIR)/src/storage/storage_sessions.c $(KRY_GEN_DIR)/src/storage/storage_elist.c $(KRY_GEN_DIR)/src/storage/sync_review.c $(KRY_GEN_DIR)/src/storage/db.c $(KRY_GEN_DIR)/src/storage/import.c $(KRY_GEN_DIR)/src/habits/habit_model.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(KRY_GEN_DIR)/src/screens/habits_screen.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections $(NATIVE_SYSTEM_LDLIBS)
|
||||
|
||||
$(FONT_LOCALE_TEST): tests/font_locale_test.c src/app/app_font_assets.h $(FONT_FILES) | $(TEST_BIN_DIR)
|
||||
$(FONT_LOCALE_TEST): $(KRY_GEN_DIR)/src/app/font_assets.c tests/font_locale_test.c src/app/app_font_assets.h $(FONT_FILES) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-DKRYON_DIR=\"$(KRYON_DIR)\" \
|
||||
-o $@ \
|
||||
tests/font_locale_test.c
|
||||
$(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src tests/font_locale_test.c $(KRY_GEN_DIR)/src/app/font_assets.c
|
||||
|
||||
$(FONT_GLYPH_COVERAGE_TEST): tests/font_glyph_coverage_test.c $(FONT_FILES) $(LOCALE_FILES) assets/fonts/input_common.txt | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-o $@ \
|
||||
tests/font_glyph_coverage_test.c
|
||||
|
||||
$(APP_BOTTOM_NAV_TEST): tests/app_bottom_nav_test.c src/app/app_nav.h src/app/app.h $(KRY_GEN_DIR)/src/app/app_nav.c $(KRY_GEN_DIR)/src/app/customize_nav.c $(KRY_GEN_DIR)/src/widgets/bottom_nav.c $(KRYON_DIR)/include/ui.h $(KRYON_DIR)/src/core/app_shell.c $(KRYON_DIR)/include/app_shell.h | $(TEST_BIN_DIR)
|
||||
$(APP_BOTTOM_NAV_TEST): tests/app_bottom_nav_test.c src/app/app_nav.h src/app/app.kry $(KRY_GEN_DIR)/src/app/app.h $(KRY_GEN_DIR)/src/app/app_nav.c $(KRY_GEN_DIR)/src/app/customize_nav.c $(KRY_GEN_DIR)/src/widgets/bottom_nav.c $(KRYON_DIR)/include/ui_tree_props.generated.h $(KRYON_GENERATED_SRC_DIR)/ui/app_shell_layout.c $(KRYON_GENERATED_SRC_DIR)/ui/app_shell_route.c $(KRYON_DIR)/include/ui_app_shell_props.generated.h $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/app_bottom_nav_test.c \
|
||||
$(KRYON_DIR)/src/core/app_shell.c \
|
||||
tests/app_bottom_nav_test.c $(KRY_GEN_DIR)/src/app/metrics.c \
|
||||
$(KRYON_GENERATED_SRC_DIR)/ui/app_shell_layout.c \
|
||||
$(KRYON_GENERATED_SRC_DIR)/ui/app_shell_route.c \
|
||||
$(KRY_GEN_DIR)/src/app/customize_nav.c \
|
||||
$(KRY_GEN_DIR)/src/widgets/bottom_nav.c
|
||||
|
||||
$(HABIT_MODEL_TEST): tests/habit_model_test.c $(KRY_GEN_DIR)/src/habits/habit_model.c src/screens/habits_screen.h src/screens/habits/habits.h | $(TEST_BIN_DIR)
|
||||
.PHONY: elist-screen-test
|
||||
test: elist-screen-test
|
||||
elist-screen-test: $(TEST_BIN_DIR)/elist_screen_test
|
||||
$<
|
||||
|
||||
$(TEST_BIN_DIR)/elist_screen_test: tests/elist_screen_test.c $(KRY_GEN_DIR)/src/screens/elist_screen.c src/app/app.kry $(KRY_GEN_DIR)/src/app/app.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-Wl,--gc-sections -o $@ tests/elist_screen_test.c $(KRY_GEN_DIR)/src/app/metrics.c
|
||||
|
||||
$(TEST_BIN_DIR)/habit_form_test: tests/habit_form_test.c $(KRY_GEN_DIR)/src/screens/habits/edit.c src/app/app.kry $(KRY_GEN_DIR)/src/app/app.h $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-Wl,--gc-sections -o $@ tests/habit_form_test.c $(KRY_GEN_DIR)/src/app/metrics.c $(KRY_GEN_DIR)/src/screens/habits/edit.c
|
||||
|
||||
$(TEST_BIN_DIR)/practice_carousel_test: tests/practice_carousel_test.c $(KRY_GEN_DIR)/src/screens/practice_screen.c src/app/app.kry $(KRY_GEN_DIR)/src/app/app.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -ffunction-sections -fdata-sections \
|
||||
$(APP_INCLUDE) $(SQLITE_INCLUDE) \
|
||||
-Wl,--gc-sections -o $@ tests/practice_carousel_test.c
|
||||
|
||||
$(HABIT_MODEL_TEST): tests/habit_model_test.c $(KRY_GEN_DIR)/src/habits/habit_model.c src/screens/habits_screen.h src/screens/habits/habits.h $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/habit_model_test.c \
|
||||
$(KRY_GEN_DIR)/src/habits/habit_model.c
|
||||
|
||||
$(HABIT_SESSIONS_TEST): tests/habit_sessions_test.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(KRY_GEN_DIR)/src/habits/habit_model.c src/screens/habits_screen.h src/screens/habits/habits.h | $(TEST_BIN_DIR)
|
||||
$(HABIT_SESSIONS_TEST): tests/habit_sessions_test.c $(KRY_GEN_DIR)/src/habits/habit_sessions.c $(KRY_GEN_DIR)/src/habits/habit_model.c src/screens/habits_screen.h src/screens/habits/habits.h $(SQLITE_AMALGAMATION_H) | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/habit_sessions_test.c \
|
||||
$(KRY_GEN_DIR)/src/habits/habit_sessions.c \
|
||||
@@ -867,6 +1002,11 @@ $(BREATH_TIMING_TEST): tests/breath_timing_test.c $(KRY_GEN_DIR)/src/core/breath
|
||||
tests/breath_timing_test.c \
|
||||
$(KRY_GEN_DIR)/src/core/breath_engine.c
|
||||
|
||||
$(TEST_BIN_DIR)/session_results_test: tests/session_results_test.c $(KRY_GEN_DIR)/src/practices/session_results.c $(KRY_GEN_DIR)/src/practices/meditation/meditation_session.c src/app/app.kry $(KRY_GEN_DIR)/src/app/app.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -ffunction-sections -fdata-sections \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android -Isrc/third_party $(KRYON_INCLUDE) $(SQLITE_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src \
|
||||
-o $@ tests/session_results_test.c $(KRY_GEN_DIR)/src/practices/session_results.c $(KRY_GEN_DIR)/src/practices/meditation/meditation_session.c -Wl,--gc-sections
|
||||
|
||||
$(BREAK_ENGINE_TEST): tests/break_engine_test.c $(KRY_GEN_DIR)/src/breaks/break_engine.c | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-Isrc/breaks $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src \
|
||||
@@ -875,14 +1015,19 @@ $(BREAK_ENGINE_TEST): tests/break_engine_test.c $(KRY_GEN_DIR)/src/breaks/break_
|
||||
$(KRY_GEN_DIR)/src/breaks/break_engine.c
|
||||
|
||||
# Plain C (no generated code): dlopen-based X idle monitor with stub fallback.
|
||||
$(ACTIVITY_MONITOR_TEST): tests/activity_monitor_test.c src/platform/inbe_activity_monitor.c src/platform/inbe_activity_monitor.h $(KRYON_DIR)/src/platform/kry_activity_monitor.c $(KRYON_DIR)/include/kry_activity_monitor.h | $(TEST_BIN_DIR)
|
||||
$(ACTIVITY_MONITOR_TEST): tests/activity_monitor_test.c $(KRYON_DIR)/src/platform/kry_activity_monitor.c $(KRYON_DIR)/include/kry_activity_monitor.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
|
||||
-Isrc $(KRYON_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/activity_monitor_test.c src/platform/inbe_activity_monitor.c \
|
||||
tests/activity_monitor_test.c \
|
||||
$(KRYON_DIR)/src/platform/kry_activity_monitor.c \
|
||||
$(if $(filter linux,$(NATIVE_PLATFORM)),-ldl,)
|
||||
|
||||
$(FRAME_PACING_TEST): tests/frame_pacing_test.c $(KRY_GEN_DIR)/src/app/app_frame_pacing.c src/app/app_frame_pacing.kry src/app/app.kry $(KRY_GEN_DIR)/src/app/app.h | $(TEST_BIN_DIR)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
-Wl,--gc-sections -o $@ tests/frame_pacing_test.c $(KRY_GEN_DIR)/src/app/app_frame_pacing.c
|
||||
|
||||
$(sort $(BUILD_OBJ_DIR) $(NATIVE_OBJ_DIR) $(NATIVE_BIN_DIR) $(NATIVE_DIST_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR) $(DEB_BUILD_DIR) $(DEB_DIST_DIR) $(RPM_BUILD_DIR) $(RPM_DIST_DIR) $(SNAP_BUILD_DIR) $(SNAP_DIST_DIR) $(FLATPAK_BUILD_DIR) $(FLATPAK_DIST_DIR) $(CLICK_BIN_DIR) $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR) $(WINDOWS_DIST_DIR) $(ANDROID_BUILD_DIR) $(TEST_BIN_DIR) $(WEB_OBJ_DIR) $(WEB_DIST_DIR) $(CHROME_WEB_STORE_DIR) $(FIREFOX_ADDONS_DIR)):
|
||||
mkdir -p $@
|
||||
|
||||
@@ -891,28 +1036,25 @@ $(WINDOWS_BIN_DIR)/$(WIN64_ARCH) $(WINDOWS_BIN_DIR)/$(WIN32_ARCH):
|
||||
|
||||
FORCE:
|
||||
|
||||
$(EMBEDDED_ASSETS_C): Makefile $(EMBEDDED_ASSET_FILES) $(KRYON_DIR)/scripts/embed-assets.sh | $(BUILD_OBJ_DIR)
|
||||
.PHONY: theme-catalog-bundle-check
|
||||
theme-catalog-bundle-check:
|
||||
@cmp themes/catalog_light.kss $(KRYON_DIR)/themes/catalog_light.kss
|
||||
@cmp themes/catalog_dark.kss $(KRYON_DIR)/themes/catalog_dark.kss
|
||||
|
||||
test: theme-catalog-bundle-check
|
||||
|
||||
$(EMBEDDED_ASSETS_C): Makefile $(EMBEDDED_ASSET_FILES) $(KRYON_DIR)/scripts/embed-assets.sh | $(BUILD_OBJ_DIR) theme-catalog-bundle-check
|
||||
sh $(KRYON_DIR)/scripts/embed-assets.sh $@ $(EMBEDDED_ASSET_FILES)
|
||||
|
||||
$(KRYON_ICON_STAMP): FORCE $(KRYON_ICON_FILES) | $(BUILD_OBJ_DIR)
|
||||
@tmp="$@.tmp"; \
|
||||
find "$(KRYON_DIR)/$(KRYON_ICON_DIR)" -path '*/review/*' -prune -o -type f -name '*.png' -print 2>/dev/null | LC_ALL=C sort | while IFS= read -r file; do sha256sum "$$file"; done > "$$tmp"; \
|
||||
if ! cmp -s "$$tmp" "$@"; then mv "$$tmp" "$@"; else rm "$$tmp"; fi
|
||||
|
||||
$(KRYON_ICON_ASSETS_C): $(KRYON_ICON_ASSETS_DEPS)
|
||||
@if [ "$(KRYON_ALLOW_ICON_REGEN)" != "1" ]; then \
|
||||
if [ ! -f "$@" ]; then \
|
||||
echo "Missing Kryon icon assets: $@"; \
|
||||
echo "Regenerate icons in the root Kryon checkout and update vendor/kryon intentionally."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
exit 0; \
|
||||
fi
|
||||
cd $(KRYON_DIR) && sh scripts/embed-icons.sh "$(KRYON_ICON_DIR)" src/ui/ui_icon_assets.c
|
||||
$(KRYON_ICON_ASSETS_C) $(KRYON_ICON_NAMES_C) $(KRYON_ICON_TYPES_H): $(KRYON_ICON_FILES) $(KRYON_DIR)/scripts/embed-icon-sheets.py | $(BUILD_OBJ_DIR)
|
||||
cd $(KRYON_DIR) && python3 scripts/embed-icon-sheets.py "$(KRYON_ICON_DIR)" \
|
||||
"$(abspath $(KRYON_ICON_ASSETS_C))" \
|
||||
--types-output "$(abspath $(KRYON_ICON_TYPES_H))" \
|
||||
--names-output "$(abspath $(KRYON_ICON_NAMES_C))"
|
||||
|
||||
sync-web-icons: $(KRYON_SYNC_ICONS)
|
||||
sh $(KRYON_SYNC_ICONS) web-assets/icons $(WEB_SHARED_ICON_SHEETS)
|
||||
cp assets/app/icon.png web-assets/icons/inbe.png
|
||||
cp assets/app/icon.png web-assets/icons/$(APP_NAME).png
|
||||
|
||||
$(WEB_LIBOQS_A): web-tools-check
|
||||
|
||||
@@ -1108,7 +1250,7 @@ $(CLICK_BIN): Makefile $(SRC) $(KRYON_CLICK_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAM
|
||||
patchelf --set-interpreter "$(CLICK_PATCHELF_INTERPRETER)" --set-rpath '$$ORIGIN/../lib' $@; \
|
||||
fi
|
||||
|
||||
$(CLICK_TARGET): Makefile $(CLICK_BIN_INPUT) $(CLICK_DIR)/inbe.apparmor $(CLICK_DIR)/inbe.desktop $(CLICK_DIR)/inbe.metainfo.xml $(CLICK_RUNNER) $(LINUX_APPIMAGE_ICON) $(VERSION_FILE) | $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR)
|
||||
$(CLICK_TARGET): Makefile $(CLICK_BIN_INPUT) $(CLICK_DIR)/$(APP_NAME).apparmor $(CLICK_DIR)/$(APP_NAME).desktop $(CLICK_DIR)/$(APP_NAME).metainfo.xml $(CLICK_RUNNER) $(LINUX_APPIMAGE_ICON) $(VERSION_FILE) | $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR)
|
||||
@command -v click >/dev/null || { \
|
||||
echo "click is missing. Install click or put it on PATH."; \
|
||||
exit 1; \
|
||||
@@ -1119,8 +1261,8 @@ $(CLICK_TARGET): Makefile $(CLICK_BIN_INPUT) $(CLICK_DIR)/inbe.apparmor $(CLICK_
|
||||
rm -f $(CLICK_ID)_$(APP_VERSION)_$(CLICK_ARCH).click
|
||||
mkdir -p $(CLICK_ROOT)/usr/bin $(CLICK_ROOT)/usr/lib $(CLICK_ROOT)/usr/share/applications $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps $(CLICK_ROOT)/usr/share/metainfo
|
||||
cp $(CLICK_BIN_INPUT) $(CLICK_ROOT)/usr/bin/$(APP_NAME)
|
||||
cp $(CLICK_RUNNER) $(CLICK_ROOT)/run-inbe.sh
|
||||
chmod +x $(CLICK_ROOT)/run-inbe.sh $(CLICK_ROOT)/usr/bin/$(APP_NAME)
|
||||
cp $(CLICK_RUNNER) $(CLICK_ROOT)/run-$(APP_NAME).sh
|
||||
chmod +x $(CLICK_ROOT)/run-$(APP_NAME).sh $(CLICK_ROOT)/usr/bin/$(APP_NAME)
|
||||
@for lib in $(CLICK_RUNTIME_LIBS); do \
|
||||
if [ -f "$$lib" ]; then \
|
||||
cp -L "$$lib" $(CLICK_ROOT)/usr/lib/; \
|
||||
@@ -1148,14 +1290,14 @@ $(CLICK_TARGET): Makefile $(CLICK_BIN_INPUT) $(CLICK_DIR)/inbe.apparmor $(CLICK_
|
||||
' }' \
|
||||
'}' \
|
||||
> $(CLICK_ROOT)/manifest.json
|
||||
cp $(CLICK_DIR)/inbe.apparmor $(CLICK_ROOT)/inbe.apparmor
|
||||
cp $(CLICK_DIR)/inbe.desktop $(CLICK_ROOT)/inbe.desktop
|
||||
cp $(CLICK_DIR)/$(APP_NAME).apparmor $(CLICK_ROOT)/$(APP_NAME).apparmor
|
||||
cp $(CLICK_DIR)/$(APP_NAME).desktop $(CLICK_ROOT)/$(APP_NAME).desktop
|
||||
@if [ "$(CLICK_INCLUDE_METAINFO)" = "1" ]; then \
|
||||
mkdir -p $(CLICK_ROOT)/usr/share/metainfo; \
|
||||
sed -e 's/<release version="[^"]*"/<release version="$(APP_VERSION)"/' $(CLICK_DIR)/inbe.metainfo.xml > $(CLICK_ROOT)/usr/share/metainfo/$(CLICK_ID).metainfo.xml; \
|
||||
sed -e 's/<release version="[^"]*"/<release version="$(APP_VERSION)"/' $(CLICK_DIR)/$(APP_NAME).metainfo.xml > $(CLICK_ROOT)/usr/share/metainfo/$(CLICK_ID).metainfo.xml; \
|
||||
fi
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/inbe.png
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps/inbe.png
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/$(APP_NAME).png
|
||||
cp $(LINUX_APPIMAGE_ICON) $(CLICK_ROOT)/usr/share/icons/hicolor/512x512/apps/$(APP_NAME).png
|
||||
click build $(CLICK_ROOT) $(CLICK_DIST_DIR)
|
||||
@if [ -f "$(CLICK_DIST_DIR)/$(CLICK_ID)_$(APP_VERSION)_$(CLICK_ARCH).click" ]; then \
|
||||
mv "$(CLICK_DIST_DIR)/$(CLICK_ID)_$(APP_VERSION)_$(CLICK_ARCH).click" "$(CLICK_TARGET)"; \
|
||||
@@ -1164,11 +1306,11 @@ $(CLICK_TARGET): Makefile $(CLICK_BIN_INPUT) $(CLICK_DIR)/inbe.apparmor $(CLICK_
|
||||
fi
|
||||
test -f $@
|
||||
|
||||
$(WIN64_RESOURCE): windows/inbe.rc windows/inbe.ico
|
||||
$(WIN64_RESOURCE): windows/$(APP_NAME).rc windows/$(APP_NAME).ico
|
||||
mkdir -p $(dir $@)
|
||||
$(WIN64_WINDRES) -Iwindows -O coff $< $@
|
||||
|
||||
$(WIN32_RESOURCE): windows/inbe.rc windows/inbe.ico
|
||||
$(WIN32_RESOURCE): windows/$(APP_NAME).rc windows/$(APP_NAME).ico
|
||||
mkdir -p $(dir $@)
|
||||
$(WIN32_WINDRES) -Iwindows -O coff $< $@
|
||||
|
||||
@@ -1414,7 +1556,7 @@ $(FLATPAK_TARGET): Makefile $(FLATPAK_MANIFEST) | $(FLATPAK_BUILD_DIR) $(FLATPAK
|
||||
-v "$(abspath .):/work" \
|
||||
-w /work \
|
||||
$(FLATPAK_IMAGE) \
|
||||
sh -lc 'set -eu; rm -rf .flatpak-builder $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; flatpak-builder --disable-rofiles-fuse --force-clean --repo=$(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir $(FLATPAK_MANIFEST) || { rm -rf $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir vendor-builds/linux build/bin/linux; make vendor-prebuilds-native; make native; flatpak build-init $(FLATPAK_BUILD_DIR)/build-dir $(APP_ID) org.gnome.Sdk org.gnome.Platform 46; install -D -m755 "$$(find build/bin/linux -maxdepth 1 -type f -name '\''inbe-linux-*'\'' | head -n 1)" $(FLATPAK_BUILD_DIR)/build-dir/files/bin/inbe; install -D -m644 packaging/linux/appimage/inbe.desktop $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; sed -i '\''s/^Icon=.*/Icon=$(APP_ID)/'\'' $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; install -D -m644 packaging/linux/appimage/inbe.png $(FLATPAK_BUILD_DIR)/build-dir/files/share/icons/hicolor/512x512/apps/$(APP_ID).png; install -D -m644 packaging/linux/appimage/inbe.appdata.xml $(FLATPAK_BUILD_DIR)/build-dir/files/share/metainfo/$(APP_ID).metainfo.xml; flatpak build-finish --share=ipc --share=network --socket=fallback-x11 --socket=wayland --socket=pulseaudio --device=dri --filesystem=home $(FLATPAK_BUILD_DIR)/build-dir; flatpak build-export $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; }; flatpak build-bundle $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_TARGET) $(APP_ID)'
|
||||
sh -lc 'set -eu; sh scripts/install-build-node.sh /tmp/inbe-build-node; export PATH=/tmp/inbe-build-node/bin:$$PATH; rm -rf .flatpak-builder $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; flatpak-builder --disable-rofiles-fuse --force-clean --repo=$(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir $(FLATPAK_MANIFEST) || { rm -rf $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir vendor-builds/linux build/bin/linux; make vendor-prebuilds-native; make native; flatpak build-init $(FLATPAK_BUILD_DIR)/build-dir $(APP_ID) org.gnome.Sdk org.gnome.Platform 46; install -D -m755 "$$(find build/bin/linux -maxdepth 1 -type f -name '\''inbe-linux-*'\'' | head -n 1)" $(FLATPAK_BUILD_DIR)/build-dir/files/bin/inbe; install -D -m644 packaging/linux/appimage/inbe.desktop $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; sed -i '\''s/^Icon=.*/Icon=$(APP_ID)/'\'' $(FLATPAK_BUILD_DIR)/build-dir/files/share/applications/$(APP_ID).desktop; install -D -m644 packaging/linux/appimage/inbe.png $(FLATPAK_BUILD_DIR)/build-dir/files/share/icons/hicolor/512x512/apps/$(APP_ID).png; install -D -m644 packaging/linux/appimage/inbe.appdata.xml $(FLATPAK_BUILD_DIR)/build-dir/files/share/metainfo/$(APP_ID).metainfo.xml; flatpak build-finish --share=ipc --share=network --socket=fallback-x11 --socket=wayland --socket=pulseaudio --device=dri --filesystem=home $(FLATPAK_BUILD_DIR)/build-dir; flatpak build-export $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_BUILD_DIR)/build-dir; }; flatpak build-bundle $(FLATPAK_BUILD_DIR)/repo $(FLATPAK_TARGET) $(APP_ID)'
|
||||
test -f $@
|
||||
|
||||
$(WEB_JS_TARGET): Makefile $(WEB_SRC) $(KRYON_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_FILES) $(EMBEDDED_ASSETS_C) $(KRY_GEN_STAMP) $(WEB_LIBOQS_A) web-tools-check | $(WEB_DIST_DIR)
|
||||
@@ -1430,10 +1572,10 @@ $(WEB_JS_TARGET): Makefile $(WEB_SRC) $(KRYON_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_A
|
||||
$(WEB_SRC) $(KRYON_WEB_SRCS) $(SQLITE_SRC) \
|
||||
$(WEB_LIBOQS_A) \
|
||||
-sASYNCIFY -sASYNCIFY_STACK_SIZE=1048576 -fexceptions \
|
||||
-sFORCE_FILESYSTEM=1 -sFETCH=1 -lidbfs.js \
|
||||
-sFORCE_FILESYSTEM=1 -sFETCH=1 -sUSE_ZLIB=1 -lidbfs.js \
|
||||
-sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=268435456 -sSTACK_SIZE=33554432 \
|
||||
-sEXPORTED_RUNTIME_METHODS=Asyncify \
|
||||
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_screen,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_enable_extension_breaks \
|
||||
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_practice_selected,_app_web_test_complete_practice,_app_web_test_completion_stage,_app_web_test_completed_practice_persisted,_app_web_test_screen,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_enable_extension_breaks \
|
||||
--preload-file locales --preload-file assets
|
||||
|
||||
$(WEB_TARGET): src/web_shell.html $(WEB_BOOT_JS) $(WEB_JS_TARGET) vendor/kryon/web/kryon-web-present.js manifest.json $(WEB_ASSET_FILES) | $(WEB_DIST_DIR)
|
||||
@@ -1448,7 +1590,7 @@ $(WEB_TARGET): src/web_shell.html $(WEB_BOOT_JS) $(WEB_JS_TARGET) vendor/kryon/w
|
||||
rm -rf $(WEB_DIST_DIR)/web-assets/dl
|
||||
rm -f $(WEB_DIST_DIR)/web-assets/canvas_index.html
|
||||
cp -R site-icons $(WEB_DIST_DIR)/
|
||||
cp manifest.json $(WEB_DIST_DIR)/webmanifest.json
|
||||
perl -0pe 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' manifest.json > $(WEB_DIST_DIR)/webmanifest.json
|
||||
|
||||
web-canvas: web
|
||||
|
||||
@@ -1468,10 +1610,10 @@ $(WEB_CANVAS_TARGET): Makefile $(WEB_SRC) $(KRYON_CANVAS_SRCS) $(SQLITE_SRC) $(S
|
||||
$(WEB_SRC) $(KRYON_CANVAS_SRCS) $(SQLITE_SRC) \
|
||||
$(WEB_LIBOQS_A) \
|
||||
-sASYNCIFY -sASYNCIFY_STACK_SIZE=1048576 -fexceptions \
|
||||
-sFORCE_FILESYSTEM=1 -sFETCH=1 -lidbfs.js \
|
||||
-sFORCE_FILESYSTEM=1 -sFETCH=1 -sUSE_ZLIB=1 -lidbfs.js \
|
||||
-sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=268435456 -sSTACK_SIZE=33554432 \
|
||||
-sEXPORTED_RUNTIME_METHODS=Asyncify \
|
||||
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_screen,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_enable_extension_breaks \
|
||||
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_app_web_get_play_in_background,_app_web_set_backgrounded,_app_web_background_tick,_app_web_launch_practice,_app_web_extension_host,_app_web_extension_break_now,_app_web_extension_breaks_enabled,_app_web_extension_break_timer_enabled,_app_web_extension_break_timer_limit_s,_app_web_extension_break_timer_duration_s,_app_web_extension_break_timer_postpone_s,_app_web_extension_break_timer_max_prompts,_app_web_extension_break_timer_show_skip,_app_web_extension_break_timer_show_postpone,_app_web_extension_open_break_settings,_app_web_extension_open_habits,_app_web_test_save_onboarding_state,_app_web_test_onboarding_state,_app_web_test_show_first_run_guide,_app_web_test_first_run_guide_active,_app_web_test_first_run_guide_step,_app_web_test_first_run_guide_text_clipped,_app_web_test_first_run_guide_next_x,_app_web_test_first_run_guide_next_y,_app_web_test_first_run_guide_close_x,_app_web_test_first_run_guide_close_y,_app_web_test_first_run_guide_anchor_x,_app_web_test_first_run_guide_anchor_y,_app_web_test_first_run_guide_anchor_w,_app_web_test_first_run_guide_anchor_h,_app_web_test_sync_key_state,_app_web_test_import_sync_key,_app_web_test_habits_click_x,_app_web_test_habits_click_y,_app_web_test_show_practice_home,_app_web_test_practice_selected,_app_web_test_complete_practice,_app_web_test_completion_stage,_app_web_test_completed_practice_persisted,_app_web_test_screen,_app_web_test_practice_start_click_x,_app_web_test_practice_start_click_y,_app_web_test_enable_extension_breaks \
|
||||
--preload-file locales --preload-file assets
|
||||
perl -0pe 's#\{\{\{ APP_SCRIPT \}\}\}#$(WEB_CANVAS_APP_SCRIPT)#g; s/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' src/web_shell.html > $@
|
||||
cp $(WEB_BOOT_JS) $(WEB_CANVAS_DIR)/index_boot.js
|
||||
@@ -1483,7 +1625,7 @@ $(WEB_CANVAS_TARGET): Makefile $(WEB_SRC) $(KRYON_CANVAS_SRCS) $(SQLITE_SRC) $(S
|
||||
rm -rf $(WEB_CANVAS_DIR)/web-assets/dl
|
||||
rm -f $(WEB_CANVAS_DIR)/web-assets/canvas_index.html
|
||||
cp -R site-icons $(WEB_CANVAS_DIR)/
|
||||
cp manifest.json $(WEB_CANVAS_DIR)/webmanifest.json
|
||||
perl -0pe 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' manifest.json > $(WEB_CANVAS_DIR)/webmanifest.json
|
||||
|
||||
android-copy-assets:
|
||||
$(MAKE) $(FONT_FILES)
|
||||
@@ -1577,7 +1719,7 @@ android-copy-release-apks: | $(ANDROID_BUILD_DIR)
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -z "$(APP_VERSION)" ]; then \
|
||||
echo "Could not read INBE_VERSION_STRING from $(VERSION_FILE)"; \
|
||||
echo "Could not read APP_VERSION_STRING from $(VERSION_FILE)"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
release_universal="$$(find droid/app/build/outputs/apk -path '*/release/*' -name "app-universal-release*.apk" | head -n 1)"; \
|
||||
@@ -1594,6 +1736,7 @@ android-copy-release-apks: | $(ANDROID_BUILD_DIR)
|
||||
cp "$$gplay_universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION)-gplay.apk"
|
||||
|
||||
android-copy-bundle: | $(ANDROID_BUILD_DIR)
|
||||
bash scripts/check-android-optimization.sh droid/app/build/outputs/bundle/gplay/app-gplay.aab
|
||||
@found=0; \
|
||||
for bundle in droid/app/build/outputs/bundle/*Release/*.aab droid/app/build/outputs/bundle/release/*.aab droid/app/build/outputs/bundle/gplay/*.aab; do \
|
||||
if [ -f "$$bundle" ]; then \
|
||||
@@ -1606,7 +1749,7 @@ android-copy-bundle: | $(ANDROID_BUILD_DIR)
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -z "$(APP_VERSION)" ]; then \
|
||||
echo "Could not read INBE_VERSION_STRING from $(VERSION_FILE)"; \
|
||||
echo "Could not read APP_VERSION_STRING from $(VERSION_FILE)"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
gplay_bundle="$$(find droid/app/build/outputs/bundle -path "*gplay*" -name "app-gplay.aab" | head -n 1)"; \
|
||||
@@ -1628,7 +1771,7 @@ android-install: android-copy-assets android-local-properties
|
||||
exit 1; \
|
||||
fi; \
|
||||
echo "Android target ABI: $$abi"; \
|
||||
$(ANDROID_GRADLE_ENV) $(GRADLE) -p droid assembleDebug -Pinbe.onlyAbi="$$abi" $(ANDROID_GRADLE_ARGS)
|
||||
$(ANDROID_GRADLE_ENV) $(GRADLE) -p droid assembleDebug -Papp.onlyAbi="$$abi" $(ANDROID_GRADLE_ARGS)
|
||||
$(MAKE) android-copy-debug-apks
|
||||
ADB='$(ADB)' sh scripts/android-install-apk.sh \
|
||||
"$(ANDROID_DEBUG_APP_ID)" "$(ANDROID_ACTIVITY)" \
|
||||
@@ -1641,7 +1784,7 @@ android-install-release: android-release
|
||||
|
||||
android-avd:
|
||||
@if [ "$(UNAME_S)" = "FreeBSD" ]; then \
|
||||
HOME="$${ANDROID_TOOL_HOME:-/tmp/inbe-android-home}" ANDROID_SDK_ROOT="$${ANDROID_SDK_WORK_ROOT:-$${ANDROID_SDK_ROOT:-$${ANDROID_HOME:-/tmp/android-sdk}}}" ANDROID_HOME="$${ANDROID_SDK_WORK_ROOT:-$${ANDROID_SDK_ROOT:-$${ANDROID_HOME:-/tmp/android-sdk}}}" bash scripts/emulator.sh; \
|
||||
HOME="$${ANDROID_TOOL_HOME:-/tmp/$(APP_NAME)-android-home}" ANDROID_SDK_ROOT="$${ANDROID_SDK_WORK_ROOT:-$${ANDROID_SDK_ROOT:-$${ANDROID_HOME:-/tmp/android-sdk}}}" ANDROID_HOME="$${ANDROID_SDK_WORK_ROOT:-$${ANDROID_SDK_ROOT:-$${ANDROID_HOME:-/tmp/android-sdk}}}" bash scripts/emulator.sh; \
|
||||
else \
|
||||
bash scripts/emulator.sh; \
|
||||
fi
|
||||
@@ -1709,7 +1852,7 @@ windows:
|
||||
$(WIN32_ARCH)/$(WIN32_BINARY_NAME)
|
||||
|
||||
WINDOWS_SETUP := $(WINDOWS_DIST_DIR)/$(APP_NAME)-windows-setup-$(APP_VERSION).exe
|
||||
WINDOWS_SETUP_SCRIPT := packaging/windows/inbe-setup.nsi
|
||||
WINDOWS_SETUP_SCRIPT := packaging/windows/$(APP_NAME)-setup.nsi
|
||||
|
||||
windows-setup-check:
|
||||
@command -v makensis >/dev/null || { \
|
||||
@@ -1733,6 +1876,7 @@ web:
|
||||
cd $(WEB_DIST_DIR) && zip -9 -r $(abspath $(WEB_DIST_ZIP)) .
|
||||
|
||||
web-smoke-test: $(WEB_SMOKE_TEST)
|
||||
node tests/web_storage_test.mjs
|
||||
WEB_SMOKE_RENDERER=canvas WEB_SMOKE_BROWSER="$(WEB_SMOKE_BROWSER)" node $(WEB_SMOKE_TEST) $(WEB_DIST_DIR)
|
||||
|
||||
web-canvas-smoke-test: $(WEB_SMOKE_TEST)
|
||||
@@ -1864,25 +2008,42 @@ NEEDS_CLICK_ENV := $(filter click click-verify,$(MAKECMDGOALS))
|
||||
ifneq ($(strip $(NEEDS_CLICK_ENV)),)
|
||||
ifeq ($(strip $(CLICK_BIN_SOURCE)),)
|
||||
ifeq ($(strip $(AARCH64_CC)),)
|
||||
$(error AARCH64_CC is not set. Install an AArch64 cross compiler, set AARCH64_CC, or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
$(error AARCH64_CC is not set. Install an AArch64 cross compiler, set AARCH64_CC, or pass CLICK_BIN_SOURCE=/path/to/breathing)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_AR)),)
|
||||
$(error AARCH64_AR is not set. Install AArch64 binutils, set AARCH64_AR, or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
$(error AARCH64_AR is not set. Install AArch64 binutils, set AARCH64_AR, or pass CLICK_BIN_SOURCE=/path/to/breathing)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RANLIB)),)
|
||||
$(error AARCH64_RANLIB is not set. Install AArch64 binutils, set AARCH64_RANLIB, or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
$(error AARCH64_RANLIB is not set. Install AArch64 binutils, set AARCH64_RANLIB, or pass CLICK_BIN_SOURCE=/path/to/breathing)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RAY_CFLAGS)),)
|
||||
$(error AARCH64_RAY_CFLAGS is not set. Set AARCH64_RAY_CFLAGS for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
$(error AARCH64_RAY_CFLAGS is not set. Set AARCH64_RAY_CFLAGS for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/breathing)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RAY_LDLIBS)),)
|
||||
$(error AARCH64_RAY_LDLIBS is not set. Set AARCH64_RAY_LDLIBS for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
$(error AARCH64_RAY_LDLIBS is not set. Set AARCH64_RAY_LDLIBS for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/breathing)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_RAY_SDL_INCLUDE_DIR)),)
|
||||
$(error AARCH64_RAY_SDL_INCLUDE_DIR is not set. Set AARCH64_RAY_SDL_INCLUDE_DIR for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
$(error AARCH64_RAY_SDL_INCLUDE_DIR is not set. Set AARCH64_RAY_SDL_INCLUDE_DIR for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/breathing)
|
||||
endif
|
||||
ifeq ($(strip $(AARCH64_KRYON_CURL_LDLIBS)),)
|
||||
$(error AARCH64_KRYON_CURL_LDLIBS is not set. Set AARCH64_KRYON_CURL_LDLIBS for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/inbe)
|
||||
$(error AARCH64_KRYON_CURL_LDLIBS is not set. Set AARCH64_KRYON_CURL_LDLIBS for your cross sysroot, or pass CLICK_BIN_SOURCE=/path/to/breathing)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: sync-recovery-test
|
||||
test: sync-recovery-test
|
||||
sync-recovery-test: $(TEST_BIN_DIR)/sync_recovery_test
|
||||
$<
|
||||
|
||||
$(TEST_BIN_DIR)/sync_recovery_test: tests/sync_recovery_test.c $(KRY_GEN_STAMP) | $(TEST_BIN_DIR)
|
||||
$(CC) -std=gnu99 -ffunction-sections -fdata-sections -D_DEFAULT_SOURCE \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/storage -Isrc/platform/android $(KRYON_INCLUDE) -I$(KRY_GEN_DIR) -I$(KRY_GEN_DIR)/src $(SQLITE_INCLUDE) \
|
||||
tests/sync_recovery_test.c $(KRY_GEN_DIR)/src/app/sync_retry.c -Wl,--gc-sections -o $@
|
||||
|
||||
# Validate before producing release packages, including direct artifact targets.
|
||||
$(APPIMAGE_TARGET) $(DEB_TARGET) $(RPM_TARGET) $(SNAP_TARGET) $(FLATPAK_TARGET) $(CLICK_TARGET) $(CHROME_WEB_STORE_ZIP) $(FIREFOX_ADDONS_ZIP): | version-check
|
||||
android-release android-bundle android-copy-release-apks android-copy-bundle windows-setup site: version-check
|
||||
|
||||
# Actual artifacts are gated too, including direct and incremental builds.
|
||||
$(TARGET) $(KRYON_HOST_TARGET) $(WIN64_TARGET) $(WIN32_TARGET) $(WEB_JS_TARGET) $(WEB_CANVAS_TARGET): $(SYNC_RETRY_HEADER) $(STORAGE_LAYOUT_HEADER) | build-laws
|
||||
@@ -25,9 +25,15 @@ optionally sync user-owned data through a Daochi-compatible sync server.
|
||||
- Habit tracking with session history and linked practice counts
|
||||
- Local import and export support
|
||||
- Theme customization with light and dark variants
|
||||
- Repeat the last completed practice using its current settings
|
||||
|
||||
## Build
|
||||
|
||||
The build host needs Node.js 22.18 or newer for mandatory Bend proof checking,
|
||||
as well as Python 3 and the platform's native build dependencies. Node and Bend
|
||||
are build tools; they are not installed with the app. See
|
||||
[build contracts and proofs](docs/build-laws-plan.md) for the checked behavior.
|
||||
|
||||
Initialize the submodules once:
|
||||
|
||||
```bash
|
||||
@@ -68,6 +74,15 @@ Run the test suite:
|
||||
make test
|
||||
```
|
||||
|
||||
To test sync and recovery against an isolated local server:
|
||||
|
||||
```bash
|
||||
make sync-server-test DAOCHI_BIN=/absolute/path/to/daochi
|
||||
```
|
||||
|
||||
This uses disposable client databases and a loopback server; see
|
||||
[web and sync test coverage](WEB_RENDERER_TESTS.md) for details.
|
||||
|
||||
Native binaries are written to `build/bin/<platform>/`. Release artifacts are
|
||||
written under `build/dist/`.
|
||||
|
||||
|
||||
@@ -1,31 +1,37 @@
|
||||
# Web Renderer Tests
|
||||
|
||||
Inbe has two web renderer paths:
|
||||
Inbe ships the Kryon Canvas2D renderer. `web-canvas` is an alias for `web`.
|
||||
|
||||
| Target | Renderer | Purpose |
|
||||
|---|---|---|
|
||||
| `make web` | raylib/WebGL | Shipping web build with liboqs sync support. |
|
||||
| `make web-canvas` | Kryon Canvas2D | No-WebGL fallback build using Kryon's Canvas backend. The app still uses Emscripten/WASM for C code and support libraries. |
|
||||
| `make web-compare-test` | both | Builds both renderers and runs the browser smoke suite against each. |
|
||||
| `make web-side-by-side-test` | both | Builds both renderers, runs both smoke tests, then serves a split-page manual comparison view. |
|
||||
| `make web` | Kryon Canvas2D | Shipping Emscripten/WASM build with liboqs sync support; WebGL is not required. |
|
||||
| `make web-canvas` | Kryon Canvas2D | Alias for the shipping web build. |
|
||||
| `make web-compare-test` | Kryon Canvas2D | Builds the web target and runs its smoke suite. |
|
||||
| `make web-side-by-side-test` | Kryon Canvas2D | Builds, tests, and serves a preview page. |
|
||||
|
||||
The shared smoke test is `scripts/web-smoke-test.mjs`. It is renderer-aware:
|
||||
The shared smoke test is `scripts/web-smoke-test.mjs`:
|
||||
|
||||
- `WEB_SMOKE_RENDERER=raylib` requires a live WebGL context.
|
||||
- `WEB_SMOKE_RENDERER=canvas` requires a live Canvas2D context and nonblank pixels.
|
||||
- Both paths require the app runtime-ready hook, a cycling render loop, IDBFS idle/flush behavior, and app settings persistence.
|
||||
- Both paths require sync-key import to work. Canvas links the same ksync/liboqs account crypto as raylib-web; only the renderer differs.
|
||||
- It requires the app runtime-ready hook, a cycling render loop, IDBFS idle/flush behavior, and app settings persistence.
|
||||
- It verifies sync-key import, practice startup, and habit navigation without reloading.
|
||||
- The Chromium path also completes a one-minute meditation through pause and
|
||||
background elapsed time, saves its mood, and verifies the saved check-in after reload.
|
||||
|
||||
Current known gap:
|
||||
Server integration:
|
||||
|
||||
- The shared smoke test verifies account crypto/import parity, rendering, storage, and app settings persistence. It does not yet run a real local sync server transaction for either renderer.
|
||||
- Run `make sync-server-test DAOCHI_BIN=/absolute/path/to/daochi` with a built
|
||||
Daochi server. The runner starts a disposable loopback server and two isolated
|
||||
client databases, and retains test data and logs in a printed temporary directory.
|
||||
- It checks offline recovery, a lost upload response, retry without duplicates,
|
||||
conflicting mood edits, backup restoration, and synced deletion. It uses Inbe's
|
||||
native storage and sync code; browser transport remains covered by the web smoke suite.
|
||||
|
||||
For manual visual comparison, run:
|
||||
For a manual preview, run:
|
||||
|
||||
```bash
|
||||
make web-side-by-side-test
|
||||
```
|
||||
|
||||
The script prints a local URL with raylib/WebGL on the left and Canvas2D on the
|
||||
right. Use `scripts/web-side-by-side-test.sh --no-serve` for CI-style
|
||||
build-and-smoke validation without starting the comparison server.
|
||||
The script prints a local preview URL. Use
|
||||
`scripts/web-side-by-side-test.sh --no-serve` for build-and-smoke validation
|
||||
without starting the preview server.
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 512 KiB |
|
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 747 KiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1 @@
|
||||
<svg fill="#5865F2" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Discord</title><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1 @@
|
||||
<svg fill="#181717" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
|
||||
|
After Width: | Height: | Size: 837 B |
|
After Width: | Height: | Size: 6.8 KiB |
@@ -0,0 +1 @@
|
||||
<svg fill="#FFFFFF" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
|
||||
|
After Width: | Height: | Size: 837 B |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1 @@
|
||||
<svg fill="#26A5E4" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Telegram</title><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg>
|
||||
|
After Width: | Height: | Size: 757 B |
@@ -0,0 +1,30 @@
|
||||
Text.practice-heading {
|
||||
foreground: text;
|
||||
}
|
||||
Text.muted {
|
||||
foreground: muted;
|
||||
}
|
||||
Text.selected-navigation {
|
||||
foreground: text;
|
||||
}
|
||||
Text.circle-ink {
|
||||
foreground: #171022;
|
||||
}
|
||||
|
||||
Button.practice-pager {
|
||||
font-size: 42;
|
||||
}
|
||||
|
||||
Image {
|
||||
foreground: #ffffff;
|
||||
background: #00000000;
|
||||
border: #00000000;
|
||||
radius: 0;
|
||||
border-width: 0;
|
||||
material: flat;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
Image.pose-muted {
|
||||
opacity: 0.62;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
# Private data path migration
|
||||
|
||||
The canonical root is `<app internalDataPath>/inbe` on Android,
|
||||
`$XDG_DATA_HOME/inbe` (or `~/.local/share/inbe`) on Unix desktops,
|
||||
`%LOCALAPPDATA%/inbe` on Windows, and `/home/inbe` in the web filesystem.
|
||||
The database is `inbe.db` inside that directory. Android release and debug
|
||||
packages each have their own private `internalDataPath`. Existing export
|
||||
archive names remain compatible.
|
||||
|
||||
On startup, if the legacy `breathing` directory exists (or `BreathSession` on
|
||||
Windows), the app moves the whole
|
||||
directory before opening SQLite. This keeps the database, WAL, SHM, and any
|
||||
other files together. An older `inbe` directory is archived under
|
||||
`inbe.before-breathing-migration-N` first, without overwriting it. If either
|
||||
directory move fails, the app continues using `breathing` and can retry next
|
||||
startup.
|
||||
|
||||
When `breathing.db` exists, SQLite's backup API copies its committed main and
|
||||
WAL content into a temporary database. The copy must pass `PRAGMA quick_check`
|
||||
before it becomes `inbe.db`. A migration marker identifies the completed copy;
|
||||
the old database remains as a recovery copy. If the copy fails, the app uses
|
||||
`breathing.db`. If both database names exist without the marker, startup fails
|
||||
closed rather than choosing one silently.
|
||||
|
||||
`laws/storage_layout/LAWS.bend` defines the finite directory choice policy:
|
||||
|
||||
- A fresh install uses the current directory.
|
||||
- A successful legacy move uses the current directory.
|
||||
- A failed move keeps using the legacy directory.
|
||||
- If both exist at decision time, the legacy directory is used. The runtime
|
||||
first archives the previous `inbe` directory; the policy then sees the
|
||||
current directory as absent and applies the move rule.
|
||||
|
||||
The generated table from the proved Bend policy is consumed by `data_root()`.
|
||||
The proof covers these decisions, not filesystem atomicity or SQLite contents.
|
||||
Storage integration tests cover pending WAL data, repeat startup, and database
|
||||
name conflicts. The Android test covers both-directory archival and compares
|
||||
the user-data tables before and after migration.
|
||||
# Desktop profiles
|
||||
|
||||
`make run` and `make run-termi` use the persistent debug profile at
|
||||
`$XDG_DATA_HOME/inbe-debug` (or `~/.local/share/inbe-debug` when XDG_DATA_HOME
|
||||
is unset). `make run-fresh` still uses a disposable temporary profile.
|
||||
|
||||
`make install` installs the production desktop app under `~/.local` by default.
|
||||
Launching `inbe` or its desktop entry uses `$XDG_DATA_HOME/inbe` (or
|
||||
`~/.local/share/inbe`). Sync keys, settings, sessions, habits, and downloaded
|
||||
meditation audio stay inside their respective profile directories. `PREFIX` can
|
||||
be set explicitly for a system installation; it does not change the production
|
||||
data location. Debug and production windows have separate desktop identities and
|
||||
single-instance locks, so both can stay open at once.
|
||||
@@ -0,0 +1,37 @@
|
||||
# Sync recovery
|
||||
|
||||
Sync enablement records the user’s intent, not whether the last request succeeded.
|
||||
The 1.9.19 connection setting is migrated without enabling disconnected accounts.
|
||||
Restoring a key explicitly requests synchronization with the configured server.
|
||||
Restoring the same key preserves upload cursors, migration completion, and local data.
|
||||
|
||||
Connect and Retry schedule the existing background worker. Temporary challenge and
|
||||
request failures retry after 5, 15, 30, then at most 60 seconds. The last result and
|
||||
attempt count survive restart; authentication, configuration, signing, and payload
|
||||
failures require action. Logout and server changes disable synchronization and
|
||||
clear retry state. Queued records remain until the server response is applied.
|
||||
|
||||
Data and Sync show actionable status and queued changes. Repair flags and server
|
||||
cursors stay internal. Secure-data migration runs through the normal background
|
||||
sync path, without an automatic blocking prompt, and completion is only recorded
|
||||
after successful response application.
|
||||
|
||||
Friendships are retrieved from the server under the restored account identity.
|
||||
Successful synchronization schedules social refresh. Temporary social failures
|
||||
retry; failed leaderboard requests do not discard a fetched friend list or replace
|
||||
cached leaderboard data with empty results. Restoring a different account cannot
|
||||
recover friendships belonging to the original identity.
|
||||
|
||||
Native clients share a SQLite connection between the UI and sync workers. Settings
|
||||
text uses a buffer per thread so a UI read cannot replace the recovery key during
|
||||
decryption. Transactions hold the connection mutex through commit or rollback,
|
||||
and habit ID reconciliation reuses a schema-created mapping table instead of
|
||||
dropping and recreating a temporary table while another thread is reading.
|
||||
|
||||
Validation: `make sync-recovery-test`, the sync account/review and locale tests,
|
||||
and `DAOCHI_BIN=/path/to/daochi make sync-server-test`. The server test creates two
|
||||
accounts with separate aliases, accepts a friendship, restores the first account's
|
||||
exported key on fresh clients with and without pre-seeded default habits, and checks
|
||||
that the alias, friend, custom habit, completed habit day, session, and check-in return.
|
||||
It also drops an upload response to verify safe retry. Native screenshot scenes `sync_disconnected` and
|
||||
`sync_retry` use disposable data and loopback configuration.
|
||||
@@ -0,0 +1,116 @@
|
||||
# Build contracts and Bend proofs
|
||||
|
||||
## Implemented
|
||||
|
||||
Inbe's release metadata uses the numeric changelog release and the permanent
|
||||
`APP_VERSION_*` macros. `update_version.sh` synchronizes the release fields;
|
||||
`check-version.py` rejects inconsistencies. The version check now runs in the
|
||||
native, web, and Windows artifact graphs and in both Gradle and CMake, including
|
||||
incremental builds. Version semantics remain a structural build check, not a
|
||||
formal theorem.
|
||||
|
||||
The retry implementation is now **Bend 2 code that ships as evaluated data**:
|
||||
|
||||
1. `laws/sync_retry/main.bend` defines the actual pure retry policy.
|
||||
2. `LAWS.bend` states 11 universally quantified contracts; `PROOF.bend` proves
|
||||
them for the complete finite input types.
|
||||
3. Kryon's `tools/bend-laws.mjs` uses pinned upstream Bend 2.0.16, commit
|
||||
`15ae0c86f3193b8f645b4bedbc438655b648d0da`. It verifies the checker and Base
|
||||
hashes before loading, checks termination and types, and rejects holes,
|
||||
unproved declarations, `@unsafe`, foreign implementations, remote imports,
|
||||
and imports outside the proof package.
|
||||
4. The checked function is evaluated directly in Bend's kernel for all 45
|
||||
combinations of result and retry state. `scripts/generate-sync-retry.mjs`
|
||||
writes the C table consumed by `src/app/sync_retry.kry`. There is no separate
|
||||
handwritten retry implementation or optimizing Bend code generator in this
|
||||
path. No Bend runtime is installed on the phone.
|
||||
5. Account-data and social retries both use that table. The small adapter
|
||||
clamps persisted integers before indexing, avoiding increment overflow.
|
||||
Unknown results stop automatic retries.
|
||||
|
||||
The proofs establish success resetting the retry state; temporary challenge
|
||||
and request failures following 5/15/30/60 seconds with a saturated fourth
|
||||
attempt; actionable failures stopping automatic retry; and the mapping of
|
||||
saved retry states and delays. Each error classification has its own law.
|
||||
They do not prove server availability, delivery, alias/friend restoration,
|
||||
or arbitrary `.kry` behavior. Existing integration tests cover those effects.
|
||||
|
||||
The Android private-data directory choice is also a proved finite Bend policy
|
||||
in `laws/storage_layout`. Its generated table is consumed by `data_root()` and
|
||||
distinguishes fresh installs, successful moves, failed moves, and an existing
|
||||
`inbe` directory that must be archived before migration. The proof does not
|
||||
establish the effects of Android filesystem calls or SQLite backup; storage
|
||||
integration tests and a device migration check cover those effects. See
|
||||
`docs/DATA_PATH_MIGRATION.md`.
|
||||
|
||||
## Build behavior and verification
|
||||
|
||||
Install Node.js **22.18 or newer** on the build host and initialize recursive
|
||||
submodules. The checker runs offline once those dependencies are present.
|
||||
CI and package builders provide Node explicitly. The container setup script
|
||||
uses pinned, checksummed official Node archives; ordinary compilation never
|
||||
downloads a proof tool. Flatpak removes its Node build tool from the app.
|
||||
|
||||
- `make build-laws`: release consistency and proofs.
|
||||
- `make proof-test`: deterministic generation, contract-breaking mutations,
|
||||
enum mapping drift, and rejection with an old header already present.
|
||||
- `make sync-recovery-test`: the actual generated C and coordinator, including
|
||||
all known result codes, extreme persisted integers, and social retry state.
|
||||
- `make version-test`: release synchronization and rejecting mismatches.
|
||||
- Upstream `make bend-laws-test`: checker/evaluator acceptance and rejection,
|
||||
including missing proofs, holes, unsafe definitions, and escaped imports.
|
||||
|
||||
Make's actual generated-header and app artifact prerequisites run the checks
|
||||
on every invocation. Failed checking prevents compilation even if an old
|
||||
header exists. Successful generation preserves the header's timestamp when
|
||||
its contents are unchanged. Gradle `preBuild` always checks; direct CMake
|
||||
builds independently regenerate their checked table. `make kry-c-plan9`
|
||||
exports the checked table with the generated sources for native Plan 9,
|
||||
which consumes the host-verified export.
|
||||
|
||||
Kryon's syntax law `image.surface.no_low_level_calls` remains mandatory in
|
||||
all six compiler frontends, including default and `--no-strict` builds. Its
|
||||
105 rejection cases are compiler regression tests, not behavioral proofs.
|
||||
The text/button scanners, migration tests, and sync integration suite remain
|
||||
separate checks with their own scope.
|
||||
|
||||
## Trust and use with smaller models
|
||||
|
||||
A model can change the implementation and provide proofs while the contracts
|
||||
stay fixed. Its output is accepted only when the checker verifies those
|
||||
contracts. This reduces dependence on model quality for **specified behavior**;
|
||||
it does not establish that a smaller model is equally good at designing the
|
||||
contracts or diagnosing missing requirements.
|
||||
|
||||
The trusted boundary is the pinned checker/Base, the finite-table generator,
|
||||
the enum/integer adapter, build graph, and target compiler. Regression tests
|
||||
exercise the integration boundary. An agent able to rewrite the laws or gates
|
||||
can weaken the guarantee. Protected branches, required checks, and independent
|
||||
review ownership should protect those files on the hosting service; repository
|
||||
files alone cannot make themselves immutable. Hosting settings have not been
|
||||
changed by this implementation.
|
||||
|
||||
`AGENTS.md` now states ownership, contract-change boundaries, and the remaining
|
||||
product/review obligations instead of treating prose as a proof system.
|
||||
|
||||
## Next migrations, in order
|
||||
|
||||
1. Move practice lifecycle decisions into a pure finite policy: desktop focus
|
||||
cannot pause a session, user pause remains explicit, and mobile background
|
||||
transitions preserve the required timer behavior. Compile its proved table
|
||||
through the same Kryon checker; retain platform integration tests.
|
||||
2. Specify sync recovery transitions: restoring an account cannot discard
|
||||
queued local changes, partial social refresh cannot erase known friends,
|
||||
and an account switch cannot apply responses belonging to the old account.
|
||||
Model effects explicitly; proofs of scheduling do not prove network delivery.
|
||||
3. For unbounded algorithms such as collection merges, define a checked direct
|
||||
compilation path and its semantics before expanding beyond finite tables.
|
||||
Do not claim a proof of a model also proves a separately implemented C path.
|
||||
4. Add typed widget contracts in Kryon's parsed compiler representation and
|
||||
negative fixtures before removing the remaining API instructions. Turning on
|
||||
today's whole-project strict mode produces thousands of unsupported-host
|
||||
diagnostics and is not a substitute for those contracts.
|
||||
|
||||
[Bend's upstream guide](https://github.com/bendlang/bend/blob/main/guide/GUIDE.md)
|
||||
describes its law/proof convention. Inbe uses the actual checker rather than
|
||||
naming ordinary assertions or tests mathematical proofs.
|
||||
@@ -0,0 +1,55 @@
|
||||
# Sync compatibility validation — 2026-09-14
|
||||
|
||||
## Production repair
|
||||
|
||||
The backend was restarting because it required `DAOCHI_TOKEN_SECRET_HEX`
|
||||
while the deployed environment still used `KSYNC_TOKEN_SECRET_HEX`.
|
||||
The configuration migration preserved the existing token secret and database
|
||||
settings, retained the old settings for rollback, and made a private backup.
|
||||
|
||||
Daochi commit `ae40c7f` is deployed. Sync responses no longer advertise backend
|
||||
protocol development as a client upgrade. `latest_protocol` echoes the client
|
||||
protocol on typed sync responses; `server_latest_protocol` reports backend
|
||||
capability separately. The opaque encrypted endpoint omits `latest_protocol`.
|
||||
|
||||
## Passed checks
|
||||
|
||||
- Daochi `make test`, including real ML-DSA authentication with the shipped
|
||||
Inbe, Ksync, and Daochi signing contexts and headers; altered signatures
|
||||
rejected; sync protocols v1–v5 accepted without upgrade warnings.
|
||||
- Environment migration tests: credential/database preservation, idempotence,
|
||||
and rejection of conflicting old/new settings.
|
||||
- Inbe sync-account and sync-review tests, including persisted newer protocol
|
||||
metadata that must not become an app-update notification.
|
||||
- Inbe two-client integration test against a disposable Daochi server:
|
||||
upload/download, offline recovery, interrupted upload, retry, conflicts,
|
||||
mood data, backup restoration, and deletion.
|
||||
- Official GitHub release APK 1.9.19 (versionCode 121), installed alongside
|
||||
the existing debug app on the attached Moto E6 Play:
|
||||
imported a disposable old-format `.key`, connected to production,
|
||||
saved and uploaded one meditation session, reset only the fresh test app,
|
||||
re-imported the same key, and restored the session from production.
|
||||
The Data screen reported one session, queued zero, and Ready, without
|
||||
the protocol-driven “Upgrade Inner Breeze” warning.
|
||||
- All five newly added sync status/error messages are present exactly once
|
||||
in all 12 locale files. Vendor trees remain clean; `git diff --check` passes.
|
||||
|
||||
## Remaining limits
|
||||
|
||||
- The phone validation uses the unchanged published APK. Its missing locale
|
||||
messages still display identifiers; the translated fixes are in 1.10.0
|
||||
source and are not published yet.
|
||||
- Building the current Android working tree fails at the existing
|
||||
`PickerDialog` / `PickerDialogProps` call in notification settings, whose
|
||||
API is absent from the selected runtime. A new APK has not been validated.
|
||||
- The full locale test also reports pre-existing missing profile translations
|
||||
and unused profile/list keys outside the sync changes.
|
||||
- A backup produced by the current development client was rejected by the
|
||||
old APK as an invalid export. Key-based server restoration passed; do not
|
||||
claim forward compatibility of development backup archives.
|
||||
- Production `/healthz` succeeds. `/readyz` still reports a separately
|
||||
configured direct-payment issuer key missing; database, token secret,
|
||||
and signature-verifier checks pass. Deployment preserved that existing
|
||||
readiness state rather than changing payment configuration.
|
||||
- This validates the tested release and wire formats, not every historical
|
||||
binary, platform, or possible account dataset.
|
||||
@@ -12,8 +12,9 @@ if (hasGplayFirebaseConfig) {
|
||||
}
|
||||
}
|
||||
}
|
||||
def inbeOnlyAbi = (project.findProperty('inbe.onlyAbi') ?: '').toString()
|
||||
def appOnlyAbi = (project.findProperty('app.onlyAbi') ?: '').toString()
|
||||
def buildingAndroidBundle = gradle.startParameter.taskNames.any { it.toLowerCase().contains("bundle") }
|
||||
def kryonDirOverride = (project.findProperty('kryon.dir') ?: System.getenv("KRYON_DIR") ?: '').toString()
|
||||
|
||||
android {
|
||||
namespace 'xyz.waozi.inbe'
|
||||
@@ -52,14 +53,17 @@ android {
|
||||
applicationId "xyz.waozi.inbe"
|
||||
minSdk 21
|
||||
targetSdk 36
|
||||
versionCode 121
|
||||
versionName "1.9.19"
|
||||
versionCode 130
|
||||
versionName "2.0.6"
|
||||
manifestPlaceholders = [
|
||||
inbeAppLabel: "Inner Breeze",
|
||||
inbeUsesCleartextTraffic: "false"
|
||||
]
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
if (kryonDirOverride) {
|
||||
arguments "-DKRYON_DIR=${kryonDirOverride}"
|
||||
}
|
||||
if (System.getProperty('os.name').toLowerCase().contains('freebsd')) {
|
||||
arguments '-DANDROID_HOST_TAG=linux-x86_64',
|
||||
'-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON'
|
||||
@@ -78,18 +82,18 @@ android {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
buildConfigField "boolean", "INBE_GPLAY", "false"
|
||||
buildConfigField "boolean", "GPLAY", "false"
|
||||
}
|
||||
gplay {
|
||||
initWith release
|
||||
signingConfig project.hasProperty('fDroidBuild') ? null : signingConfigs.release
|
||||
matchingFallbacks = ['release']
|
||||
buildConfigField "boolean", "INBE_GPLAY", "true"
|
||||
buildConfigField "boolean", "GPLAY", "true"
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
signingConfig signingConfigs.debug
|
||||
buildConfigField "boolean", "INBE_GPLAY", "false"
|
||||
buildConfigField "boolean", "GPLAY", "false"
|
||||
manifestPlaceholders.inbeAppLabel = "Inner Breeze Debug"
|
||||
manifestPlaceholders.inbeUsesCleartextTraffic = "true"
|
||||
}
|
||||
@@ -105,8 +109,8 @@ android {
|
||||
abi {
|
||||
enable !buildingAndroidBundle
|
||||
reset()
|
||||
if (!buildingAndroidBundle && inbeOnlyAbi) {
|
||||
include inbeOnlyAbi
|
||||
if (!buildingAndroidBundle && appOnlyAbi) {
|
||||
include appOnlyAbi
|
||||
universalApk false
|
||||
} else if (!buildingAndroidBundle) {
|
||||
include 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
||||
@@ -132,6 +136,28 @@ androidComponents {
|
||||
}
|
||||
}
|
||||
|
||||
// Always run, including Java-only incremental builds. CMake independently
|
||||
// checks its own generated header so direct native builds have the same gate.
|
||||
tasks.register('checkBuildLaws') {
|
||||
doLast {
|
||||
exec {
|
||||
workingDir rootProject.file('..')
|
||||
commandLine 'python3', 'scripts/check-version.py'
|
||||
}
|
||||
exec {
|
||||
workingDir rootProject.file('..')
|
||||
commandLine 'node', 'scripts/generate-sync-retry.mjs'
|
||||
}
|
||||
exec {
|
||||
workingDir rootProject.file('..')
|
||||
commandLine 'node', 'scripts/generate-storage-layout.mjs'
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.named('preBuild').configure {
|
||||
dependsOn 'checkBuildLaws'
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady { taskGraph ->
|
||||
def signedTasks = [":app:assembleRelease", ":app:bundleRelease", ":app:assembleGplay", ":app:bundleGplay"]
|
||||
if (signedTasks.any { taskGraph.hasTask(it) }
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.google.firebase.messaging.FirebaseMessagingService;
|
||||
import com.google.firebase.messaging.RemoteMessage;
|
||||
|
||||
public class FcmPushService extends FirebaseMessagingService {
|
||||
private static final String TAG = "INBE_FCM";
|
||||
private static final String TAG = "FCM";
|
||||
|
||||
@Override
|
||||
public void onNewToken(String token) {
|
||||
|
||||
@@ -38,16 +38,42 @@
|
||||
<meta-data
|
||||
android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<!-- Health Connect: app info can deep-link to the permissions page. -->
|
||||
<intent-filter>
|
||||
<action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity-alias
|
||||
android:name="xyz.waozi.inbe.SkyCradleLauncher"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:label="${inbeAppLabel}"
|
||||
android:targetActivity="xyz.waozi.inbe.MainActivity">
|
||||
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name="xyz.waozi.inbe.InkAndAirLauncher"
|
||||
android:enabled="false"
|
||||
android:exported="true"
|
||||
android:icon="@mipmap/ic_launcher_air"
|
||||
android:roundIcon="@mipmap/ic_launcher_air_round"
|
||||
android:label="${inbeAppLabel}"
|
||||
android:targetActivity="xyz.waozi.inbe.MainActivity">
|
||||
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
|
||||
<!-- Health Connect on API 34+ routes the rationale through this alias. -->
|
||||
<activity-alias
|
||||
android:name="ViewPermissionActivity"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(Inbe C)
|
||||
project(App C)
|
||||
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if(CCACHE_PROGRAM AND EXISTS "${CCACHE_PROGRAM}")
|
||||
@@ -11,13 +11,23 @@ endif()
|
||||
|
||||
set(REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../../..")
|
||||
set(SRC_DIR "${REPO_ROOT}/src")
|
||||
set(KRYON_DIR "${REPO_ROOT}/vendor/kryon")
|
||||
if(NOT DEFINED KRYON_DIR)
|
||||
set(KRYON_DIR "${REPO_ROOT}/vendor/kryon")
|
||||
endif()
|
||||
get_filename_component(KRYON_DIR "${KRYON_DIR}" ABSOLUTE BASE_DIR "${REPO_ROOT}")
|
||||
set(RAYLIB_DIR "${KRYON_DIR}/vendor/raylib/src")
|
||||
set(KRYON_RAYLIB_GENERATED_DIR "${CMAKE_BINARY_DIR}/kryon/raylib_generated")
|
||||
set(KRYON_COMPAT_GENERATED_HEADER "${KRYON_RAYLIB_GENERATED_DIR}/kryon_compat.generated.h")
|
||||
set(KRYON_RAYLIB_BACKEND_RENAME_HEADER "${KRYON_RAYLIB_GENERATED_DIR}/raylib_backend_rename.h")
|
||||
set(KRYON_RAYLIB_WRAPPERS_C "${KRYON_RAYLIB_GENERATED_DIR}/kryon_raylib_wrappers.c")
|
||||
set(KRYON_NULL_BACKEND_C "${KRYON_RAYLIB_GENERATED_DIR}/kryon_null_backend.c")
|
||||
# Icon outputs must live outside kryon/generated: the k2c regeneration step
|
||||
# wipes that whole directory, which would delete these mid-build.
|
||||
set(KRYON_ICON_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/kryon/generated-icons/include")
|
||||
set(KRYON_ICON_GENERATED_SRC_DIR "${CMAKE_BINARY_DIR}/kryon/generated-icons/src")
|
||||
set(KRYON_ICON_ASSETS_C "${KRYON_ICON_GENERATED_SRC_DIR}/ui/ui_icon_assets.c")
|
||||
set(KRYON_ICON_NAMES_C "${KRYON_ICON_GENERATED_SRC_DIR}/ui/ui_icon_names.c")
|
||||
set(KRYON_ICON_TYPES_H "${KRYON_ICON_GENERATED_INCLUDE_DIR}/ui_icon_types.h")
|
||||
set(SQLITE_DIR "${REPO_ROOT}/vendor/sqlite")
|
||||
set(SQLITE_BUILD_DIR "${CMAKE_BINARY_DIR}/sqlite")
|
||||
set(SQLITE_AMALGAMATION_C "${SQLITE_BUILD_DIR}/sqlite3.c")
|
||||
@@ -35,25 +45,37 @@ foreach(oqs_x86_feature
|
||||
endforeach()
|
||||
add_subdirectory("${KRYON_DIR}/vendor/liboqs" "${CMAKE_BINARY_DIR}/liboqs")
|
||||
if(NOT TARGET oqs)
|
||||
message(FATAL_ERROR "Inbe Android builds require liboqs for sync account crypto")
|
||||
message(FATAL_ERROR "Android builds require liboqs for sync account crypto")
|
||||
endif()
|
||||
file(GLOB_RECURSE KRYON_SOURCES CONFIGURE_DEPENDS "${KRYON_DIR}/src/*.c")
|
||||
list(REMOVE_ITEM KRYON_SOURCES "${KRYON_DIR}/src/file_dialog/file_dialog.c")
|
||||
list(REMOVE_ITEM KRYON_SOURCES "${KRYON_DIR}/src/ui/ui_icon_assets.c")
|
||||
list(REMOVE_ITEM KRYON_SOURCES "${KRYON_DIR}/src/ui/ui_icon_names.c")
|
||||
# The src/backend/ canvas/software renderers implement raylib-named functions
|
||||
# for no-raylib hosts; Android links real raylib, so compiling those is a
|
||||
# duplicate-symbol link error. Keep Kryon's shared front-end backend glue.
|
||||
list(FILTER KRYON_SOURCES EXCLUDE REGEX "${KRYON_DIR}/src/backend/.*")
|
||||
list(FILTER KRYON_SOURCES EXCLUDE REGEX "${KRYON_DIR}/src/platform/plan9/.*")
|
||||
list(APPEND KRYON_SOURCES
|
||||
"${KRYON_DIR}/src/backend/kry_backend.c"
|
||||
"${KRYON_DIR}/src/backend/kry_backend_draw.c"
|
||||
"${KRYON_DIR}/src/backend/kry_dpi.c"
|
||||
"${KRYON_DIR}/src/backend/kry_event_wait.c"
|
||||
"${KRYON_DIR}/src/backend/kry_icon_atlas.c"
|
||||
"${KRYON_DIR}/src/backend/kry_layer_texture.c"
|
||||
"${KRYON_DIR}/src/backend/kry_style_build_mode.c"
|
||||
"${KRYON_DIR}/src/backend/kry_ui_platform.c"
|
||||
"${KRYON_DIR}/src/backend/kry_unicode.c"
|
||||
"${KRYON_DIR}/src/backend/kry_image.c"
|
||||
"${KRYON_DIR}/src/backend/kry_image_decode.c"
|
||||
"${KRYON_DIR}/src/backend/kry_input.c"
|
||||
"${KRYON_DIR}/src/backend/kry_instance.c"
|
||||
"${KRYON_DIR}/src/backend/kry_screenshot.c"
|
||||
"${KRYON_DIR}/src/backend/kry_sw_png.c"
|
||||
"${KRYON_DIR}/src/backend/kry_surface_math.c")
|
||||
# inbe is a UI-only app: drop the 2D physics subsystem (Box2D). Mirror the
|
||||
"${KRYON_DIR}/src/backend/kry_surface_math.c"
|
||||
"${KRYON_ICON_ASSETS_C}"
|
||||
"${KRYON_ICON_NAMES_C}")
|
||||
# this app is UI-only: drop the 2D physics subsystem (Box2D). Mirror the
|
||||
# KRYON_PHYSICS_SRCS filter the desktop Makefile applies via vendor.mk.
|
||||
list(REMOVE_ITEM KRYON_SOURCES
|
||||
"${KRYON_DIR}/src/scene/physics_world.c"
|
||||
@@ -61,41 +83,58 @@ list(REMOVE_ITEM KRYON_SOURCES
|
||||
"${KRYON_DIR}/src/scene/node_area2d.c"
|
||||
"${KRYON_DIR}/src/scene/node_collision_shape2d.c")
|
||||
file(GLOB KRYON_K2C_SOURCES CONFIGURE_DEPENDS "${KRYON_DIR}/cmd/k2c/*.c")
|
||||
list(APPEND KRYON_K2C_SOURCES
|
||||
"${KRYON_DIR}/cmd/kir/kir.c"
|
||||
"${KRYON_DIR}/cmd/kir/kir_parse.c"
|
||||
"${KRYON_DIR}/cmd/kir/kir_text.c")
|
||||
file(GLOB KRYON_KIR_SOURCES CONFIGURE_DEPENDS "${KRYON_DIR}/cmd/kir/*.c")
|
||||
file(GLOB KRYON_K2C_HEADERS CONFIGURE_DEPENDS
|
||||
"${KRYON_DIR}/cmd/k2c/*.h" "${KRYON_DIR}/cmd/kir/*.h")
|
||||
list(APPEND KRYON_K2C_SOURCES ${KRYON_KIR_SOURCES}
|
||||
"${KRYON_DIR}/src/kry_std/kry_json.c")
|
||||
list(SORT KRYON_K2C_SOURCES)
|
||||
find_program(HOST_CC NAMES cc clang gcc REQUIRED)
|
||||
find_program(HOST_PYTHON NAMES python3 REQUIRED)
|
||||
find_program(HOST_NODE NAMES node REQUIRED)
|
||||
set(APP_PROOF_DIR "${CMAKE_BINARY_DIR}/proofs")
|
||||
add_custom_target(app_build_laws
|
||||
COMMAND "${HOST_PYTHON}" "${REPO_ROOT}/scripts/check-version.py"
|
||||
COMMAND "${HOST_NODE}" "${REPO_ROOT}/scripts/generate-sync-retry.mjs"
|
||||
"${APP_PROOF_DIR}/sync_retry_table.h"
|
||||
COMMAND "${HOST_NODE}" "${REPO_ROOT}/scripts/generate-storage-layout.mjs"
|
||||
"${APP_PROOF_DIR}/storage_layout.h"
|
||||
BYPRODUCTS "${APP_PROOF_DIR}/sync_retry_table.h"
|
||||
"${APP_PROOF_DIR}/storage_layout.h"
|
||||
WORKING_DIRECTORY "${REPO_ROOT}"
|
||||
COMMENT "Checking release consistency and proving app laws"
|
||||
VERBATIM
|
||||
)
|
||||
set(KRYON_K2C "${CMAKE_BINARY_DIR}/host-tools/k2c")
|
||||
# needs the kir headers on the include path
|
||||
set(INBE_KRY_GEN_DIR "${CMAKE_BINARY_DIR}/kryon/generated")
|
||||
file(GLOB_RECURSE INBE_KRY_SOURCES CONFIGURE_DEPENDS "${SRC_DIR}/*.kry")
|
||||
list(SORT INBE_KRY_SOURCES)
|
||||
set(APP_KRY_GEN_DIR "${CMAKE_BINARY_DIR}/kryon/generated")
|
||||
file(GLOB_RECURSE APP_KRY_SOURCES CONFIGURE_DEPENDS "${SRC_DIR}/*.kry")
|
||||
list(SORT APP_KRY_SOURCES)
|
||||
# App-layer sources are cross-platform modules that belong in every build.
|
||||
# Glob them so adding an app .c file needs no edit here -- this list had
|
||||
# drifted out of sync with the Makefile APP_SRCS more than once.
|
||||
file(GLOB APP_C_SOURCES CONFIGURE_DEPENDS "${SRC_DIR}/app/*.c")
|
||||
list(SORT APP_C_SOURCES)
|
||||
set(INBE_KRY_GENERATED_SOURCES)
|
||||
set(INBE_KRY_GENERATED_HEADERS)
|
||||
set(INBE_KRY_COMMAND_SOURCES)
|
||||
foreach(kry_source ${INBE_KRY_SOURCES})
|
||||
set(APP_KRY_GENERATED_SOURCES)
|
||||
set(APP_KRY_GENERATED_HEADERS)
|
||||
set(APP_KRY_COMMAND_SOURCES)
|
||||
foreach(kry_source ${APP_KRY_SOURCES})
|
||||
file(RELATIVE_PATH kry_rel "${REPO_ROOT}" "${kry_source}")
|
||||
list(APPEND INBE_KRY_COMMAND_SOURCES "${kry_rel}")
|
||||
list(APPEND APP_KRY_COMMAND_SOURCES "${kry_rel}")
|
||||
get_filename_component(kry_rel_dir "${kry_rel}" DIRECTORY)
|
||||
get_filename_component(kry_name "${kry_rel}" NAME_WE)
|
||||
set(kry_output_c "${INBE_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.c")
|
||||
set(kry_output_h "${INBE_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.h")
|
||||
list(APPEND INBE_KRY_GENERATED_SOURCES "${kry_output_c}")
|
||||
list(APPEND INBE_KRY_GENERATED_HEADERS "${kry_output_h}")
|
||||
set(kry_output_c "${APP_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.c")
|
||||
set(kry_output_h "${APP_KRY_GEN_DIR}/${kry_rel_dir}/${kry_name}.h")
|
||||
list(APPEND APP_KRY_GENERATED_SOURCES "${kry_output_c}")
|
||||
list(APPEND APP_KRY_GENERATED_HEADERS "${kry_output_h}")
|
||||
endforeach()
|
||||
set(INBE_KRY_PROJECT_HEADER "${INBE_KRY_GEN_DIR}/kryon_project.h")
|
||||
set(APP_KRY_PROJECT_HEADER "${APP_KRY_GEN_DIR}/kryon_project.h")
|
||||
add_custom_command(
|
||||
OUTPUT ${INBE_KRY_GENERATED_SOURCES} ${INBE_KRY_GENERATED_HEADERS} "${INBE_KRY_PROJECT_HEADER}"
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${INBE_KRY_GEN_DIR}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${INBE_KRY_GEN_DIR}"
|
||||
COMMAND "${KRYON_K2C}" --root "${REPO_ROOT}" -o "${INBE_KRY_GEN_DIR}" ${INBE_KRY_COMMAND_SOURCES}
|
||||
DEPENDS ${INBE_KRY_SOURCES} "${KRYON_K2C}"
|
||||
OUTPUT ${APP_KRY_GENERATED_SOURCES} ${APP_KRY_GENERATED_HEADERS} "${APP_KRY_PROJECT_HEADER}"
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${APP_KRY_GEN_DIR}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${APP_KRY_GEN_DIR}"
|
||||
COMMAND "${KRYON_K2C}" --root "${REPO_ROOT}" -o "${APP_KRY_GEN_DIR}" ${APP_KRY_COMMAND_SOURCES}
|
||||
DEPENDS ${APP_KRY_SOURCES} "${KRYON_K2C}"
|
||||
WORKING_DIRECTORY "${REPO_ROOT}"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -103,15 +142,75 @@ add_custom_command(
|
||||
OUTPUT "${KRYON_K2C}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/host-tools"
|
||||
# VERBATIM escapes embedded quotes, so unquoted -I paths (no spaces here)
|
||||
COMMAND "${HOST_CC}" -Wall -Wextra -O2 -I${KRYON_DIR}/cmd/kir -I${KRYON_DIR}/cmd/k2c -o "${KRYON_K2C}" ${KRYON_K2C_SOURCES}
|
||||
DEPENDS ${KRYON_K2C_SOURCES}
|
||||
COMMAND "${HOST_CC}" -Wall -Wextra -O2 -I${KRYON_DIR}/include -I${KRYON_DIR}/cmd/kir -I${KRYON_DIR}/cmd/k2c -o "${KRYON_K2C}" ${KRYON_K2C_SOURCES}
|
||||
DEPENDS ${KRYON_K2C_SOURCES} ${KRYON_K2C_HEADERS}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(inbe_kry_generated DEPENDS
|
||||
${INBE_KRY_GENERATED_SOURCES}
|
||||
${INBE_KRY_GENERATED_HEADERS}
|
||||
"${INBE_KRY_PROJECT_HEADER}"
|
||||
# Kryon ships part of its runtime as Kry modules transpiled at build time
|
||||
# (runtime/*.kry -> generated/src/runtime/*.c). Downstream C builds compile
|
||||
# the generated sources and put their directory on the include path so
|
||||
# kryon's own C files can #include "runtime/*.h".
|
||||
set(KRYON_RUNTIME_GEN_DIR "${CMAKE_BINARY_DIR}/kryon/generated-runtime")
|
||||
file(GLOB KRYON_RUNTIME_MODULE_FILES CONFIGURE_DEPENDS
|
||||
"${KRYON_DIR}/runtime/*.kry")
|
||||
set(KRYON_RUNTIME_KRY_MODULES)
|
||||
foreach(kryon_module_file ${KRYON_RUNTIME_MODULE_FILES})
|
||||
file(RELATIVE_PATH kryon_module "${KRYON_DIR}" "${kryon_module_file}")
|
||||
list(APPEND KRYON_RUNTIME_KRY_MODULES "${kryon_module}")
|
||||
endforeach()
|
||||
set(KRYON_RUNTIME_KRY_FILES)
|
||||
set(KRYON_RUNTIME_GENERATED_C)
|
||||
foreach(kryon_module ${KRYON_RUNTIME_KRY_MODULES})
|
||||
list(APPEND KRYON_RUNTIME_KRY_FILES "${KRYON_DIR}/${kryon_module}")
|
||||
string(REGEX REPLACE "\\.kry$" ".c" kryon_module_c "${kryon_module}")
|
||||
list(APPEND KRYON_RUNTIME_GENERATED_C "${KRYON_RUNTIME_GEN_DIR}/${kryon_module_c}")
|
||||
endforeach()
|
||||
add_custom_command(
|
||||
OUTPUT ${KRYON_RUNTIME_GENERATED_C}
|
||||
COMMAND "${KRYON_K2C}" --strict --no-main --root "${KRYON_DIR}" -o "${KRYON_RUNTIME_GEN_DIR}" ${KRYON_RUNTIME_KRY_MODULES}
|
||||
DEPENDS "${KRYON_K2C}" ${KRYON_RUNTIME_KRY_FILES}
|
||||
WORKING_DIRECTORY "${KRYON_DIR}"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(kryon_runtime_generated DEPENDS ${KRYON_RUNTIME_GENERATED_C})
|
||||
list(APPEND KRYON_SOURCES ${KRYON_RUNTIME_GENERATED_C})
|
||||
# Kryon's .kry-backed UI modules generate the public ui/*.h headers that the
|
||||
# retained handwritten src/ui/*.c host services include, plus the generated
|
||||
# implementations for the migrated widgets. Mirrors the root Makefile's
|
||||
# KRYON_UI pass (k2c --no-main --root kryon/src), which runs after the
|
||||
# runtime pass.
|
||||
set(KRYON_UI_GEN_DIR "${CMAKE_BINARY_DIR}/kryon/generated-ui")
|
||||
file(GLOB KRYON_UI_MODULE_FILES CONFIGURE_DEPENDS
|
||||
"${KRYON_DIR}/src/ui/*.kry")
|
||||
set(KRYON_UI_GENERATED_C)
|
||||
foreach(kryon_module_file ${KRYON_UI_MODULE_FILES})
|
||||
file(RELATIVE_PATH kryon_module "${KRYON_DIR}/src" "${kryon_module_file}")
|
||||
string(REGEX REPLACE "\\.kry$" ".c" kryon_module_c "${kryon_module}")
|
||||
list(APPEND KRYON_UI_GENERATED_C "${KRYON_UI_GEN_DIR}/${kryon_module_c}")
|
||||
endforeach()
|
||||
add_custom_command(
|
||||
OUTPUT ${KRYON_UI_GENERATED_C}
|
||||
COMMAND "${KRYON_K2C}" --no-main --root "${KRYON_DIR}/src" -o "${KRYON_UI_GEN_DIR}" ${KRYON_UI_MODULE_FILES}
|
||||
DEPENDS "${KRYON_K2C}" ${KRYON_UI_MODULE_FILES} ${KRYON_RUNTIME_GENERATED_C}
|
||||
WORKING_DIRECTORY "${KRYON_DIR}"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(kryon_ui_generated DEPENDS ${KRYON_UI_GENERATED_C})
|
||||
list(APPEND KRYON_SOURCES ${KRYON_UI_GENERATED_C})
|
||||
add_custom_target(app_kry_generated DEPENDS
|
||||
${APP_KRY_GENERATED_SOURCES}
|
||||
${APP_KRY_GENERATED_HEADERS}
|
||||
"${APP_KRY_PROJECT_HEADER}"
|
||||
)
|
||||
add_custom_target(app_clean_runtime_api
|
||||
COMMAND "${HOST_PYTHON}"
|
||||
"${KRYON_DIR}/scripts/check-clean-text-api.py"
|
||||
"${SRC_DIR}"
|
||||
WORKING_DIRECTORY "${REPO_ROOT}"
|
||||
COMMENT "Rejecting stale or duplicate Kryon runtime API usage"
|
||||
VERBATIM
|
||||
)
|
||||
add_dependencies(app_kry_generated app_clean_runtime_api app_build_laws)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
@@ -136,37 +235,50 @@ add_custom_target(kryon_raylib_generated DEPENDS
|
||||
"${KRYON_RAYLIB_WRAPPERS_C}"
|
||||
"${KRYON_NULL_BACKEND_C}"
|
||||
)
|
||||
file(GLOB INBE_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/locales/*.txt")
|
||||
file(GLOB INBE_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
|
||||
file(GLOB INBE_PRACTICE_BANNER_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/practices/*/banner.png")
|
||||
set(INBE_EMBEDDED_INPUTS
|
||||
${INBE_LOCALE_ASSETS}
|
||||
file(GLOB APP_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/locales/*.txt")
|
||||
file(GLOB APP_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
|
||||
file(GLOB APP_PRACTICE_BANNER_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/practices/*/banner*.png")
|
||||
file(GLOB APP_STYLE_ASSETS RELATIVE "${REPO_ROOT}"
|
||||
"${KRYON_DIR}/styles/kryon/*.kss" "${REPO_ROOT}/assets/styles/*.kss"
|
||||
"${REPO_ROOT}/themes/catalog_*.kss")
|
||||
foreach(mode light dark)
|
||||
file(SHA256 "${REPO_ROOT}/themes/catalog_${mode}.kss" APP_CATALOG_HASH)
|
||||
file(SHA256 "${KRYON_DIR}/themes/catalog_${mode}.kss" KRYON_CATALOG_HASH)
|
||||
if(NOT APP_CATALOG_HASH STREQUAL KRYON_CATALOG_HASH)
|
||||
message(FATAL_ERROR "Packaged ${mode} theme catalog differs from Kryon")
|
||||
endif()
|
||||
endforeach()
|
||||
set(APP_EMBEDDED_INPUTS
|
||||
${APP_STYLE_ASSETS}
|
||||
${APP_LOCALE_ASSETS}
|
||||
assets/app/icon-sky-cradle.png
|
||||
assets/app/icon-ink-and-air.png
|
||||
assets/easteregg/art.png
|
||||
assets/easteregg/waozi.png
|
||||
assets/practices/whm/1.png
|
||||
assets/practices/whm/2.png
|
||||
assets/practices/meditation/1.png
|
||||
assets/pet/egg1.png
|
||||
${INBE_PRACTICE_BANNER_ASSETS}
|
||||
${APP_PRACTICE_BANNER_ASSETS}
|
||||
assets/practices/sunsalutation/poses_man_sheet.png
|
||||
assets/practices/sunsalutation/poses_woman_sheet.png
|
||||
assets/fonts/subset/NotoSans-Inbe-Regular.ttf
|
||||
assets/fonts/subset/NotoSansSC-Inbe-Regular.otf
|
||||
assets/fonts/subset/NotoSansJP-Inbe-Regular.otf
|
||||
assets/fonts/subset/NotoSansKR-Inbe-Regular.otf
|
||||
assets/fonts/subset/NotoSansTC-Inbe-Regular.otf
|
||||
${INBE_SOUND_ASSETS}
|
||||
assets/fonts/subset/NotoSans-App-Regular.ttf
|
||||
assets/fonts/subset/NotoSansSC-App-Regular.otf
|
||||
assets/fonts/subset/NotoSansJP-App-Regular.otf
|
||||
assets/fonts/subset/NotoSansKR-App-Regular.otf
|
||||
assets/fonts/subset/NotoSansTC-App-Regular.otf
|
||||
${APP_SOUND_ASSETS}
|
||||
)
|
||||
set(INBE_EMBEDDED_DEPS)
|
||||
foreach(asset ${INBE_EMBEDDED_INPUTS})
|
||||
list(APPEND INBE_EMBEDDED_DEPS "${REPO_ROOT}/${asset}")
|
||||
set(APP_EMBEDDED_DEPS)
|
||||
foreach(asset ${APP_EMBEDDED_INPUTS})
|
||||
list(APPEND APP_EMBEDDED_DEPS "${REPO_ROOT}/${asset}")
|
||||
endforeach()
|
||||
set(INBE_EMBEDDED_ASSETS_C "${CMAKE_BINARY_DIR}/inbe_embedded_assets.c")
|
||||
set(APP_EMBEDDED_ASSETS_C "${CMAKE_BINARY_DIR}/app_embedded_assets.c")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${INBE_EMBEDDED_ASSETS_C}"
|
||||
COMMAND sh "${KRYON_DIR}/scripts/embed-assets.sh" "${INBE_EMBEDDED_ASSETS_C}" ${INBE_EMBEDDED_INPUTS}
|
||||
DEPENDS "${KRYON_DIR}/scripts/embed-assets.sh" ${INBE_EMBEDDED_DEPS}
|
||||
OUTPUT "${APP_EMBEDDED_ASSETS_C}"
|
||||
COMMAND sh "${KRYON_DIR}/scripts/embed-assets.sh" "${APP_EMBEDDED_ASSETS_C}" ${APP_EMBEDDED_INPUTS}
|
||||
DEPENDS "${KRYON_DIR}/scripts/embed-assets.sh" ${APP_EMBEDDED_DEPS}
|
||||
WORKING_DIRECTORY "${REPO_ROOT}"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -220,30 +332,47 @@ target_include_directories(raylib PUBLIC
|
||||
)
|
||||
|
||||
add_library(main SHARED
|
||||
"${SRC_DIR}/main.c"
|
||||
"${SRC_DIR}/platform/main_host.c"
|
||||
${APP_C_SOURCES}
|
||||
"${SRC_DIR}/storage/storage.c"
|
||||
"${SRC_DIR}/storage/storage_json_builder.c"
|
||||
"${SRC_DIR}/storage/storage_habits.c"
|
||||
"${SRC_DIR}/storage/storage_habit_materialize.c"
|
||||
"${SRC_DIR}/storage/storage_habit_sync.c"
|
||||
"${SRC_DIR}/storage/sync_client.c"
|
||||
"${SRC_DIR}/third_party/miniz.c"
|
||||
"${SQLITE_AMALGAMATION_C}"
|
||||
"${SRC_DIR}/platform/android/android_device.c"
|
||||
"${SRC_DIR}/platform/android/android_share.c"
|
||||
"${INBE_EMBEDDED_ASSETS_C}"
|
||||
${INBE_KRY_GENERATED_SOURCES}
|
||||
"${APP_EMBEDDED_ASSETS_C}"
|
||||
${APP_KRY_GENERATED_SOURCES}
|
||||
${KRYON_SOURCES}
|
||||
"${KRYON_RAYLIB_WRAPPERS_C}"
|
||||
"${SRC_DIR}/platform/android/android_insets.c"
|
||||
"${NATIVE_APP_GLUE_DIR}/android_native_app_glue.c"
|
||||
)
|
||||
add_dependencies(main inbe_kry_generated kryon_raylib_generated)
|
||||
add_dependencies(main app_kry_generated kryon_raylib_generated
|
||||
kryon_runtime_generated kryon_ui_generated app_build_laws)
|
||||
|
||||
file(GLOB_RECURSE KRYON_ICON_FILES CONFIGURE_DEPENDS "${KRYON_DIR}/icons/*.png" "${KRYON_DIR}/icons/*.json")
|
||||
add_custom_command(
|
||||
OUTPUT "${KRYON_ICON_ASSETS_C}" "${KRYON_ICON_NAMES_C}" "${KRYON_ICON_TYPES_H}"
|
||||
COMMAND "${HOST_PYTHON}" "${KRYON_DIR}/scripts/embed-icon-sheets.py"
|
||||
icons
|
||||
"${KRYON_ICON_ASSETS_C}"
|
||||
--types-output "${KRYON_ICON_TYPES_H}"
|
||||
--names-output "${KRYON_ICON_NAMES_C}"
|
||||
DEPENDS "${KRYON_DIR}/scripts/embed-icon-sheets.py" ${KRYON_ICON_FILES}
|
||||
WORKING_DIRECTORY "${KRYON_DIR}"
|
||||
VERBATIM)
|
||||
add_custom_target(kryon_icon_assets_generated DEPENDS "${KRYON_ICON_ASSETS_C}" "${KRYON_ICON_NAMES_C}" "${KRYON_ICON_TYPES_H}")
|
||||
add_dependencies(main kryon_icon_assets_generated)
|
||||
|
||||
target_include_directories(main PRIVATE
|
||||
"${APP_PROOF_DIR}"
|
||||
"${KRYON_ICON_GENERATED_INCLUDE_DIR}"
|
||||
"${KRYON_DIR}/include"
|
||||
"${KRYON_DIR}/src"
|
||||
"${KRYON_DIR}/src/ui"
|
||||
"${KRYON_DIR}/src/platform"
|
||||
"${KRYON_DIR}/src/backend"
|
||||
"${KRYON_DIR}/vendor/utf8proc"
|
||||
"${KRYON_DIR}/vendor/monocypher/src"
|
||||
"${KRYON_DIR}/vendor/monocypher/src/optional"
|
||||
"${SRC_DIR}"
|
||||
"${SRC_DIR}/app"
|
||||
"${SRC_DIR}/core"
|
||||
@@ -256,8 +385,11 @@ target_include_directories(main PRIVATE
|
||||
"${SRC_DIR}/storage"
|
||||
"${SRC_DIR}/platform/android"
|
||||
"${SRC_DIR}/third_party"
|
||||
"${INBE_KRY_GEN_DIR}"
|
||||
"${INBE_KRY_GEN_DIR}/src"
|
||||
"${APP_KRY_GEN_DIR}"
|
||||
"${APP_KRY_GEN_DIR}/src"
|
||||
"${KRYON_RUNTIME_GEN_DIR}"
|
||||
"${KRYON_RUNTIME_GEN_DIR}/runtime"
|
||||
"${KRYON_UI_GEN_DIR}"
|
||||
"${NATIVE_APP_GLUE_DIR}"
|
||||
"${SQLITE_BUILD_DIR}"
|
||||
)
|
||||
@@ -267,6 +399,7 @@ target_compile_definitions(main PRIVATE
|
||||
ANDROID_BUILD=1
|
||||
_DEFAULT_SOURCE
|
||||
_GNU_SOURCE
|
||||
UTF8PROC_STATIC
|
||||
_FILE_OFFSET_BITS=64
|
||||
MG_TLS=MG_TLS_BUILTIN
|
||||
MG_ENABLE_EPOLL=0
|
||||
@@ -276,6 +409,7 @@ target_compile_definitions(main PRIVATE
|
||||
SUPPORT_FILEFORMAT_OGG=1
|
||||
UI_EMBEDDED_ONLY=1
|
||||
HAS_LIBOQS=1
|
||||
KRYON_WITH_SYNC=1
|
||||
KRYON_WITH_PHYSICS=0
|
||||
)
|
||||
|
||||
@@ -288,11 +422,13 @@ target_compile_options(main PRIVATE
|
||||
|
||||
target_link_options(main PRIVATE
|
||||
-Wl,--gc-sections
|
||||
-Wl,--strip-all
|
||||
-Wl,-z,max-page-size=16384
|
||||
-Wl,-z,common-page-size=16384
|
||||
-Wl,--wrap=fopen
|
||||
)
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_link_options(main PRIVATE -Wl,--strip-all)
|
||||
endif()
|
||||
|
||||
target_link_libraries(main
|
||||
raylib
|
||||
@@ -302,5 +438,6 @@ target_link_libraries(main
|
||||
OpenSLES
|
||||
EGL
|
||||
GLESv2
|
||||
z
|
||||
m
|
||||
)
|
||||
@@ -23,7 +23,7 @@ import kotlin.coroutines.EmptyCoroutineContext
|
||||
import kotlin.coroutines.startCoroutine
|
||||
|
||||
/**
|
||||
* One-way push of finished inbe sessions into Health Connect: meditation
|
||||
* One-way push of finished sessions into Health Connect: meditation
|
||||
* and the breathwork practices become mindfulness sessions (meditation /
|
||||
* breathing types), sun salutation becomes a yoga exercise session. The
|
||||
* native side writes the session list (start,end,activity per CSV line);
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
|
||||
/** The component state is device-local and survives process restarts and upgrades. */
|
||||
final class LauncherIcons {
|
||||
static final int SKY_CRADLE = 0;
|
||||
static final int INK_AND_AIR = 1;
|
||||
private static final String[] ALIASES = {
|
||||
"xyz.waozi.inbe.SkyCradleLauncher",
|
||||
"xyz.waozi.inbe.InkAndAirLauncher"
|
||||
};
|
||||
|
||||
private LauncherIcons() {
|
||||
}
|
||||
|
||||
private static ComponentName component(Context context, int icon) {
|
||||
// The application ID has a .debug suffix in debug builds; alias names don't.
|
||||
return new ComponentName(context.getPackageName(), ALIASES[icon]);
|
||||
}
|
||||
|
||||
private static boolean enabled(Context context, int icon) {
|
||||
int state = context.getPackageManager().getComponentEnabledSetting(component(context, icon));
|
||||
return state == PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|
||||
|| (state == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT && icon == SKY_CRADLE);
|
||||
}
|
||||
|
||||
static synchronized int selected(Context context) {
|
||||
return enabled(context, INK_AND_AIR) ? INK_AND_AIR : SKY_CRADLE;
|
||||
}
|
||||
|
||||
static synchronized boolean select(Context context, int icon) {
|
||||
if (icon != SKY_CRADLE && icon != INK_AND_AIR) {
|
||||
return false;
|
||||
}
|
||||
PackageManager manager = context.getPackageManager();
|
||||
int previous = selected(context);
|
||||
int other = icon == SKY_CRADLE ? INK_AND_AIR : SKY_CRADLE;
|
||||
if (enabled(context, icon) && !enabled(context, other)) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
// Always leave a launchable entry, including on Android 21–32 where
|
||||
// component changes cannot be applied atomically. Never disable MainActivity.
|
||||
manager.setComponentEnabledSetting(component(context, icon),
|
||||
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
|
||||
manager.setComponentEnabledSetting(component(context, other),
|
||||
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
||||
Log.i("LauncherIcons", "Selected " + ALIASES[icon]);
|
||||
return true;
|
||||
} catch (RuntimeException error) {
|
||||
Log.e("LauncherIcons", "Could not change launcher icon", error);
|
||||
try {
|
||||
manager.setComponentEnabledSetting(component(context, previous),
|
||||
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
|
||||
int unused = previous == SKY_CRADLE ? INK_AND_AIR : SKY_CRADLE;
|
||||
manager.setComponentEnabledSetting(component(context, unused),
|
||||
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
||||
} catch (RuntimeException restoreError) {
|
||||
Log.e("LauncherIcons", "Could not restore launcher icon", restoreError);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class MainActivity extends NativeActivity {
|
||||
private static final String TAG = "InbeMainActivity";
|
||||
private static final String TAG = "MainActivity";
|
||||
private static final int REQUEST_IMPORT_ZIP = 1001;
|
||||
private static final int REQUEST_POST_NOTIFICATIONS = 1002;
|
||||
private static final int REQUEST_HEALTH_CONNECT = HealthConnectExport.REQUEST_CODE;
|
||||
@@ -68,7 +68,6 @@ public class MainActivity extends NativeActivity {
|
||||
private boolean activityPaused = false;
|
||||
private boolean windowFocused = true;
|
||||
private boolean backgroundExecutionActive = false;
|
||||
private boolean autoPausedForLifecycle = false;
|
||||
private boolean notificationPermissionRequestInFlight = false;
|
||||
private int lastDeleteRepeatCount = -1;
|
||||
private int pendingImportKind = 0;
|
||||
@@ -78,6 +77,14 @@ public class MainActivity extends NativeActivity {
|
||||
private boolean pendingDebugDonationReminder = false;
|
||||
private int pendingDebugDonationReminderRetries = 0;
|
||||
private final Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
private final Runnable checkSessionIndicator = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (backgroundExecutionActive) {
|
||||
syncLifecycleState("indicator check");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private native void nativeSetInsets(int left, int top, int right, int bottom, int imeBottom,
|
||||
int cutoutLeft, int cutoutTop, int cutoutRight, int cutoutBottom);
|
||||
@@ -85,10 +92,7 @@ public class MainActivity extends NativeActivity {
|
||||
private native void nativeSetSystemDark(int dark);
|
||||
private native void nativeSetOrientation(int orientation);
|
||||
private native void nativeWakeLockReady();
|
||||
private native void nativeSetBackgroundActive(boolean active);
|
||||
private native int nativeGetPlayInBackground();
|
||||
private native int nativePauseSession();
|
||||
private native void nativeResumeSession();
|
||||
private native int nativeSyncLifecycleState(boolean paused, boolean indicatorVisible);
|
||||
private native void nativeImportSelectedFile(int kind, String path);
|
||||
private native void nativeImportCancelled(int kind);
|
||||
private native void nativeRuntimeAssetDownloadSucceeded(long handle, long bytes, int httpStatus);
|
||||
@@ -326,7 +330,7 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
}, "inbe-runtime-asset-download").start();
|
||||
}, "runtime-asset-download").start();
|
||||
}
|
||||
|
||||
public String syncHttpRequest(String method, String urlText, String body, String[] headers) {
|
||||
@@ -609,7 +613,7 @@ public class MainActivity extends NativeActivity {
|
||||
importName = hasExt ? displayName : displayName + "."
|
||||
+ (extension != null && !extension.isEmpty() ? extension : "bin");
|
||||
} else {
|
||||
importName = "inbe-import-" + pendingImportKind
|
||||
importName = "import-" + pendingImportKind
|
||||
+ (extension != null && !extension.isEmpty() ? "." + extension : "");
|
||||
}
|
||||
File importFile = new File(importDir, importName);
|
||||
@@ -683,8 +687,12 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
|
||||
public void acquireWakeLock() {
|
||||
Log.d(TAG, "Starting session foreground service");
|
||||
requestNotificationPermissionIfNeeded();
|
||||
if (!SessionForegroundService.canShowIndicator(this)) {
|
||||
Log.w(TAG, "Session indicator unavailable; background service not started");
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "Starting session foreground service");
|
||||
Intent intent = new Intent(this, SessionForegroundService.class);
|
||||
intent.setAction(SessionForegroundService.ACTION_START);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
@@ -696,9 +704,7 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
public void releaseWakeLock() {
|
||||
Log.d(TAG, "Stopping session foreground service");
|
||||
Intent intent = new Intent(this, SessionForegroundService.class);
|
||||
intent.setAction(SessionForegroundService.ACTION_STOP);
|
||||
startService(intent);
|
||||
stopService(new Intent(this, SessionForegroundService.class));
|
||||
}
|
||||
|
||||
public void updateSessionNotification(final String statusText) {
|
||||
@@ -742,6 +748,14 @@ public class MainActivity extends NativeActivity {
|
||||
});
|
||||
}
|
||||
|
||||
public int getAppIcon() {
|
||||
return LauncherIcons.selected(this);
|
||||
}
|
||||
|
||||
public boolean setAppIcon(int icon) {
|
||||
return LauncherIcons.select(this, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
configureSystemBars();
|
||||
@@ -899,7 +913,7 @@ public class MainActivity extends NativeActivity {
|
||||
int imeBottom = 0;
|
||||
int cLeft = 0, cTop = 0, cRight = 0, cBottom = 0;
|
||||
|
||||
// Inbe owns a single edge-to-edge native surface. Java reports the
|
||||
// This app owns a single edge-to-edge native surface. Java reports the
|
||||
// system bar insets; native applies them once against the real GL surface.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
Insets systemBars = insets.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars());
|
||||
@@ -976,34 +990,27 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
|
||||
private void syncLifecycleState(String reason) {
|
||||
int playInBackground = nativeGetPlayInBackground();
|
||||
boolean shouldRunInBackground = playInBackground != 0 && activityPaused;
|
||||
boolean indicatorVisible = SessionForegroundService.hasVisibleIndicator(this);
|
||||
backgroundExecutionActive = nativeSyncLifecycleState(activityPaused, indicatorVisible) != 0;
|
||||
|
||||
Log.d(TAG, reason + ": play_in_background=" + playInBackground
|
||||
+ " activityPaused=" + activityPaused
|
||||
Log.d(TAG, reason + ": activityPaused=" + activityPaused
|
||||
+ " indicatorVisible=" + indicatorVisible
|
||||
+ " windowFocused=" + windowFocused
|
||||
+ " backgroundActive=" + backgroundExecutionActive);
|
||||
|
||||
if (backgroundExecutionActive != shouldRunInBackground) {
|
||||
nativeSetBackgroundActive(shouldRunInBackground);
|
||||
backgroundExecutionActive = shouldRunInBackground;
|
||||
if (activityPaused && !backgroundExecutionActive) {
|
||||
stopService(new Intent(this, SessionForegroundService.class));
|
||||
}
|
||||
|
||||
if (playInBackground == 0) {
|
||||
if (activityPaused && !autoPausedForLifecycle) {
|
||||
autoPausedForLifecycle = nativePauseSession() != 0;
|
||||
} else if (!activityPaused && autoPausedForLifecycle) {
|
||||
nativeResumeSession();
|
||||
autoPausedForLifecycle = false;
|
||||
}
|
||||
} else if (autoPausedForLifecycle) {
|
||||
nativeResumeSession();
|
||||
autoPausedForLifecycle = false;
|
||||
mainHandler.removeCallbacks(checkSessionIndicator);
|
||||
if (backgroundExecutionActive) {
|
||||
mainHandler.postDelayed(checkSessionIndicator, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
NotificationPresence.setActivityVisible(false);
|
||||
super.onPause();
|
||||
activityPaused = true;
|
||||
syncLifecycleState("onPause");
|
||||
@@ -1012,6 +1019,7 @@ public class MainActivity extends NativeActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
NotificationPresence.setActivityVisible(true);
|
||||
activityPaused = false;
|
||||
configureSystemBars();
|
||||
nativeInvalidateGraphicsResources();
|
||||
@@ -1052,6 +1060,8 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
NotificationPresence.setActivityVisible(false);
|
||||
mainHandler.removeCallbacks(checkSessionIndicator);
|
||||
super.onDestroy();
|
||||
Log.d(TAG, "onDestroy called - releasing wake lock");
|
||||
allowScreenOff();
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
/** Process-local presence. A push delivery in a new process starts as absent. */
|
||||
final class NotificationPresence {
|
||||
private static volatile boolean activityVisible;
|
||||
|
||||
private NotificationPresence() {
|
||||
}
|
||||
|
||||
static void setActivityVisible(boolean visible) {
|
||||
activityVisible = visible;
|
||||
}
|
||||
|
||||
static boolean canPostPush(Context context) {
|
||||
return activityVisible || SessionForegroundService.hasVisibleIndicator(context);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ final class PaymentBridge {
|
||||
public void run() {
|
||||
try {
|
||||
String body = "{\"app_id\":\"inbe\",\"product_id\":\"" + jsonEscape(productId) + "\"}";
|
||||
String response = SyncNetwork.httpRequest("INBE_PAYMENTS", "POST",
|
||||
String response = SyncNetwork.httpRequest("PAYMENTS", "POST",
|
||||
DAOCHI_BASE_URL + "/api/v1/tokens/purchases/monero/invoices",
|
||||
body, authHeaders(authToken));
|
||||
final Invoice invoice = parseInvoice(response);
|
||||
@@ -47,7 +47,7 @@ final class PaymentBridge {
|
||||
showToast(activity, "Monero invoice failed");
|
||||
}
|
||||
}
|
||||
}, "inbe-monero-token-invoice").start();
|
||||
}, "monero-token-invoice").start();
|
||||
}
|
||||
|
||||
private static String gplayChannel() {
|
||||
|
||||
@@ -18,7 +18,7 @@ final class PushBridge {
|
||||
private PushBridge() {}
|
||||
|
||||
static boolean isRegistered(MainActivity activity) {
|
||||
if (BuildConfig.INBE_GPLAY) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("isRegistered", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof Boolean) {
|
||||
return (Boolean) value;
|
||||
@@ -28,7 +28,7 @@ final class PushBridge {
|
||||
}
|
||||
|
||||
static String[] getDistributors(MainActivity activity) {
|
||||
if (BuildConfig.INBE_GPLAY) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("getDistributors", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof String[]) {
|
||||
return (String[]) value;
|
||||
@@ -39,7 +39,7 @@ final class PushBridge {
|
||||
}
|
||||
|
||||
static String[] getDistributorLabels(MainActivity activity) {
|
||||
if (BuildConfig.INBE_GPLAY) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("getDistributorLabels", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof String[]) {
|
||||
return (String[]) value;
|
||||
@@ -58,7 +58,7 @@ final class PushBridge {
|
||||
}
|
||||
|
||||
static String[] getDistributorIcons(MainActivity activity) {
|
||||
if (BuildConfig.INBE_GPLAY) {
|
||||
if (BuildConfig.GPLAY) {
|
||||
Object value = callGplay("getDistributorIcons", new Class<?>[] {MainActivity.class}, activity);
|
||||
if (value instanceof String[]) {
|
||||
return (String[]) value;
|
||||
@@ -91,7 +91,7 @@ final class PushBridge {
|
||||
}
|
||||
|
||||
static void configureWith(final MainActivity activity, final String pkg) {
|
||||
if (BuildConfig.INBE_GPLAY && callGplay("configureWith",
|
||||
if (BuildConfig.GPLAY && callGplay("configureWith",
|
||||
new Class<?>[] {MainActivity.class, String.class}, activity, pkg) != null) {
|
||||
return;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ final class PushBridge {
|
||||
}
|
||||
|
||||
static void configure(final MainActivity activity) {
|
||||
if (BuildConfig.INBE_GPLAY && callGplay("configure",
|
||||
if (BuildConfig.GPLAY && callGplay("configure",
|
||||
new Class<?>[] {MainActivity.class}, activity) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ import org.unifiedpush.android.connector.data.PushEndpoint;
|
||||
import org.unifiedpush.android.connector.data.PushMessage;
|
||||
|
||||
public class PushServiceImpl extends PushService {
|
||||
private static final String TAG = "INBE_PUSH";
|
||||
private static final String PREFS = "inbe_push";
|
||||
private static final String TAG = "PUSH";
|
||||
private static final String PREFS = "push";
|
||||
private static final String PREF_ENDPOINT = "endpoint";
|
||||
private static final String PREF_AUTH = "auth";
|
||||
private static final String PREF_P256DH = "p256dh";
|
||||
@@ -25,6 +25,10 @@ public class PushServiceImpl extends PushService {
|
||||
|
||||
@Override
|
||||
public void onMessage(PushMessage message, String instance) {
|
||||
if (!NotificationPresence.canPostPush(this)) {
|
||||
Log.d(TAG, "Ignoring push without a visible app or session indicator");
|
||||
return;
|
||||
}
|
||||
String text = new String(message.getContent());
|
||||
String title = "Inner Breeze";
|
||||
String body = text;
|
||||
@@ -85,6 +89,9 @@ public class PushServiceImpl extends PushService {
|
||||
.setContentText(body)
|
||||
.setAutoCancel(true)
|
||||
.setContentIntent(pi);
|
||||
if (!NotificationPresence.canPostPush(this)) {
|
||||
return;
|
||||
}
|
||||
nm.notify(NOTIFICATION_ID, b.build());
|
||||
}
|
||||
}
|
||||
@@ -11,25 +11,26 @@ import android.content.pm.ServiceInfo;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.os.PowerManager;
|
||||
import android.service.notification.StatusBarNotification;
|
||||
import android.util.Log;
|
||||
|
||||
public class SessionForegroundService extends Service {
|
||||
public static final String ACTION_START = "xyz.waozi.inbe.action.START_SESSION_FOREGROUND";
|
||||
public static final String ACTION_STOP = "xyz.waozi.inbe.action.STOP_SESSION_FOREGROUND";
|
||||
private static final String TAG = "InbeSessionService";
|
||||
private static final String TAG = "SessionService";
|
||||
private static final String CHANNEL_ID = "active_session";
|
||||
private static final int NOTIFICATION_ID = 3001;
|
||||
private static String currentStatusText = "";
|
||||
private static SessionForegroundService activeService = null;
|
||||
private static volatile SessionForegroundService activeService = null;
|
||||
|
||||
private PowerManager.WakeLock wakeLock = null;
|
||||
private boolean foregroundActive = false;
|
||||
private volatile boolean foregroundActive = false;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
activeService = this;
|
||||
ensureNotificationChannel();
|
||||
ensureNotificationChannel(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,6 +61,11 @@ public class SessionForegroundService extends Service {
|
||||
}
|
||||
|
||||
private void startSession() {
|
||||
if (!canShowIndicator(this)) {
|
||||
Log.w(TAG, "Session indicator unavailable; refusing background service");
|
||||
stopSelf();
|
||||
return;
|
||||
}
|
||||
currentStatusText = "";
|
||||
Notification notification = buildNotification();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
@@ -102,6 +108,56 @@ public class SessionForegroundService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
static boolean hasVisibleIndicator(Context context) {
|
||||
SessionForegroundService service = activeService;
|
||||
if (service == null || !service.foregroundActive) {
|
||||
return false;
|
||||
}
|
||||
|
||||
NotificationManager manager = notificationManagerWithVisibleChannel(context);
|
||||
if (manager == null) {
|
||||
return false;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
try {
|
||||
for (StatusBarNotification notification : manager.getActiveNotifications()) {
|
||||
if (notification.getId() == NOTIFICATION_ID) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException error) {
|
||||
Log.w(TAG, "Could not confirm session indicator", error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// Older Android releases cannot confirm that the posted indicator is
|
||||
// visible, so they cannot authorize background session execution.
|
||||
return false;
|
||||
}
|
||||
|
||||
static boolean canShowIndicator(Context context) {
|
||||
ensureNotificationChannel(context);
|
||||
return notificationManagerWithVisibleChannel(context) != null;
|
||||
}
|
||||
|
||||
private static NotificationManager notificationManagerWithVisibleChannel(Context context) {
|
||||
NotificationManager manager =
|
||||
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (manager == null) {
|
||||
return null;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && !manager.areNotificationsEnabled()) {
|
||||
return null;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = manager.getNotificationChannel(CHANNEL_ID);
|
||||
if (channel == null || channel.getImportance() == NotificationManager.IMPORTANCE_NONE) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
private void stopForegroundCompat() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
stopForeground(STOP_FOREGROUND_REMOVE);
|
||||
@@ -179,20 +235,20 @@ public class SessionForegroundService extends Service {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
private void ensureNotificationChannel() {
|
||||
private static void ensureNotificationChannel(Context context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
return;
|
||||
}
|
||||
|
||||
NotificationManager manager =
|
||||
(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (manager == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
NotificationChannel channel = new NotificationChannel(
|
||||
CHANNEL_ID,
|
||||
getApplicationInfo().loadLabel(getPackageManager()),
|
||||
context.getApplicationInfo().loadLabel(context.getPackageManager()),
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
);
|
||||
manager.createNotificationChannel(channel);
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
public class ShareHelper {
|
||||
private static final String TAG = "InbeShare";
|
||||
private static final String TAG = "Share";
|
||||
private static final String FILE_PROVIDER_AUTHORITY = BuildConfig.APPLICATION_ID + ".fileprovider";
|
||||
|
||||
public static void shareFile(Activity activity, byte[] data, String filename, String mimeType, String chooserTitle) {
|
||||
|
||||
|
After Width: | Height: | Size: 63 KiB |
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#87CEEB" />
|
||||
<solid android:color="#E6F1FA" />
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_air_foreground" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 7.0 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_air_foreground" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,20 @@
|
||||
Changed
|
||||
---
|
||||
- Added cat, sea turtle, and crescent moon profile pictures in place of three similar tree choices.
|
||||
- Updated Kryon controls, navigation, styling, and text editing throughout the app.
|
||||
- Material is now the default style. Choose Material, TK, or Lightfield in Appearance, with color themes available within each style.
|
||||
- Removed the Vanilla style and the startup style-selection screen.
|
||||
Fixed
|
||||
---
|
||||
- Restored profile pictures in Settings and Profile. The picture picker now displays its full grid and uses standard scrolling and selection.
|
||||
- Settings row labels and icons now share the same vertical alignment.
|
||||
- Guide and modal panels remain visible with Material styling instead of showing text over the underlying screen.
|
||||
- Settings navigation opens the Settings overview, with improved bottom navigation and click handling.
|
||||
- Improved text selection, keyboard focus, and composition handling when editing text.
|
||||
- Connecting to sync runs in the background so network requests do not block the interface.
|
||||
- Sync retries temporary connection failures automatically without losing queued changes.
|
||||
- Profile shows actionable sync status instead of internal repair messages.
|
||||
- Restoring an account key now starts synchronization and retrieves existing friendships. Friend lists remain available when leaderboard loading fails.
|
||||
- Sync no longer asks you to upgrade just because the server supports a newer sync protocol.
|
||||
- Sync connection and account errors now display readable, translated messages.
|
||||
- Desktop update links now use the current Inner Breeze release location.
|
||||
@@ -0,0 +1,44 @@
|
||||
Changed
|
||||
---
|
||||
- Added cat, sea turtle, and crescent moon profile pictures in place of three similar tree choices.
|
||||
- Added the new peaceful meditation logo and made it the default app icon, with app icon selection available from Appearance.
|
||||
- Updated Kryon controls, navigation, styling, and text editing throughout the app.
|
||||
- Material is now the default style. Choose Material, TK, or Lightfield in Appearance, with color themes available within each style.
|
||||
- Navigation customization has cleaner spacing and smoother reorder handles.
|
||||
- Desktop development runs keep their settings and sync account separate from the installed app.
|
||||
- Completed list items now move behind a Show Completed toggle instead of staying mixed into the active list.
|
||||
- Practice controls sit closer to the bottom navigation while preserving the image fade.
|
||||
- Session results now show a clearer round chart and a compact summary for single-round practices.
|
||||
- About now uses proper Discord, Telegram, and GitHub icons, and the support dialog has cleaner donation address previews.
|
||||
- Removed the Vanilla style and the startup style-selection screen.
|
||||
Fixed
|
||||
---
|
||||
- Existing Android installations now move their private data to the consistent Inner Breeze location while preserving habits, sessions, settings, and sync details.
|
||||
- Desktop, web, and Windows installations now use the same Inner Breeze data location, moving existing data there on first launch instead of leaving it behind.
|
||||
- Backups exported by earlier releases import again, including archives named after the previous app identity.
|
||||
- Restored profile pictures in Settings and Profile. The picture picker now displays its full grid and uses standard scrolling and selection.
|
||||
- Settings row labels and icons now share the same vertical alignment.
|
||||
- Settings now uses one consistent modern screen instead of switching between duplicate layouts.
|
||||
- Sidebar switching is stable at responsive breakpoints instead of jittering between navigation modes.
|
||||
- Guide and modal panels remain visible with Material styling instead of showing text over the underlying screen.
|
||||
- Guide screens and practice previews are placed correctly across phone and desktop sizes.
|
||||
- Guide cards now have a clear heading, and tapping outside a focused control dismisses its focus.
|
||||
- Scrollable Settings pages leave comfortable space above the bottom navigation at larger text scales.
|
||||
- An unnamed local profile now has a neutral label in the navigation card.
|
||||
- Settings navigation opens the Settings overview, with improved bottom navigation and click handling.
|
||||
- Older navigation layouts now place Lists before Habits, Practice, and Settings.
|
||||
- Lightfield buttons and glow settings now update with the selected style, and glow is scoped to styles that support it.
|
||||
- Material sliders keep labels and values readable instead of floating too high or drawing white text on pale slider fills.
|
||||
- Android masked app icons use a gentle blue background instead of black.
|
||||
- Web loading screens and browser icons now show the current meditation logo.
|
||||
- Emptying a list no longer restores the initial sample data.
|
||||
- Improved text selection, keyboard focus, and composition handling when editing text.
|
||||
- Connecting to sync runs in the background so network requests do not block the interface.
|
||||
- Sync retries temporary connection failures automatically without losing queued changes.
|
||||
- Automatic friend-list retries stop when account details need attention, and retry delays recover safely from invalid saved counts.
|
||||
- Profile shows actionable sync status instead of internal repair messages.
|
||||
- Restoring an account key now starts synchronization and retrieves the account alias and existing friendships. Friend lists remain available when leaderboard loading fails.
|
||||
- Restoring a profile now reliably recovers habit history and session data alongside the alias and friends, including on Android.
|
||||
- Sync no longer asks you to upgrade just because the server supports a newer sync protocol.
|
||||
- Sync connection and account errors now display readable, translated messages.
|
||||
- Desktop update links now use the current Inner Breeze release location.
|
||||
@@ -0,0 +1,3 @@
|
||||
Fixed
|
||||
---
|
||||
- Existing installations reset navigation once to show Lists, Habits, Practice, and Settings in that order. Changes made afterward are kept.
|
||||
@@ -0,0 +1,3 @@
|
||||
Fixed
|
||||
---
|
||||
- Habit editor section headings and reminder details now align with their rows.
|
||||
@@ -0,0 +1,4 @@
|
||||
Fixed
|
||||
---
|
||||
- Web and browser builds can connect to compatible custom sync servers when you choose one.
|
||||
- Browser extensions no longer request access to the Inner Breeze website.
|
||||
@@ -0,0 +1,12 @@
|
||||
Changed
|
||||
---
|
||||
- The account screen shows the connected alias, automatic sync progress, and counts for habits, history days, sessions, friends, lists, and list items.
|
||||
- Habits show a distinct mark for days completed through a practice session.
|
||||
- Importing an account key offers Merge or Replace before changing local data, with clear details about each choice.
|
||||
- Profile offers Connect Account, and the sync screen offers Import .key when no account is connected.
|
||||
Fixed
|
||||
---
|
||||
- Restoring an existing account now retrieves its username, friends, habits, history, and sessions from the complete account data.
|
||||
- Lists and their items now sync across devices, including completed items and changes made on another device.
|
||||
- Sync status shows the current upload or restore step instead of staying on a generic syncing message.
|
||||
- Connecting an account starts automatic sync without leaving a stale status message behind.
|
||||
@@ -0,0 +1,3 @@
|
||||
Changed
|
||||
---
|
||||
- Session details now show the practice name, time, and round count above clearly separated round rows with larger hold times and easier-to-tap edit and delete actions.
|
||||
@@ -0,0 +1,3 @@
|
||||
Fixed
|
||||
---
|
||||
- App color themes now keep their backgrounds, cards, and text visible on devices without system palette colors. Theme catalogs are included in every build, and an unavailable palette falls back to readable built-in colors.
|
||||
@@ -1,3 +1,3 @@
|
||||
Changed
|
||||
---
|
||||
- Move shared Ksync sync protocol code into Flint and simplify Inbe sync client wiring.
|
||||
- Improve the shared sync protocol and simplify Inbe sync client wiring.
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 97 KiB |
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1789785513,
|
||||
"narHash": "sha256-B44WL6h0XoLjJ41bUPJk0X5SDinLCII//6EcBLXKiJ0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20b1ddd1aa5ace70c9468305030aa4f9ef79671b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -18,13 +18,13 @@
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
versionLine =
|
||||
pkgs.lib.lists.findFirst
|
||||
(line: builtins.match ''#define INBE_VERSION_STRING "([^"]+)".*'' line != null)
|
||||
(line: builtins.match ''#define APP_VERSION_STRING "([^"]+)".*'' line != null)
|
||||
null
|
||||
(pkgs.lib.strings.splitString "\n" (builtins.readFile ./src/core/version.h));
|
||||
versionMatch = builtins.match ''#define INBE_VERSION_STRING "([^"]+)".*'' versionLine;
|
||||
versionMatch = builtins.match ''#define APP_VERSION_STRING "([^"]+)".*'' versionLine;
|
||||
in {
|
||||
default = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "inbe";
|
||||
pname = "breathing";
|
||||
version = builtins.elemAt versionMatch 0;
|
||||
|
||||
src = self;
|
||||
@@ -56,23 +56,23 @@
|
||||
runHook preInstall
|
||||
|
||||
install -d "$out/bin"
|
||||
install -m755 "$(find build/bin/linux -maxdepth 1 -type f -name 'inbe-linux-*' | head -n 1)" "$out/bin/inbe"
|
||||
install -m755 "$(find build/bin/linux -maxdepth 1 -type f -name 'breathing-linux-*' | head -n 1)" "$out/bin/breathing"
|
||||
|
||||
install -D -m644 packaging/linux/appimage/inbe.desktop \
|
||||
"$out/share/applications/inbe.desktop"
|
||||
install -D -m644 packaging/linux/appimage/inbe.png \
|
||||
"$out/share/icons/hicolor/512x512/apps/inbe.png"
|
||||
install -D -m644 packaging/linux/appimage/inbe.appdata.xml \
|
||||
"$out/share/metainfo/xyz.waozi.inbe.metainfo.xml"
|
||||
install -D -m644 packaging/linux/appimage/breathing.desktop \
|
||||
"$out/share/applications/breathing.desktop"
|
||||
install -D -m644 packaging/linux/appimage/breathing.png \
|
||||
"$out/share/icons/hicolor/512x512/apps/breathing.png"
|
||||
install -D -m644 packaging/linux/appimage/breathing.appdata.xml \
|
||||
"$out/share/metainfo/xyz.waozi.breathing.metainfo.xml"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Syncable breathing, meditation, and habit practice app";
|
||||
homepage = "https://inbe.waozi.xyz/";
|
||||
homepage = "https://breathing.waozi.xyz/";
|
||||
license = licenses.bsd3;
|
||||
mainProgram = "inbe";
|
||||
mainProgram = "breathing";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
@@ -81,7 +81,7 @@
|
||||
apps = forAllSystems (system: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/inbe";
|
||||
program = "${self.packages.${system}.default}/bin/breathing";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||