Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9466bf02ed | ||
|
|
acbd43bc65 | ||
|
|
06d79002e1 | ||
|
|
2db5045efb | ||
|
|
0f6f40cb0a | ||
|
|
b9ec755e1f | ||
|
|
fc75410dea | ||
|
|
4083893ddc | ||
|
|
07a2315353 | ||
|
|
195eef42a9 | ||
|
|
e22ae0f8aa | ||
|
|
460ac28e0a | ||
|
|
40b0121c81 | ||
|
|
f49dbc2015 | ||
|
|
bab61346be | ||
|
|
2c9348c52a | ||
|
|
209be9e78b | ||
|
|
28a5d8fa51 | ||
|
|
d356cc078f | ||
|
|
e31ff91168 | ||
|
|
7728a6327e | ||
|
|
945943dceb | ||
|
|
e567ba21c2 | ||
|
|
0ddb4ddfb8 | ||
|
|
27e1902958 | ||
|
|
2e83575485 | ||
|
|
bf26a1056f | ||
|
|
3b44d1bc1a | ||
|
|
cafe058420 | ||
|
|
b0a031136b | ||
|
|
06d403ed63 | ||
|
|
1d0009958d | ||
|
|
2c0ac20ce3 | ||
|
|
9181c91a3a | ||
|
|
63e790f96a | ||
|
|
aef5f5441b | ||
|
|
827d5e350b | ||
|
|
f64195ec1d | ||
|
|
60b699f28b | ||
|
|
85b9d3daf5 | ||
|
|
89bb5a63ca | ||
|
|
94c004b923 | ||
|
|
9822180288 | ||
|
|
0976fb82bc | ||
|
|
8353f49f27 | ||
|
|
07b46d7bf0 | ||
|
|
99375c9c4b | ||
|
|
1381311e02 | ||
|
|
595f239015 | ||
|
|
d43a8de800 | ||
|
|
894f8f7da8 | ||
|
|
629aa739f6 | ||
|
|
323be33ec4 | ||
|
|
64480683d6 | ||
|
|
2a4d93f3b6 | ||
|
|
61f5a75634 | ||
|
|
085ed5393d | ||
|
|
015843c4d6 | ||
|
|
5d335ff637 | ||
|
|
61731bd680 | ||
|
|
e3f6a22d24 | ||
|
|
e00245e212 | ||
|
|
951309c75f | ||
|
|
c3d36d8d28 | ||
|
|
a9b615614b | ||
|
|
0fb8630dc9 | ||
|
|
bda1bf536d | ||
|
|
7e27498379 | ||
|
|
08ef56d788 | ||
|
|
a3f92aaf5c | ||
|
|
447e2b6187 | ||
|
|
72fd21dad0 | ||
|
|
f9da10204d | ||
|
|
1549f5e3bc | ||
|
|
0c650fc94f | ||
|
|
52716b1edb | ||
|
|
9e40eda25e | ||
|
|
92985e8a03 | ||
|
|
5aedde8d80 | ||
|
|
eb25d437a4 | ||
|
|
7690e04429 | ||
|
|
07ca47ee7c | ||
|
|
7c3275fee3 | ||
|
|
249702ca32 | ||
|
|
2797b3371d | ||
|
|
bc7514406b | ||
|
|
79bcf2c328 | ||
|
|
b5962360c1 | ||
|
|
83ecc17423 | ||
|
|
f01c4d7d81 | ||
|
|
03b714aa64 | ||
|
|
5f116c29cb | ||
|
|
cdbdcd20cb | ||
|
|
6a3362f59e | ||
|
|
43013c64ab | ||
|
|
3f86abb35a | ||
|
|
3e75089266 | ||
|
|
d51fdea355 | ||
|
|
5bc63e7b13 | ||
|
|
03e1fccab3 | ||
|
|
ed2e52c13a | ||
|
|
616ef0cb09 | ||
|
|
e7debfc68f | ||
|
|
796f1393de | ||
|
|
99567e68c1 | ||
|
|
f714674e62 | ||
|
|
3d75216483 | ||
|
|
ac485ea355 | ||
|
|
ad59bb0c51 | ||
|
|
efbeec104d | ||
|
|
f9d109182d | ||
|
|
ccb8c2f2b5 | ||
|
|
2405fb2fcf | ||
|
|
8c25a6630b | ||
|
|
97dd375822 | ||
|
|
93103cc0ea | ||
|
|
a0ded8e537 | ||
|
|
1f8ada56f9 | ||
|
|
e80097fb83 | ||
|
|
4e0dedf97d | ||
|
|
675b2c260a | ||
|
|
463c858565 | ||
|
|
8b739fcbd4 | ||
|
|
7b23749f7d | ||
|
|
3c3eb9e0f2 | ||
|
|
a896ad4f55 | ||
|
|
19ad586e0c | ||
|
|
bdb1e92a51 | ||
|
|
8d1cf2b8f9 | ||
|
|
6547bd9636 | ||
|
|
8d9117bd16 | ||
|
|
695aafa231 | ||
|
|
88598d830f | ||
|
|
0be5f925a7 | ||
|
|
39096d0dd4 | ||
|
|
2242553194 | ||
|
|
5d6985b2b5 | ||
|
|
ba216da8e6 | ||
|
|
13c469166a | ||
|
|
e1298bd262 | ||
|
|
6c1eb327e3 | ||
|
|
3ff05eac4e | ||
|
|
93f1bae5b7 | ||
|
|
896f0b1c22 | ||
|
|
615e32b0c6 | ||
|
|
77093f27a0 | ||
|
|
c13b7e743d | ||
|
|
5e61ef5351 | ||
|
|
79f44d353b | ||
|
|
e22e3f98ef | ||
|
|
14d4594d71 | ||
|
|
899500307c | ||
|
|
50527f15b8 | ||
|
|
94218efc5e | ||
|
|
cf9ff9fb1f | ||
|
|
81410ea4ae | ||
|
|
2add9f0f30 | ||
|
|
8bbc5625b7 | ||
|
|
ccc2032c50 | ||
|
|
df3d04fa26 | ||
|
|
4c5c76e51e | ||
|
|
a3db764783 | ||
|
|
80b2214af3 | ||
|
|
96ef714ca8 | ||
|
|
d808bdf985 | ||
|
|
c448e5d429 | ||
|
|
d592c943f0 | ||
|
|
d90336d710 | ||
|
|
c135464530 | ||
|
|
45a360f498 | ||
|
|
0fad496a0e | ||
|
|
7642a146cc | ||
|
|
d1633381f4 | ||
|
|
2825a41d02 | ||
|
|
c86d2da631 | ||
|
|
99d2433283 | ||
|
|
1650d50c72 |
No files matched your search
@@ -0,0 +1 @@
|
||||
unpackaged_assets/**/*.ogg filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -49,6 +49,9 @@ jobs:
|
||||
- name: Copy Assets to Android Project
|
||||
run: ./scripts/copy-android-assets.sh
|
||||
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
- name: Build Release APK
|
||||
working-directory: ./droid
|
||||
env:
|
||||
|
||||
@@ -26,6 +26,8 @@ node_modules
|
||||
/main
|
||||
!droid/app/src/main
|
||||
droid/app/src/main/assets
|
||||
droid/*.apk
|
||||
droid/*.aab
|
||||
|
||||
.direnv/
|
||||
.node-repl-history
|
||||
@@ -51,3 +53,5 @@ local.properties
|
||||
*.9
|
||||
*.8
|
||||
*.a
|
||||
|
||||
/pro/
|
||||
@@ -4,9 +4,9 @@
|
||||
[submodule "vendor/rini"]
|
||||
path = vendor/rini
|
||||
url = https://github.com/raysan5/rini.git
|
||||
[submodule "vendor/flint"]
|
||||
path = vendor/flint
|
||||
url = https://github.com/waozixyz/flint
|
||||
[submodule "vendor/otfchop"]
|
||||
path = vendor/otfchop
|
||||
url = https://github.com/waozixyz/otfchop
|
||||
[submodule "vendor/sqlite"]
|
||||
path = vendor/sqlite
|
||||
url = https://github.com/sqlite/sqlite
|
||||
@@ -1,4 +1,40 @@
|
||||
# Changelog
|
||||
## [1.3.2] - 2026-06-17
|
||||
### Fixed
|
||||
- Unified scroll containers so content stays out of scrollbar tracks and scroll positions clamp cleanly at the bottom.
|
||||
- Android meditation audio downloads now show a localized network-permission/connectivity modal when the host cannot be resolved.
|
||||
|
||||
## [1.3.1] - 2026-06-17
|
||||
### Fixed
|
||||
- Fixed Android orientation resizing and habit import merging by name.
|
||||
|
||||
## [1.3.0] - 2026-06-14
|
||||
### Added
|
||||
- Implemented 1-bit habit tracker synced with practice data
|
||||
- Habit editing, custom colors, sync options, and deletion.
|
||||
- Add monochrome theme
|
||||
- Add simple meditation exercise with background music
|
||||
|
||||
## [1.2.6] - 2026-06-12
|
||||
### Fixed
|
||||
- Import now replaces only matching session files from the ZIP and never removes local sessions missing from the import.
|
||||
- Fixed web scaling behavior.
|
||||
|
||||
## [1.2.5] - 2026-06-12
|
||||
### Added
|
||||
- BTC address for donations
|
||||
|
||||
## [1.2.4] - 2026-06-11
|
||||
### Fixed
|
||||
- Android sessions continue correctly when the notification shade causes focus loss with background playback enabled.
|
||||
- Android safe-area insets now offset the viewport at the top instead of creating bottom-only padding.
|
||||
- Progressive start speed defaults to 3, normal speed defaults to 6, and the start speed editor preview animates at the exact selected speed.
|
||||
- Dropdown menu text is clipped cleanly while scrolling.
|
||||
|
||||
## [1.2.3] - 2026-06-10
|
||||
### Fixed
|
||||
- History editing now scrolls to the active field once and keeps 16px Unifont row text aligned without clipping.
|
||||
|
||||
## [1.2.2] - 2026-06-10
|
||||
### Fixed
|
||||
- Android touch targets now align correctly on devices with navigation bar window insets.
|
||||
|
||||
@@ -1,44 +1,579 @@
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
include mk/common.mk
|
||||
include mk/native.mk
|
||||
include mk/windows.mk
|
||||
include mk/web.mk
|
||||
include mk/android.mk
|
||||
include mk/dist.mk
|
||||
include mk/clean.mk
|
||||
APP_NAME := inbe
|
||||
APP_TITLE := Inner Breeze
|
||||
ANDROID_APP_ID := xyz.waozi.inbe
|
||||
ANDROID_ACTIVITY := xyz.waozi.inbe.MainActivity
|
||||
|
||||
FORCE:
|
||||
CC ?= gcc
|
||||
GRADLE ?= gradle
|
||||
ARCH := $(shell uname -m)
|
||||
ANDROID_KEYSTORE ?= $(HOME)/.android/flint-release.keystore
|
||||
ANDROID_KEY_ALIAS ?= inbe-key
|
||||
|
||||
.PHONY: \
|
||||
all \
|
||||
native \
|
||||
run \
|
||||
linux \
|
||||
$(LINUX_ARCHES:%=linux-%) \
|
||||
build-linux-arch \
|
||||
windows \
|
||||
web \
|
||||
clean \
|
||||
clean-linux \
|
||||
clean-windows \
|
||||
clean-web \
|
||||
clean-raylib \
|
||||
dist \
|
||||
dist-linux \
|
||||
dist-windows \
|
||||
install \
|
||||
uninstall \
|
||||
android-init-signing \
|
||||
android-debug \
|
||||
android-release \
|
||||
android-bundle \
|
||||
android-copy-assets \
|
||||
android-copy-apks \
|
||||
android-copy-debug-apks \
|
||||
android-copy-release-apks \
|
||||
android-copy-bundle \
|
||||
android-install \
|
||||
android-install-release \
|
||||
android-clean \
|
||||
FORCE
|
||||
BUILD_DIR := build
|
||||
BUILD_OBJ_DIR := $(BUILD_DIR)/obj
|
||||
BUILD_BIN_DIR := $(BUILD_DIR)/bin
|
||||
BUILD_DIST_DIR := $(BUILD_DIR)/dist
|
||||
LINUX_OBJ_DIR := $(BUILD_OBJ_DIR)/linux
|
||||
LINUX_BIN_DIR := $(BUILD_BIN_DIR)/linux
|
||||
LINUX_DIST_DIR := $(BUILD_DIST_DIR)/linux
|
||||
LINUX_APPIMAGE_BUILD_DIR := $(BUILD_OBJ_DIR)/appimage/linux
|
||||
LINUX_APPDIR := $(LINUX_APPIMAGE_BUILD_DIR)/$(APP_NAME).AppDir
|
||||
LINUX_APPIMAGE_DIR := packaging/linux/appimage
|
||||
LINUX_APPIMAGE_APPRUN := $(LINUX_APPIMAGE_DIR)/AppRun
|
||||
LINUX_APPIMAGE_DESKTOP := $(LINUX_APPIMAGE_DIR)/$(APP_NAME).desktop
|
||||
LINUX_APPIMAGE_ICON := $(LINUX_APPIMAGE_DIR)/$(APP_NAME).png
|
||||
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
|
||||
WEB_OBJ_DIR := $(BUILD_OBJ_DIR)/web
|
||||
WEB_DIST_DIR := $(BUILD_DIST_DIR)/web
|
||||
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
|
||||
RAYLIB_BUILD_DIR := $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib
|
||||
RAYLIB_A := $(RAYLIB_BUILD_DIR)/libraylib.a
|
||||
WIN64_ARCH := x86_64
|
||||
WIN64_CC ?= $(or $(WIN_CC),x86_64-w64-mingw32-gcc)
|
||||
WIN64_AR ?= $(or $(WIN_AR),x86_64-w64-mingw32-ar)
|
||||
WIN64_RANLIB ?= $(or $(WIN_RANLIB),x86_64-w64-mingw32-ranlib)
|
||||
WIN64_STRIP ?= $(or $(WIN_STRIP),x86_64-w64-mingw32-strip)
|
||||
WIN32_ARCH := i686
|
||||
WIN32_CC ?= i686-w64-mingw32-gcc
|
||||
WIN32_AR ?= i686-w64-mingw32-ar
|
||||
WIN32_RANLIB ?= i686-w64-mingw32-ranlib
|
||||
WIN32_STRIP ?= i686-w64-mingw32-strip
|
||||
WIN64_RAYLIB_BUILD_DIR := $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib
|
||||
WIN64_RAYLIB_A := $(WIN64_RAYLIB_BUILD_DIR)/libraylib.a
|
||||
WIN32_RAYLIB_BUILD_DIR := $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib
|
||||
WIN32_RAYLIB_A := $(WIN32_RAYLIB_BUILD_DIR)/libraylib.a
|
||||
WEB_RAYLIB_BUILD_DIR := $(WEB_OBJ_DIR)/raylib
|
||||
WEB_RAYLIB_A := $(WEB_RAYLIB_BUILD_DIR)/libraylib.web.a
|
||||
RAYLIB_SOURCES := $(wildcard $(RAYLIB_DIR)/*.c) $(wildcard $(RAYLIB_DIR)/*.h)
|
||||
|
||||
FLINT_DIR := flint
|
||||
FLINT_ICON_FILES := $(wildcard $(FLINT_DIR)/icons/*.png)
|
||||
FLINT_ICON_ASSETS_C := $(FLINT_DIR)/src/flint_icon_assets.c
|
||||
FLINT_SRCS := $(filter-out $(FLINT_ICON_ASSETS_C),$(wildcard $(FLINT_DIR)/src/*.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))
|
||||
FLINT_INCLUDE := -I$(FLINT_DIR)/include
|
||||
FLINT_CURL_CFLAGS ?= $(shell pkg-config --cflags libcurl 2>/dev/null || curl-config --cflags 2>/dev/null)
|
||||
FLINT_CURL_LDLIBS ?= $(shell pkg-config --libs libcurl 2>/dev/null || curl-config --libs 2>/dev/null)
|
||||
SQLITE_DIR := vendor/sqlite
|
||||
SQLITE_BUILD_DIR := $(BUILD_OBJ_DIR)/sqlite
|
||||
SQLITE_AMALGAMATION_C := $(SQLITE_BUILD_DIR)/sqlite3.c
|
||||
SQLITE_AMALGAMATION_H := $(SQLITE_BUILD_DIR)/sqlite3.h
|
||||
SQLITE_SRC := $(SQLITE_AMALGAMATION_C)
|
||||
SQLITE_INCLUDE := -I$(SQLITE_BUILD_DIR)
|
||||
TEST_BIN_DIR := $(BUILD_BIN_DIR)/tests
|
||||
STORAGE_IMPORT_TEST := $(TEST_BIN_DIR)/storage_import_test
|
||||
FLINT_TEXT_SCALING_TEST := $(TEST_BIN_DIR)/flint_text_scaling_test
|
||||
FLINT_RUNTIME_ASSET_CFLAGS := -DFLINT_HAS_LIBCURL=1 $(FLINT_CURL_CFLAGS)
|
||||
FLINT_RUNTIME_ASSET_LDLIBS := $(FLINT_CURL_LDLIBS)
|
||||
|
||||
APP_SRCS := \
|
||||
src/main.c \
|
||||
src/core/breath_engine.c \
|
||||
src/app/app.c \
|
||||
src/app/device_preferences.c \
|
||||
src/session/session.c \
|
||||
src/screens/habits_screen.c \
|
||||
src/session/meditation_music.c \
|
||||
src/core/locale.c \
|
||||
src/core/theme.c \
|
||||
src/storage/data.c \
|
||||
src/storage/storage.c \
|
||||
src/third_party/miniz.c \
|
||||
src/platform/android/android_device.c \
|
||||
src/screens/practice_screen.c \
|
||||
src/screens/language_screen.c \
|
||||
src/screens/manual_screen.c \
|
||||
src/screens/settings/settings_screen.c
|
||||
|
||||
LOCALE_FILES := $(wildcard locales/*.txt)
|
||||
IMAGE_FILES := assets/whm/1.jpg assets/whm/2.jpg
|
||||
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
|
||||
FONT_OUTPUTS := assets/fonts/locales.png assets/fonts/locales.dat assets/fonts/locales-8.png assets/fonts/locales-8.dat
|
||||
OTFCHOP_DIR ?= vendor/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/session -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
|
||||
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
|
||||
LDFLAGS := -Wl,--gc-sections -s
|
||||
WINDOWS_LDFLAGS := -Wl,--gc-sections -static -static-libgcc -mwindows
|
||||
WINDOWS_LDLIBS := -lgdi32 -lwinmm -lopengl32 -luser32 -lshell32 -lole32 -lcomdlg32 -lcomctl32 -luuid -lm
|
||||
ifneq ($(strip $(MCFGTHREADS)),)
|
||||
WIN64_THREAD_LDFLAGS := -L$(MCFGTHREADS)/lib
|
||||
else
|
||||
WIN64_THREAD_LDFLAGS :=
|
||||
endif
|
||||
ifneq ($(strip $(WIN32_MCFGTHREADS)),)
|
||||
WIN32_THREAD_LDFLAGS := -L$(WIN32_MCFGTHREADS)/lib
|
||||
else
|
||||
WIN32_THREAD_LDFLAGS :=
|
||||
endif
|
||||
|
||||
BINARY_NAME := $(APP_NAME)-linux-$(ARCH)
|
||||
TARGET := $(LINUX_BIN_DIR)/$(BINARY_NAME)
|
||||
WIN64_BINARY_NAME := $(APP_NAME)-windows-$(WIN64_ARCH).exe
|
||||
WIN64_TARGET := $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)/$(WIN64_BINARY_NAME)
|
||||
WIN32_BINARY_NAME := $(APP_NAME)-windows-$(WIN32_ARCH).exe
|
||||
WIN32_TARGET := $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)/$(WIN32_BINARY_NAME)
|
||||
WINDOWS_DIST := $(WINDOWS_DIST_DIR)/$(APP_NAME)-windows.zip
|
||||
APPIMAGE_NAME := $(APP_NAME)-linux-$(ARCH).AppImage
|
||||
APPIMAGE_TARGET := $(LINUX_DIST_DIR)/$(APPIMAGE_NAME)
|
||||
LINUXDEPLOY ?= linuxdeploy
|
||||
WEB_CC ?= emcc
|
||||
WEB_AR ?= emar
|
||||
WEB_CACHE_BUSTER ?= $(shell git rev-parse --short HEAD 2>/dev/null || date +%s)
|
||||
WEB_TARGET := $(WEB_DIST_DIR)/index.html
|
||||
WEB_ASSET_FILES := $(shell find web-assets -type f 2>/dev/null)
|
||||
UNPACKAGED_AUDIO_DIR := unpackaged_assets/audio
|
||||
MEDITATION_AUDIO_ZIP := web-assets/dl/inbe-meditation-audio-v1.zip
|
||||
|
||||
.PHONY: all native run test dist appimage clean clean-linux clean-raylib android-check-keystore android-copy-assets android-debug android-release android-bundle android-install android-install-release android-clean package-unpackaged-assets windows-runtime-assets-check windows windows64 windows32 web
|
||||
.NOTPARALLEL: dist windows windows64 windows32 android-release android-bundle
|
||||
|
||||
all: native
|
||||
|
||||
native: $(TARGET)
|
||||
|
||||
dist:
|
||||
@password="$(PASSWORD)"; \
|
||||
if [ -z "$$password" ]; then \
|
||||
printf "Android release keystore password: "; \
|
||||
stty -echo; \
|
||||
read password; \
|
||||
stty echo; \
|
||||
printf "\n"; \
|
||||
fi; \
|
||||
if [ -z "$$password" ]; then \
|
||||
echo "Set PASSWORD=your-keystore-password for release builds"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
$(MAKE) android-check-keystore PASSWORD="$$password" && \
|
||||
$(MAKE) package-unpackaged-assets && \
|
||||
$(MAKE) web && \
|
||||
$(MAKE) appimage && \
|
||||
$(MAKE) windows && \
|
||||
$(MAKE) android-release PASSWORD="$$password" && \
|
||||
$(MAKE) android-bundle PASSWORD="$$password"
|
||||
|
||||
appimage: $(APPIMAGE_TARGET)
|
||||
|
||||
run: $(TARGET)
|
||||
./$(TARGET)
|
||||
|
||||
test: $(STORAGE_IMPORT_TEST) $(FLINT_TEXT_SCALING_TEST)
|
||||
$(STORAGE_IMPORT_TEST)
|
||||
$(FLINT_TEXT_SCALING_TEST)
|
||||
|
||||
$(STORAGE_IMPORT_TEST): tests/storage_import_test.c src/storage/storage.c src/storage/storage.h 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 \
|
||||
-Isrc -Isrc/app -Isrc/core -Isrc/screens -Isrc/screens/settings -Isrc/session -Isrc/storage -Isrc/platform/android -Isrc/third_party -Ivendor/raylib/src $(FLINT_INCLUDE) $(SQLITE_INCLUDE) \
|
||||
-o $@ \
|
||||
tests/storage_import_test.c src/storage/storage.c src/screens/habits_screen.c src/third_party/miniz.c $(SQLITE_SRC) \
|
||||
-Wl,--gc-sections -lm -lpthread -ldl
|
||||
|
||||
$(FLINT_TEXT_SCALING_TEST): tests/flint_text_scaling_test.c flint/src/flint_text.c flint/src/flint_clip.c flint/src/flint_scaling.c flint/include/flint_text.h flint/include/flint_clip.h flint/include/flint_scaling.h | $(TEST_BIN_DIR)
|
||||
$(CC) -Wall -Wextra -std=c99 -ffunction-sections -fdata-sections \
|
||||
-Iflint/include -Ivendor/raylib/src \
|
||||
-o $@ \
|
||||
tests/flint_text_scaling_test.c flint/src/flint_text.c flint/src/flint_clip.c flint/src/flint_scaling.c \
|
||||
-Wl,--gc-sections -lm
|
||||
|
||||
$(BUILD_OBJ_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR) $(WINDOWS_DIST_DIR) $(ANDROID_BUILD_DIR) $(TEST_BIN_DIR) $(WEB_OBJ_DIR) $(WEB_DIST_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
$(WINDOWS_BIN_DIR)/$(WIN64_ARCH) $(WINDOWS_BIN_DIR)/$(WIN32_ARCH):
|
||||
mkdir -p $@
|
||||
|
||||
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
|
||||
|
||||
assets/fonts/locales.png assets/fonts/locales.dat: $(LOCALE_FILES) $(FONT_TOOL) | assets/fonts
|
||||
$(FONT_TOOL) --size 16 $(FONT_SOURCE) $(LOCALE_FILES) assets/fonts/locales
|
||||
|
||||
assets/fonts/locales-8.png assets/fonts/locales-8.dat: $(LOCALE_FILES) $(FONT_TOOL) | assets/fonts
|
||||
$(FONT_TOOL) --size 8 $(FONT_SOURCE) $(LOCALE_FILES) assets/fonts/locales-8
|
||||
|
||||
$(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 $@
|
||||
|
||||
$(RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
rm -rf $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src
|
||||
mkdir -p $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src $(RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src/
|
||||
$(MAKE) -j1 -C $(LINUX_OBJ_DIR)/$(ARCH)/native/raylib-src \
|
||||
PLATFORM=PLATFORM_DESKTOP_SDL \
|
||||
GRAPHICS=GRAPHICS_API_OPENGL_ES2 \
|
||||
RAYLIB_LIBTYPE=STATIC \
|
||||
RAYLIB_RELEASE_PATH=../raylib \
|
||||
RAYLIB_MODULE_AUDIO=TRUE \
|
||||
RAYLIB_MODULE_MODELS=FALSE \
|
||||
SDL_INCLUDE_PATH="$(RAY_SDL_INCLUDE_DIR)" \
|
||||
SDL_LIBRARIES="$(RAY_SDL_LDLIBS)" \
|
||||
CUSTOM_CFLAGS="-DUSING_SDL2_PROJECT $(RAY_CFLAGS) $(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(WEB_RAYLIB_A): $(RAYLIB_SOURCES) | $(WEB_OBJ_DIR)
|
||||
rm -rf $(WEB_OBJ_DIR)/raylib-src
|
||||
mkdir -p $(WEB_OBJ_DIR)/raylib-src $(WEB_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(WEB_OBJ_DIR)/raylib-src/
|
||||
$(MAKE) -j1 -C $(WEB_OBJ_DIR)/raylib-src \
|
||||
PLATFORM=PLATFORM_WEB \
|
||||
RAYLIB_LIBTYPE=STATIC \
|
||||
RAYLIB_RELEASE_PATH=../raylib \
|
||||
RAYLIB_MODULE_AUDIO=TRUE \
|
||||
RAYLIB_MODULE_MODELS=FALSE \
|
||||
CC="$(WEB_CC)" \
|
||||
AR="$(WEB_AR)" \
|
||||
CUSTOM_CFLAGS="$(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(WIN64_RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
rm -rf $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src
|
||||
mkdir -p $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src $(WIN64_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(WINDOWS_OBJ_DIR)/$(WIN64_ARCH)/raylib-src \
|
||||
OS=Windows_NT \
|
||||
PLATFORM=PLATFORM_DESKTOP_RGFW \
|
||||
GRAPHICS=GRAPHICS_API_OPENGL_11 \
|
||||
RAYLIB_LIBTYPE=STATIC \
|
||||
RAYLIB_RELEASE_PATH=../raylib \
|
||||
RAYLIB_MODULE_AUDIO=TRUE \
|
||||
RAYLIB_MODULE_MODELS=FALSE \
|
||||
CC="$(WIN64_CC)" \
|
||||
AR="$(WIN64_AR)" \
|
||||
RANLIB="$(WIN64_RANLIB)" \
|
||||
CUSTOM_CFLAGS="$(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(WIN32_RAYLIB_A): $(RAYLIB_SOURCES)
|
||||
rm -rf $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src
|
||||
mkdir -p $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src $(WIN32_RAYLIB_BUILD_DIR)
|
||||
cp -R $(RAYLIB_DIR)/. $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src/
|
||||
$(MAKE) -j1 -C $(WINDOWS_OBJ_DIR)/$(WIN32_ARCH)/raylib-src \
|
||||
OS=Windows_NT \
|
||||
PLATFORM=PLATFORM_DESKTOP_RGFW \
|
||||
GRAPHICS=GRAPHICS_API_OPENGL_11 \
|
||||
RAYLIB_LIBTYPE=STATIC \
|
||||
RAYLIB_RELEASE_PATH=../raylib \
|
||||
RAYLIB_MODULE_AUDIO=TRUE \
|
||||
RAYLIB_MODULE_MODELS=FALSE \
|
||||
CC="$(WIN32_CC)" \
|
||||
AR="$(WIN32_AR)" \
|
||||
RANLIB="$(WIN32_RANLIB)" \
|
||||
CUSTOM_CFLAGS="$(APP_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
|
||||
|
||||
$(SQLITE_AMALGAMATION_C) $(SQLITE_AMALGAMATION_H): $(SQLITE_DIR)/configure $(SQLITE_DIR)/manifest | $(BUILD_OBJ_DIR)
|
||||
mkdir -p $(SQLITE_BUILD_DIR)
|
||||
cd $(SQLITE_BUILD_DIR) && ../../../$(SQLITE_DIR)/configure
|
||||
$(MAKE) -C $(SQLITE_BUILD_DIR) sqlite3.c sqlite3.h
|
||||
|
||||
$(TARGET): Makefile $(SRC) $(FLINT_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(RAYLIB_A) | $(LINUX_BIN_DIR)
|
||||
$(CC) $(CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
$(RAY_CFLAGS) \
|
||||
-DSUPPORT_MODULE_RAUDIO=1 \
|
||||
-DSUPPORT_FILEFORMAT_OGG=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=1 \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(RAYLIB_A) \
|
||||
$(RAY_LDLIBS) \
|
||||
$(FLINT_RUNTIME_ASSET_LDLIBS) \
|
||||
-lm -lpthread -ldl -lrt \
|
||||
$(LDFLAGS)
|
||||
|
||||
$(WIN64_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN64_RAYLIB_A) | $(WINDOWS_BIN_DIR)/$(WIN64_ARCH)
|
||||
$(WIN64_CC) $(WINDOWS_CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
-DPLATFORM_DESKTOP \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_WINDOWS_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(WIN64_RAYLIB_A) \
|
||||
$(WINDOWS_LDLIBS) \
|
||||
$(WIN64_THREAD_LDFLAGS) \
|
||||
$(WINDOWS_LDFLAGS)
|
||||
$(WIN64_STRIP) $@
|
||||
|
||||
$(WIN32_TARGET): Makefile $(SRC) $(FLINT_WINDOWS_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WIN32_RAYLIB_A) | $(WINDOWS_BIN_DIR)/$(WIN32_ARCH)
|
||||
$(WIN32_CC) $(WINDOWS_CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
-DPLATFORM_DESKTOP \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_WINDOWS_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(WIN32_RAYLIB_A) \
|
||||
$(WINDOWS_LDLIBS) \
|
||||
$(WIN32_THREAD_LDFLAGS) \
|
||||
$(WINDOWS_LDFLAGS)
|
||||
$(WIN32_STRIP) $@
|
||||
|
||||
$(APPIMAGE_TARGET): $(TARGET) $(LINUX_APPIMAGE_APPRUN) $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPIMAGE_ICON) | $(LINUX_DIST_DIR) $(LINUX_APPIMAGE_BUILD_DIR)
|
||||
@command -v linuxdeploy-plugin-appimage >/dev/null || { \
|
||||
echo "linuxdeploy-plugin-appimage is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
}
|
||||
@command -v appimagetool >/dev/null || { \
|
||||
echo "appimagetool is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
}
|
||||
@command -v patchelf >/dev/null || { \
|
||||
echo "patchelf is missing. Re-enter the flake shell with: nix develop"; \
|
||||
exit 1; \
|
||||
}
|
||||
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/share/applications $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps
|
||||
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
|
||||
chmod +x $(LINUX_APPDIR)/AppRun
|
||||
cp $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPDIR)/$(APP_NAME).desktop
|
||||
cp $(LINUX_APPIMAGE_DESKTOP) $(LINUX_APPDIR)/usr/share/applications/$(APP_NAME).desktop
|
||||
cp $(LINUX_APPIMAGE_ICON) $(LINUX_APPDIR)/$(APP_NAME).png
|
||||
cp $(LINUX_APPIMAGE_ICON) $(LINUX_APPDIR)/usr/share/icons/hicolor/512x512/apps/$(APP_NAME).png
|
||||
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) \
|
||||
--output appimage
|
||||
test -f $@
|
||||
|
||||
$(WEB_TARGET): Makefile $(SRC) $(FLINT_WEB_SRCS) $(SQLITE_SRC) $(SQLITE_AMALGAMATION_H) $(FONT_OUTPUTS) $(EMBEDDED_ASSETS_C) $(WEB_RAYLIB_A) src/web_shell.html manifest.json $(WEB_ASSET_FILES) | $(WEB_DIST_DIR)
|
||||
$(WEB_CC) $(WEB_CFLAGS) \
|
||||
$(APP_INCLUDE) \
|
||||
$(FLINT_INCLUDE) \
|
||||
$(SQLITE_INCLUDE) \
|
||||
-I$(RAYLIB_DIR) \
|
||||
-DPLATFORM_WEB \
|
||||
-DSUPPORT_MODULE_RAUDIO=1 \
|
||||
-DSUPPORT_FILEFORMAT_OGG=1 \
|
||||
-DSUPPORT_FILEFORMAT_MP3=1 \
|
||||
-o $@ \
|
||||
$(SRC) \
|
||||
$(FLINT_WEB_SRCS) \
|
||||
$(SQLITE_SRC) \
|
||||
$(WEB_RAYLIB_A) \
|
||||
-sUSE_GLFW=3 \
|
||||
-sASYNCIFY \
|
||||
-sFORCE_FILESYSTEM=1 \
|
||||
-sFETCH=1 \
|
||||
-sALLOW_MEMORY_GROWTH=1 \
|
||||
--shell-file src/web_shell.html \
|
||||
-lidbfs.js \
|
||||
-lm
|
||||
perl -0pi -e 's/WEB_CACHE_BUSTER/$(WEB_CACHE_BUSTER)/g' $(WEB_DIST_DIR)/index.html
|
||||
cp -R web-assets $(WEB_DIST_DIR)/
|
||||
cp manifest.json $(WEB_DIST_DIR)/
|
||||
|
||||
android-copy-assets:
|
||||
$(MAKE) $(FONT_OUTPUTS)
|
||||
$(MAKE) $(EMBEDDED_ASSETS_C)
|
||||
rm -rf droid/app/src/main/assets
|
||||
mkdir -p droid/app/src/main/assets
|
||||
|
||||
android-check-keystore:
|
||||
@if [ -z "$(PASSWORD)" ]; then \
|
||||
echo "Set PASSWORD=your-keystore-password for release builds"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ ! -f "$(ANDROID_KEYSTORE)" ]; then \
|
||||
echo "Android release keystore not found: $(ANDROID_KEYSTORE)"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@command -v keytool >/dev/null || { \
|
||||
echo "keytool is missing. Re-enter the Android/JDK build environment."; \
|
||||
exit 1; \
|
||||
}
|
||||
@if ! keytool -list -keystore "$(ANDROID_KEYSTORE)" -storepass "$(PASSWORD)" -alias "$(ANDROID_KEY_ALIAS)" >/dev/null 2>&1; then \
|
||||
echo "Android release keystore password or alias is invalid"; \
|
||||
echo "Checked keystore: $(ANDROID_KEYSTORE)"; \
|
||||
echo "Checked alias: $(ANDROID_KEY_ALIAS)"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
android-debug: android-copy-assets
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid assembleDebug
|
||||
$(MAKE) android-copy-debug-apks
|
||||
|
||||
android-release:
|
||||
$(MAKE) android-check-keystore PASSWORD="$(PASSWORD)"
|
||||
$(MAKE) android-copy-assets
|
||||
@if [ -n "$(PASSWORD)" ]; then \
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid assembleRelease -Pkeystore.path="$(ANDROID_KEYSTORE)" -Pkeystore.alias="$(ANDROID_KEY_ALIAS)" -Pkeystore.password="$(PASSWORD)" || exit $$?; \
|
||||
else \
|
||||
echo "Set PASSWORD=your-keystore-password for release builds"; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(MAKE) android-copy-release-apks
|
||||
|
||||
android-bundle:
|
||||
$(MAKE) android-check-keystore PASSWORD="$(PASSWORD)"
|
||||
$(MAKE) android-copy-assets
|
||||
@if [ -n "$(PASSWORD)" ]; then \
|
||||
unset ANDROID_HOME; $(GRADLE) -p droid bundleRelease -Pkeystore.path="$(ANDROID_KEYSTORE)" -Pkeystore.alias="$(ANDROID_KEY_ALIAS)" -Pkeystore.password="$(PASSWORD)" || exit $$?; \
|
||||
else \
|
||||
echo "Set PASSWORD=your-keystore-password for bundle builds"; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(MAKE) android-copy-bundle
|
||||
|
||||
android-copy-debug-apks: | $(ANDROID_BUILD_DIR)
|
||||
@found=0; \
|
||||
for apk in droid/app/build/outputs/apk/debug/*.apk; do \
|
||||
if [ -f "$$apk" ]; then \
|
||||
cp "$$apk" "$(ANDROID_BUILD_DIR)/$$(basename "$$apk")"; \
|
||||
found=1; \
|
||||
fi; \
|
||||
done; \
|
||||
if [ "$$found" -eq 0 ]; then \
|
||||
echo "No debug APKs were produced"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
android-copy-release-apks: | $(ANDROID_BUILD_DIR)
|
||||
@found=0; \
|
||||
for apk in droid/app/build/outputs/apk/release/*.apk; do \
|
||||
if [ -f "$$apk" ]; then \
|
||||
cp "$$apk" "$(ANDROID_BUILD_DIR)/$$(basename "$$apk")"; \
|
||||
found=1; \
|
||||
fi; \
|
||||
done; \
|
||||
if [ "$$found" -eq 0 ]; then \
|
||||
echo "No release APKs were produced"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -z "$(APP_VERSION)" ]; then \
|
||||
echo "Could not read INBE_VERSION_STRING from $(VERSION_FILE)"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
universal="$$(find droid/app/build/outputs/apk/release -maxdepth 1 -name '*universal*release*.apk' | head -n 1)"; \
|
||||
if [ -z "$$universal" ]; then universal="$$(find droid/app/build/outputs/apk/release -maxdepth 1 -name '*release*.apk' | head -n 1)"; fi; \
|
||||
if [ -z "$$universal" ]; then \
|
||||
echo "No release APK was available for versioned copy"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
cp "$$universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION).apk"; \
|
||||
cp "$$universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-latest.apk"
|
||||
|
||||
android-copy-bundle: | $(ANDROID_BUILD_DIR)
|
||||
@found=0; \
|
||||
for bundle in droid/app/build/outputs/bundle/release/*.aab; do \
|
||||
if [ -f "$$bundle" ]; then \
|
||||
cp "$$bundle" "$(ANDROID_BUILD_DIR)/$$(basename "$$bundle")"; \
|
||||
found=1; \
|
||||
fi; \
|
||||
done; \
|
||||
if [ "$$found" -eq 0 ]; then \
|
||||
echo "No release AAB was produced"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
android-install: android-debug
|
||||
@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'); \
|
||||
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)
|
||||
|
||||
android-clean:
|
||||
$(GRADLE) -p droid clean
|
||||
rm -rf $(ANDROID_BUILD_DIR)
|
||||
|
||||
package-unpackaged-assets:
|
||||
mkdir -p $(dir $(MEDITATION_AUDIO_ZIP))
|
||||
rm -f $(MEDITATION_AUDIO_ZIP)
|
||||
cd $(UNPACKAGED_AUDIO_DIR) && find . -mindepth 2 -type f -name '*.ogg' -exec zip -9 -r $(abspath $(MEDITATION_AUDIO_ZIP)) {} + && zip -9 -r $(abspath $(MEDITATION_AUDIO_ZIP)) LICENSE.md MANIFEST.txt
|
||||
|
||||
windows-runtime-assets-check:
|
||||
@echo "Windows runtime asset downloads are not wired into this build yet"; \
|
||||
echo "Refusing to build Windows binaries that cannot download meditation audio."; \
|
||||
exit 1
|
||||
|
||||
windows64: windows-runtime-assets-check $(WIN64_TARGET)
|
||||
|
||||
windows32: windows-runtime-assets-check $(WIN32_TARGET)
|
||||
|
||||
windows:
|
||||
$(MAKE) windows64
|
||||
$(MAKE) windows32
|
||||
mkdir -p $(WINDOWS_DIST_DIR)
|
||||
rm -f $(WINDOWS_DIST_DIR)/$(APP_NAME)-windows-*.zip
|
||||
rm -f $(WINDOWS_DIST)
|
||||
cd $(WINDOWS_BIN_DIR) && zip -9 -j $(abspath $(WINDOWS_DIST)) \
|
||||
$(WIN64_ARCH)/$(WIN64_BINARY_NAME) \
|
||||
$(WIN32_ARCH)/$(WIN32_BINARY_NAME)
|
||||
|
||||
web:
|
||||
$(MAKE) $(WEB_TARGET)
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
clean-linux:
|
||||
rm -rf $(LINUX_OBJ_DIR) $(LINUX_BIN_DIR) $(LINUX_DIST_DIR)
|
||||
|
||||
clean-raylib:
|
||||
rm -rf $(RAYLIB_BUILD_DIR) $(LINUX_OBJ_DIR)/*/native/raylib-src vendor/raylib/build
|
||||
|
||||
NEEDS_NATIVE_ENV := $(if $(MAKECMDGOALS),$(filter all native run dist appimage,$(MAKECMDGOALS)),native)
|
||||
ifneq ($(strip $(NEEDS_NATIVE_ENV)),)
|
||||
ifeq ($(strip $(RAY_CFLAGS)),)
|
||||
$(error RAY_CFLAGS is not set. Enter the ray flake shell with 'nix develop')
|
||||
endif
|
||||
ifeq ($(strip $(RAY_LDLIBS)),)
|
||||
$(error RAY_LDLIBS is not set. Enter the ray flake shell with 'nix develop')
|
||||
endif
|
||||
ifeq ($(strip $(RAY_SDL_LDLIBS)),)
|
||||
$(error RAY_SDL_LDLIBS is not set. Enter the ray flake shell with 'nix develop')
|
||||
endif
|
||||
ifeq ($(strip $(RAY_SDL_INCLUDE_DIR)),)
|
||||
$(error RAY_SDL_INCLUDE_DIR is not set. Enter the ray flake shell with 'nix develop')
|
||||
endif
|
||||
ifeq ($(strip $(RAY_RAYLIB_CONFIG)),)
|
||||
$(error RAY_RAYLIB_CONFIG is not set. Enter the ray flake shell with 'nix develop')
|
||||
endif
|
||||
ifeq ($(strip $(FLINT_CURL_LDLIBS)),)
|
||||
$(error libcurl pkg-config metadata is missing. Runtime asset downloads are required; enter the flake shell with 'nix develop' or set FLINT_CURL_CFLAGS/FLINT_CURL_LDLIBS explicitly)
|
||||
endif
|
||||
endif
|
||||
@@ -1,16 +1,16 @@
|
||||
# Inner Breeze
|
||||
|
||||
Inner Breeze - A free, open-source guided breathing meditation app based on the Wim Hof method.
|
||||
Inner Breeze is a free, open-source practice app for breathing, meditation, and habit tracking.
|
||||
|
||||
## Features
|
||||
|
||||
- Guided breathing sessions with visual and audio cues
|
||||
- Configurable breath counts and hold times
|
||||
- Session history with local storage
|
||||
- 8 color themes (Forest, Ocean, Sky, Sunset, Lavender - each with light/dark variants)
|
||||
- Sound effects (breath in/out, bell)
|
||||
- Fullscreen mode with proper DPI scaling
|
||||
- Touch-optimized UI for mobile devices
|
||||
- Guided practice sessions with visual and audio cues
|
||||
- Mind, Yoga, and Fitness organization for habits and practice views
|
||||
- Configurable breathing sessions and meditation timers
|
||||
- Habit tracking with session history
|
||||
- Local SQLite storage with import/export support
|
||||
- Theme customization with light and dark variants
|
||||
- Touch-optimized UI for desktop and mobile
|
||||
|
||||
## Building
|
||||
|
||||
@@ -27,27 +27,21 @@ inbe uses [raylib](https://github.com/raysan5/raylib) and requires a Nix develop
|
||||
# Enter the development shell
|
||||
nix develop
|
||||
|
||||
# Build for your current platform (Linux x86_64/aarch64)
|
||||
make
|
||||
# Build for your current platform
|
||||
make native
|
||||
|
||||
# Run
|
||||
./build/linux/inbe-linux-$(uname -m)
|
||||
make run
|
||||
```
|
||||
|
||||
### Cross-Platform Builds
|
||||
|
||||
```bash
|
||||
# Linux (both architectures)
|
||||
make linux
|
||||
# Android debug APK
|
||||
make android-debug
|
||||
|
||||
# Windows (from Linux)
|
||||
make windows
|
||||
|
||||
# Android APK
|
||||
make android
|
||||
|
||||
# WebAssembly
|
||||
make web
|
||||
# Android release APK
|
||||
make android-release PASSWORD=your-keystore-password
|
||||
```
|
||||
|
||||
### Android Emulator Testing
|
||||
@@ -57,7 +51,8 @@ For automated testing with camera notch (cutout) support:
|
||||
```bash
|
||||
# Enter the development shell and run everything automatically
|
||||
nix develop
|
||||
./scripts/emulator.sh # Creates AVD, launches emulator, builds & runs app
|
||||
./scripts/emulator.sh # Creates and launches the test AVD
|
||||
make android-install # Builds, installs, and launches the app
|
||||
```
|
||||
|
||||
This single script handles:
|
||||
@@ -81,12 +76,12 @@ The AVD is configured with:
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `src/` - Main application code (raylib frontend)
|
||||
- `libinbe/` - Core meditation logic (platform-agnostic)
|
||||
- `src/` - Inbe application code
|
||||
- `flint/` - first-party UI/runtime support code used directly by Inbe
|
||||
- `vendor/` - external third-party dependencies
|
||||
- `wasm4/` - Standalone WASM-4 version
|
||||
- `assets/` - Images and sounds
|
||||
- `themes/` - Color theme definitions
|
||||
- `droid/` - Android build configuration
|
||||
- `vendor/raylib/` - raylib submodule
|
||||
|
||||
## License
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@@ -1,72 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<title>Inner Breeze - All Builds</title>
|
||||
<link href="/style.css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Inner Breeze - All available builds and implementations.">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="web-assets/icons/favicon-32x32.png">
|
||||
<meta name="theme-color" content="#5566aa">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<section>
|
||||
<h1>All Builds</h1>
|
||||
<p><a href="/">← Back to Inner Breeze</a></p>
|
||||
</section>
|
||||
<section>
|
||||
<div class="platform-section">
|
||||
<div class="platform-header">
|
||||
<img src="/web-assets/icons/ray.png" alt="raylib"/>
|
||||
<div>
|
||||
<strong><a href="https://raylib.com">Raylib</a></strong>
|
||||
<p>A C library for video game programming - the primary implementation.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="downloads-grid">
|
||||
<a href="/build/web/index.html" class="download-item">Web (WASM)</a>
|
||||
<a href="/build/linux/inbe-linux.tar.gz" class="download-item">Linux</a>
|
||||
<a href="/build/windows/inbe-windows.zip" class="download-item">Windows</a>
|
||||
<a href="/build/android/inbe-latest.apk" class="download-item">Android APK</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="platform-section">
|
||||
<div class="platform-header">
|
||||
<img src="/web-assets/icons/wasm4.png" alt="wasm4"/>
|
||||
<div>
|
||||
<strong><a href="https://wasm4.org">WASM-4</a></strong>
|
||||
<p>A tiny fantasy console that runs WebAssembly cartridges.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="downloads-grid">
|
||||
<a href="/wasm4/build/index.html" class="download-item">Web</a>
|
||||
<a href="/wasm4/build/cart.wasm" class="download-item">cart.wasm</a>
|
||||
<a href="/wasm4/build/inbe-windows.zip" class="download-item">Windows</a>
|
||||
<a href="/wasm4/build/inbe-linux.tar.gz" class="download-item">Linux</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="platform-section">
|
||||
<div class="platform-header">
|
||||
<img src="/web-assets/icons/uxn.png" alt="uxn"/>
|
||||
<div>
|
||||
<strong><a href="https://100r.co/site/uxn.html">Uxn</a></strong>
|
||||
<p>A small virtual computer; <code>.rom</code> runs in a Uxn emulator.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="downloads-grid">
|
||||
<a href="/uxn/index.html" class="download-item">Web</a>
|
||||
<a href="/uxn/inbe.rom" class="download-item">inbe.rom</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<p>© 2026 <a href="https://waozi.xyz">Waozi</a> | <a href="/privacy.html">Privacy Policy</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,7 +18,8 @@ android {
|
||||
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
||||
}
|
||||
|
||||
def getKeystorePath = { -> keystoreProps['keystore.path'] ?: System.getenv("HOME") + "/.android/inbe-release.keystore" }
|
||||
def getKeystorePath = { -> project.findProperty('keystore.path') ?: keystoreProps['keystore.path'] ?: System.getenv("HOME") + "/.android/flint-release.keystore" }
|
||||
def getKeystoreAlias = { -> project.findProperty('keystore.alias') ?: keystoreProps['keystore.alias'] ?: "inbe-key" }
|
||||
|
||||
def releasePassword = project.findProperty('keystore.password') ?: ""
|
||||
|
||||
@@ -26,7 +27,7 @@ android {
|
||||
release {
|
||||
storeFile getKeystorePath() ? file(getKeystorePath()) : null
|
||||
storePassword releasePassword
|
||||
keyAlias "inbe-key"
|
||||
keyAlias getKeystoreAlias()
|
||||
keyPassword releasePassword
|
||||
}
|
||||
}
|
||||
@@ -34,8 +35,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 19
|
||||
targetSdk 35
|
||||
versionCode 23
|
||||
versionName "1.2.2"
|
||||
versionCode 30
|
||||
versionName "1.3.2"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<application
|
||||
android:hasCode="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
@@ -9,9 +10,8 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round">
|
||||
<activity
|
||||
android:name="xyz.waozi.inbe.MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize|uiMode"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
|
||||
android:windowLayoutInDisplayCutoutMode="never">
|
||||
<meta-data
|
||||
|
||||
@@ -3,12 +3,49 @@ project(Inbe C)
|
||||
|
||||
set(REPO_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../../..")
|
||||
set(SRC_DIR "${REPO_ROOT}/src")
|
||||
set(LIBINBE_DIR "${REPO_ROOT}/libinbe")
|
||||
set(RAYLIB_DIR "${REPO_ROOT}/vendor/raylib/src")
|
||||
set(FLINT_DIR "${REPO_ROOT}/vendor/flint")
|
||||
set(FLINT_DIR "${REPO_ROOT}/flint")
|
||||
set(SQLITE_DIR "${REPO_ROOT}/vendor/sqlite")
|
||||
set(SQLITE_BUILD_DIR "${CMAKE_BINARY_DIR}/sqlite")
|
||||
set(SQLITE_AMALGAMATION_C "${SQLITE_BUILD_DIR}/sqlite3.c")
|
||||
set(SQLITE_AMALGAMATION_H "${SQLITE_BUILD_DIR}/sqlite3.h")
|
||||
set(NATIVE_APP_GLUE_DIR "${ANDROID_NDK}/sources/android/native_app_glue")
|
||||
file(GLOB FLINT_SOURCES CONFIGURE_DEPENDS "${FLINT_DIR}/src/*.c")
|
||||
list(REMOVE_ITEM FLINT_SOURCES "${FLINT_DIR}/src/flint_file_dialog.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")
|
||||
set(INBE_EMBEDDED_INPUTS
|
||||
${INBE_LOCALE_ASSETS}
|
||||
assets/whm/1.jpg
|
||||
assets/whm/2.jpg
|
||||
assets/fonts/locales.png
|
||||
assets/fonts/locales.dat
|
||||
assets/fonts/locales-8.png
|
||||
assets/fonts/locales-8.dat
|
||||
${INBE_SOUND_ASSETS}
|
||||
)
|
||||
set(INBE_EMBEDDED_DEPS)
|
||||
foreach(asset ${INBE_EMBEDDED_INPUTS})
|
||||
list(APPEND INBE_EMBEDDED_DEPS "${REPO_ROOT}/${asset}")
|
||||
endforeach()
|
||||
set(INBE_EMBEDDED_ASSETS_C "${CMAKE_BINARY_DIR}/inbe_embedded_assets.c")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${INBE_EMBEDDED_ASSETS_C}"
|
||||
COMMAND sh "${FLINT_DIR}/scripts/embed-assets.sh" "${INBE_EMBEDDED_ASSETS_C}" ${INBE_EMBEDDED_INPUTS}
|
||||
DEPENDS "${FLINT_DIR}/scripts/embed-assets.sh" ${INBE_EMBEDDED_DEPS}
|
||||
WORKING_DIRECTORY "${REPO_ROOT}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${SQLITE_AMALGAMATION_C}" "${SQLITE_AMALGAMATION_H}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${SQLITE_BUILD_DIR}"
|
||||
COMMAND sh -c "cd '${SQLITE_BUILD_DIR}' && '${SQLITE_DIR}/configure'"
|
||||
COMMAND make -C "${SQLITE_BUILD_DIR}" sqlite3.c sqlite3.h
|
||||
DEPENDS "${SQLITE_DIR}/configure" "${SQLITE_DIR}/manifest"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_library(raylib STATIC
|
||||
"${RAYLIB_DIR}/rcore.c"
|
||||
@@ -47,48 +84,49 @@ target_include_directories(raylib PUBLIC
|
||||
"${NATIVE_APP_GLUE_DIR}"
|
||||
)
|
||||
|
||||
add_library(inbe STATIC
|
||||
"${LIBINBE_DIR}/inbe.c"
|
||||
)
|
||||
|
||||
target_include_directories(inbe PUBLIC
|
||||
"${LIBINBE_DIR}"
|
||||
)
|
||||
|
||||
add_library(flint STATIC ${FLINT_SOURCES})
|
||||
|
||||
target_include_directories(flint PUBLIC
|
||||
"${FLINT_DIR}/include"
|
||||
"${RAYLIB_DIR}"
|
||||
)
|
||||
|
||||
add_library(main SHARED
|
||||
"${SRC_DIR}/main.c"
|
||||
"${SRC_DIR}/app.c"
|
||||
"${SRC_DIR}/app_session.c"
|
||||
"${SRC_DIR}/locale.c"
|
||||
"${SRC_DIR}/theme_meta.c"
|
||||
"${SRC_DIR}/theme.c"
|
||||
"${SRC_DIR}/data.c"
|
||||
"${SRC_DIR}/miniz.c"
|
||||
"${SRC_DIR}/android/android_import.c"
|
||||
"${SRC_DIR}/android/android_share.c"
|
||||
"${SRC_DIR}/tabs/history_tab.c"
|
||||
"${SRC_DIR}/tabs/language_tab.c"
|
||||
"${SRC_DIR}/tabs/manual_tab.c"
|
||||
"${SRC_DIR}/tabs/settings_tab.c"
|
||||
"${SRC_DIR}/android/android_insets.c"
|
||||
"${SRC_DIR}/android/android_wakelock.c"
|
||||
"${SRC_DIR}/android/android_timer.c"
|
||||
"${SRC_DIR}/core/breath_engine.c"
|
||||
"${SRC_DIR}/app/app.c"
|
||||
"${SRC_DIR}/app/device_preferences.c"
|
||||
"${SRC_DIR}/session/session.c"
|
||||
"${SRC_DIR}/screens/habits_screen.c"
|
||||
"${SRC_DIR}/session/meditation_music.c"
|
||||
"${SRC_DIR}/core/locale.c"
|
||||
"${SRC_DIR}/core/theme.c"
|
||||
"${SRC_DIR}/storage/data.c"
|
||||
"${SRC_DIR}/storage/storage.c"
|
||||
"${SRC_DIR}/third_party/miniz.c"
|
||||
"${SQLITE_AMALGAMATION_C}"
|
||||
"${SRC_DIR}/platform/android/android_device.c"
|
||||
"${SRC_DIR}/platform/android/android_import.c"
|
||||
"${SRC_DIR}/platform/android/android_runtime_assets.c"
|
||||
"${SRC_DIR}/platform/android/android_share.c"
|
||||
"${SRC_DIR}/screens/practice_screen.c"
|
||||
"${SRC_DIR}/screens/language_screen.c"
|
||||
"${SRC_DIR}/screens/manual_screen.c"
|
||||
"${SRC_DIR}/screens/settings/settings_screen.c"
|
||||
"${INBE_EMBEDDED_ASSETS_C}"
|
||||
${FLINT_SOURCES}
|
||||
"${SRC_DIR}/platform/android/android_insets.c"
|
||||
"${SRC_DIR}/platform/android/android_wakelock.c"
|
||||
"${SRC_DIR}/platform/android/android_timer.c"
|
||||
"${NATIVE_APP_GLUE_DIR}/android_native_app_glue.c"
|
||||
)
|
||||
|
||||
target_include_directories(main PRIVATE
|
||||
"${SRC_DIR}"
|
||||
"${SRC_DIR}/android"
|
||||
"${SRC_DIR}/app"
|
||||
"${SRC_DIR}/core"
|
||||
"${SRC_DIR}/screens"
|
||||
"${SRC_DIR}/screens/settings"
|
||||
"${SRC_DIR}/session"
|
||||
"${SRC_DIR}/storage"
|
||||
"${SRC_DIR}/platform/android"
|
||||
"${SRC_DIR}/third_party"
|
||||
"${NATIVE_APP_GLUE_DIR}"
|
||||
"${LIBINBE_DIR}"
|
||||
"${FLINT_DIR}/include"
|
||||
"${SQLITE_BUILD_DIR}"
|
||||
)
|
||||
|
||||
target_compile_definitions(main PRIVATE
|
||||
@@ -102,6 +140,7 @@ target_compile_definitions(main PRIVATE
|
||||
MG_ENABLE_POSIX_FS=0
|
||||
SUPPORT_MODULE_RAUDIO=1
|
||||
SUPPORT_FILEFORMAT_OGG=1
|
||||
FLINT_EMBEDDED_ONLY=1
|
||||
)
|
||||
|
||||
target_compile_options(main PRIVATE
|
||||
@@ -119,8 +158,6 @@ target_link_options(main PRIVATE
|
||||
|
||||
target_link_libraries(main
|
||||
raylib
|
||||
inbe
|
||||
flint
|
||||
android
|
||||
log
|
||||
OpenSLES
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
package xyz.waozi.inbe;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.NativeActivity;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Insets;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
@@ -10,17 +17,27 @@ import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.util.Log;
|
||||
import android.view.DisplayCutout;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.net.URL;
|
||||
|
||||
public class MainActivity extends NativeActivity {
|
||||
private static final String TAG = "InbeMainActivity";
|
||||
private static final int REQUEST_IMPORT_ZIP = 1001;
|
||||
private static final int REQUEST_POST_NOTIFICATIONS = 1002;
|
||||
private static final String DOWNLOAD_CHANNEL_ID = "runtime_downloads";
|
||||
private static final int DOWNLOAD_NOTIFICATION_ID = 2001;
|
||||
|
||||
static {
|
||||
System.loadLibrary("main");
|
||||
@@ -30,17 +47,226 @@ public class MainActivity extends NativeActivity {
|
||||
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 native void nativeSetInsets(int status, int nav,
|
||||
int cutoutLeft, int cutoutTop, int cutoutRight, int cutoutBottom);
|
||||
private native void nativeSetSystemDark(int dark);
|
||||
private native void nativeSetOrientation(int orientation);
|
||||
private native void nativeWakeLockReady();
|
||||
private native void nativeTimerActivate();
|
||||
private native void nativeTimerDeactivate();
|
||||
private native void nativeSetBackgroundActive(boolean active);
|
||||
private native int nativeGetPlayInBackground();
|
||||
private native void nativePauseSession();
|
||||
private native int nativePauseSession();
|
||||
private native void nativeResumeSession();
|
||||
private native void nativeImportSelectedFile(String path);
|
||||
private native void nativeImportCancelled();
|
||||
private native void nativeRuntimeAssetDownloadSucceeded(long handle, long bytes, int httpStatus);
|
||||
private native void nativeRuntimeAssetDownloadProgress(long handle, long bytes, long totalBytes);
|
||||
private native void nativeRuntimeAssetDownloadFailed(long handle, int httpStatus, String error);
|
||||
private native void nativeTextInputCommit(int codepoint);
|
||||
private native void nativeTextInputBackspace();
|
||||
private native void nativeTextInputEnter();
|
||||
|
||||
private void requestDownloadNotificationPermissionIfNeeded() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
|
||||
checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
|
||||
checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
||||
requestPermissions(new String[] { Manifest.permission.POST_NOTIFICATIONS },
|
||||
REQUEST_POST_NOTIFICATIONS);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private NotificationManager getDownloadNotificationManager() {
|
||||
requestDownloadNotificationPermissionIfNeeded();
|
||||
NotificationManager manager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (manager != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(
|
||||
DOWNLOAD_CHANNEL_ID,
|
||||
"Downloads",
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
);
|
||||
manager.createNotificationChannel(channel);
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
private void showDownloadNotification(NotificationManager manager, long written, long total) {
|
||||
if (manager == null) return;
|
||||
|
||||
Notification.Builder builder = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
|
||||
? new Notification.Builder(this, DOWNLOAD_CHANNEL_ID)
|
||||
: new Notification.Builder(this);
|
||||
builder.setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
.setContentTitle("Downloading audio")
|
||||
.setOngoing(true)
|
||||
.setOnlyAlertOnce(true);
|
||||
if (total > 0) {
|
||||
int progress = (int)Math.max(0, Math.min(100, (written * 100) / total));
|
||||
builder.setProgress(100, progress, false)
|
||||
.setContentText(progress + "%");
|
||||
} else {
|
||||
builder.setProgress(0, 0, true);
|
||||
}
|
||||
manager.notify(DOWNLOAD_NOTIFICATION_ID, builder.build());
|
||||
}
|
||||
|
||||
private void clearDownloadNotification(NotificationManager manager) {
|
||||
if (manager != null) {
|
||||
manager.cancel(DOWNLOAD_NOTIFICATION_ID);
|
||||
}
|
||||
}
|
||||
|
||||
public void setSoftKeyboardVisible(final boolean visible) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
View view = getWindow() != null ? getWindow().getDecorView() : null;
|
||||
if (imm == null || view == null) return;
|
||||
|
||||
if (visible) {
|
||||
view.requestFocus();
|
||||
imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);
|
||||
} else {
|
||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if (event != null && event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
int keyCode = event.getKeyCode();
|
||||
if (keyCode == KeyEvent.KEYCODE_DEL) {
|
||||
nativeTextInputBackspace();
|
||||
} else if (keyCode == KeyEvent.KEYCODE_ENTER ||
|
||||
keyCode == KeyEvent.KEYCODE_NUMPAD_ENTER) {
|
||||
nativeTextInputEnter();
|
||||
} else {
|
||||
int unicode = event.getUnicodeChar();
|
||||
if (unicode >= 32) {
|
||||
nativeTextInputCommit(unicode);
|
||||
}
|
||||
}
|
||||
} else if (event != null && event.getAction() == KeyEvent.ACTION_MULTIPLE &&
|
||||
event.getCharacters() != null) {
|
||||
String chars = event.getCharacters();
|
||||
for (int i = 0; i < chars.length();) {
|
||||
int codepoint = chars.codePointAt(i);
|
||||
if (codepoint >= 32) {
|
||||
nativeTextInputCommit(codepoint);
|
||||
}
|
||||
i += Character.charCount(codepoint);
|
||||
}
|
||||
}
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
public void applyOrientationMode(final int mode) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int requested = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
|
||||
switch (mode) {
|
||||
case 1:
|
||||
requested = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||
break;
|
||||
case 2:
|
||||
requested = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
break;
|
||||
case 3:
|
||||
requested = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
break;
|
||||
default:
|
||||
requested = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
|
||||
break;
|
||||
}
|
||||
setRequestedOrientation(requested);
|
||||
pushDeviceConfiguration();
|
||||
requestInsetRefresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void startRuntimeAssetDownload(final String url, final String path, final long handle) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
HttpURLConnection connection = null;
|
||||
int status = 0;
|
||||
long written = 0;
|
||||
long total = 0;
|
||||
long lastNotify = 0;
|
||||
File outputFile = new File(path);
|
||||
File parent = outputFile.getParentFile();
|
||||
NotificationManager notificationManager = getDownloadNotificationManager();
|
||||
|
||||
try {
|
||||
if (parent != null && !parent.exists() && !parent.mkdirs()) {
|
||||
nativeRuntimeAssetDownloadFailed(handle, status, "failed to create download directory");
|
||||
return;
|
||||
}
|
||||
|
||||
connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
connection.setInstanceFollowRedirects(true);
|
||||
connection.setConnectTimeout(15000);
|
||||
connection.setReadTimeout(30000);
|
||||
connection.setRequestProperty("User-Agent", "flint-runtime-assets/1");
|
||||
status = connection.getResponseCode();
|
||||
|
||||
if (status < 200 || status >= 300) {
|
||||
outputFile.delete();
|
||||
nativeRuntimeAssetDownloadFailed(handle, status, "HTTP " + status);
|
||||
return;
|
||||
}
|
||||
|
||||
total = connection.getContentLengthLong();
|
||||
nativeRuntimeAssetDownloadProgress(handle, written, total);
|
||||
showDownloadNotification(notificationManager, written, total);
|
||||
|
||||
try (InputStream input = connection.getInputStream();
|
||||
FileOutputStream output = new FileOutputStream(outputFile)) {
|
||||
byte[] buffer = new byte[32768];
|
||||
int read;
|
||||
while ((read = input.read(buffer)) != -1) {
|
||||
output.write(buffer, 0, read);
|
||||
written += read;
|
||||
nativeRuntimeAssetDownloadProgress(handle, written, total);
|
||||
long now = android.os.SystemClock.uptimeMillis();
|
||||
if (now - lastNotify > 250 || (total > 0 && written >= total)) {
|
||||
showDownloadNotification(notificationManager, written, total);
|
||||
lastNotify = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nativeRuntimeAssetDownloadSucceeded(handle, written, status);
|
||||
} catch (UnknownHostException | SocketException | SocketTimeoutException e) {
|
||||
outputFile.delete();
|
||||
nativeRuntimeAssetDownloadFailed(handle, status, "NETWORK_UNAVAILABLE");
|
||||
} catch (Exception e) {
|
||||
outputFile.delete();
|
||||
nativeRuntimeAssetDownloadFailed(handle, status, e.getMessage());
|
||||
} finally {
|
||||
clearDownloadNotification(notificationManager);
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, "inbe-runtime-asset-download").start();
|
||||
}
|
||||
|
||||
public void openImportPicker() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@@ -52,8 +278,10 @@ public class MainActivity extends NativeActivity {
|
||||
intent.setType("*/*");
|
||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {
|
||||
"application/zip",
|
||||
"application/octet-stream",
|
||||
"application/x-zip-compressed"
|
||||
"application/x-zip-compressed",
|
||||
"application/vnd.sqlite3",
|
||||
"application/x-sqlite",
|
||||
"application/x-sqlite3"
|
||||
});
|
||||
startActivityForResult(intent, REQUEST_IMPORT_ZIP);
|
||||
} catch (Exception e) {
|
||||
@@ -77,7 +305,7 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
Uri uri = data.getData();
|
||||
File importDir = new File(getCacheDir(), "imports");
|
||||
File importFile = new File(importDir, "inbe-import.zip");
|
||||
File importFile = new File(importDir, "inbe-import");
|
||||
|
||||
try {
|
||||
if (!importDir.exists() && !importDir.mkdirs()) {
|
||||
@@ -165,11 +393,49 @@ public class MainActivity extends NativeActivity {
|
||||
}
|
||||
|
||||
setupInsetsListener();
|
||||
pushDeviceConfiguration();
|
||||
|
||||
// Notify native code that activity is ready for wake lock
|
||||
nativeWakeLockReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
pushDeviceConfiguration();
|
||||
requestInsetRefresh();
|
||||
}
|
||||
|
||||
private void pushDeviceConfiguration() {
|
||||
Configuration config = getResources().getConfiguration();
|
||||
int nightMask = config.uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||
int dark = nightMask == Configuration.UI_MODE_NIGHT_YES ? 1 : 0;
|
||||
int orientation = 0;
|
||||
|
||||
if (config.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
orientation = 1;
|
||||
} else if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
orientation = 2;
|
||||
}
|
||||
|
||||
nativeSetSystemDark(dark);
|
||||
nativeSetOrientation(orientation);
|
||||
}
|
||||
|
||||
private void requestInsetRefresh() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
final View decorView = getWindow().getDecorView();
|
||||
decorView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
decorView.requestApplyInsets();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void setupInsetsListener() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
final View decorView = getWindow().getDecorView();
|
||||
@@ -296,36 +562,52 @@ public class MainActivity extends NativeActivity {
|
||||
return result;
|
||||
}
|
||||
|
||||
private void syncLifecycleState(String reason) {
|
||||
int playInBackground = nativeGetPlayInBackground();
|
||||
boolean shouldRunInBackground = playInBackground != 0 && (activityPaused || !windowFocused);
|
||||
|
||||
Log.d(TAG, reason + ": play_in_background=" + playInBackground
|
||||
+ " activityPaused=" + activityPaused
|
||||
+ " windowFocused=" + windowFocused
|
||||
+ " backgroundActive=" + backgroundExecutionActive);
|
||||
|
||||
if (backgroundExecutionActive != shouldRunInBackground) {
|
||||
nativeSetBackgroundActive(shouldRunInBackground);
|
||||
backgroundExecutionActive = shouldRunInBackground;
|
||||
}
|
||||
|
||||
if (playInBackground == 0) {
|
||||
if (activityPaused && !autoPausedForLifecycle) {
|
||||
autoPausedForLifecycle = nativePauseSession() != 0;
|
||||
} else if (!activityPaused && autoPausedForLifecycle) {
|
||||
nativeResumeSession();
|
||||
autoPausedForLifecycle = false;
|
||||
}
|
||||
} else if (autoPausedForLifecycle) {
|
||||
nativeResumeSession();
|
||||
autoPausedForLifecycle = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
int playInBackground = nativeGetPlayInBackground();
|
||||
Log.d(TAG, "onPause: play_in_background = " + playInBackground);
|
||||
if (playInBackground == 0) {
|
||||
// Auto-pause if play in background is disabled
|
||||
Log.d(TAG, "onPause: Auto-pausing session (play in background disabled)");
|
||||
nativePauseSession();
|
||||
} else {
|
||||
// Continue in background
|
||||
Log.d(TAG, "onPause: Continuing in background (play in background enabled)");
|
||||
nativeTimerActivate();
|
||||
}
|
||||
activityPaused = true;
|
||||
syncLifecycleState("onPause");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
int playInBackground = nativeGetPlayInBackground();
|
||||
Log.d(TAG, "onResume: play_in_background = " + playInBackground);
|
||||
if (playInBackground == 0) {
|
||||
// Auto-resume if play in background is disabled
|
||||
Log.d(TAG, "onResume: Auto-resuming session (play in background disabled)");
|
||||
nativeResumeSession();
|
||||
} else {
|
||||
// Just deactivate timer (session continued in background)
|
||||
Log.d(TAG, "onResume: Deactivating background timer");
|
||||
nativeTimerDeactivate();
|
||||
}
|
||||
activityPaused = false;
|
||||
syncLifecycleState("onResume");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
windowFocused = hasFocus;
|
||||
syncLifecycleState("onWindowFocusChanged");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Eine freie, quelloffene App für geführte Atemmeditation nach der Wim-Hof-Methode.
|
||||
Eine freie, quelloffene App für Atmung, Meditation und Gewohnheiten.
|
||||
|
||||
Funktionen:
|
||||
- Geführte Atemsitzungen mit visuellen und akustischen Hinweisen
|
||||
- Anpassbare Atemanzahl und Haltezeiten
|
||||
- Sitzungsverlauf mit lokaler Speicherung
|
||||
- 8 Farbthemen (Forest, Ocean, Sky, Sunset, Lavender - jeweils hell/dunkel)
|
||||
- Soundeffekte (Einatmen/Ausatmen, Glocke)
|
||||
- Vollbildmodus mit korrekter DPI-Skalierung
|
||||
- Geführte Übungen mit visuellen und akustischen Hinweisen
|
||||
- Mind, Yoga und Fitness für Gewohnheiten und Übungen
|
||||
- Anpassbare Atemsitzungen und Meditationstimer
|
||||
- Gewohnheitstracking mit Sitzungsverlauf
|
||||
- Lokale Speicherung mit Import und Export
|
||||
- Anpassbare Designs mit hellen und dunklen Varianten
|
||||
- Touch-optimierte Oberfläche für Mobilgeräte
|
||||
|
||||
Verfügbare Plattformen: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Eine freie, quelloffene Atemmeditations-App nach der Wim-Hof-Methode.
|
||||
Eine freie App für Atmung, Meditation und Gewohnheiten.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Fixed
|
||||
- History editing now scrolls to the active field once and keeps 16px Unifont row text aligned without clipping.
|
||||
@@ -0,0 +1,5 @@
|
||||
### Fixed
|
||||
- Android sessions continue correctly when the notification shade causes focus loss with background playback enabled.
|
||||
- Android safe-area insets now offset the viewport at the top instead of creating bottom-only padding.
|
||||
- Progressive start speed defaults to 3, normal speed defaults to 6, and the start speed editor preview animates at the exact selected speed.
|
||||
- Dropdown menu text is clipped cleanly while scrolling.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Added
|
||||
- BTC address for donations
|
||||
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
- Import now replaces only matching session files from the ZIP and never removes local sessions missing from the import.
|
||||
- Fixed web scaling behavior.
|
||||
@@ -0,0 +1,6 @@
|
||||
### Added
|
||||
- Habit tracking with default Mind, Yoga, and Fitness habits.
|
||||
- Habit editing, custom colors, sync options, and deletion.
|
||||
- Practice tabs with configurable themes.
|
||||
### Changed
|
||||
- App theme now follows the active practice theme globally.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Fixed
|
||||
- Fixed Android orientation changes so forced landscape and portrait resize the app viewport correctly.
|
||||
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
- Unified scroll containers so content stays out of scrollbar tracks and scroll positions clamp cleanly at the bottom.
|
||||
- Android meditation audio downloads now show a localized network-permission/connectivity modal when the host cannot be resolved.
|
||||
@@ -1,12 +1,12 @@
|
||||
A free, open-source guided breathing meditation app based on the Wim Hof method.
|
||||
A free, open-source practice app for breathing, meditation, and habit tracking.
|
||||
|
||||
Features:
|
||||
- Guided breathing sessions with visual and audio cues
|
||||
- Configurable breath counts and hold times
|
||||
- Session history with local storage
|
||||
- 8 color themes (Forest, Ocean, Sky, Sunset, Lavender - each with light/dark variants)
|
||||
- Sound effects (breath in/out, bell)
|
||||
- Fullscreen mode with proper DPI scaling
|
||||
- Guided practice sessions with visual and audio cues
|
||||
- Mind, Yoga, and Fitness organization for habits and practice views
|
||||
- Configurable breathing sessions and meditation timers
|
||||
- Habit tracking with session history
|
||||
- Local storage with import/export support
|
||||
- Theme customization with light and dark variants
|
||||
- Touch-optimized UI for mobile devices
|
||||
|
||||
Available platforms: Linux, Windows, Android, WebAssembly.
|
||||
Available platforms: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
A free, open-source guided breathing meditation app based on the Wim Hof method.
|
||||
A free, open-source app for breathing, meditation, and habit tracking.
|
||||
@@ -1,12 +1,12 @@
|
||||
Una app libre y de código abierto de meditación respiratoria guiada basada en el método Wim Hof.
|
||||
Una app libre y de código abierto para respiración, meditación y hábitos.
|
||||
|
||||
Funciones:
|
||||
- Sesiones de respiración guiadas con señales visuales y de audio
|
||||
- Cantidad de respiraciones y tiempos de retención configurables
|
||||
- Historial de sesiones con almacenamiento local
|
||||
- 8 temas de color (Forest, Ocean, Sky, Sunset, Lavender, cada uno con variante clara/oscura)
|
||||
- Efectos de sonido (inhalar/exhalar, campana)
|
||||
- Modo de pantalla completa con escalado DPI correcto
|
||||
- Prácticas guiadas con señales visuales y de audio
|
||||
- Organización Mind, Yoga y Fitness para hábitos y prácticas
|
||||
- Sesiones de respiración y temporizadores de meditación configurables
|
||||
- Seguimiento de hábitos con historial de sesiones
|
||||
- Almacenamiento local con importación y exportación
|
||||
- Temas personalizables con variantes claras y oscuras
|
||||
- Interfaz optimizada para pantallas táctiles
|
||||
|
||||
Plataformas disponibles: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Una app libre y de código abierto de meditación respiratoria guiada basada en el método Wim Hof.
|
||||
Una app libre para respiración, meditación y hábitos.
|
||||
@@ -1,12 +1,12 @@
|
||||
Une app libre et open source de méditation respiratoire guidée basée sur la méthode Wim Hof.
|
||||
Une app libre et open source pour respiration, méditation et habitudes.
|
||||
|
||||
Fonctionnalités :
|
||||
- Séances de respiration guidées avec repères visuels et audio
|
||||
- Nombre de respirations et temps de rétention configurables
|
||||
- Historique des séances avec stockage local
|
||||
- 8 thèmes de couleur (Forest, Ocean, Sky, Sunset, Lavender, chacun en clair/sombre)
|
||||
- Effets sonores (inspiration/expiration, cloche)
|
||||
- Mode plein écran avec mise à l'échelle DPI correcte
|
||||
- Pratiques guidées avec repères visuels et audio
|
||||
- Organisation Mind, Yoga et Fitness pour habitudes et pratiques
|
||||
- Séances de respiration et minuteries de méditation configurables
|
||||
- Suivi des habitudes avec historique des séances
|
||||
- Stockage local avec import et export
|
||||
- Thèmes personnalisables avec variantes claires et sombres
|
||||
- Interface optimisée pour les écrans tactiles
|
||||
|
||||
Plateformes disponibles : Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Une app libre de méditation respiratoire guidée basée sur la méthode Wim Hof.
|
||||
Une app libre pour respiration, méditation et habitudes.
|
||||
@@ -1,12 +1,12 @@
|
||||
Um app livre e de código aberto de meditação respiratória guiada baseada no método Wim Hof.
|
||||
Um app livre e de código aberto para respiração, meditação e hábitos.
|
||||
|
||||
Recursos:
|
||||
- Sessões de respiração guiadas com sinais visuais e sonoros
|
||||
- Quantidade de respirações e tempos de retenção configuráveis
|
||||
- Histórico de sessões com armazenamento local
|
||||
- 8 temas de cores (Forest, Ocean, Sky, Sunset, Lavender, cada um com claro/escuro)
|
||||
- Efeitos sonoros (inspirar/expirar, sino)
|
||||
- Modo de tela cheia com escala DPI correta
|
||||
- Práticas guiadas com sinais visuais e sonoros
|
||||
- Organização Mind, Yoga e Fitness para hábitos e práticas
|
||||
- Sessões de respiração e timers de meditação configuráveis
|
||||
- Acompanhamento de hábitos com histórico de sessões
|
||||
- Armazenamento local com importação e exportação
|
||||
- Temas personalizáveis com variantes claras e escuras
|
||||
- Interface otimizada para toque em dispositivos móveis
|
||||
|
||||
Plataformas disponíveis: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Um app livre de meditação respiratória guiada baseada no método Wim Hof.
|
||||
Um app livre para respiração, meditação e hábitos.
|
||||
@@ -16,9 +16,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-sdl2": {
|
||||
"locked": {
|
||||
"lastModified": 1751274312,
|
||||
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-sdl2": "nixpkgs-sdl2"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-sdl2.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
outputs = { self, nixpkgs, nixpkgs-sdl2 }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
@@ -26,6 +27,13 @@
|
||||
mkShell = system:
|
||||
let
|
||||
pkgs = mkPkgs system;
|
||||
sdl2Pkgs = import nixpkgs-sdl2 {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
};
|
||||
};
|
||||
aarch64Pkgs = pkgs.pkgsCross.aarch64-multiplatform;
|
||||
|
||||
windowsCrossEnabled = system == "x86_64-linux";
|
||||
@@ -39,7 +47,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
mingw32Pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
crossSystem = { config = "i686-w64-mingw32"; };
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
};
|
||||
};
|
||||
|
||||
mcfgthreads = pkgs.pkgsCross.mingwW64.windows.mcfgthreads;
|
||||
mcfgthreads32 = pkgs.pkgsCross.mingw32.windows.mcfgthreads;
|
||||
|
||||
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
||||
cmdLineToolsVersion = "11.0";
|
||||
@@ -58,7 +76,8 @@
|
||||
ndkPath = "${sdk}/libexec/android-sdk/ndk-bundle";
|
||||
|
||||
pkgConfigPath = pkgs.lib.makeSearchPath "lib/pkgconfig" [
|
||||
pkgs.SDL2.dev
|
||||
sdl2Pkgs.SDL2.dev
|
||||
pkgs.curl.dev
|
||||
pkgs.libdrm.dev
|
||||
pkgs.libgbm
|
||||
pkgs.libglvnd.dev
|
||||
@@ -75,8 +94,71 @@
|
||||
mingwPkgs.buildPackages.gcc
|
||||
mingwPkgs.windows.mingw_w64
|
||||
mcfgthreads
|
||||
mingw32Pkgs.buildPackages.gcc
|
||||
mingw32Pkgs.windows.mingw_w64
|
||||
mcfgthreads32
|
||||
];
|
||||
|
||||
linuxdeployPluginAppImage = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "linuxdeploy-plugin-appimage";
|
||||
version = "1-alpha-20250213-1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-appimage-x86_64.AppImage";
|
||||
hash = "sha256-mS1QKiSOFKsYVEjd9vbn0lVYy4TUYjw1TDrzUMJfzLM=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cp "$src" linuxdeploy-plugin-appimage.AppImage
|
||||
chmod +x linuxdeploy-plugin-appimage.AppImage
|
||||
./linuxdeploy-plugin-appimage.AppImage --appimage-extract >/dev/null
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
cp squashfs-root/AppRun "$out/bin/linuxdeploy-plugin-appimage"
|
||||
chmod +x "$out/bin/linuxdeploy-plugin-appimage"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
appimagetool = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "appimagetool";
|
||||
version = "continuous";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage";
|
||||
hash = "sha256-uQ9KixiWdUX9p4pEWydoChZC8e+UiM7Si2U5jyvnrdI=";
|
||||
};
|
||||
|
||||
extracted = pkgs.appimageTools.extract {
|
||||
pname = "appimagetool";
|
||||
version = "continuous";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage";
|
||||
hash = "sha256-uQ9KixiWdUX9p4pEWydoChZC8e+UiM7Si2U5jyvnrdI=";
|
||||
};
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
cat > "$out/bin/appimagetool" <<EOF
|
||||
#!${pkgs.runtimeShell}
|
||||
exec "$extracted/AppRun" "\$@"
|
||||
EOF
|
||||
chmod +x "$out/bin/appimagetool"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
windowsProfile = pkgs.lib.optionalString windowsCrossEnabled ''
|
||||
export WIN_CC="x86_64-w64-mingw32-gcc"
|
||||
export WIN_CXX="x86_64-w64-mingw32-g++"
|
||||
@@ -85,7 +167,15 @@
|
||||
export WIN_WINDRES="x86_64-w64-mingw32-windres"
|
||||
export WIN_STRIP="x86_64-w64-mingw32-strip"
|
||||
|
||||
export WIN32_CC="i686-w64-mingw32-gcc"
|
||||
export WIN32_CXX="i686-w64-mingw32-g++"
|
||||
export WIN32_AR="i686-w64-mingw32-ar"
|
||||
export WIN32_RANLIB="i686-w64-mingw32-ranlib"
|
||||
export WIN32_WINDRES="i686-w64-mingw32-windres"
|
||||
export WIN32_STRIP="i686-w64-mingw32-strip"
|
||||
|
||||
export MCFGTHREADS="${mcfgthreads}"
|
||||
export WIN32_MCFGTHREADS="${mcfgthreads32}"
|
||||
export CPATH="$MCFGTHREADS/include:$CPATH"
|
||||
export LIBRARY_PATH="$MCFGTHREADS/lib:$LIBRARY_PATH"
|
||||
export LDFLAGS="-L$MCFGTHREADS/lib $LDFLAGS"
|
||||
@@ -96,12 +186,15 @@
|
||||
extraOutputsToInstall = [ "dev" ];
|
||||
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
SDL2
|
||||
SDL2.dev
|
||||
sdl2Pkgs.SDL2
|
||||
sdl2Pkgs.SDL2.dev
|
||||
butler
|
||||
cmake
|
||||
curl
|
||||
curl.dev
|
||||
emscripten
|
||||
gcc
|
||||
git-lfs
|
||||
gnumake
|
||||
gradle
|
||||
imagemagick
|
||||
@@ -111,6 +204,9 @@
|
||||
libgbm
|
||||
libglvnd
|
||||
libglvnd.dev
|
||||
appimagetool
|
||||
linuxdeploy
|
||||
linuxdeployPluginAppImage
|
||||
mesa
|
||||
ncurses
|
||||
ninja
|
||||
@@ -155,6 +251,8 @@
|
||||
export WEB_AR="emar"
|
||||
export WEB_RANLIB="emranlib"
|
||||
|
||||
export LINUXDEPLOY="linuxdeploy"
|
||||
|
||||
export AARCH64_CC="${aarch64Pkgs.stdenv.cc}/bin/${aarch64Pkgs.stdenv.cc.targetPrefix}cc"
|
||||
export AARCH64_AR="${aarch64Pkgs.stdenv.cc.bintools.bintools}/bin/${aarch64Pkgs.stdenv.cc.targetPrefix}ar"
|
||||
export AARCH64_PKG_CONFIG_PATH="${aarch64PkgConfigPath}"
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
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.
|
||||
@@ -0,0 +1,14 @@
|
||||
# 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.
|
||||
|
After Width: | Height: | Size: 169 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 187 B |
|
After Width: | Height: | Size: 131 B |
|
After Width: | Height: | Size: 180 B |
|
After Width: | Height: | Size: 170 B |
|
After Width: | Height: | Size: 172 B |
|
After Width: | Height: | Size: 157 B |
|
After Width: | Height: | Size: 268 B |
|
After Width: | Height: | Size: 153 B |
|
After Width: | Height: | Size: 208 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 192 B |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 151 B |
|
After Width: | Height: | Size: 217 B |
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 154 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 173 B |
|
After Width: | Height: | Size: 268 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 197 B |
|
After Width: | Height: | Size: 110 B |
|
After Width: | Height: | Size: 172 B |
|
After Width: | Height: | Size: 151 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 117 B |
|
After Width: | Height: | Size: 714 B |
|
After Width: | Height: | Size: 152 B |
|
After Width: | Height: | Size: 165 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 160 B |
|
After Width: | Height: | Size: 154 B |
|
After Width: | Height: | Size: 131 B |
|
After Width: | Height: | Size: 224 B |
|
After Width: | Height: | Size: 343 B |
|
After Width: | Height: | Size: 245 B |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 278 B |
|
After Width: | Height: | Size: 233 B |
|
After Width: | Height: | Size: 112 B |
|
After Width: | Height: | Size: 180 B |
|
After Width: | Height: | Size: 180 B |
|
After Width: | Height: | Size: 165 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 182 B |
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 206 B |
|
After Width: | Height: | Size: 252 B |
|
After Width: | Height: | Size: 205 B |