Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ced92152e1 | ||
|
|
22c309e5e6 | ||
|
|
b4922b5c35 | ||
|
|
e455f5c40c | ||
|
|
7fbdfc5c49 | ||
|
|
d78af1d5b9 | ||
|
|
9d3844820f | ||
|
|
1d01a8aa32 | ||
|
|
e5af624e3d | ||
|
|
fe2f9209c6 | ||
|
|
189227f3a1 | ||
|
|
58c33a90d6 | ||
|
|
5a38c6953e | ||
|
|
fcd134a8e1 | ||
|
|
158c66d588 | ||
|
|
14d801fb11 | ||
|
|
93941b5c6a | ||
|
|
62641a2b41 | ||
|
|
ee94071509 | ||
|
|
9770dd6b4c | ||
|
|
8c82f35493 | ||
|
|
71d0e24c39 | ||
|
|
0ceebd055e | ||
|
|
6555f85769 | ||
|
|
6b40d00b5b | ||
|
|
54cfd0e5e6 | ||
|
|
50674fefd6 | ||
|
|
f6dbfc373a | ||
|
|
f5397afcd6 | ||
|
|
47ff302a0f | ||
|
|
dbe2e2fc6a | ||
|
|
ab662be647 | ||
|
|
0341d983d1 | ||
|
|
b2a8b34df1 | ||
|
|
3b73ae0cb4 | ||
|
|
ddf4671297 | ||
|
|
83489725ed | ||
|
|
7fb258f5d5 | ||
|
|
fff3469944 | ||
|
|
731abd410b | ||
|
|
8fd4efb642 | ||
|
|
adf8352e92 | ||
|
|
706a8a0797 | ||
|
|
d068a8b8e0 | ||
|
|
024b16e36b | ||
|
|
16e4ec2711 | ||
|
|
7ce19c045f | ||
|
|
a2e5a594cd | ||
|
|
ec53dd02af | ||
|
|
8d92924849 | ||
|
|
407681fada | ||
|
|
6a3d3f3559 | ||
|
|
ab59ab6b83 | ||
|
|
321afdd465 | ||
|
|
c2f7d75258 | ||
|
|
eba69651a9 | ||
|
|
8fe47c8a32 | ||
|
|
81032a9dcc | ||
|
|
2be97ca801 | ||
|
|
324d18fdfb | ||
|
|
6889777cff | ||
|
|
ea78b73c86 | ||
|
|
1e5768f6b4 | ||
|
|
612f431376 | ||
|
|
f13a88b94e | ||
|
|
e7d9843e94 | ||
|
|
ae438d7c14 | ||
|
|
879f058d7a | ||
|
|
f208429e08 | ||
|
|
827780347b | ||
|
|
791ca2eba9 | ||
|
|
7d3d4d588b | ||
|
|
eec36173c8 | ||
|
|
a21bc16bcd | ||
|
|
79a9f92e35 | ||
|
|
fc77fa2aea | ||
|
|
e21f49cf4d | ||
|
|
a9f2cbb464 | ||
|
|
a0b86526a2 | ||
|
|
d39f908ddb | ||
|
|
cb8cbf4ca7 | ||
|
|
077e400e38 | ||
|
|
050eee00ae | ||
|
|
212160a48a | ||
|
|
96b479b99f | ||
|
|
19570e4b1c | ||
|
|
fc8c583eee | ||
|
|
2612192889 | ||
|
|
ce26a3d2a3 | ||
|
|
b8b1bc9989 | ||
|
|
16a5a33091 | ||
|
|
dac27ce0d8 | ||
|
|
44e70de7d1 | ||
|
|
7c3318ff72 | ||
|
|
170ecc851a | ||
|
|
c0a9484d7e | ||
|
|
310a822ea5 | ||
|
|
f3a437a165 | ||
|
|
f2dbd32df4 | ||
|
|
66cb62b4d3 | ||
|
|
e9c1945511 | ||
|
|
dd7d05fa28 | ||
|
|
ace95aa97c | ||
|
|
b2cca9395c | ||
|
|
548217c10d | ||
|
|
d674586fe9 | ||
|
|
7f48edf8f6 | ||
|
|
18bff54ec5 | ||
|
|
764a652e1c | ||
|
|
d41a12503e | ||
|
|
8f728d97bb | ||
|
|
e43973882e | ||
|
|
1e8976c0d4 | ||
|
|
90adc96782 | ||
|
|
4f1950c488 | ||
|
|
bc27c72034 | ||
|
|
3f7054fe40 | ||
|
|
48a3a78049 | ||
|
|
b9ee0287f5 | ||
|
|
dec0a05dd0 | ||
|
|
6ad78bd288 | ||
|
|
bb40a2822d | ||
|
|
f189300079 | ||
|
|
77f880f3ed | ||
|
|
163bbeaa8c | ||
|
|
54a6016976 | ||
|
|
11add452e2 | ||
|
|
aaf7019067 | ||
|
|
2829f237a1 |
No files matched your search
@@ -1 +0,0 @@
|
||||
unpackaged_assets/**/*.ogg filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -49,9 +49,6 @@ 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,8 +26,6 @@ node_modules
|
||||
/main
|
||||
!droid/app/src/main
|
||||
droid/app/src/main/assets
|
||||
droid/*.apk
|
||||
droid/*.aab
|
||||
|
||||
.direnv/
|
||||
.node-repl-history
|
||||
@@ -53,5 +51,3 @@ 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,40 +1,4 @@
|
||||
# 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,579 +1,44 @@
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
APP_NAME := inbe
|
||||
APP_TITLE := Inner Breeze
|
||||
ANDROID_APP_ID := xyz.waozi.inbe
|
||||
ANDROID_ACTIVITY := xyz.waozi.inbe.MainActivity
|
||||
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
|
||||
|
||||
CC ?= gcc
|
||||
GRADLE ?= gradle
|
||||
ARCH := $(shell uname -m)
|
||||
ANDROID_KEYSTORE ?= $(HOME)/.android/flint-release.keystore
|
||||
ANDROID_KEY_ALIAS ?= inbe-key
|
||||
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
|
||||
.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
|
||||
@@ -1,16 +1,16 @@
|
||||
# Inner Breeze
|
||||
|
||||
Inner Breeze is a free, open-source practice app for breathing, meditation, and habit tracking.
|
||||
Inner Breeze - A free, open-source guided breathing meditation app based on the Wim Hof method.
|
||||
|
||||
## Features
|
||||
|
||||
- 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
|
||||
- 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
|
||||
|
||||
## Building
|
||||
|
||||
@@ -27,21 +27,27 @@ inbe uses [raylib](https://github.com/raysan5/raylib) and requires a Nix develop
|
||||
# Enter the development shell
|
||||
nix develop
|
||||
|
||||
# Build for your current platform
|
||||
make native
|
||||
# Build for your current platform (Linux x86_64/aarch64)
|
||||
make
|
||||
|
||||
# Run
|
||||
make run
|
||||
./build/linux/inbe-linux-$(uname -m)
|
||||
```
|
||||
|
||||
### Cross-Platform Builds
|
||||
|
||||
```bash
|
||||
# Android debug APK
|
||||
make android-debug
|
||||
# Linux (both architectures)
|
||||
make linux
|
||||
|
||||
# Android release APK
|
||||
make android-release PASSWORD=your-keystore-password
|
||||
# Windows (from Linux)
|
||||
make windows
|
||||
|
||||
# Android APK
|
||||
make android
|
||||
|
||||
# WebAssembly
|
||||
make web
|
||||
```
|
||||
|
||||
### Android Emulator Testing
|
||||
@@ -51,8 +57,7 @@ For automated testing with camera notch (cutout) support:
|
||||
```bash
|
||||
# Enter the development shell and run everything automatically
|
||||
nix develop
|
||||
./scripts/emulator.sh # Creates and launches the test AVD
|
||||
make android-install # Builds, installs, and launches the app
|
||||
./scripts/emulator.sh # Creates AVD, launches emulator, builds & runs app
|
||||
```
|
||||
|
||||
This single script handles:
|
||||
@@ -76,12 +81,12 @@ 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
|
||||
- `wasm4/` - Standalone WASM-4 version
|
||||
- `src/` - Main application code (raylib frontend)
|
||||
- `libinbe/` - Core meditation logic (platform-agnostic)
|
||||
- `assets/` - Images and sounds
|
||||
- `themes/` - Color theme definitions
|
||||
- `droid/` - Android build configuration
|
||||
- `vendor/raylib/` - raylib submodule
|
||||
|
||||
## License
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,72 @@
|
||||
<!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,8 +18,7 @@ android {
|
||||
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
||||
}
|
||||
|
||||
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 getKeystorePath = { -> keystoreProps['keystore.path'] ?: System.getenv("HOME") + "/.android/inbe-release.keystore" }
|
||||
|
||||
def releasePassword = project.findProperty('keystore.password') ?: ""
|
||||
|
||||
@@ -27,7 +26,7 @@ android {
|
||||
release {
|
||||
storeFile getKeystorePath() ? file(getKeystorePath()) : null
|
||||
storePassword releasePassword
|
||||
keyAlias getKeystoreAlias()
|
||||
keyAlias "inbe-key"
|
||||
keyPassword releasePassword
|
||||
}
|
||||
}
|
||||
@@ -35,8 +34,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 19
|
||||
targetSdk 35
|
||||
versionCode 30
|
||||
versionName "1.3.2"
|
||||
versionCode 23
|
||||
versionName "1.2.2"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<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"
|
||||
@@ -10,8 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round">
|
||||
<activity
|
||||
android:name="xyz.waozi.inbe.MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize|uiMode"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
|
||||
android:windowLayoutInDisplayCutoutMode="never">
|
||||
<meta-data
|
||||
|
||||
@@ -3,49 +3,12 @@ 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}/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(FLINT_DIR "${REPO_ROOT}/vendor/flint")
|
||||
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"
|
||||
@@ -84,49 +47,48 @@ 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}/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"
|
||||
"${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"
|
||||
"${NATIVE_APP_GLUE_DIR}/android_native_app_glue.c"
|
||||
)
|
||||
|
||||
target_include_directories(main PRIVATE
|
||||
"${SRC_DIR}"
|
||||
"${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"
|
||||
"${SRC_DIR}/android"
|
||||
"${NATIVE_APP_GLUE_DIR}"
|
||||
"${LIBINBE_DIR}"
|
||||
"${FLINT_DIR}/include"
|
||||
"${SQLITE_BUILD_DIR}"
|
||||
)
|
||||
|
||||
target_compile_definitions(main PRIVATE
|
||||
@@ -140,7 +102,6 @@ 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
|
||||
@@ -158,6 +119,8 @@ target_link_options(main PRIVATE
|
||||
|
||||
target_link_libraries(main
|
||||
raylib
|
||||
inbe
|
||||
flint
|
||||
android
|
||||
log
|
||||
OpenSLES
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
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;
|
||||
@@ -17,27 +10,17 @@ 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");
|
||||
@@ -47,226 +30,17 @@ 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 nativeSetBackgroundActive(boolean active);
|
||||
private native void nativeTimerActivate();
|
||||
private native void nativeTimerDeactivate();
|
||||
private native int nativeGetPlayInBackground();
|
||||
private native int nativePauseSession();
|
||||
private native void 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() {
|
||||
@@ -278,10 +52,8 @@ public class MainActivity extends NativeActivity {
|
||||
intent.setType("*/*");
|
||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {
|
||||
"application/zip",
|
||||
"application/x-zip-compressed",
|
||||
"application/vnd.sqlite3",
|
||||
"application/x-sqlite",
|
||||
"application/x-sqlite3"
|
||||
"application/octet-stream",
|
||||
"application/x-zip-compressed"
|
||||
});
|
||||
startActivityForResult(intent, REQUEST_IMPORT_ZIP);
|
||||
} catch (Exception e) {
|
||||
@@ -305,7 +77,7 @@ public class MainActivity extends NativeActivity {
|
||||
|
||||
Uri uri = data.getData();
|
||||
File importDir = new File(getCacheDir(), "imports");
|
||||
File importFile = new File(importDir, "inbe-import");
|
||||
File importFile = new File(importDir, "inbe-import.zip");
|
||||
|
||||
try {
|
||||
if (!importDir.exists() && !importDir.mkdirs()) {
|
||||
@@ -393,49 +165,11 @@ 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();
|
||||
@@ -562,52 +296,36 @@ 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();
|
||||
activityPaused = true;
|
||||
syncLifecycleState("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();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
activityPaused = false;
|
||||
syncLifecycleState("onResume");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
windowFocused = hasFocus;
|
||||
syncLifecycleState("onWindowFocusChanged");
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Eine freie, quelloffene App für Atmung, Meditation und Gewohnheiten.
|
||||
Eine freie, quelloffene App für geführte Atemmeditation nach der Wim-Hof-Methode.
|
||||
|
||||
Funktionen:
|
||||
- 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
|
||||
- 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
|
||||
- Touch-optimierte Oberfläche für Mobilgeräte
|
||||
|
||||
Verfügbare Plattformen: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Eine freie App für Atmung, Meditation und Gewohnheiten.
|
||||
Eine freie, quelloffene Atemmeditations-App nach der Wim-Hof-Methode.
|
||||
@@ -1,2 +0,0 @@
|
||||
### Fixed
|
||||
- History editing now scrolls to the active field once and keeps 16px Unifont row text aligned without clipping.
|
||||
@@ -1,5 +0,0 @@
|
||||
### 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 +0,0 @@
|
||||
### Added
|
||||
- BTC address for donations
|
||||
@@ -1,3 +0,0 @@
|
||||
### 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,6 +0,0 @@
|
||||
### 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.
|
||||
@@ -1,2 +0,0 @@
|
||||
### Fixed
|
||||
- Fixed Android orientation changes so forced landscape and portrait resize the app viewport correctly.
|
||||
@@ -1,3 +0,0 @@
|
||||
### 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 practice app for breathing, meditation, and habit tracking.
|
||||
A free, open-source guided breathing meditation app based on the Wim Hof method.
|
||||
|
||||
Features:
|
||||
- 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
|
||||
- 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
|
||||
|
||||
Available platforms: Linux, Windows, Android, WebAssembly.
|
||||
Available platforms: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
A free, open-source app for breathing, meditation, and habit tracking.
|
||||
A free, open-source guided breathing meditation app based on the Wim Hof method.
|
||||
@@ -1,12 +1,12 @@
|
||||
Una app libre y de código abierto para respiración, meditación y hábitos.
|
||||
Una app libre y de código abierto de meditación respiratoria guiada basada en el método Wim Hof.
|
||||
|
||||
Funciones:
|
||||
- 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
|
||||
- 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
|
||||
- Interfaz optimizada para pantallas táctiles
|
||||
|
||||
Plataformas disponibles: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Una app libre para respiración, meditación y hábitos.
|
||||
Una app libre y de código abierto de meditación respiratoria guiada basada en el método Wim Hof.
|
||||
@@ -1,12 +1,12 @@
|
||||
Une app libre et open source pour respiration, méditation et habitudes.
|
||||
Une app libre et open source de méditation respiratoire guidée basée sur la méthode Wim Hof.
|
||||
|
||||
Fonctionnalités :
|
||||
- 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
|
||||
- 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
|
||||
- Interface optimisée pour les écrans tactiles
|
||||
|
||||
Plateformes disponibles : Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Une app libre pour respiration, méditation et habitudes.
|
||||
Une app libre de méditation respiratoire guidée basée sur la méthode Wim Hof.
|
||||
@@ -1,12 +1,12 @@
|
||||
Um app livre e de código aberto para respiração, meditação e hábitos.
|
||||
Um app livre e de código aberto de meditação respiratória guiada baseada no método Wim Hof.
|
||||
|
||||
Recursos:
|
||||
- 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
|
||||
- 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
|
||||
- Interface otimizada para toque em dispositivos móveis
|
||||
|
||||
Plataformas disponíveis: Linux, Windows, Android, WebAssembly.
|
||||
@@ -1 +1 @@
|
||||
Um app livre para respiração, meditação e hábitos.
|
||||
Um app livre de meditação respiratória guiada baseada no método Wim Hof.
|
||||
@@ -16,26 +16,9 @@
|
||||
"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-sdl2": "nixpkgs-sdl2"
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-sdl2.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-sdl2 }:
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
@@ -27,13 +26,6 @@
|
||||
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";
|
||||
@@ -47,17 +39,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
@@ -76,8 +58,7 @@
|
||||
ndkPath = "${sdk}/libexec/android-sdk/ndk-bundle";
|
||||
|
||||
pkgConfigPath = pkgs.lib.makeSearchPath "lib/pkgconfig" [
|
||||
sdl2Pkgs.SDL2.dev
|
||||
pkgs.curl.dev
|
||||
pkgs.SDL2.dev
|
||||
pkgs.libdrm.dev
|
||||
pkgs.libgbm
|
||||
pkgs.libglvnd.dev
|
||||
@@ -94,71 +75,8 @@
|
||||
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++"
|
||||
@@ -167,15 +85,7 @@ EOF
|
||||
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"
|
||||
@@ -186,15 +96,12 @@ EOF
|
||||
extraOutputsToInstall = [ "dev" ];
|
||||
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
sdl2Pkgs.SDL2
|
||||
sdl2Pkgs.SDL2.dev
|
||||
SDL2
|
||||
SDL2.dev
|
||||
butler
|
||||
cmake
|
||||
curl
|
||||
curl.dev
|
||||
emscripten
|
||||
gcc
|
||||
git-lfs
|
||||
gnumake
|
||||
gradle
|
||||
imagemagick
|
||||
@@ -204,9 +111,6 @@ EOF
|
||||
libgbm
|
||||
libglvnd
|
||||
libglvnd.dev
|
||||
appimagetool
|
||||
linuxdeploy
|
||||
linuxdeployPluginAppImage
|
||||
mesa
|
||||
ncurses
|
||||
ninja
|
||||
@@ -251,8 +155,6 @@ EOF
|
||||
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}"
|
||||
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
|
Before Width: | Height: | Size: 169 B |
|
Before Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 187 B |
|
Before Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 153 B |
|
Before Width: | Height: | Size: 208 B |
|
Before Width: | Height: | Size: 332 B |
|
Before Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 832 B |
|
Before Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 151 B |
|
Before Width: | Height: | Size: 217 B |
|
Before Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 213 B |
|
Before Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 197 B |
|
Before Width: | Height: | Size: 110 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 151 B |
|
Before Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 117 B |
|
Before Width: | Height: | Size: 714 B |
|
Before Width: | Height: | Size: 152 B |
|
Before Width: | Height: | Size: 165 B |
|
Before Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 160 B |
|
Before Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 266 B |
|
Before Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 112 B |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 165 B |
|
Before Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 182 B |
|
Before Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 252 B |
|
Before Width: | Height: | Size: 205 B |