Compare commits

...
73 Commits
Author SHA1 Message Date
waozi a9248d0645 improve sun salutation 2026-06-27 13:18:16 -03:00
waozi 0d6f853775 Remove Inbe all builds page 2026-06-27 11:48:14 -03:00
waozi 841018451d Move Inbe site into project 2026-06-27 11:09:05 -03:00
waozi 15d3176a0b improve notifications and settings 2026-06-27 10:13:49 -03:00
waozi 67e55bc931 Update Flint vendor after Netlify restore 2026-06-27 00:18:26 -03:00
waozi 8d3265732e Update Flint vendor for Netlify deploy 2026-06-27 00:12:25 -03:00
waozi 15eab9f75c Use raylib from Flint vendor 2026-06-27 00:09:25 -03:00
waozi ca6d0c1a51 update version 2026-06-26 18:57:00 -03:00
waozi edac1da85c improve sync and add wip sun salutation 2026-06-26 18:56:46 -03:00
waozi 48ee4615d1 background service working on modern android 2026-06-26 11:34:38 -03:00
waozi 631a3d4666 update github action for itch 2026-06-25 20:30:01 -03:00
waozi 0a325d2dc7 fix background play for practice meditation 2026-06-25 20:14:25 -03:00
waozi 32e76391ef fix test music 2026-06-25 00:38:24 -03:00
waozi 57af29796e update itch upload 2026-06-25 00:29:52 -03:00
waozi d87a9fd7e7 fix modal issues and ci 2026-06-25 00:14:35 -03:00
waozi 6396281b9c Update Flint modal input handling 2026-06-24 23:58:37 -03:00
waozi cac8afab9e Make disabled transitions instant 2026-06-24 23:40:12 -03:00
waozi 39c11965ca Skip empty sync review modal 2026-06-24 23:38:25 -03:00
waozi 2f45dc30a1 Show sync review as diff 2026-06-24 23:33:06 -03:00
waozi 0b85606f98 Simplify sync review habit details 2026-06-24 23:23:45 -03:00
waozi 2b3183eb38 Fix sync review build warnings 2026-06-24 23:17:30 -03:00
waozi 810436f3bb Group sync review sessions by practice 2026-06-24 23:15:41 -03:00
waozi c51911383f Improve sync review details 2026-06-24 23:12:22 -03:00
waozi a0ea5d987c Fix hidden startup modal input block 2026-06-24 21:35:09 -03:00
waozi b7b470ca1c Remove guide pre-blocking from app UI 2026-06-24 21:32:04 -03:00
waozi 63acc477e5 Prevent stale modal capture blocking input 2026-06-24 21:29:50 -03:00
waozi aebc742384 Update Flint guide include fix 2026-06-24 21:27:30 -03:00
waozi 37856cef75 Prevent inactive guide input blocking 2026-06-24 21:26:19 -03:00
waozi 240ae3345f Harden AppImage release smoke test 2026-06-24 21:20:16 -03:00
waozi 8b314ef21f improvements with modal and syn settings 2026-06-24 21:16:25 -03:00
waozi 604f1adc0b Use Flint readonly box for public ID 2026-06-24 21:08:58 -03:00
waozi 05d55bf845 Update Flint submodule to master 2026-06-24 21:02:11 -03:00
waozi 393f62e5f0 Improve WHM breath controls 2026-06-24 21:00:44 -03:00
waozi a12cdac763 Clarify alias change flow 2026-06-24 20:55:21 -03:00
waozi 5da72c3710 Fix alias registration flow 2026-06-24 20:21:26 -03:00
waozi 73b6e5a2dc Test chopped locale font coverage 2026-06-24 20:09:16 -03:00
waozi 9930131571 Add account aliases and Flint font tooling 2026-06-24 20:05:04 -03:00
waozi 8f8114b8d7 Add sync state review flow 2026-06-24 19:24:46 -03:00
waozi cfd92e587a update sun salutation 2026-06-24 19:09:56 -03:00
waozi e6aa9b1d84 Use Flint modal capture throughout Inbe 2026-06-24 19:09:06 -03:00
waozi e625044648 Update vendor/flint submodule to modal capture release 2026-06-24 18:59:51 -03:00
waozi f28daf7668 fix modal bug 2026-06-23 17:58:29 -03:00
waozi cddac728b1 fix bug 2026-06-23 14:25:11 -03:00
waozi cc92f494e3 add missing locales 2026-06-23 13:33:26 -03:00
waozi fd3d10521a udpate appimage build 2026-06-23 13:14:27 -03:00
waozi 351c1334c6 improve settings tehem 2026-06-23 11:52:07 -03:00
waozi 414a6ea198 move flint back to submodule 2026-06-22 21:46:54 -03:00
waozi aebb706eac update screenshot script 2026-06-22 14:07:51 -03:00
waozi 3ff584355c rm snap from gh actions 2026-06-22 12:52:54 -03:00
waozi 4d7538f46e update workflow 2026-06-22 12:43:14 -03:00
waozi b5d1fa617a update locales 2026-06-22 12:29:59 -03:00
waozi c700c5a616 fix logo 2026-06-22 11:51:04 -03:00
waozi 285a93fa58 fix image scaling 2026-06-22 11:39:33 -03:00
waozi 92777d5425 fix dropdown mode 2026-06-22 01:46:10 -03:00
waozi 05170a2846 hardn sql 2026-06-22 04:37:31 +00:00
waozi c34ad06050 fix last write wins 2026-06-22 04:35:18 +00:00
waozi 3cef21ab54 update wpa icons 2026-06-22 04:25:19 +00:00
waozi 1b0a50e248 simplify account model 2026-06-22 01:10:05 -03:00
waozi a6616d3cb2 bug fixes 2026-06-22 00:40:29 -03:00
waozi 0cf6f436e1 fi xstorage 2026-06-22 00:27:14 -03:00
waozi 06358b5bfb update icons 2026-06-22 00:13:14 -03:00
waozi 201dced542 update logos 2026-06-21 23:43:39 -03:00
waozi c580bc28ed tab bar 2026-06-21 20:37:40 -03:00
waozi 7b0ecd1e13 cleaner first user guide 2026-06-21 17:17:07 -03:00
waozi 53fdc50827 update version 2026-06-21 12:52:33 -03:00
waozi 0fb6e98993 fix orientation issues 2026-06-21 12:52:12 -03:00
waozi 2a95e1652f fix rotation bug 2026-06-21 12:43:00 -03:00
waozi 9a04b9893b improve avd script 2026-06-21 12:36:51 -03:00
waozi 4b093aef18 more cleanup and guided habits tetx 2026-06-21 12:00:35 -03:00
waozi 9f0a136689 clean up code 2026-06-21 11:41:16 -03:00
waozi 78507b44eb add skip feature in guide 2026-06-21 11:22:33 -03:00
waozi 7b7fb07717 fix padding issues 2026-06-21 01:59:07 -03:00
waozi 0f34ddc97d bug fixes 2026-06-21 01:46:41 -03:00
339 changed files with 13174 additions and 15220 deletions

No files matched your search

+10
View File
@@ -3,9 +3,19 @@ ca-certificates
curl
libcurl4-openssl-dev
libdrm-dev
libdrm2
libegl1-mesa-dev
libegl1
libgbm-dev
libgbm1
libgles2-mesa-dev
libgl1
libgl1-mesa-dri
libglvnd0
libx11-6
libx11-dev
libxext6
libsdl2-2.0-0
libsdl2-dev
patchelf
pkg-config
+122
View File
@@ -0,0 +1,122 @@
name: Netlify
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: netlify-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Site
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Packages
run: |
set -euo pipefail
mapfile -t packages < .github/apt/web-packages.txt
sudo apt-get update
sudo apt-get install -y "${packages[@]}" tcl
- name: Set Up Emscripten
run: |
set -euo pipefail
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$HOME/emsdk"
"$HOME/emsdk/emsdk" install latest
"$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 "$HOME/emsdk/upstream/emscripten" >> "$GITHUB_PATH"
- name: Build Site
run: |
set -euo pipefail
make site
test -f build/site/index.html
test -f build/site/build/web/index.html
test -f build/site/build/web/index.js
test -f build/site/build/web/index.wasm
- name: Upload Site Artifact
uses: actions/upload-artifact@v4
with:
name: inbe-site
path: build/site
if-no-files-found: error
deploy-preview:
name: Deploy Preview
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'pull_request'
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Install Netlify CLI
run: npm install --global netlify-cli
- name: Deploy Preview To Netlify
run: |
set -euo pipefail
auth_token="$(printf '%s' "$NETLIFY_AUTH_TOKEN" | tr -d '\r\n')"
site_id="$(printf '%s' "$NETLIFY_SITE_ID" | tr -d '\r\n')"
netlify deploy \
--dir build/site \
--alias "pr-${{ github.event.pull_request.number }}" \
--message "Preview ${{ github.event.pull_request.number }}" \
--auth "$auth_token" \
--site "$site_id"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
deploy-production:
name: Deploy Production
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
steps:
- name: Download Site Artifact
uses: actions/download-artifact@v4
with:
name: inbe-site
path: build/site
- name: Install Netlify CLI
run: npm install --global netlify-cli
- name: Deploy Production To Netlify
run: |
set -euo pipefail
auth_token="$(printf '%s' "$NETLIFY_AUTH_TOKEN" | tr -d '\r\n')"
site_id="$(printf '%s' "$NETLIFY_SITE_ID" | tr -d '\r\n')"
netlify deploy \
--dir build/site \
--prod \
--message "Production ${{ github.sha }}" \
--auth "$auth_token" \
--site "$site_id"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
+107 -4
View File
@@ -169,7 +169,7 @@ jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: test
env:
APT_CACHE_DIR: /tmp/apt-cache
@@ -229,6 +229,37 @@ jobs:
find build/dist/linux -maxdepth 1 -type f -name '*.AppImage' -exec cp {} build/release/linux/ \;
test -n "$(find build/release/linux -type f -print -quit)"
- name: Smoke Test Linux AppImage
env:
APPIMAGE_EXTRACT_AND_RUN: "1"
DISPLAY: ":99"
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y xvfb x11-utils
appimage="$(find build/release/linux -maxdepth 1 -type f -name '*.AppImage' | head -n 1)"
chmod +x "$appimage"
Xvfb "$DISPLAY" -screen 0 800x600x24 >/tmp/inbe-xvfb.log 2>&1 &
xvfb_pid=$!
trap 'kill "$app_pid" "$xvfb_pid" >/dev/null 2>&1 || true' EXIT
sleep 2
"$appimage" >/tmp/inbe-appimage.log 2>&1 &
app_pid=$!
for _ in $(seq 1 30); do
if xwininfo -tree -root | grep -q 'Inner Breeze'; then
exit 0
fi
if ! kill -0 "$app_pid" >/dev/null 2>&1; then
echo "AppImage exited before opening a window"
cat /tmp/inbe-appimage.log || true
exit 1
fi
sleep 1
done
echo "AppImage did not open an X11 window within 30 seconds"
cat /tmp/inbe-appimage.log || true
exit 1
- name: Upload Linux Artifact
uses: actions/upload-artifact@v4
with:
@@ -264,7 +295,7 @@ jobs:
path: |
vendor-builds/windows
vendor-builds/sqlite
key: windows-vendor-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile', 'vendor/raylib/src/**', 'vendor/curl/**', 'vendor/sqlite/**') }}
key: windows-vendor-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile', 'vendor/flint/vendor/raylib/src/**', 'vendor/curl/**', 'vendor/sqlite/**') }}
restore-keys: |
windows-vendor-${{ runner.os }}-${{ runner.arch }}-
@@ -340,7 +371,7 @@ jobs:
path: |
droid/app/.cxx
droid/app/build/intermediates/cxx
key: android-native-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('droid/app/src/main/cpp/CMakeLists.txt', 'droid/app/build.gradle', 'src/**/*.c', 'src/**/*.h', 'flint/src/**/*.c', 'flint/include/**/*.h', 'vendor/raylib/src/**') }}
key: android-native-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('droid/app/src/main/cpp/CMakeLists.txt', 'droid/app/build.gradle', 'src/**/*.c', 'src/**/*.h', 'flint/src/**/*.c', 'flint/include/**/*.h', 'vendor/flint/vendor/raylib/src/**') }}
restore-keys: |
android-native-${{ runner.os }}-${{ runner.arch }}-
@@ -403,6 +434,10 @@ jobs:
- build-linux
- build-windows
- build-android
outputs:
tag_pushed: ${{ steps.tag_version.outputs.tag_pushed }}
tag_name: ${{ steps.tag_version.outputs.tag_name }}
version: ${{ steps.tag_version.outputs.version }}
steps:
- name: Checkout Repository
@@ -432,6 +467,8 @@ jobs:
exit 1
fi
TAG="v$VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tag_name=$TAG" >> "$GITHUB_OUTPUT"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG exists, skipping release"
echo "tag_pushed=false" >> "$GITHUB_OUTPUT"
@@ -441,7 +478,6 @@ jobs:
git tag -a "$TAG" -m "Release $VERSION"
git push origin "$TAG"
echo "tag_pushed=true" >> "$GITHUB_OUTPUT"
echo "tag_name=$TAG" >> "$GITHUB_OUTPUT"
fi
- name: Create GitHub Release
@@ -454,3 +490,70 @@ jobs:
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-itch:
name: Publish itch.io
runs-on: ubuntu-latest
needs:
- build-web
- release
if: needs.release.outputs.tag_pushed == 'true'
env:
BUTLER_API_KEY: ${{ secrets.ITCH_API_KEY }}
steps:
- name: Check itch.io Secret
run: |
set -euo pipefail
if [ -z "${BUTLER_API_KEY:-}" ]; then
echo "ITCH_API_KEY secret is required to publish itch.io"
exit 1
fi
- name: Download Release Artifacts
uses: actions/download-artifact@v4
with:
pattern: release-*
path: build/release
merge-multiple: true
- name: Install Butler
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y unzip
curl -fsSL \
https://broth.itch.zone/butler/linux-amd64/LATEST/archive/default \
-o "$RUNNER_TEMP/butler.zip"
mkdir -p "$RUNNER_TEMP/butler"
unzip -q "$RUNNER_TEMP/butler.zip" -d "$RUNNER_TEMP/butler"
chmod +x "$RUNNER_TEMP/butler/butler"
echo "$RUNNER_TEMP/butler" >> "$GITHUB_PATH"
- name: Check Butler
run: |
set -euo pipefail
butler version
- name: Publish Release Builds to itch.io
run: |
set -euo pipefail
VERSION="${{ needs.release.outputs.version }}"
web_zip="build/release/inbe-web.zip"
android_apk="build/release/inbe-$VERSION.apk"
windows_zip="build/release/inbe-windows.zip"
linux_appimage="build/release/inbe-linux-x86_64.AppImage"
test -f "$web_zip"
test -f "$android_apk"
test -f "$windows_zip"
test -f "$linux_appimage"
mkdir -p build/itch/inbe-web
unzip -q "$web_zip" -d build/itch/inbe-web
butler push build/itch/inbe-web waozi/inbe:html5 --userversion "$VERSION"
butler push "$android_apk" waozi/inbe:android --userversion "$VERSION"
butler push "$windows_zip" waozi/inbe:windows --userversion "$VERSION"
butler push "$linux_appimage" waozi/inbe:linux --userversion "$VERSION"
+1
View File
@@ -10,6 +10,7 @@
.codex/
.agents/
.cache/
.ccache
*.wasm
build/
tmp/
+3 -6
View File
@@ -1,12 +1,6 @@
[submodule "vendor/raylib"]
path = vendor/raylib
url = https://github.com/raysan5/raylib.git
[submodule "vendor/rini"]
path = vendor/rini
url = https://github.com/raysan5/rini.git
[submodule "vendor/otfchop"]
path = vendor/otfchop
url = https://github.com/waozixyz/otfchop
[submodule "vendor/sqlite"]
path = vendor/sqlite
url = https://github.com/sqlite/sqlite
@@ -16,3 +10,6 @@
[submodule "vendor/curl"]
path = vendor/curl
url = https://github.com/curl/curl.git
[submodule "vendor/flint"]
path = vendor/flint
url = [email protected]:waozixyz/flint.git
+88
View File
@@ -1,4 +1,92 @@
# Changelog
## [1.6.2] - 2026-06-27
## Changed
- Improve sun salutation
## [1.6.1] - 2026-06-27
## Changed
- Improved notification in session
- Standardized settings screen1
## [1.6.0] - 2026-06-26
### Added
- Sun Salutation practice with Yoga habit sync support.
### Changed
- Improve sync reliability and review handling.
## [1.5.9] - 2026-06-26
### Fixed
- Android session notification and wakelock for screen-locked playback
## [1.5.8] - 2026-06-25
### Fixed
- Background play for meditation practice
## [1.5.7] - 2026-06-25
- Fix test music
## [1.5.6] - 2026-06-24
### Fixed
- Modal button issue
## [1.5.5] - 2026-06-24
### Fixed
- modal capture bug
- fix sync diff
## [1.5.4] - 2026-06-24
### Changed
- Use Flint-managed modal handling so modal dialogs block background input consistently.
- Add optional sync account aliases, with compact public ID display and full ID reveal modal.
- Make sync state tracking more robust with snapshot hash checks and review flow for unresolved differences.
- Use Flint's built-in font chopping pipeline and verify multilingual locale glyph coverage.
## [1.5.3] - 2026-06-23
### Fixed
- modal issues
## [1.5.2] - 2026-06-23
### Changed
- let you disable screen transitions
- added theme modal
## [1.5.1] - 2026-06-22
### Fixed
- icon scaling
- fix inset bug
### Added
- toggle background music
## [1.5.0] - 2026-06-22
### Changed
- New logo
- improve tabbar ui
### Fixed
- sync issues
## [1.4.11] - 2026-06-21
### Added
- tab bar mode for habits and exercises
### Changed
- fix ut click file
## [1.4.10] - 2026-06-21
### Added
- Added guide to habits page
### Changed
- fix orientation issues
## [1.4.9] - 2026-06-21
### Fixed
- Fix Practice startup, manual navigation, configuration scrolling, and sync backfill issues.
- Add skip feature to on screen guide
## [1.4.8] - 2026-06-21
### Changed
- Fixed start screen
- Fixed schema on first sync
## [1.4.7] - 2026-06-21
### Changed
- Rework Practice into Manual, start, and configuration tabs with a new localized first-run guide.
+157 -90
View File
@@ -8,6 +8,7 @@ ANDROID_ACTIVITY := xyz.waozi.inbe.MainActivity
CC ?= gcc
CMAKE ?= $(shell if [ -x /usr/bin/cmake ]; then echo /usr/bin/cmake; else command -v cmake; fi)
GRADLE ?= gradle
ADB ?= adb
ARCH := $(shell uname -m)
ANDROID_KEYSTORE ?= $(HOME)/.android/flint-release.keystore
ANDROID_KEY_ALIAS ?= inbe-key
@@ -35,11 +36,6 @@ CLICK_FRAMEWORK ?= ubuntu-sdk-20.04
CLICK_POLICY_VERSION ?= 20.04
CLICK_INCLUDE_METAINFO ?= 0
CLICK_DIR := packaging/click
CLICK_MANIFEST_TEMPLATE := $(CLICK_DIR)/manifest.json.in
CLICK_CONTROL_TEMPLATE := $(CLICK_DIR)/control.in
CLICK_APPARMOR_TEMPLATE := $(CLICK_DIR)/inbe.apparmor.in
CLICK_DESKTOP_TEMPLATE := $(CLICK_DIR)/inbe.desktop.in
CLICK_METAINFO_TEMPLATE := $(CLICK_DIR)/inbe.metainfo.xml.in
CLICK_RUNNER := $(CLICK_DIR)/run-inbe.sh
CLICK_BUILD_DIR := $(BUILD_OBJ_DIR)/click/$(CLICK_ARCH)
CLICK_ROOT := $(CLICK_BUILD_DIR)/$(CLICK_PACKAGE)
@@ -57,13 +53,16 @@ WINDOWS_OBJ_DIR := $(BUILD_OBJ_DIR)/windows
WINDOWS_BIN_DIR := $(BUILD_BIN_DIR)/windows
WINDOWS_DIST_DIR := $(BUILD_DIST_DIR)/windows
ANDROID_BUILD_DIR := $(BUILD_DIR)/android
ANDROID_FAST_ABI ?= $(shell $(ADB) shell getprop ro.product.cpu.abi 2>/dev/null | tr -d '\r' | head -n 1)
ANDROID_DEBUG_ABIS ?= $(if $(strip $(ANDROID_FAST_ABI)),$(ANDROID_FAST_ABI),arm64-v8a)
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 sed -n 's/^#define INBE_VERSION_STRING "\([^"]*\)".*/\1/p' $(VERSION_FILE) 2>/dev/null)
RAYLIB_DIR := vendor/raylib/src
FLINT_DIR := vendor/flint
RAYLIB_DIR = $(FLINT_DIR)/vendor/raylib/src
RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/linux/$(ARCH)/raylib
RAYLIB_A := $(RAYLIB_BUILD_DIR)/libraylib.a
WIN64_ARCH := x86_64
@@ -96,9 +95,9 @@ WEB_RAYLIB_BUILD_DIR := $(VENDOR_BUILD_DIR)/web/raylib
WEB_RAYLIB_A := $(WEB_RAYLIB_BUILD_DIR)/libraylib.web.a
RAYLIB_SOURCES := $(shell find $(RAYLIB_DIR) -type f \( -name '*.c' -o -name '*.h' \))
FLINT_DIR := flint
FLINT_ICON_FILES := $(wildcard $(FLINT_DIR)/icons/*.png)
FLINT_ICON_ASSETS_C := $(FLINT_DIR)/src/flint_icon_assets.c
FLINT_ICON_STAMP := $(BUILD_OBJ_DIR)/flint-icons.sha256
FLINT_SRCS := $(filter-out $(FLINT_ICON_ASSETS_C),$(wildcard $(FLINT_DIR)/src/*.c) $(wildcard $(FLINT_DIR)/src/ui/*.c)) $(FLINT_ICON_ASSETS_C)
FLINT_WEB_SRCS := $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
FLINT_WINDOWS_SRCS := $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
@@ -138,6 +137,10 @@ STORAGE_IMPORT_TEST := $(TEST_BIN_DIR)/storage_import_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
SYNC_REVIEW_TEST := $(TEST_BIN_DIR)/sync_review_test
FONT_LOCALE_TEST := $(TEST_BIN_DIR)/font_locale_test
GUIDE_OVERLAY_TEST := $(TEST_BIN_DIR)/guide_overlay_test
TESTS := $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST) $(SYNC_REVIEW_TEST) $(FONT_LOCALE_TEST) $(GUIDE_OVERLAY_TEST)
FLINT_RUNTIME_ASSET_CFLAGS := $(FLINT_CURL_CFLAGS)
FLINT_RUNTIME_ASSET_LDLIBS := $(FLINT_CURL_LDLIBS)
@@ -156,16 +159,18 @@ APP_SRCS := \
src/practices/meditation/meditation_session.c \
src/practices/meditation/meditation_manual.c \
src/practices/meditation/meditation_config.c \
src/practices/sun_salutation/sun_salutation_practice.c \
src/practices/sun_salutation/sun_salutation_session.c \
src/screens/habits_screen.c \
src/screens/statistics_screen.c \
src/screens/habits/edit.c \
src/screens/habits/session.c \
src/practices/meditation/meditation_music.c \
src/core/theme.c \
src/storage/data.c \
src/storage/db.c \
src/storage/import.c \
src/storage/storage.c \
src/storage/sync_review.c \
src/storage/sync_account.c \
src/storage/sync_client.c \
src/third_party/miniz.c \
@@ -175,23 +180,24 @@ APP_SRCS := \
src/screens/manual_screen.c \
src/screens/settings/settings_screen.c \
src/screens/settings/settings_device.c \
src/screens/settings/settings_session.c \
src/screens/settings/settings_theme.c \
src/screens/settings/settings_data.c \
src/screens/settings/settings_sync_account.c
LOCALE_FILES := $(wildcard locales/*.txt)
IMAGE_FILES := assets/practices/whm/1.jpg assets/practices/whm/2.jpg assets/practices/meditation/1.jpg
IMAGE_FILES := assets/practices/whm/1.jpg assets/practices/whm/2.jpg assets/practices/meditation/1.jpg $(wildcard assets/practices/sunsalutation/pos_*.png)
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
FONT_OUTPUTS := assets/fonts/locales.png assets/fonts/locales.dat
OTFCHOP_DIR ?= vendor/otfchop
OTFCHOP_DIR ?= $(FLINT_DIR)/tools/otfchop
FONT_TOOL := $(OTFCHOP_DIR)/otfchop
FONT_SOURCE := $(OTFCHOP_DIR)/unifont-17.0.04.otf
EMBEDDED_ASSETS_C := $(BUILD_OBJ_DIR)/$(APP_NAME)_embedded_assets.c
EMBEDDED_ASSET_FILES := $(LOCALE_FILES) $(IMAGE_FILES) $(SOUND_FILES) $(FONT_OUTPUTS)
SRC := $(APP_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/storage -Isrc/platform/android -Isrc/third_party
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=0,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=1
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/android -Isrc/third_party
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
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 -DFLINT_EMBEDDED_ONLY=1 $(FLINT_RUNTIME_ASSET_CFLAGS)
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 -DFLINT_EMBEDDED_ONLY=1
WEB_CFLAGS := $(filter-out -std=c99,$(CFLAGS)) -std=gnu99
@@ -236,12 +242,12 @@ CHROME_WEB_STORE_ICONS := \
$(CHROME_WEB_STORE_ICON_DIR)/icon-32.png \
$(CHROME_WEB_STORE_ICON_DIR)/icon-48.png \
$(CHROME_WEB_STORE_ICON_DIR)/icon-128.png
WEB_ASSET_FILES := $(shell find web-assets -type f 2>/dev/null)
WEB_ASSET_FILES := $(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
.PHONY: all native run run-fresh screenshot test dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows clean clean-linux clean-vendor-builds android-check-keystore android-copy-assets android-local-properties android-debug android-release android-bundle android-install android-install-release android-clean package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web chrome-web-store
.PHONY: all native run run-fresh screenshot test dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows clean clean-linux clean-vendor-builds android-avd android-check-keystore android-copy-assets android-local-properties android-debug android-debug-fast android-release android-bundle android-install android-install-fast android-install-release android-clean package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web site chrome-web-store
.NOTPARALLEL: dist windows windows64 windows32 android-release android-bundle click
all: native
@@ -296,22 +302,44 @@ run: $(TARGET)
run-fresh: $(TARGET)
@root=$$(mktemp -d /tmp/inbe-fresh.XXXXXX); \
echo "INBE_DATA_ROOT=$$root"; \
INBE_DATA_ROOT="$$root" ./$(TARGET)
INBE_FORCE_DARK_MODE=1 INBE_DATA_ROOT="$$root" ./$(TARGET)
screenshot: $(TARGET)
./scripts/generate-screenshots.sh "$(TARGET)"
test: $(STORAGE_IMPORT_TEST) $(LOCALE_KEYS_TEST) $(SYNC_URL_TEST) $(SYNC_ACCOUNT_TEST)
$(STORAGE_IMPORT_TEST)
$(LOCALE_KEYS_TEST)
$(SYNC_URL_TEST)
$(SYNC_ACCOUNT_TEST)
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c src/storage/storage.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/screens/habits_screen.c src/screens/habits/edit.c 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)
.SILENT: test $(TESTS)
test: $(TESTS)
echo "== Inbe tests =="; \
status=0; \
for test_bin in $(TESTS); do \
name=$$(basename "$$test_bin"); \
log=$$(mktemp /tmp/inbe-test.XXXXXX); \
printf "%-28s" "$$name"; \
if "$$test_bin" >"$$log" 2>&1; then \
echo "PASS"; \
rm -f "$$log"; \
else \
echo "FAIL"; \
cat "$$log"; \
rm -f "$$log"; \
status=1; \
break; \
fi; \
done; \
if [ "$$status" -eq 0 ]; then \
echo "== PASS: all Inbe tests =="; \
else \
echo "== FAIL: Inbe tests =="; \
fi; \
exit "$$status"
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/storage/storage.h src/storage/db.h src/storage/import.h src/screens/habits_screen.c src/screens/habits/edit.c 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 \
-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 -Ivendor/raylib/src $(FLINT_INCLUDE) $(SQLITE_INCLUDE) \
-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 -I$(RAYLIB_DIR) $(FLINT_INCLUDE) $(SQLITE_INCLUDE) \
-o $@ \
tests/storage_import_test.c src/storage/storage.c src/storage/db.c src/storage/import.c src/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/third_party/miniz.c $(SQLITE_SRC) \
tests/storage_import_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/screens/habits_screen.c src/screens/habits/edit.c src/screens/habits/session.c src/third_party/miniz.c $(SQLITE_SRC) \
-Wl,--gc-sections -lm -lpthread -ldl
$(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_DIR)
@@ -321,17 +349,35 @@ $(LOCALE_KEYS_TEST): tests/locale_keys_test.c $(LOCALE_FILES) | $(TEST_BIN_DIR)
$(SYNC_URL_TEST): tests/sync_url_test.c src/storage/sync_client.c src/storage/sync_client.h $(CURL_PROTOCOL_CHECK) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -Wno-unused-function -std=c99 -D_DEFAULT_SOURCE -DINBE_SYNC_CLIENT_TESTS -ffunction-sections -fdata-sections \
-Isrc/storage -Isrc -Ivendor/raylib/src $(FLINT_CURL_CFLAGS) -o $@ \
-Isrc/storage -Isrc -Isrc/core $(FLINT_INCLUDE) -I$(RAYLIB_DIR) $(FLINT_CURL_CFLAGS) -o $@ \
tests/sync_url_test.c src/storage/sync_client.c \
-Wl,--gc-sections $(FLINT_CURL_LDLIBS)
$(SYNC_ACCOUNT_TEST): tests/sync_account_test.c src/storage/sync_account.c src/storage/sync_account.h src/storage/storage.c src/storage/db.c src/storage/import.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) | $(TEST_BIN_DIR)
$(SYNC_ACCOUNT_TEST): tests/sync_account_test.c src/storage/sync_account.c src/storage/sync_account.h src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.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) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -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 -Ivendor/raylib/src $(SQLITE_INCLUDE) \
-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 $(FLINT_INCLUDE) -I$(RAYLIB_DIR) $(SQLITE_INCLUDE) \
-o $@ \
tests/sync_account_test.c src/storage/sync_account.c src/storage/storage.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
tests/sync_account_test.c src/storage/sync_account.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
-Wl,--gc-sections -lm -lpthread -ldl
$(SYNC_REVIEW_TEST): tests/sync_review_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.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) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE -D_GNU_SOURCE -DMINIZ_NO_ZLIB_COMPATIBLE_NAMES -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 $(FLINT_INCLUDE) -I$(RAYLIB_DIR) $(SQLITE_INCLUDE) \
-o $@ \
tests/sync_review_test.c src/storage/storage.c src/storage/sync_review.c src/storage/db.c src/storage/import.c src/third_party/miniz.c $(SQLITE_SRC) \
-Wl,--gc-sections -lm -lpthread -ldl
$(FONT_LOCALE_TEST): tests/font_locale_test.c $(FONT_OUTPUTS) | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
-o $@ \
tests/font_locale_test.c
$(GUIDE_OVERLAY_TEST): tests/guide_overlay_test.c vendor/flint/src/ui/guide.c vendor/flint/include/flint_ui.h | $(TEST_BIN_DIR)
$(CC) -Wall -Wextra -std=c99 -D_DEFAULT_SOURCE \
$(FLINT_INCLUDE) -I$(RAYLIB_DIR) \
-o $@ \
tests/guide_overlay_test.c
$(BUILD_OBJ_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_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):
mkdir -p $@
@@ -341,8 +387,10 @@ $(WINDOWS_BIN_DIR)/$(WIN64_ARCH) $(WINDOWS_BIN_DIR)/$(WIN32_ARCH):
assets/fonts:
mkdir -p $@
$(FONT_TOOL): vendor/otfchop/otfchop.c vendor/otfchop/stb_truetype.h vendor/otfchop/stb_image_write.h
$(MAKE) -C vendor/otfchop otfchop
FORCE:
$(FONT_TOOL): $(OTFCHOP_DIR)/otfchop.c $(OTFCHOP_DIR)/stb_truetype.h $(OTFCHOP_DIR)/stb_image_write.h
$(MAKE) -C $(OTFCHOP_DIR) otfchop
assets/fonts/locales.png assets/fonts/locales.dat: $(LOCALE_FILES) $(FONT_TOOL) | assets/fonts
$(FONT_TOOL) $(FONT_SOURCE) $(LOCALE_FILES) assets/fonts/locales
@@ -350,8 +398,13 @@ assets/fonts/locales.png assets/fonts/locales.dat: $(LOCALE_FILES) $(FONT_TOOL)
$(EMBEDDED_ASSETS_C): $(EMBEDDED_ASSET_FILES) $(FLINT_DIR)/scripts/embed-assets.sh | $(BUILD_OBJ_DIR)
sh $(FLINT_DIR)/scripts/embed-assets.sh $@ $(EMBEDDED_ASSET_FILES)
$(FLINT_ICON_ASSETS_C): $(FLINT_ICON_FILES) $(FLINT_DIR)/scripts/embed-icons.sh
sh $(FLINT_DIR)/scripts/embed-icons.sh $(FLINT_DIR)/icons $@
$(FLINT_ICON_STAMP): FORCE $(FLINT_ICON_FILES) | $(BUILD_OBJ_DIR)
@tmp="$@.tmp"; \
find $(FLINT_DIR)/icons -maxdepth 1 -type f -name '*.png' | 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
$(FLINT_ICON_ASSETS_C): $(FLINT_ICON_STAMP) $(FLINT_DIR)/scripts/embed-icons.sh
cd $(FLINT_DIR) && sh scripts/embed-icons.sh icons src/flint_icon_assets.c
$(RAYLIB_A): $(RAYLIB_SOURCES)
rm -rf $(VENDOR_BUILD_DIR)/linux/$(ARCH)/raylib-src
@@ -571,7 +624,7 @@ $(WIN32_CURL_A): $(CURL_DIR)/CMakeLists.txt
-DBUILD_TESTING=OFF
$(CMAKE) --build $(WIN32_CURL_BUILD_DIR) --target install
$(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(RAYLIB_A) $(LIBOQS_A) $(CURL_PROTOCOL_CHECK) | $(LINUX_BIN_DIR)
$(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(RAYLIB_A) $(LIBOQS_A) $(CURL_PROTOCOL_CHECK) | $(LINUX_BIN_DIR)
$(CC) $(CFLAGS) \
$(APP_INCLUDE) \
$(FLINT_INCLUDE) \
@@ -582,7 +635,7 @@ $(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H)
-DINBE_HAS_LIBOQS=1 \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
-DSUPPORT_FILEFORMAT_MP3=1 \
-DSUPPORT_FILEFORMAT_MP3=0 \
-o $@ \
$(SRC) \
$(FLINT_SRCS) \
@@ -594,7 +647,7 @@ $(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H)
-lm -lpthread -ldl -lrt \
$(LDFLAGS)
$(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(CLICK_RAYLIB_A) | $(CLICK_BIN_DIR)
$(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(CLICK_RAYLIB_A) | $(CLICK_BIN_DIR)
$(AARCH64_CC) $(CLICK_CFLAGS) \
$(APP_INCLUDE) \
$(FLINT_INCLUDE) \
@@ -604,7 +657,7 @@ $(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_
-DPLATFORM_DESKTOP \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
-DSUPPORT_FILEFORMAT_MP3=1 \
-DSUPPORT_FILEFORMAT_MP3=0 \
-o $@ \
$(SRC) \
$(FLINT_SRCS) \
@@ -619,15 +672,13 @@ $(CLICK_BIN): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_
fi
$(CLICK_TARGET): $(CLICK_BIN_INPUT) $(CLICK_MANIFEST_TEMPLATE) $(CLICK_CONTROL_TEMPLATE) $(CLICK_APPARMOR_TEMPLATE) $(CLICK_DESKTOP_TEMPLATE) $(CLICK_METAINFO_TEMPLATE) $(CLICK_RUNNER) $(LINUX_APPIMAGE_ICON) | $(CLICK_BUILD_DIR) $(CLICK_DIST_DIR)
@command -v ar >/dev/null || { \
echo "ar is missing. Re-enter the flake shell with: nix develop"; \
@command -v zip >/dev/null || { \
echo "zip is missing. Re-enter the flake shell with: nix develop"; \
exit 1; \
}
rm -rf $(CLICK_ROOT) $(CLICK_CONTROL_DIR)
rm -rf $(CLICK_ROOT)
rm -f $(CLICK_DIST_DIR)/$(CLICK_PACKAGE)_*_$(CLICK_ARCH).click
rm -f $(CLICK_BUILD_DIR)/debian-binary $(CLICK_BUILD_DIR)/control.tar.gz $(CLICK_BUILD_DIR)/data.tar.gz
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
mkdir -p $(CLICK_CONTROL_DIR)
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)
@@ -641,49 +692,18 @@ $(CLICK_TARGET): $(CLICK_BIN_INPUT) $(CLICK_MANIFEST_TEMPLATE) $(CLICK_CONTROL_T
if [ -f "$$elf" ]; then patchelf --set-rpath '$$ORIGIN' "$$elf" >/dev/null 2>&1 || true; fi; \
done; \
fi
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
-e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
-e 's#__CLICK_ARCH__#$(CLICK_ARCH)#g' \
-e 's#__CLICK_FRAMEWORK__#$(CLICK_FRAMEWORK)#g' \
-e 's#__CLICK_MAINTAINER__#$(CLICK_MAINTAINER)#g' \
$(CLICK_MANIFEST_TEMPLATE) > $(CLICK_ROOT)/manifest.json
cp $(CLICK_ROOT)/manifest.json $(CLICK_CONTROL_DIR)/manifest
installed_size=$$(du -sk $(CLICK_ROOT) | awk '{ print $$1 }'); \
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
-e 's#__CLICK_ARCH__#$(CLICK_ARCH)#g' \
-e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
-e 's#__CLICK_MAINTAINER__#$(CLICK_MAINTAINER)#g' \
-e "s#__INSTALLED_SIZE__#$$installed_size#g" \
$(CLICK_CONTROL_TEMPLATE) > $(CLICK_CONTROL_DIR)/control
printf '%s\n' '#! /bin/sh' \
'echo "Click packages may not be installed directly using dpkg."' \
'echo "Use '\''click install'\'' instead."' \
'exit 1' > $(CLICK_CONTROL_DIR)/preinst
sed -e 's#__CLICK_POLICY_VERSION__#$(CLICK_POLICY_VERSION)#g' \
$(CLICK_APPARMOR_TEMPLATE) > $(CLICK_ROOT)/inbe.apparmor
sed -e 's#__CLICK_TITLE__#$(CLICK_TITLE)#g' \
$(CLICK_DESKTOP_TEMPLATE) > $(CLICK_ROOT)/inbe.desktop
@if [ "$(CLICK_INCLUDE_METAINFO)" = "1" ]; then \
sed -e 's#__CLICK_PACKAGE__#$(CLICK_PACKAGE)#g' \
-e 's#__APP_VERSION__#$(APP_VERSION)#g' \
-e 's#__RELEASE_DATE__#$(shell date -u +%Y-%m-%d)#g' \
$(CLICK_METAINFO_TEMPLATE) > $(CLICK_ROOT)/usr/share/metainfo/$(CLICK_PACKAGE).metainfo.xml; \
fi
cp $(CLICK_DIR)/manifest.json $(CLICK_ROOT)/manifest.json
cp $(CLICK_DIR)/inbe.apparmor $(CLICK_ROOT)/inbe.apparmor
cp $(CLICK_DIR)/inbe.desktop $(CLICK_ROOT)/inbe.desktop
@if [ "$(CLICK_INCLUDE_METAINFO)" = "1" ]; then \
mkdir -p $(CLICK_ROOT)/usr/share/metainfo; \
cp $(CLICK_DIR)/inbe.metainfo.xml $(CLICK_ROOT)/usr/share/metainfo/$(CLICK_PACKAGE).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
cd $(CLICK_ROOT) && find . -type f -printf '%P\n' | LC_ALL=C sort | xargs md5sum > $(abspath $(CLICK_CONTROL_DIR)/md5sums)
printf '2.0\n' > $(CLICK_BUILD_DIR)/debian-binary
tar -C $(CLICK_CONTROL_DIR) --sort=name --owner=0 --group=0 --numeric-owner -czf $(abspath $(CLICK_BUILD_DIR)/control.tar.gz) control manifest md5sums preinst
tar -C $(CLICK_ROOT) --sort=name --owner=0 --group=0 --numeric-owner -czf $(abspath $(CLICK_BUILD_DIR)/data.tar.gz) inbe.apparmor inbe.desktop inbe.png manifest.json run-inbe.sh usr
cd $(CLICK_BUILD_DIR) && ar rcs $(abspath $@) debian-binary control.tar.gz data.tar.gz
test -f $@
ar t $@ | grep -qx debian-binary
ar t $@ | grep -qx control.tar.gz
ar t $@ | grep -qx data.tar.gz
cd $(CLICK_ROOT) && zip -qr $(abspath $@) .
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) $(WIN64_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) $(WIN64_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
$(WIN64_CC) $(WINDOWS_CFLAGS) \
$(APP_INCLUDE) \
$(FLINT_INCLUDE) \
@@ -703,7 +723,7 @@ $(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AM
$(WINDOWS_LDFLAGS)
$(WIN64_STRIP) $@
$(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN32_RAYLIB_A) $(WIN32_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)
$(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN32_RAYLIB_A) $(WIN32_CURL_A) | $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)
$(WIN32_CC) $(WINDOWS_CFLAGS) \
$(APP_INCLUDE) \
$(FLINT_INCLUDE) \
@@ -739,7 +759,7 @@ $(APPIMAGE_TARGET): $(TARGET) $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPIMAGE_DESKTOP)
rm -rf $(LINUX_APPDIR)
rm -rf $(LINUX_DIST_DIR)/*.AppDir
rm -f $(LINUX_DIST_DIR)/*.AppImage
mkdir -p $(LINUX_APPDIR)/usr/bin $(LINUX_APPDIR)/usr/lib $(LINUX_APPDIR)/usr/share/applications $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps $(LINUX_APPDIR)/usr/share/metainfo
mkdir -p $(LINUX_APPDIR)/usr/bin $(LINUX_APPDIR)/usr/lib $(LINUX_APPDIR)/usr/share/applications $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps $(LINUX_APPDIR)/usr/share/metainfo $(LINUX_APPDIR)/usr/share/appdata
cp $(TARGET) $(LINUX_APPDIR)/usr/bin/$(APP_NAME)
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 $(LINUX_APPDIR)/usr/bin/$(APP_NAME)
cp $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPDIR)/AppRun
@@ -762,17 +782,36 @@ $(APPIMAGE_TARGET): $(TARGET) $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPIMAGE_DESKTOP)
cp $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPDIR)/$(APP_NAME).desktop
cp $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPDIR)/usr/share/applications/$(APP_NAME).desktop
cp $(LINUX_APPIMAGE_APPDATA) $(LINUX_APPDIR)/usr/share/metainfo/$(ANDROID_APP_ID).metainfo.xml
cp $(LINUX_APPIMAGE_APPDATA) $(LINUX_APPDIR)/usr/share/appdata/$(ANDROID_APP_ID).appdata.xml
cp $(LINUX_APPIMAGE_ICON) $(LINUX_APPDIR)/$(APP_NAME).png
cp $(LINUX_APPIMAGE_ICON) $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps/$(APP_NAME).png
@# Manually copy critical X11/OpenGL libraries that linuxdeploy might miss
@for lib in libX11.so.6 libXext.so.6 libdrm.so.2 libgbm.so.1 libEGL.so.1 libGLESv2.so.2 libGLdispatch.so.0 libglapi.so.0; do \
found=$$(find /usr/lib /lib -name "$$lib" 2>/dev/null | head -n 1); \
if [ -n "$$found" ]; then \
echo "Copying $$lib from $$found"; \
cp "$$found" $(LINUX_APPDIR)/usr/lib/ 2>/dev/null || true; \
fi; \
done
@# Detect if running on NixOS (by checking if loader is in /nix/store)
@loader=$$(LC_ALL=C readelf -l $(TARGET) | sed -n 's#.*Requesting program interpreter: \(.*\)]#\1#p'); \
if printf '%s\n' "$$loader" | grep -q '^/nix/store/.*glibc.*/'; then \
LIBRARY_FLAGS=""; \
echo "Building on NixOS - linuxdeploy will auto-detect libraries from /nix/store"; \
else \
LIBRARY_FLAGS=""; \
echo "Building on FHS system - linuxdeploy will auto-detect libraries"; \
fi; \
cd $(LINUX_APPIMAGE_BUILD_DIR) && env -u SOURCE_DATE_EPOCH ARCH=$(ARCH) LDAI_OUTPUT=$(abspath $(APPIMAGE_TARGET)) $(LINUXDEPLOY) \
--appdir $(APP_NAME).AppDir \
--executable $(abspath $(LINUX_APPDIR)/usr/bin/$(APP_NAME)) \
--desktop-file $(abspath $(LINUX_APPIMAGE_DESKTOP)) \
--icon-file $(abspath $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps/$(APP_NAME).png) \
$$LIBRARY_FLAGS \
--output appimage
test -f $@
$(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WEB_RAYLIB_A) $(WEB_LIBOQS_A) src/web_shell.html $(WEB_BOOT_JS) manifest.json $(WEB_ASSET_FILES) $(MEDITATION_AUDIO_ZIP) | $(WEB_DIST_DIR)
$(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(FLINT_ICON_STAMP) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WEB_RAYLIB_A) $(WEB_LIBOQS_A) src/web_shell.html $(WEB_BOOT_JS) manifest.json $(WEB_ASSET_FILES) $(MEDITATION_AUDIO_ZIP) | $(WEB_DIST_DIR)
rm -f $(WEB_DIST_DIR)/index.data
$(WEB_CC) $(WEB_CFLAGS) \
$(APP_INCLUDE) \
@@ -784,7 +823,7 @@ $(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMA
-DPLATFORM_WEB \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
-DSUPPORT_FILEFORMAT_MP3=1 \
-DSUPPORT_FILEFORMAT_MP3=0 \
-o $@ \
$(SRC) \
$(FLINT_WEB_SRCS) \
@@ -804,7 +843,9 @@ $(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMA
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_DIST_DIR)/index.html
cp $(WEB_BOOT_JS) $(WEB_DIST_DIR)/index_boot.js
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_DIST_DIR)/index_boot.js
rm -rf $(WEB_DIST_DIR)/web-assets $(WEB_DIST_DIR)/site-icons
cp -R web-assets $(WEB_DIST_DIR)/
cp -R site-icons $(WEB_DIST_DIR)/
cp manifest.json $(WEB_DIST_DIR)/webmanifest.json
android-copy-assets:
@@ -848,6 +889,10 @@ android-debug: android-copy-assets android-local-properties
unset ANDROID_HOME; $(GRADLE) -p droid assembleDebug
$(MAKE) android-copy-debug-apks
android-debug-fast: android-copy-assets android-local-properties
unset ANDROID_HOME; $(GRADLE) -p droid assembleDebug -Pinbe.abis="$(ANDROID_DEBUG_ABIS)"
$(MAKE) android-copy-debug-apks
android-release:
$(MAKE) android-check-keystore PASSWORD="$(PASSWORD)"
$(MAKE) android-copy-assets
@@ -924,18 +969,37 @@ android-copy-bundle: | $(ANDROID_BUILD_DIR)
fi
android-install: android-debug
@ABI=$$(adb shell getprop ro.product.cpu.abi | tr -d '\r'); \
@ABI=$$($(ADB) shell getprop ro.product.cpu.abi | tr -d '\r'); \
APK=droid/app/build/outputs/apk/debug/app-$${ABI}-debug.apk; \
if [ ! -f "$$APK" ]; then APK=droid/app/build/outputs/apk/debug/app-debug.apk; fi; \
adb install -r "$$APK"; \
adb shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
$(ADB) install -r "$$APK"; \
$(ADB) shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
android-install-fast: android-debug-fast
@ABI=$$($(ADB) shell getprop ro.product.cpu.abi | tr -d '\r'); \
APK=droid/app/build/outputs/apk/debug/app-$${ABI}-debug.apk; \
if [ ! -f "$$APK" ]; then APK=droid/app/build/outputs/apk/debug/app-debug.apk; fi; \
$(ADB) install -r "$$APK"; \
$(ADB) shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
android-install-release: android-release
@ABI=$$(adb shell getprop ro.product.cpu.abi | tr -d '\r'); \
@ABI=$$($(ADB) shell getprop ro.product.cpu.abi | tr -d '\r'); \
APK=droid/app/build/outputs/apk/release/app-$${ABI}-release.apk; \
if [ ! -f "$$APK" ]; then APK=droid/app/build/outputs/apk/release/app-release.apk; fi; \
adb install -r "$$APK"; \
adb shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
$(ADB) install -r "$$APK"; \
$(ADB) shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
android-avd:
bash scripts/emulator.sh
@adb_cmd="$$HOME/.android-sdk-writable/platform-tools/adb"; \
if [ ! -x "$$adb_cmd" ]; then adb_cmd="$${ANDROID_SDK_ROOT:-$${ANDROID_HOME}}/platform-tools/adb"; fi; \
if [ ! -x "$$adb_cmd" ]; then adb_cmd=adb; fi; \
abi=$$("$$adb_cmd" -e shell getprop ro.product.cpu.abi | tr -d '\r'); \
if [ -z "$$abi" ]; then \
echo "No emulator ABI detected. Is the AVD running?"; \
exit 1; \
fi; \
$(MAKE) android-install-fast ADB="$$adb_cmd -e" ANDROID_DEBUG_ABIS="$$abi"
android-clean:
$(GRADLE) -p droid clean
@@ -970,6 +1034,9 @@ web:
rm -f $(WEB_DIST_ZIP)
cd $(WEB_DIST_DIR) && zip -9 -r $(abspath $(WEB_DIST_ZIP)) .
site: web
tclsh site/build.tcl
chrome-web-store: $(CHROME_WEB_STORE_ZIP)
$(CHROME_WEB_STORE_ZIP): $(WEB_TARGET) $(CHROME_WEB_STORE_MANIFEST) $(CHROME_WEB_STORE_WORKER) $(CHROME_WEB_STORE_ICONS) | $(CHROME_WEB_STORE_DIR)
+24 -1
View File
@@ -44,6 +44,17 @@ make android-debug
make android-release PASSWORD=your-keystore-password
```
## Release Automation
GitHub Actions builds release artifacts for web, Linux, Windows, Android, and
the Chrome extension. When a new version tag is created by the release workflow,
the web, Android, Windows, and Linux builds are also published to itch.io.
Required repository secrets:
- `ITCH_API_KEY` - itch.io Butler API key for publishing `waozi/inbe:html5`,
`waozi/inbe:android`, `waozi/inbe:windows`, and `waozi/inbe:linux`
### Android Emulator Testing
For automated testing with camera notch (cutout) support:
@@ -77,12 +88,24 @@ The AVD is configured with:
## Project Structure
- `src/` - Inbe application code
- `flint/` - first-party UI/runtime support code used directly by Inbe
- `vendor/` - external third-party dependencies
- `vendor/flint/` - **git submodule** for first-party UI/runtime support code used directly by Inbe
- `wasm4/` - Standalone WASM-4 version
- `assets/` - Images and sounds
- `droid/` - Android build configuration
## Flint submodule workflow
`vendor/flint` is a source submodule (not a one-off copied sync). To update Inbe after a Flint change:
1. Push changes in the Flint repo.
2. In Inbe, update the submodule pointer:
- `git submodule update --init --recursive vendor/flint`
- `git -C vendor/flint pull`
3. Commit Inbe with the updated `vendor/flint` submodule reference.
When updating other projects that vendor Flint as a submodule, this keeps UI behavior and API docs aligned.
## License
MIT - see [LICENSE](LICENSE)
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

-2061
View File
File diff suppressed because it is too large. Load diff

Before

Width:  |  Height:  |  Size: 131 KiB

+8 -4
View File
@@ -35,8 +35,8 @@ android {
defaultConfig {
minSdk 21
targetSdk 35
versionCode 42
versionName "1.4.7"
versionCode 58
versionName "1.6.2"
}
@@ -61,8 +61,12 @@ android {
abi {
enable true
reset()
include 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
universalApk true
def selectedAbis = (project.findProperty('inbe.abis') ?: 'arm64-v8a,armeabi-v7a,x86,x86_64')
.split(',')
.collect { it.trim() }
.findAll { it.length() > 0 }
include(*selectedAbis)
universalApk !project.hasProperty('inbe.abis')
}
}
+8 -1
View File
@@ -3,6 +3,8 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<application
android:hasCode="true"
android:icon="@mipmap/ic_launcher"
@@ -10,7 +12,7 @@
android:roundIcon="@mipmap/ic_launcher_round">
<activity
android:name="xyz.waozi.inbe.MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize|uiMode"
android:configChanges="keyboardHidden|uiMode"
android:exported="true"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
android:windowLayoutInDisplayCutoutMode="never">
@@ -32,5 +34,10 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<service
android:name="xyz.waozi.inbe.SessionForegroundService"
android:exported="false"
android:foregroundServiceType="mediaPlayback" />
</application>
</manifest>
+23 -3
View File
@@ -1,10 +1,18 @@
cmake_minimum_required(VERSION 3.22)
project(Inbe C)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM AND EXISTS "${CCACHE_PROGRAM}")
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
else()
set(CMAKE_C_COMPILER_LAUNCHER "")
set(CMAKE_C_COMPILER_LAUNCHER "" CACHE STRING "" FORCE)
endif()
set(REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../../..")
set(SRC_DIR "${REPO_ROOT}/src")
set(RAYLIB_DIR "${REPO_ROOT}/vendor/raylib/src")
set(FLINT_DIR "${REPO_ROOT}/flint")
set(FLINT_DIR "${REPO_ROOT}/vendor/flint")
set(RAYLIB_DIR "${FLINT_DIR}/vendor/raylib/src")
set(SQLITE_DIR "${REPO_ROOT}/vendor/sqlite")
set(SQLITE_BUILD_DIR "${CMAKE_BINARY_DIR}/sqlite")
set(SQLITE_AMALGAMATION_C "${SQLITE_BUILD_DIR}/sqlite3.c")
@@ -23,6 +31,14 @@ set(INBE_EMBEDDED_INPUTS
assets/practices/whm/1.jpg
assets/practices/whm/2.jpg
assets/practices/meditation/1.jpg
assets/practices/sunsalutation/pos_0001.png
assets/practices/sunsalutation/pos_0002.png
assets/practices/sunsalutation/pos_0003.png
assets/practices/sunsalutation/pos_0004.png
assets/practices/sunsalutation/pos_0005.png
assets/practices/sunsalutation/pos_0006.png
assets/practices/sunsalutation/pos_0007.png
assets/practices/sunsalutation/pos_0008.png
assets/fonts/locales.png
assets/fonts/locales.dat
${INBE_SOUND_ASSETS}
@@ -102,16 +118,18 @@ add_library(main SHARED
"${SRC_DIR}/practices/meditation/meditation_session.c"
"${SRC_DIR}/practices/meditation/meditation_manual.c"
"${SRC_DIR}/practices/meditation/meditation_config.c"
"${SRC_DIR}/practices/sun_salutation/sun_salutation_practice.c"
"${SRC_DIR}/practices/sun_salutation/sun_salutation_session.c"
"${SRC_DIR}/screens/habits_screen.c"
"${SRC_DIR}/screens/statistics_screen.c"
"${SRC_DIR}/screens/habits/edit.c"
"${SRC_DIR}/screens/habits/session.c"
"${SRC_DIR}/practices/meditation/meditation_music.c"
"${SRC_DIR}/core/theme.c"
"${SRC_DIR}/storage/data.c"
"${SRC_DIR}/storage/db.c"
"${SRC_DIR}/storage/import.c"
"${SRC_DIR}/storage/storage.c"
"${SRC_DIR}/storage/sync_review.c"
"${SRC_DIR}/storage/sync_account.c"
"${SRC_DIR}/storage/sync_client.c"
"${SRC_DIR}/third_party/miniz.c"
@@ -125,6 +143,7 @@ add_library(main SHARED
"${SRC_DIR}/screens/manual_screen.c"
"${SRC_DIR}/screens/settings/settings_screen.c"
"${SRC_DIR}/screens/settings/settings_device.c"
"${SRC_DIR}/screens/settings/settings_session.c"
"${SRC_DIR}/screens/settings/settings_theme.c"
"${SRC_DIR}/screens/settings/settings_data.c"
"${SRC_DIR}/screens/settings/settings_sync_account.c"
@@ -145,6 +164,7 @@ target_include_directories(main PRIVATE
"${SRC_DIR}/practices"
"${SRC_DIR}/practices/whm"
"${SRC_DIR}/practices/meditation"
"${SRC_DIR}/practices/sun_salutation"
"${SRC_DIR}/storage"
"${SRC_DIR}/platform/android"
"${SRC_DIR}/third_party"
@@ -14,7 +14,6 @@ import android.graphics.Insets;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.util.Base64;
import android.util.Log;
import android.view.DisplayCutout;
@@ -53,11 +52,11 @@ public class MainActivity extends NativeActivity {
// [status_bar, nav_bar, cutout_left, cutout_top, cutout_right, cutout_bottom]
private final int[] cachedInsets = new int[6];
private boolean insetsInitialized = false;
private PowerManager.WakeLock wakeLock = null;
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 native void nativeSetInsets(int status, int nav,
@@ -77,15 +76,19 @@ public class MainActivity extends NativeActivity {
private native void nativeTextInputCommit(int codepoint);
private native void nativeTextInputBackspace();
private native void nativeTextInputEnter();
private native void nativeInvalidateGraphicsResources();
private void requestDownloadNotificationPermissionIfNeeded() {
private void requestNotificationPermissionIfNeeded() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED &&
!notificationPermissionRequestInFlight) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED &&
!notificationPermissionRequestInFlight) {
notificationPermissionRequestInFlight = true;
requestPermissions(new String[] { Manifest.permission.POST_NOTIFICATIONS },
REQUEST_POST_NOTIFICATIONS);
}
@@ -94,8 +97,19 @@ public class MainActivity extends NativeActivity {
}
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == REQUEST_POST_NOTIFICATIONS) {
notificationPermissionRequestInFlight = false;
boolean granted = grantResults.length > 0 &&
grantResults[0] == PackageManager.PERMISSION_GRANTED;
Log.d(TAG, "Notification permission result: granted=" + granted);
}
}
private NotificationManager getDownloadNotificationManager() {
requestDownloadNotificationPermissionIfNeeded();
requestNotificationPermissionIfNeeded();
NotificationManager manager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
if (manager != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel(
@@ -591,31 +605,27 @@ public class MainActivity extends NativeActivity {
}
public void acquireWakeLock() {
Log.d(TAG, "acquireWakeLock called - wakeLock=" + wakeLock);
if (wakeLock == null) {
Log.d(TAG, "Creating new PARTIAL_WAKE_LOCK");
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
wakeLock = pm.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK,
"inbe:meditation_session"
);
wakeLock.acquire();
Log.d(TAG, "Wake lock acquired successfully - held=" + wakeLock.isHeld());
Log.d(TAG, "Starting session foreground service");
requestNotificationPermissionIfNeeded();
Intent intent = new Intent(this, SessionForegroundService.class);
intent.setAction(SessionForegroundService.ACTION_START);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForegroundService(intent);
} else {
Log.d(TAG, "Wake lock already exists - held=" + wakeLock.isHeld());
startService(intent);
}
}
public void releaseWakeLock() {
Log.d(TAG, "releaseWakeLock called - wakeLock=" + wakeLock);
if (wakeLock != null && wakeLock.isHeld()) {
Log.d(TAG, "Releasing wake lock - was held=" + wakeLock.isHeld());
wakeLock.release();
Log.d(TAG, "Wake lock released successfully");
wakeLock = null;
} else {
Log.d(TAG, "Wake lock not held - wakeLock=" + wakeLock + " isHeld=" + (wakeLock != null ? wakeLock.isHeld() : "null"));
}
Log.d(TAG, "Stopping session foreground service");
Intent intent = new Intent(this, SessionForegroundService.class);
intent.setAction(SessionForegroundService.ACTION_STOP);
stopService(intent);
}
public void updateSessionNotification(final String statusText) {
if (statusText == null || statusText.isEmpty()) return;
SessionForegroundService.updateStatus(statusText);
}
public void keepScreenOn() {
@@ -653,11 +663,13 @@ public class MainActivity extends NativeActivity {
// Notify native code that activity is ready for wake lock
nativeWakeLockReady();
requestNotificationPermissionIfNeeded();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
nativeInvalidateGraphicsResources();
pushDeviceConfiguration();
requestInsetRefresh();
}
@@ -856,6 +868,8 @@ public class MainActivity extends NativeActivity {
protected void onResume() {
super.onResume();
activityPaused = false;
nativeInvalidateGraphicsResources();
requestInsetRefresh();
syncLifecycleState("onResume");
}
@@ -0,0 +1,181 @@
package xyz.waozi.inbe;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ServiceInfo;
import android.os.Build;
import android.os.IBinder;
import android.os.PowerManager;
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 CHANNEL_ID = "active_session";
private static final int NOTIFICATION_ID = 3001;
private static String currentStatusText = "";
private static SessionForegroundService activeService = null;
private PowerManager.WakeLock wakeLock = null;
@Override
public void onCreate() {
super.onCreate();
activeService = this;
ensureNotificationChannel();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
String action = intent != null ? intent.getAction() : ACTION_START;
if (ACTION_STOP.equals(action)) {
stopSession();
return START_NOT_STICKY;
}
startSession();
return START_NOT_STICKY;
}
@Override
public void onDestroy() {
releaseWakeLock();
stopForegroundCompat();
if (activeService == this) {
activeService = null;
}
super.onDestroy();
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private void startSession() {
Notification notification = buildNotification();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
startForeground(
NOTIFICATION_ID,
notification,
ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
);
} else {
startForeground(NOTIFICATION_ID, notification);
}
acquireWakeLock();
Log.d(TAG, "Session foreground service started");
}
private void stopSession() {
releaseWakeLock();
stopForegroundCompat();
stopSelf();
Log.d(TAG, "Session foreground service stopped");
}
public static void updateStatus(String statusText) {
if (statusText != null && !statusText.isEmpty()) {
currentStatusText = statusText;
}
SessionForegroundService service = activeService;
if (service == null) {
return;
}
NotificationManager manager =
(NotificationManager)service.getSystemService(Context.NOTIFICATION_SERVICE);
if (manager != null) {
manager.notify(NOTIFICATION_ID, service.buildNotification());
}
}
private void stopForegroundCompat() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
stopForeground(STOP_FOREGROUND_REMOVE);
} else {
stopForeground(true);
}
}
private void acquireWakeLock() {
if (wakeLock != null && wakeLock.isHeld()) {
return;
}
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
if (pm == null) {
Log.e(TAG, "PowerManager unavailable; cannot acquire wakelock");
return;
}
wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "inbe:active_session");
wakeLock.setReferenceCounted(false);
wakeLock.acquire();
Log.d(TAG, "Session wakelock acquired");
}
private void releaseWakeLock() {
if (wakeLock != null && wakeLock.isHeld()) {
wakeLock.release();
Log.d(TAG, "Session wakelock released");
}
wakeLock = null;
}
private Notification buildNotification() {
Intent launchIntent = new Intent(this, MainActivity.class);
launchIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
int pendingFlags = PendingIntent.FLAG_UPDATE_CURRENT;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
pendingFlags |= PendingIntent.FLAG_IMMUTABLE;
}
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, pendingFlags);
Notification.Builder builder = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
? new Notification.Builder(this, CHANNEL_ID)
: new Notification.Builder(this);
CharSequence title = getApplicationInfo().loadLabel(getPackageManager());
builder.setSmallIcon(android.R.drawable.ic_media_play)
.setContentTitle(title)
.setContentText(currentStatusText)
.setContentIntent(pendingIntent)
.setOngoing(true)
.setOnlyAlertOnce(true)
.setShowWhen(false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
builder.setCategory(Notification.CATEGORY_TRANSPORT)
.setVisibility(Notification.VISIBILITY_PUBLIC);
}
return builder.build();
}
private void ensureNotificationChannel() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
return;
}
NotificationManager manager =
(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
if (manager == null) {
return;
}
NotificationChannel channel = new NotificationChannel(
CHANNEL_ID,
getApplicationInfo().loadLabel(getPackageManager()),
NotificationManager.IMPORTANCE_LOW
);
manager.createNotificationChannel(channel);
}
}
@@ -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="#E2EEFC" />
<solid android:color="#87CEEB" />
</shape>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 720 B

@@ -1,7 +0,0 @@
Initial release
• Breathing exercise tutorial with 5 steps
• Configurable settings: speed, rounds, breaths, pause duration
• Session history tracking and statistics
• Support for Linux, Windows, Android, and WebAssembly
• Dark theme with customizable colors
+1
View File
@@ -2,3 +2,4 @@ android.useAndroidX=true
android.suppressUnsupportedCompileSdk=35
org.gradle.caching=true
org.gradle.parallel=true
android.nativeBuildCache.enabled=true
@@ -1,2 +1,3 @@
### Fixed
Fixed
---
- Import now restores habits, habit sync settings, and optionally app settings from Inbe SQLite exports.
@@ -0,0 +1,2 @@
### Changed
- Fixed start screen
@@ -0,0 +1,2 @@
### Fixed
- Fix Practice startup, manual navigation, configuration scrolling, and sync backfill issues.
@@ -0,0 +1,4 @@
### Added
- Added guide to habits page
### Changed
- fix orientation issues
@@ -0,0 +1,4 @@
### Added
- tab bar mode for habits and exercises
### Changed
- fix ut click file
@@ -0,0 +1,3 @@
### Changed
- New logo
- improve tabbar ui
@@ -0,0 +1,3 @@
Fixed
---
- icon scaling
@@ -0,0 +1,4 @@
Changed
---
- let you disable screen transitions
- added theme modal
@@ -0,0 +1,3 @@
Fixed
---
- modal issues
@@ -0,0 +1,6 @@
Changed
---
- Use Flint-managed modal handling so modal dialogs block background input consistently.
- Add optional sync account aliases, with compact public ID display and full ID reveal modal.
- Make sync state tracking more robust with snapshot hash checks and review flow for unresolved differences.
- Use Flint's built-in font chopping pipeline and verify multilingual locale glyph coverage.
@@ -0,0 +1,3 @@
Fixed
---
- modal capture bug
@@ -0,0 +1,3 @@
Fixed
---
- Modal button issue
@@ -0,0 +1 @@
- Fix test music
@@ -0,0 +1,3 @@
Fixed
---
- Background play for meditation practice
@@ -0,0 +1,3 @@
Fixed
---
- Android session notification and wakelock for screen-locked playback
@@ -0,0 +1,6 @@
Added
---
- Sun Salutation practice with Yoga habit sync support.
Changed
---
- Improve sync reliability and review handling.
@@ -0,0 +1,2 @@
- Improved notification in session
- Standardized settings screen1
@@ -0,0 +1 @@
- Improve sun salutation
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+5 -1
View File
@@ -194,7 +194,8 @@ EOF
sdl2Pkgs.SDL2.dev
butler
binutils
clickable
ubports-click
ccache
cmake
curl
curl.dev
@@ -254,6 +255,9 @@ EOF
export ANDROID_HOME="${sdk}/libexec/android-sdk"
export ANDROID_SDK_ROOT="${sdk}/libexec/android-sdk"
export ANDROID_NDK_ROOT="${ndkPath}"
export CCACHE_DIR="$PWD/.ccache"
export CCACHE_BASEDIR="$PWD"
export CCACHE_COMPRESS=1
export PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:${pkgConfigPath}:$PKG_CONFIG_PATH"
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2026 Waozi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-14
View File
@@ -1,14 +0,0 @@
# Inbe Flint UI
This directory is first-party Inbe UI/runtime support code. It was merged from
the old Flint project so Inbe can extend the UI system directly without a
vendored submodule, project manifest, CLI, or separate library target.
## Layout
- `include/` - public headers used by Inbe source files
- `src/` - C implementation files compiled directly into Inbe
- `icons/` - icon bitmaps embedded by the Flint icon asset source
- `scripts/` - small build helpers, currently asset embedding
The root `Makefile` and Android CMake project compile these files directly.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

Loaded 100 of 339 files, more files were not shown because too many files have changed in this diff. Show more