Add donation address

This commit is contained in:
waozi authored and Waozi committed 2026-07-11 18:49:15 -03:00
1 parent ae0d4d7da3
commit 1be4050ab0
34 files changed
+498 -1085

No files matched your search

+4
View File
@@ -1,4 +1,8 @@
# Changelog
## [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.
+4 -41
View File
@@ -1,44 +1,7 @@
.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
FLINT_DIR ?= vendor/flint
FLINT_PROJECT ?= flint.toml
ANDROID_ACTIVITY ?= xyz.waozi.inbe.MainActivity
FORCE:
.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
include $(FLINT_DIR)/mk/project.mk
+17 -9
View File
@@ -28,26 +28,33 @@ inbe uses [raylib](https://github.com/raysan5/raylib) and requires a Nix develop
nix develop
# Build for your current platform (Linux x86_64/aarch64)
make
flint build native
# Run
./build/linux/inbe-linux-$(uname -m)
flint run native
```
### Cross-Platform Builds
```bash
# Linux (both architectures)
make linux
flint build linux
# Windows (from Linux)
make windows
# Windows (x86_64/i686, OpenGL and software renderer variants, from Linux)
flint build windows
# Android APK
make android
# Android debug APK
flint build android
# WebAssembly
make web
flint build web
# Release/package artifacts
flint dist linux # Linux tar.gz with all Linux arch binaries
flint dist windows # Windows zip with all Windows arch/renderer binaries
flint dist android # Signed release APK
flint dist itch # Build release artifacts and publish to itch.io
flint dist # Full release flow
```
### Android Emulator Testing
@@ -57,7 +64,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
flint run android # Builds, installs, and launches the app
```
This single script handles:
+3 -3
View File
@@ -34,8 +34,8 @@ android {
defaultConfig {
minSdk 19
targetSdk 35
versionCode 25
versionName "1.2.4"
versionCode 26
versionName "1.2.5"
}
@@ -74,7 +74,7 @@ gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(":app:assembleRelease")
&& !project.findProperty('keystore.password')
&& !project.hasProperty('fDroidBuild')) {
throw new GradleException("Use: make android-release PASSWORD=your-password")
throw new GradleException("Use: flint dist android PASSWORD=your-password")
}
}
+27
View File
@@ -9,6 +9,31 @@ 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_THEME_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${FLINT_DIR}/themes/*.ini")
file(GLOB INBE_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
set(INBE_EMBEDDED_INPUTS
${INBE_LOCALE_ASSETS}
${INBE_THEME_ASSETS}
assets/angel.jpg
assets/begin.jpg
assets/fonts/locales.png
assets/fonts/locales.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_library(raylib STATIC
"${RAYLIB_DIR}/rcore.c"
@@ -77,6 +102,7 @@ add_library(main SHARED
"${SRC_DIR}/tabs/language_tab.c"
"${SRC_DIR}/tabs/manual_tab.c"
"${SRC_DIR}/tabs/settings_tab.c"
"${INBE_EMBEDDED_ASSETS_C}"
"${SRC_DIR}/android/android_insets.c"
"${SRC_DIR}/android/android_wakelock.c"
"${SRC_DIR}/android/android_timer.c"
@@ -102,6 +128,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
@@ -0,0 +1,2 @@
### Added
- BTC address for donations
+21
View File
@@ -39,7 +39,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";
@@ -75,6 +85,9 @@
mingwPkgs.buildPackages.gcc
mingwPkgs.windows.mingw_w64
mcfgthreads
mingw32Pkgs.buildPackages.gcc
mingw32Pkgs.windows.mingw_w64
mcfgthreads32
];
windowsProfile = pkgs.lib.optionalString windowsCrossEnabled ''
@@ -85,7 +98,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"
+84
View File
@@ -0,0 +1,84 @@
[app]
name = "inbe"
title = "Inner Breeze"
id = "xyz.waozi.inbe"
version_header = "src/version.h"
[paths]
raylib = "vendor/raylib/src"
flint = "vendor/flint"
core_library = "libinbe"
android_project = "droid"
[sources]
app = [
"src/main.c",
"src/app.c",
"src/app_session.c",
"src/locale.c",
"src/theme_meta.c",
"src/theme.c",
"src/data.c",
"src/miniz.c",
"src/android/android_share.c",
"src/tabs/history_tab.c",
"src/tabs/language_tab.c",
"src/tabs/manual_tab.c",
"src/tabs/settings_tab.c"
]
core = ["libinbe/inbe.c"]
include_dirs = ["src", "src/android", "libinbe"]
[assets]
locales = "locales/*.txt"
themes = "vendor/flint/themes/*.ini"
images = ["assets/angel.jpg", "assets/begin.jpg"]
sounds = [
"assets/sounds/breath-in.ogg",
"assets/sounds/breath-out.ogg",
"assets/sounds/bell.ogg"
]
generated_fonts = ["assets/fonts/locales.png", "assets/fonts/locales.dat"]
font_tool = "vendor/otfchop/otfchop"
font_source = "vendor/otfchop/unifont-17.0.04.otf"
[raylib]
modules = ["core", "shapes", "textures", "text", "audio"]
audio = true
models = false
graphics = "gles2"
formats = ["jpg", "png", "ogg"]
[platform.linux]
arches = ["x86_64", "aarch64"]
backend = "sdl"
[platform.windows]
arches = ["x86_64", "i686"]
renderers = ["opengl", "rlsw"]
[platform.web]
shell = "src/web_shell.html"
public = ["manifest.json", "web-assets"]
[platform.android]
min_sdk = 19
target_sdk = 35
compile_sdk = 35
abis = ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"]
activity = "xyz.waozi.inbe.MainActivity"
sources = [
"src/android/android_import.c",
"src/android/android_share.c",
"src/android/android_insets.c",
"src/android/android_wakelock.c",
"src/android/android_timer.c"
]
[dist.itch]
user = "waozi"
game = "inbe"
web_channel = "html5"
windows_channel = "windows"
linux_channel = "linux"
android_channel = "android"
-5
View File
@@ -1,5 +0,0 @@
# Inbe app configuration
name "inbe"
title "Inner Breeze"
width 320
height 560
+1 -1
View File
@@ -79,7 +79,7 @@
<h1>Inner Breeze</h1>
<p>guided breathing meditation based on the Wim Hof method</p>
<p class="version">1.2.4</p>
<p class="version">1.2.5</p>
<!-- Direct Downloads -->
<nav aria-label="Platform downloads" class="platform-buttons">
-153
View File
@@ -1,153 +0,0 @@
android-init-signing:
@echo "Generating release keystore..."
@mkdir -p ~/.android
keytool -genkeypair -v -storetype PKCS12 \
-keystore ~/.android/inbe-release.keystore \
-alias inbe-key \
-keyalg RSA \
-keysize 4096 \
-validity 10000
@echo ""
@echo "Keystore created at ~/.android/inbe-release.keystore"
@echo ""
@echo "Add this line to $(ANDROID_DIR)/local.properties:"
@echo " keystore.path=$$HOME/.android/inbe-release.keystore"
android-copy-assets:
$(MAKE) $(FONT_FILES)
rm -rf $(ANDROID_DIR)/app/src/main/assets
mkdir -p $(ANDROID_DIR)/app/src/main/assets
cp $(CONFIG_FILES) $(ANDROID_DIR)/app/src/main/assets/
mkdir -p $(ANDROID_DIR)/app/src/main/assets/locales
cp $(LOCALE_FILES) $(ANDROID_DIR)/app/src/main/assets/locales/
mkdir -p $(ANDROID_DIR)/app/src/main/assets/themes
cp $(THEME_FILES) $(ANDROID_DIR)/app/src/main/assets/themes/
mkdir -p $(ANDROID_DIR)/app/src/main/assets/assets
cp $(IMAGE_FILES) $(ANDROID_DIR)/app/src/main/assets/assets/
mkdir -p $(ANDROID_DIR)/app/src/main/assets/assets/fonts
cp $(FONT_FILES) $(ANDROID_DIR)/app/src/main/assets/assets/fonts/
mkdir -p $(ANDROID_DIR)/app/src/main/assets/assets/sounds
cp $(SOUND_FILES) $(ANDROID_DIR)/app/src/main/assets/assets/sounds/
android-debug:
$(MAKE) android-copy-assets
unset ANDROID_HOME; $(GRADLE) -p $(ANDROID_DIR) assembleDebug
$(MAKE) android-copy-debug-apks
android-release:
$(MAKE) android-copy-assets
@if [ -n "$(PASSWORD)" ]; then \
PASSWORD_VALUE="$(PASSWORD)"; \
unset ANDROID_HOME; $(GRADLE) -p $(ANDROID_DIR) assembleRelease -Pkeystore.password="$$PASSWORD_VALUE" || exit $$?; \
$(MAKE) android-copy-release-apks; \
elif [ -t 0 ]; then \
printf "Keystore password: "; \
stty -echo; \
read PASSWORD_VALUE; \
stty echo; \
printf "\n"; \
if [ -n "$$PASSWORD_VALUE" ]; then \
unset ANDROID_HOME; $(GRADLE) -p $(ANDROID_DIR) assembleRelease -Pkeystore.password="$$PASSWORD_VALUE" || exit $$?; \
$(MAKE) android-copy-release-apks; \
else \
echo "Keystore password is required"; \
exit 1; \
fi; \
else \
echo "Keystore password is required. Run from a terminal or use PASSWORD=your-password."; \
exit 1; \
fi
android-bundle:
$(MAKE) android-copy-assets
@if [ -n "$(PASSWORD)" ]; then \
PASSWORD_VALUE="$(PASSWORD)"; \
unset ANDROID_HOME; $(GRADLE) -p $(ANDROID_DIR) bundleRelease -Pkeystore.password="$$PASSWORD_VALUE" || exit $$?; \
$(MAKE) android-copy-bundle; \
elif [ -t 0 ]; then \
printf "Keystore password: "; \
stty -echo; \
read PASSWORD_VALUE; \
stty echo; \
printf "\n"; \
if [ -n "$$PASSWORD_VALUE" ]; then \
unset ANDROID_HOME; $(GRADLE) -p $(ANDROID_DIR) bundleRelease -Pkeystore.password="$$PASSWORD_VALUE" || exit $$?; \
$(MAKE) android-copy-bundle; \
else \
echo "Keystore password is required"; \
exit 1; \
fi; \
else \
echo "Keystore password is required. Run from a terminal or use PASSWORD=your-password."; \
exit 1; \
fi
android-copy-bundle: | $(ANDROID_BUILD_DIR)
@VERSION=$$(grep -m1 '^## \[' CHANGELOG.md | sed 's/^## \[\([^]]*\)\].*/\1/'); \
BUNDLE=$$(find $(ANDROID_DIR)/app/build/outputs/bundle/release -name "*.aab" 2>/dev/null | head -1); \
if [ -n "$$BUNDLE" ] && [ -f "$$BUNDLE" ]; then \
VERSIONED_BUNDLE="$(ANDROID_BUILD_DIR)/inbe-$$VERSION.aab"; \
echo "Copying and renaming $$BUNDLE to $$VERSIONED_BUNDLE"; \
cp "$$BUNDLE" "$$VERSIONED_BUNDLE"; \
ln -sf "$$(basename "$$VERSIONED_BUNDLE")" "$(ANDROID_BUILD_DIR)/inbe-latest.aab"; \
echo "Created symlink: inbe-latest.aab -> $$(basename "$$VERSIONED_BUNDLE")"; \
else \
echo "Bundle not found in $(ANDROID_DIR)/app/build/outputs/bundle/release/"; \
exit 1; \
fi
android-copy-apks: android-copy-debug-apks android-copy-release-apks
android-copy-debug-apks: | $(ANDROID_BUILD_DIR)
@for apk in $(ANDROID_DIR)/app/build/outputs/apk/debug/*.apk; do \
if [ -f "$$apk" ]; then \
echo "Copying $$apk"; \
cp "$$apk" "$(ANDROID_BUILD_DIR)/$$(basename "$$apk")"; \
fi; \
done
android-copy-release-apks: | $(ANDROID_BUILD_DIR)
@VERSION=$$(grep INBE_VERSION_STRING src/version.h | grep -o '"[^"]*"' | tr -d '"'); \
UNIVERSAL_APK=$$(find $(ANDROID_DIR)/app/build/outputs/apk/release -name "app-universal-release.apk" 2>/dev/null); \
if [ -n "$$UNIVERSAL_APK" ] && [ -f "$$UNIVERSAL_APK" ]; then \
VERSIONED_APK="$(ANDROID_BUILD_DIR)/inbe-$$VERSION.apk"; \
echo "Copying and renaming $$UNIVERSAL_APK to $$VERSIONED_APK"; \
cp "$$UNIVERSAL_APK" "$$VERSIONED_APK"; \
ln -sf "$$(basename "$$VERSIONED_APK")" "$(ANDROID_BUILD_DIR)/inbe-latest.apk"; \
echo "Created symlink: inbe-latest.apk -> $$(basename "$$VERSIONED_APK")"; \
else \
for apk in $(ANDROID_DIR)/app/build/outputs/apk/release/*.apk; do \
if [ -f "$$apk" ]; then \
echo "Copying $$apk"; \
cp "$$apk" "$(ANDROID_BUILD_DIR)/$$(basename "$$apk")"; \
fi; \
done; \
fi
android-install: android-debug
@ABI=$$(adb shell getprop ro.product.cpu.abi | tr -d '\r'); \
echo "Device ABI: $$ABI"; \
APK=$(ANDROID_DIR)/app/build/outputs/apk/debug/app-$${ABI}-debug.apk; \
if [ ! -f "$$APK" ]; then \
echo "APK not found for $$ABI, trying universal..."; \
APK=$(ANDROID_DIR)/app/build/outputs/apk/debug/app-debug.apk; \
fi; \
echo "Installing: $$APK"; \
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'); \
echo "Device ABI: $$ABI"; \
APK=$(ANDROID_DIR)/app/build/outputs/apk/release/app-$${ABI}-release.apk; \
if [ ! -f "$$APK" ]; then \
echo "APK not found for $$ABI, trying universal..."; \
APK=$(ANDROID_DIR)/app/build/outputs/apk/release/app-release.apk; \
fi; \
echo "Installing: $$APK"; \
adb install -r "$$APK"
adb shell am start -n $(ANDROID_APP_ID)/$(ANDROID_ACTIVITY)
android-clean:
$(GRADLE) -p $(ANDROID_DIR) clean
rm -rf $(ANDROID_BUILD_DIR)
-18
View File
@@ -1,18 +0,0 @@
clean:
rm -rf build
$(MAKE) -C $(INBE_DIR) clean
clean-linux:
rm -rf $(LINUX_BUILD_DIR)
$(MAKE) -C $(INBE_DIR) clean
clean-windows:
rm -rf $(WINDOWS_BUILD_DIR)
$(MAKE) -C $(INBE_DIR) clean
clean-web:
rm -rf $(WEB_BUILD_DIR)
clean-raylib:
$(MAKE) -C $(RAYLIB_DIR) clean
rm -rf vendor/raylib/build
-114
View File
@@ -1,114 +0,0 @@
CC = gcc
WINDRES = windres
SRC = src/main.c src/app.c src/app_session.c src/locale.c src/theme_meta.c src/theme.c src/data.c src/miniz.c src/android/android_share.c src/tabs/history_tab.c src/tabs/language_tab.c src/tabs/manual_tab.c src/tabs/settings_tab.c
INBE_DIR = libinbe
INBE_A = $(INBE_DIR)/libinbe.a
RAYLIB_DIR = vendor/raylib/src
RAYLIB_BUILD_DIR = vendor/raylib/build/sdl
RAYLIB_A = $(RAYLIB_BUILD_DIR)/libraylib.a
RAYLIB_SOURCES = $(wildcard $(RAYLIB_DIR)/*.c) $(wildcard $(RAYLIB_DIR)/*.h)
FLINT_DIR = vendor/flint
FLINT_SRCS = $(wildcard $(FLINT_DIR)/src/*.c)
FLINT_INCLUDE = -I$(FLINT_DIR)/include
ANDROID_DIR = droid
GRADLE = gradle
ANDROID_APP_ID = xyz.waozi.inbe
ANDROID_ACTIVITY = android.app.NativeActivity
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)
ifeq ($(UNAME_S),Linux)
PLATFORM = linux
else ifeq ($(UNAME_S),Darwin)
PLATFORM = macos
else
PLATFORM = unknown
endif
ifeq ($(UNAME_M),x86_64)
ARCH = x86_64
else ifeq ($(UNAME_M),aarch64)
ARCH = aarch64
else ifeq ($(UNAME_M),armv7l)
ARCH = arm
else
ARCH = $(UNAME_M)
endif
BUILD_DIR = build
LINUX_BUILD_DIR = $(BUILD_DIR)/linux
WINDOWS_BUILD_DIR = $(BUILD_DIR)/windows
ANDROID_BUILD_DIR = $(BUILD_DIR)/android
WEB_BUILD_DIR = $(BUILD_DIR)/web
LINUX_ARCHES = x86_64 aarch64
ANDROID_DIST ?= release
INSTALL_DIR = $(HOME)/.local/share/inbe
BIN_DIR = $(HOME)/bin
TARBALL = $(LINUX_BUILD_DIR)/inbe-linux.tar.gz
CONFIG_FILES = inbe.ini theme.ini
LOCALE_FILES = $(wildcard locales/*.txt)
THEME_FILES = $(wildcard $(FLINT_DIR)/themes/*.ini)
IMAGE_FILES = assets/angel.jpg assets/begin.jpg
SOUND_FILES = assets/sounds/breath-in.ogg assets/sounds/breath-out.ogg assets/sounds/bell.ogg
FONT_OUTPUTS = assets/fonts/locales.png assets/fonts/locales.dat
FONT_FILES = $(FONT_OUTPUTS)
FONT_TOOL = vendor/otfchop/otfchop
FONT_SOURCE = vendor/otfchop/unifont-17.0.04.otf
BUILD_MAKEFILES = Makefile mk/common.mk mk/native.mk mk/windows.mk mk/web.mk mk/android.mk mk/dist.mk mk/clean.mk
assets/fonts:
mkdir -p $@
$(FONT_OUTPUTS): $(LOCALE_FILES) $(FONT_TOOL) | assets/fonts
$(FONT_TOOL) $(FONT_SOURCE) $(LOCALE_FILES) assets/fonts/locales
$(FONT_TOOL): vendor/otfchop/otfchop.c vendor/otfchop/stb_truetype.h vendor/otfchop/stb_image_write.h
$(MAKE) -C vendor/otfchop otfchop
INBE_RAYLIB_CONFIG = $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=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
LDFLAGS = -Wl,--gc-sections -s
.NOTPARALLEL:
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
build:
mkdir -p $(BUILD_DIR)
$(LINUX_BUILD_DIR):
mkdir -p $@
$(WINDOWS_BUILD_DIR):
mkdir -p $@
$(ANDROID_BUILD_DIR):
mkdir -p $@
$(WEB_BUILD_DIR):
mkdir -p $@
$(RAYLIB_BUILD_DIR): build
mkdir -p $@
-135
View File
@@ -1,135 +0,0 @@
dist:
@# Get password once for both Android builds
@if [ -n "$(PASSWORD)" ]; then \
PASSWORD_VALUE="$(PASSWORD)"; \
elif [ -t 0 ]; then \
printf "Keystore password: "; \
stty -echo; \
read PASSWORD_VALUE; \
stty echo; \
printf "\n"; \
else \
echo "Keystore password is required. Run from a terminal or use PASSWORD=your-password."; \
exit 1; \
fi; \
if [ -z "$$PASSWORD_VALUE" ]; then \
echo "Keystore password is required"; \
exit 1; \
fi; \
echo "Building Android release APK (validating password)..."; \
$(MAKE) android-release PASSWORD="$$PASSWORD_VALUE" || exit $$?; \
echo "Building Android bundle..."; \
$(MAKE) android-bundle PASSWORD="$$PASSWORD_VALUE" || exit $$?; \
echo "✓ Android builds complete, proceeding with desktop builds..."; \
$(MAKE) linux || exit $$?; \
$(MAKE) windows || exit $$?; \
$(MAKE) web || exit $$?; \
$(MAKE) dist-linux || exit $$?; \
$(MAKE) dist-windows || exit $$?
dist-linux: linux
@echo "Creating Linux tar.gz package with all Linux arch binaries..."
@mkdir -p $(LINUX_BUILD_DIR)/dist/inbe-linux
@for bin in $(LINUX_BUILD_DIR)/inbe-linux-*; do \
if [ -f "$$bin" ] && [ -x "$$bin" ]; then \
echo "Adding $$bin"; \
cp "$$bin" "$(LINUX_BUILD_DIR)/dist/inbe-linux/$$(basename "$$bin")"; \
fi; \
done
@if [ -z "$$(find $(LINUX_BUILD_DIR)/dist/inbe-linux -type f 2>/dev/null)" ]; then \
echo "No Linux binaries found in $(LINUX_BUILD_DIR)"; \
exit 1; \
fi
@cp $(CONFIG_FILES) $(LINUX_BUILD_DIR)/dist/inbe-linux/
@mkdir -p $(LINUX_BUILD_DIR)/dist/inbe-linux/locales
@cp $(LOCALE_FILES) $(LINUX_BUILD_DIR)/dist/inbe-linux/locales/
@mkdir -p $(LINUX_BUILD_DIR)/dist/inbe-linux/themes
@cp $(THEME_FILES) $(LINUX_BUILD_DIR)/dist/inbe-linux/themes/
@mkdir -p $(LINUX_BUILD_DIR)/dist/inbe-linux/assets
@cp $(IMAGE_FILES) $(LINUX_BUILD_DIR)/dist/inbe-linux/assets/
@mkdir -p $(LINUX_BUILD_DIR)/dist/inbe-linux/assets/fonts
@cp $(FONT_FILES) $(LINUX_BUILD_DIR)/dist/inbe-linux/assets/fonts/
@mkdir -p $(LINUX_BUILD_DIR)/dist/inbe-linux/assets/sounds
@cp $(SOUND_FILES) $(LINUX_BUILD_DIR)/dist/inbe-linux/assets/sounds/
@cd $(LINUX_BUILD_DIR)/dist && tar -czf ../inbe-linux.tar.gz inbe-linux/
@rm -rf $(LINUX_BUILD_DIR)/dist
@echo "Created $(LINUX_BUILD_DIR)/inbe-linux.tar.gz"
install: dist-linux
@echo "Installing inbe to $(INSTALL_DIR)..."
@mkdir -p $(INSTALL_DIR)
@mkdir -p $(BIN_DIR)
@tar -xzf $(TARBALL) -C $(INSTALL_DIR)
@ARCH=$$(uname -m); \
if [ "$$ARCH" != "x86_64" ] && [ "$$ARCH" != "aarch64" ]; then \
echo "Warning: Unsupported architecture $$ARCH, defaulting to x86_64"; \
ARCH="x86_64"; \
fi; \
BINARY_PATH="$(INSTALL_DIR)/inbe-linux/inbe-linux-$$ARCH"; \
if [ ! -f "$$BINARY_PATH" ]; then \
echo "Error: Binary not found: $$BINARY_PATH"; \
echo "Available binaries:"; \
ls $(INSTALL_DIR)/inbe-linux/inbe-linux-* 2>/dev/null || echo " None"; \
exit 1; \
fi; \
if [ -L $(BIN_DIR)/inbe ]; then \
echo "Removing existing symlink: $(BIN_DIR)/inbe"; \
rm $(BIN_DIR)/inbe; \
elif [ -e $(BIN_DIR)/inbe ]; then \
echo "Error: $(BIN_DIR)/inbe exists and is not a symlink"; \
echo "Please remove it manually and try again"; \
exit 1; \
fi; \
ln -s "$$BINARY_PATH" $(BIN_DIR)/inbe && \
echo "Created symlink: $(BIN_DIR)/inbe -> $$BINARY_PATH" && \
echo "" && \
echo "Installation complete!" && \
echo " Binary: $(BIN_DIR)/inbe" && \
echo " Data: $(INSTALL_DIR)/inbe-linux/" && \
echo "" && \
echo "Run 'inbe' to start the application"
uninstall:
@echo "Uninstalling inbe..."
@if [ -L $(BIN_DIR)/inbe ]; then \
echo "Removing symlink: $(BIN_DIR)/inbe"; \
rm $(BIN_DIR)/inbe; \
elif [ -e $(BIN_DIR)/inbe ]; then \
echo "Warning: $(BIN_DIR)/inbe exists but is not a symlink"; \
echo "Skipping symlink removal"; \
fi
@if [ -d $(INSTALL_DIR) ]; then \
echo "Removing directory: $(INSTALL_DIR)"; \
rm -rf $(INSTALL_DIR); \
else \
echo "Install directory not found: $(INSTALL_DIR)"; \
fi
@echo "Uninstall complete"
dist-windows:
@echo "Creating Windows zip package with all Windows arch binaries..."
@mkdir -p $(WINDOWS_BUILD_DIR)/dist/inbe-windows
@for bin in $(WINDOWS_BUILD_DIR)/inbe-windows-*.exe; do \
if [ -f "$$bin" ]; then \
echo "Adding $$bin"; \
cp "$$bin" "$(WINDOWS_BUILD_DIR)/dist/inbe-windows/$$(basename "$$bin")"; \
fi; \
done
@if [ -z "$$(find $(WINDOWS_BUILD_DIR)/dist/inbe-windows -type f 2>/dev/null)" ]; then \
echo "No Windows binaries found in $(WINDOWS_BUILD_DIR)"; \
exit 1; \
fi
@cp $(CONFIG_FILES) $(WINDOWS_BUILD_DIR)/dist/inbe-windows/
@mkdir -p $(WINDOWS_BUILD_DIR)/dist/inbe-windows/locales
@cp $(LOCALE_FILES) $(WINDOWS_BUILD_DIR)/dist/inbe-windows/locales/
@mkdir -p $(WINDOWS_BUILD_DIR)/dist/inbe-windows/themes
@cp $(THEME_FILES) $(WINDOWS_BUILD_DIR)/dist/inbe-windows/themes/
@mkdir -p $(WINDOWS_BUILD_DIR)/dist/inbe-windows/assets
@cp $(IMAGE_FILES) $(WINDOWS_BUILD_DIR)/dist/inbe-windows/assets/
@mkdir -p $(WINDOWS_BUILD_DIR)/dist/inbe-windows/assets/fonts
@cp $(FONT_FILES) $(WINDOWS_BUILD_DIR)/dist/inbe-windows/assets/fonts/
@mkdir -p $(WINDOWS_BUILD_DIR)/dist/inbe-windows/assets/sounds
@cp $(SOUND_FILES) $(WINDOWS_BUILD_DIR)/dist/inbe-windows/assets/sounds/
@cd $(WINDOWS_BUILD_DIR)/dist && zip -r ../inbe-windows.zip inbe-windows/
@rm -rf $(WINDOWS_BUILD_DIR)/dist
@echo "Created $(WINDOWS_BUILD_DIR)/inbe-windows.zip"
-107
View File
@@ -1,107 +0,0 @@
BINARY_NAME = inbe-$(PLATFORM)-$(ARCH)
TARGET = $(LINUX_BUILD_DIR)/$(BINARY_NAME)
LINUX_INBE_A = $(LINUX_BUILD_DIR)/libinbe.a
all: native
native: $(TARGET)
$(RAYLIB_A): $(RAYLIB_SOURCES) | $(RAYLIB_BUILD_DIR)
$(MAKE) -j1 -C $(RAYLIB_DIR) \
PLATFORM=PLATFORM_DESKTOP_SDL \
GRAPHICS=GRAPHICS_API_OPENGL_ES2 \
RAYLIB_LIBTYPE=STATIC \
RAYLIB_RELEASE_PATH=../build/sdl \
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) $(INBE_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
$(LINUX_INBE_A): FORCE | $(LINUX_BUILD_DIR)
$(MAKE) -C $(INBE_DIR) clean
$(MAKE) -C $(INBE_DIR) CC=$(CC) AR=ar
cp $(INBE_A) $@
$(TARGET): $(SRC) $(FLINT_SRCS) $(FONT_FILES) theme.ini inbe.ini $(RAYLIB_A) $(LINUX_INBE_A) | $(LINUX_BUILD_DIR)
$(CC) $(CFLAGS) \
-I$(RAYLIB_DIR) \
-I$(INBE_DIR) \
$(FLINT_INCLUDE) \
-Isrc -Isrc/android \
$(RAY_CFLAGS) \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
-o $@ \
$(SRC) \
$(FLINT_SRCS) \
$(LINUX_INBE_A) \
$(RAYLIB_A) \
$(RAY_LDLIBS) \
-lm -lpthread -ldl -lrt \
$(LDFLAGS)
run: $(TARGET)
./$(TARGET)
linux: $(LINUX_ARCHES:%=linux-%)
linux-x86_64: | $(LINUX_BUILD_DIR)
$(MAKE) build-linux-arch \
ARCH_NAME=x86_64 \
LINUX_CC="$(CC)" \
LINUX_AR=ar \
LINUX_RAY_CFLAGS="$(RAY_CFLAGS)" \
LINUX_RAY_LDLIBS="$(RAY_LDLIBS)" \
LINUX_RAY_SDL_LDLIBS="$(RAY_SDL_LDLIBS)" \
LINUX_RAY_SDL_INCLUDE_DIR="$(RAY_SDL_INCLUDE_DIR)"
linux-aarch64: | $(LINUX_BUILD_DIR)
@if [ -z "$(AARCH64_CC)" ] || [ -z "$(AARCH64_AR)" ] || [ -z "$(AARCH64_RAY_CFLAGS)" ] || [ -z "$(AARCH64_RAY_LDLIBS)" ] || [ -z "$(AARCH64_RAY_SDL_LDLIBS)" ] || [ -z "$(AARCH64_RAY_SDL_INCLUDE_DIR)" ]; then \
echo "AARCH64 cross-build variables are missing. Enter the flake shell with 'nix develop'."; \
exit 1; \
fi
$(MAKE) build-linux-arch \
ARCH_NAME=aarch64 \
LINUX_CC="$(AARCH64_CC)" \
LINUX_AR="$(AARCH64_AR)" \
LINUX_RAY_CFLAGS="$(AARCH64_RAY_CFLAGS)" \
LINUX_RAY_LDLIBS="$(AARCH64_RAY_LDLIBS)" \
LINUX_RAY_SDL_LDLIBS="$(AARCH64_RAY_SDL_LDLIBS)" \
LINUX_RAY_SDL_INCLUDE_DIR="$(AARCH64_RAY_SDL_INCLUDE_DIR)"
build-linux-arch:
@mkdir -p $(LINUX_BUILD_DIR)/obj-$(ARCH_NAME) vendor/raylib/build/sdl-$(ARCH_NAME)
$(MAKE) $(FONT_FILES)
$(MAKE) -C $(RAYLIB_DIR) clean
$(MAKE) -j1 -C $(RAYLIB_DIR) \
CC="$(LINUX_CC)" \
AR="$(LINUX_AR)" \
PLATFORM=PLATFORM_DESKTOP_SDL \
GRAPHICS=GRAPHICS_API_OPENGL_ES2 \
RAYLIB_LIBTYPE=STATIC \
RAYLIB_RELEASE_PATH=../build/sdl-$(ARCH_NAME) \
RAYLIB_MODULE_AUDIO=TRUE \
RAYLIB_MODULE_MODELS=FALSE \
SDL_INCLUDE_PATH="$(LINUX_RAY_SDL_INCLUDE_DIR)" \
SDL_LIBRARIES="$(LINUX_RAY_SDL_LDLIBS)" \
CUSTOM_CFLAGS="-DUSING_SDL2_PROJECT $(LINUX_RAY_CFLAGS) $(INBE_RAYLIB_CONFIG) -Os -ffunction-sections -fdata-sections"
$(MAKE) -C $(RAYLIB_DIR) clean
$(LINUX_CC) $(CFLAGS) -I$(INBE_DIR) -c $(INBE_DIR)/inbe.c -o $(LINUX_BUILD_DIR)/obj-$(ARCH_NAME)/inbe.o
$(LINUX_AR) rcs $(LINUX_BUILD_DIR)/obj-$(ARCH_NAME)/libinbe.a $(LINUX_BUILD_DIR)/obj-$(ARCH_NAME)/inbe.o
$(LINUX_CC) $(CFLAGS) \
-I$(RAYLIB_DIR) \
-I$(INBE_DIR) \
$(FLINT_INCLUDE) \
-Isrc -Isrc/android \
$(LINUX_RAY_CFLAGS) \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
-o $(LINUX_BUILD_DIR)/inbe-linux-$(ARCH_NAME) \
$(SRC) \
$(FLINT_SRCS) \
$(LINUX_BUILD_DIR)/obj-$(ARCH_NAME)/libinbe.a \
vendor/raylib/build/sdl-$(ARCH_NAME)/libraylib.a \
$(LINUX_RAY_LDLIBS) \
-lm -lpthread -ldl -lrt \
$(LDFLAGS)
-67
View File
@@ -1,67 +0,0 @@
WEB_CC ?= emcc
WEB_AR ?= emar
WEB_TARGET = $(WEB_BUILD_DIR)/index.html
WEB_RAYLIB_BUILD_DIR = $(WEB_BUILD_DIR)/raylib
WEB_RAYLIB_A = $(WEB_RAYLIB_BUILD_DIR)/libraylib.web.a
WEB_FLINT_SRCS = $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
WEB_RAYLIB_OBJS = \
$(WEB_RAYLIB_BUILD_DIR)/rcore.o \
$(WEB_RAYLIB_BUILD_DIR)/rshapes.o \
$(WEB_RAYLIB_BUILD_DIR)/rtextures.o \
$(WEB_RAYLIB_BUILD_DIR)/rtext.o \
$(WEB_RAYLIB_BUILD_DIR)/raudio.o
WEB_CFLAGS = -Wall -Wextra -std=gnu99 -Os -DPLATFORM_WEB -DGRAPHICS_API_OPENGL_ES2 -D_DEFAULT_SOURCE -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1
WEB_SHELL = src/web_shell.html
WEB_SOUND_FILES = $(wildcard assets/sounds/*)
WEB_FONT_FILES = $(FONT_FILES)
WEB_LOCALE_PRELOADS = $(foreach file,$(LOCALE_FILES),--preload-file $(file)@locales/$(notdir $(file)))
WEB_THEME_PRELOADS = $(foreach file,$(THEME_FILES),--preload-file $(file)@themes/$(notdir $(file)))
WEB_SOUND_PRELOADS = $(foreach file,$(WEB_SOUND_FILES),--preload-file $(file)@assets/sounds/$(notdir $(file)))
WEB_FONT_PRELOADS = $(foreach file,$(WEB_FONT_FILES),--preload-file $(file)@assets/fonts/$(notdir $(file)))
WEB_ASSET_FILES = $(CONFIG_FILES) $(IMAGE_FILES) $(LOCALE_FILES) $(THEME_FILES) $(WEB_SOUND_FILES) $(WEB_FONT_FILES)
WEB_PUBLIC_FILES = manifest.json $(shell find web-assets -type f 2>/dev/null)
WEB_LDFLAGS = -sUSE_GLFW=3 -sALLOW_MEMORY_GROWTH=1 -lidbfs.js --shell-file $(WEB_SHELL) $(WEB_LOCALE_PRELOADS) $(WEB_THEME_PRELOADS) $(WEB_SOUND_PRELOADS) $(WEB_FONT_PRELOADS) --preload-file [email protected] --preload-file [email protected] --preload-file assets/angel.jpg@assets/angel.jpg --preload-file assets/begin.jpg@assets/begin.jpg
$(WEB_RAYLIB_BUILD_DIR):
mkdir -p $@
web: $(WEB_TARGET)
$(WEB_RAYLIB_BUILD_DIR)/%.o: $(RAYLIB_DIR)/%.c | $(WEB_RAYLIB_BUILD_DIR)
$(WEB_CC) \
-c $< \
-o $@ \
-Wall \
-D_GNU_SOURCE \
-DPLATFORM_WEB \
-DGRAPHICS_API_OPENGL_ES2 \
-Wno-missing-braces \
-Werror=pointer-arith \
-fno-strict-aliasing \
-std=gnu99 \
-D_DEFAULT_SOURCE \
$(INBE_RAYLIB_CONFIG) \
-Os \
-ffunction-sections \
-fdata-sections \
-I$(RAYLIB_DIR)
$(WEB_RAYLIB_A): $(RAYLIB_SOURCES) $(WEB_RAYLIB_OBJS)
$(WEB_AR) rcs $@ $(WEB_RAYLIB_OBJS)
$(WEB_TARGET): $(BUILD_MAKEFILES) $(SRC) $(WEB_FLINT_SRCS) $(INBE_DIR)/inbe.c $(WEB_SHELL) $(WEB_RAYLIB_A) $(WEB_ASSET_FILES) $(WEB_PUBLIC_FILES) | $(WEB_BUILD_DIR)
$(WEB_CC) $(WEB_CFLAGS) \
-I$(RAYLIB_DIR) \
-I$(INBE_DIR) \
$(FLINT_INCLUDE) \
-Isrc -Isrc/android \
-o $@ \
$(SRC) \
$(WEB_FLINT_SRCS) \
$(INBE_DIR)/inbe.c \
$(WEB_RAYLIB_A) \
$(WEB_LDFLAGS)
cache_buster=$$(cksum $(WEB_BUILD_DIR)/index.js $(WEB_BUILD_DIR)/index.data $(WEB_BUILD_DIR)/index.wasm | cksum | cut -d ' ' -f 1); \
sed -i "s#src=\"index.js\"#src=\"index.js?v=$$cache_buster\"#; s#WEB_CACHE_BUSTER#$$cache_buster#g" $(WEB_TARGET)
rsync -a web-assets/ $(WEB_BUILD_DIR)/web-assets/
cp manifest.json $(WEB_BUILD_DIR)/
-64
View File
@@ -1,64 +0,0 @@
WIN_CC = x86_64-w64-mingw32-gcc
WIN_AR = x86_64-w64-mingw32-ar
WIN_WINDRES = x86_64-w64-mingw32-windres
WIN_TARGET = $(WINDOWS_BUILD_DIR)/inbe-windows-x86_64.exe
WIN_RAYLIB_BUILD_DIR = $(WINDOWS_BUILD_DIR)/raylib
WIN_RAYLIB_A = $(WIN_RAYLIB_BUILD_DIR)/libraylib.a
WIN_FLINT_SRCS = $(filter-out $(FLINT_DIR)/src/flint_file_dialog.c,$(FLINT_SRCS))
WIN_RAYLIB_OBJS = \
$(WIN_RAYLIB_BUILD_DIR)/rcore.o \
$(WIN_RAYLIB_BUILD_DIR)/rshapes.o \
$(WIN_RAYLIB_BUILD_DIR)/rtextures.o \
$(WIN_RAYLIB_BUILD_DIR)/rtext.o \
$(WIN_RAYLIB_BUILD_DIR)/raudio.o
WIN_INBE_A = $(WINDOWS_BUILD_DIR)/libinbe.a
$(WIN_RAYLIB_BUILD_DIR):
mkdir -p $@
windows: $(WIN_TARGET)
$(WIN_RAYLIB_BUILD_DIR)/%.o: $(RAYLIB_DIR)/%.c | $(WIN_RAYLIB_BUILD_DIR)
$(WIN_CC) \
-c $< \
-o $@ \
-Wall \
-D_GNU_SOURCE \
-DPLATFORM_DESKTOP_WIN32 \
-DGRAPHICS_API_OPENGL_33 \
-DSUPPORT_MODULE_RAUDIO=1 \
-DSUPPORT_FILEFORMAT_OGG=1 \
-Wno-missing-braces \
-Werror=pointer-arith \
-fno-strict-aliasing \
-std=gnu99 \
-DUNICODE \
$(INBE_RAYLIB_CONFIG) \
-Os \
-ffunction-sections \
-fdata-sections \
-I$(RAYLIB_DIR)
$(WIN_RAYLIB_A): $(RAYLIB_SOURCES) $(WIN_RAYLIB_OBJS)
$(WIN_AR) rcs $@ $(WIN_RAYLIB_OBJS)
$(WIN_INBE_A): FORCE | $(WINDOWS_BUILD_DIR)
$(MAKE) -C $(INBE_DIR) clean
$(MAKE) -C $(INBE_DIR) CC=$(WIN_CC) AR=$(WIN_AR)
cp $(INBE_A) $@
$(WIN_TARGET): $(SRC) $(WIN_FLINT_SRCS) $(FONT_FILES) $(WIN_RAYLIB_A) $(WIN_INBE_A) | $(WINDOWS_BUILD_DIR)
$(WIN_CC) $(CFLAGS) \
-I$(RAYLIB_DIR) \
-I$(INBE_DIR) \
$(FLINT_INCLUDE) \
-Isrc -Isrc/android \
-o $@ \
$(SRC) \
$(WIN_FLINT_SRCS) \
$(WIN_INBE_A) \
$(WIN_RAYLIB_A) \
-L$(MCFGTHREADS)/lib \
-lopengl32 -lgdi32 -lwinmm -lws2_32 \
-mwindows \
$(LDFLAGS)
-56
View File
@@ -1,56 +0,0 @@
#!/bin/bash
# Publish inbe HTML5 to itch.io using butler
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
# Check if butler is installed
if ! command -v butler &> /dev/null; then
echo "Error: 'butler' command not found"
echo "Install it from: https://itch.io/docs/butler/"
exit 1
fi
WEB_BUILD_DIR="build/web"
# Verify the web build exists
if [ ! -f "$WEB_BUILD_DIR/index.html" ]; then
echo "Error: Web build not found at $WEB_BUILD_DIR/index.html"
echo "Run 'make web' first."
exit 1
fi
# Read version from src/version.h
VERSION=$(grep INBE_VERSION_STRING src/version.h | grep -o '"[^"]*"' | tr -d '"')
if [ -z "$VERSION" ]; then
echo "Error: Could not determine version from src/version.h"
exit 1
fi
ITCH_USER="waozi"
ITCH_GAME="inbe"
ITCH_CHANNEL="html5"
echo "Publishing inbe v$VERSION ($ITCH_CHANNEL) to itch.io..."
echo " User: $ITCH_USER"
echo " Game: $ITCH_GAME"
echo " Channel: $ITCH_CHANNEL"
echo " Build dir: $WEB_BUILD_DIR"
echo ""
TMPDIR=$(mktemp -d -p /tmp)
cleanup() {
rm -rf "$TMPDIR"
}
trap cleanup EXIT
rsync -a \
--exclude='raylib' \
"$WEB_BUILD_DIR/" "$TMPDIR/"
rsync -a web-assets/ "$TMPDIR/web-assets/"
cp manifest.json "$TMPDIR/"
butler push "$TMPDIR" "$ITCH_USER/$ITCH_GAME:$ITCH_CHANNEL" --userversion "$VERSION"
echo "✓ Published inbe v$VERSION to https://$ITCH_USER.itch.io/$ITCH_GAME"
+32 -59
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Publish inbe site to inbe.waozi.xyz
set -e
@@ -18,59 +18,33 @@ echo "Publishing inbe.waozi.xyz..."
TMPDIR=$(mktemp -d -p /tmp)
cleanup() {
rm -rf "$TMPDIR"
rm -f "$SITE_DIR/inbe.tar.gz"
if [ "${PACKAGE_ONLY:-0}" != "1" ]; then
rm -f "$SITE_DIR/inbe.tar.gz"
fi
}
trap cleanup EXIT
# Base site files
rsync -av --delete \
--exclude='local.properties' \
--exclude='.git' \
--exclude='*.sym' \
--exclude='*.o' \
--exclude='*.a' \
--exclude='*.d' \
--exclude='*.9' \
--exclude='*.8' \
--exclude='build' \
--exclude='.gradle' \
--exclude='.idea' \
--exclude='node_modules' \
--exclude='*.iml' \
--exclude='.cxx' \
--exclude='.externalNativeBuild' \
--exclude='Captures' \
--exclude='.DS_Store' \
--exclude='Thumbs.db' \
--exclude='.xdp-*' \
--exclude='inbe.tar.gz' \
--exclude='*.bak' \
--exclude='*.swp' \
--exclude='*.lock' \
--exclude='assets' \
--exclude='icons' \
--exclude='site-icons' \
--exclude='gradlew' \
--exclude='gradlew.bat' \
--exclude='shell.nix' \
--exclude='flake.nix' \
--exclude='flake.lock' \
--exclude='Makefile' \
--exclude='gradle' \
--exclude='codex' \
--exclude='.codex' \
--exclude='.npm' \
--exclude='.local' \
--exclude='droid' \
--exclude='vendor' \
. "$TMPDIR/"
# Base site files. Keep this as an allowlist so source/build inputs never leak
# into the published archive.
for site_file in \
index.html \
builds.html \
privacy.html \
legacy-converter.html \
style.css \
og.png \
og.jpg \
sitemap.xml \
robots.txt \
manifest.json; do
[ -f "$site_file" ] && cp "$site_file" "$TMPDIR/"
done
mkdir -p "$TMPDIR/rc"
[ -f "rc/inbe.rc" ] && cp rc/inbe.rc "$TMPDIR/rc/"
[ -d "web-assets" ] && rsync -a web-assets/ "$TMPDIR/web-assets/"
mkdir -p "$TMPDIR/uxn/devices"
[ -f "uxn/index.html" ] && cp uxn/index.html "$TMPDIR/uxn/"
[ -f "uxn/inbe.rom" ] && cp uxn/inbe.* "$TMPDIR/uxn/"
[ -f "uxn/inbe.rom" ] && cp uxn/inbe.rom "$TMPDIR/uxn/"
if [ -d "uxn/devices" ]; then
rsync -av --exclude='*.sym' uxn/devices/*.js "$TMPDIR/uxn/devices/" 2>/dev/null || true
fi
@@ -83,18 +57,18 @@ if [ -d "build/web" ]; then
[ -f "$raylib_web_artifact" ] && cp "$raylib_web_artifact" "$TMPDIR/build/web/"
done
fi
if [ -d "build/linux" ]; then
for raylib_linux_artifact in build/linux/inbe-linux-* build/linux/inbe-linux.tar.gz; do
if [ -d "build/bin/linux" ] || [ -d "build/dist/linux" ]; then
for raylib_linux_artifact in build/bin/linux/inbe-linux-* build/dist/linux/inbe-linux.tar.gz; do
[ -f "$raylib_linux_artifact" ] && cp "$raylib_linux_artifact" "$TMPDIR/build/linux/"
done
fi
if [ -d "build/windows" ]; then
for raylib_windows_artifact in build/windows/inbe-windows-* build/windows/inbe-windows.zip; do
if [ -d "build/bin/windows" ] || [ -d "build/dist/windows" ]; then
for raylib_windows_artifact in build/bin/windows/inbe-windows-*.exe build/dist/windows/inbe-windows.zip; do
[ -f "$raylib_windows_artifact" ] && cp "$raylib_windows_artifact" "$TMPDIR/build/windows/"
done
fi
if [ -d "build/android" ]; then
for raylib_android_artifact in build/android/*.apk; do
for raylib_android_artifact in build/android/inbe-*.apk build/android/inbe-latest.apk build/android/app-universal-release.apk; do
[ -f "$raylib_android_artifact" ] && cp "$raylib_android_artifact" "$TMPDIR/build/android/"
done
fi
@@ -105,9 +79,6 @@ mkdir -p "$TMPDIR/wasm4/build"
for wasm4_artifact in wasm4/build/inbe-x86_64 wasm4/build/inbe-x86_64.exe wasm4/build/inbe-windows.zip wasm4/build/inbe-linux.tar.gz; do
[ -f "$wasm4_artifact" ] && cp "$wasm4_artifact" "$TMPDIR/wasm4/build/"
done
[ -d "wasm4/src" ] && rsync -av --exclude='*.o' --exclude='*.d' --exclude='.npm' --exclude='.local' --exclude='.codex' wasm4/src/ "$TMPDIR/wasm4/src/"
[ -f "wasm4/Makefile" ] && cp wasm4/Makefile "$TMPDIR/wasm4/"
[ -f "wasm4/shell.nix" ] && cp wasm4/shell.nix "$TMPDIR/wasm4/"
[ -f "wasm4/README.md" ] && cp wasm4/README.md "$TMPDIR/wasm4/"
mkdir -p "$TMPDIR/linux/build"
@@ -127,10 +98,7 @@ mkdir -p "$TMPDIR/tcl"
# Compatibility copy for older Android links.
mkdir -p "$TMPDIR/droid"
[ -f "build/android/app-universal-release.apk" ] && cp build/android/app-universal-release.apk "$TMPDIR/droid/app-release.apk"
cp style.css og.png sitemap.xml robots.txt "$TMPDIR/"
[ -f "manifest.json" ] && cp manifest.json "$TMPDIR/"
[ -d "web-assets" ] && rsync -a web-assets/ "$TMPDIR/web-assets/"
[ -f "build/android/inbe-latest.apk" ] && cp build/android/inbe-latest.apk "$TMPDIR/droid/app-release.apk"
if [ -f "$TMPDIR/index.html" ]; then
sed -e 's|/inbe/droid/app/build/outputs/apk/release/app-release.apk|/build/android/app-universal-release.apk|g' \
@@ -148,6 +116,11 @@ if [ ! -f "$SITE_DIR/inbe.tar.gz" ]; then
exit 1
fi
if [ "${PACKAGE_ONLY:-0}" = "1" ]; then
echo "✓ Package created at $SITE_DIR/inbe.tar.gz"
exit 0
fi
hut pages publish -d inbe.waozi.xyz "$SITE_DIR/inbe.tar.gz"
echo "✓ Published to https://inbe.waozi.xyz"
+13 -34
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copy assets to Android project without requiring nix-shell or Makefile dependencies
# Generate embedded assets for Android without requiring nix-shell.
# This script is used by GitHub Actions and F-Droid builds
# This script works from any directory by detecting the repository root
@@ -13,42 +13,15 @@ REPO_ROOT="$(dirname "$SCRIPT_DIR")"
cd "$REPO_ROOT" || exit 1
echo "Running from repository root: $(pwd)"
echo "Copying assets to Android project..."
echo "Generating embedded assets for Android..."
ANDROID_DIR="droid"
ASSETS_DIR="$ANDROID_DIR/app/src/main/assets"
echo "Copying assets to Android project..."
# Remove and recreate assets directory
# Keep APK assets empty; runtime assets are compiled into the native library.
rm -rf "$ASSETS_DIR"
mkdir -p "$ASSETS_DIR"
# Copy config files
echo "Copying config files..."
cp inbe.ini "$ASSETS_DIR/inbe.ini"
cp theme.ini "$ASSETS_DIR/theme.ini"
# Copy locales
echo "Copying locales..."
mkdir -p "$ASSETS_DIR/locales"
cp locales/*.txt "$ASSETS_DIR/locales/"
# Copy themes
echo "Copying themes..."
mkdir -p "$ASSETS_DIR/themes"
cp vendor/flint/themes/*.ini "$ASSETS_DIR/themes/" 2>/dev/null || echo "No theme files found in vendor/flint/themes/"
# Copy images
echo "Copying images..."
mkdir -p "$ASSETS_DIR/assets"
cp assets/angel.jpg assets/begin.jpg "$ASSETS_DIR/assets/"
# Copy sounds
echo "Copying sounds..."
mkdir -p "$ASSETS_DIR/assets/sounds"
cp assets/sounds/breath-in.ogg assets/sounds/breath-out.ogg assets/sounds/bell.ogg "$ASSETS_DIR/assets/sounds/"
# Build fonts only when explicitly requested. Android/F-Droid builds use the
# committed glyph atlas so they do not need host build tools beyond Gradle.
if [ "${INBE_REBUILD_FONTS:-0}" = "1" ]; then
@@ -60,8 +33,14 @@ else
echo "Using versioned fonts..."
fi
echo "Copying fonts..."
mkdir -p "$ASSETS_DIR/assets/fonts"
cp assets/fonts/locales.png assets/fonts/locales.dat "$ASSETS_DIR/assets/fonts/"
mkdir -p build
sh vendor/flint/scripts/embed-assets.sh build/inbe_embedded_assets.c \
locales/*.txt \
vendor/flint/themes/*.ini \
assets/angel.jpg \
assets/begin.jpg \
assets/fonts/locales.png \
assets/fonts/locales.dat \
assets/sounds/*.ogg
echo "Assets copied successfully!"
echo "Embedded assets generated successfully!"
-64
View File
@@ -1,64 +0,0 @@
#!/usr/bin/env bash
set -e
APK_PATH="build/android/app-universal-debug.apk"
PACKAGE_NAME="xyz.waozi.inbe"
echo "🚀 Android App Builder & Installer"
echo " This script builds the APK and installs it to your chosen device"
echo ""
# Build APK
echo "🔨 Building APK..."
make android-debug
echo "✅ APK built: $APK_PATH"
echo ""
# Get list of connected devices
mapfile -t DEVICES < <(adb devices | grep -v "List" | grep -v "^$" | awk '{print $1}')
if [ ${#DEVICES[@]} -eq 0 ]; then
echo "❌ No Android devices found"
echo " Connect a device or start an emulator:"
echo " ./scripts/emulator.sh"
exit 1
fi
echo "📱 Found ${#DEVICES[@]} device(s):"
for i in "${!DEVICES[@]}"; do
DEVICE_ID="${DEVICES[$i]}"
# Get device info
DEVICE_NAME=$(adb -s "$DEVICE_ID" shell getprop ro.product.model 2>/dev/null | tr -d '\r')
DEVICE_ANDROID=$(adb -s "$DEVICE_ID" shell getprop ro.build.version.release 2>/dev/null | tr -d '\r')
echo " [$i] $DEVICE_ID"
echo " Model: $DEVICE_NAME"
echo " Android: $DEVICE_ANDROID"
echo ""
done
# Select device
if [ ${#DEVICES[@]} -eq 1 ]; then
SELECTED_DEVICE="${DEVICES[0]}"
echo "✅ Using only available device"
else
echo -n "👉 Select device number [0-$((${#DEVICES[@]}-1))]: "
read -r SELECTION
SELECTED_DEVICE="${DEVICES[$SELECTION]}"
fi
echo ""
echo "📦 Installing APK to $SELECTED_DEVICE..."
adb -s "$SELECTED_DEVICE" install -r "$APK_PATH"
echo "🚀 Launching app..."
adb -s "$SELECTED_DEVICE" shell am start -n "$PACKAGE_NAME/.MainActivity"
echo ""
echo "🎉 App is running!"
echo ""
echo "To rebuild and reinstall:"
echo " ./scripts/run-android.sh"
echo ""
echo "To view logs:"
echo " adb -s $SELECTED_DEVICE logcat | grep inbe"
-15
View File
@@ -1,15 +0,0 @@
speed 6
max_rounds 4
max_breaths 30
pause_seconds 2
sound_volume 100
tutorial_seen 1
theme 4
dark_mode 0
fullscreen 0
on_screen_keyboard 1
progressive_speed 1
progressive_start_speed 3
advanced_session_controls 1
hold_display_mode 0
language en
+62 -70
View File
@@ -14,6 +14,8 @@
#include "version.h"
#include "flint_ui.h"
#include "flint_dpi.h"
#include "flint_text.h"
#include "flint_embedded_assets.h"
#if !defined(LOTUS_BUILD)
#define RINI_IMPLEMENTATION
@@ -43,11 +45,11 @@ void set_global_inbe_app(InbeApp *app);
#define INBE_DEFAULT_HEIGHT 560
InbeConfig config = {
.title = "",
.title = "Inner Breeze",
.width = INBE_DEFAULT_WIDTH,
.height = INBE_DEFAULT_HEIGHT,
.loaded = 0,
.title_custom = 0
.title_custom = 1
};
int view_width = INBE_DEFAULT_WIDTH;
@@ -124,11 +126,19 @@ load_locale_font(InbeApp *app)
{
Font font;
Image white;
const FlintEmbeddedAsset *png;
const FlintEmbeddedAsset *dat;
if(app == NULL)
return 0;
font = flint_text_load_chopped_font(LOCALE_FONT_PNG, LOCALE_FONT_DAT, LOCALE_FONT_BASE_SIZE);
png = flint_embedded_asset(LOCALE_FONT_PNG);
dat = flint_embedded_asset(LOCALE_FONT_DAT);
if(png == NULL || dat == NULL)
return 0;
font = flint_text_load_chopped_font_from_memory(png->data, png->size, dat->data, dat->size,
LOCALE_FONT_BASE_SIZE);
if(font.texture.id == 0)
return 0;
@@ -305,24 +315,13 @@ refresh_theme_colors(int theme_id, int dark_mode)
static void
inbe_settings_path(char *out, size_t out_size)
{
char apps_path[FS_PATH_MAX];
char inbe_path[FS_PATH_MAX];
snprintf(apps_path, sizeof(apps_path), "%s/apps", data_root());
if(!DirectoryExists(apps_path))
MakeDirectory(apps_path);
snprintf(inbe_path, sizeof(inbe_path), "%s/apps/inbe", data_root());
if(!DirectoryExists(inbe_path))
MakeDirectory(inbe_path);
snprintf(out, out_size, "%s/apps/inbe/settings.ini", data_root());
snprintf(out, out_size, "%s/settings.ini", data_root());
}
static void
register_all_themes(void)
{
if(DirectoryExists("vendor/flint/themes"))
flint_theme_register_defaults("vendor/flint/themes");
else
flint_theme_register_defaults("themes");
flint_theme_register_defaults("vendor/flint/themes");
}
static void
@@ -331,34 +330,6 @@ load_config(void)
if(config.loaded)
return;
const char *paths[] = {
"inbe.ini",
"apps/inbe/inbe.ini",
"../inbe/inbe.ini",
0
};
for(int i = 0; paths[i] != 0; i++) {
rini_data ini = rini_load(paths[i]);
if(ini.count == 0) {
rini_unload(&ini);
continue;
}
const char *title = rini_get_value_text(ini, "title");
if(title != NULL && title[0] != '\0') {
snprintf(config.title, sizeof(config.title), "%s", title);
config.title_custom = 1;
} else {
snprintf(config.title, sizeof(config.title), "%s", locale_get("app_title"));
config.title_custom = 0;
}
config.width = rini_get_value_fallback(ini, "width", INBE_DEFAULT_WIDTH);
config.height = rini_get_value_fallback(ini, "height", INBE_DEFAULT_HEIGHT);
rini_unload(&ini);
break;
}
if(config.title[0] == '\0') {
snprintf(config.title, sizeof(config.title), "%s", locale_get("app_title"));
config.title_custom = 0;
@@ -491,6 +462,7 @@ load_settings(InbeApp *app)
char settings_path[FS_PATH_MAX];
inbe_settings_path(settings_path, sizeof(settings_path));
rini_data settings = rini_load(settings_path);
int settings_missing = settings.count == 0;
int speed = rini_get_value_fallback(settings, "speed", DefaultSpeedLevel);
int max_rounds = rini_get_value_fallback(settings, "max_rounds", DefaultMaxRounds);
@@ -552,12 +524,39 @@ load_settings(InbeApp *app)
apply_settings(&app->inbe, speed, max_rounds, max_breaths, pause_seconds);
refresh_locale_dependent_text(app);
rini_unload(&settings);
if(settings_missing)
save_settings(app);
}
static Texture2D
load_pixel_texture(const char *path)
load_pixel_texture_from_asset(const char *path)
{
Texture2D texture = LoadTexture(path);
const FlintEmbeddedAsset *asset = flint_embedded_asset(path);
Image image;
Texture2D texture = {0};
if(asset == NULL || asset->data == NULL || asset->size == 0)
return texture;
image = LoadImageFromMemory(flint_embedded_asset_extension(path), asset->data, (int)asset->size);
if(image.data == NULL)
return texture;
#if defined(_WIN32)
{
int pot_w = 1;
int pot_h = 1;
while(pot_w < image.width)
pot_w <<= 1;
while(pot_h < image.height)
pot_h <<= 1;
if(pot_w != image.width || pot_h != image.height)
ImageResizeCanvas(&image, pot_w, pot_h, 0, 0, BLANK);
}
#endif
texture = LoadTextureFromImage(image);
UnloadImage(image);
if(texture.id != 0)
SetTextureFilter(texture, TEXTURE_FILTER_POINT);
return texture;
@@ -583,40 +582,29 @@ load_asset_texture(const char *name)
char path[64];
snprintf(path, sizeof(path), "assets/%s", name);
#if defined(PLATFORM_ANDROID) || defined(__ANDROID__) || defined(ANDROID) || defined(PLATFORM_WEB)
return load_pixel_texture(path);
#else
if(FileExists(path))
return load_pixel_texture(path);
snprintf(path, sizeof(path), "../inbe/assets/%s", name);
if(FileExists(path))
return load_pixel_texture(path);
snprintf(path, sizeof(path), "../assets/%s", name);
return load_pixel_texture(path);
#endif
return load_pixel_texture_from_asset(path);
}
static Sound
load_sound_asset(const char *name)
{
char path[96];
const FlintEmbeddedAsset *asset;
Wave wave;
Sound sound = {0};
snprintf(path, sizeof(path), "assets/sounds/%s", name);
#if defined(PLATFORM_ANDROID) || defined(__ANDROID__) || defined(ANDROID) || defined(PLATFORM_WEB)
return LoadSound(path);
#else
if(FileExists(path))
return LoadSound(path);
asset = flint_embedded_asset(path);
if(asset == NULL || asset->data == NULL || asset->size == 0)
return sound;
snprintf(path, sizeof(path), "../inbe/assets/sounds/%s", name);
if(FileExists(path))
return LoadSound(path);
wave = LoadWaveFromMemory(flint_embedded_asset_extension(path), asset->data, (int)asset->size);
if(wave.data == NULL)
return sound;
snprintf(path, sizeof(path), "../assets/sounds/%s", name);
return LoadSound(path);
#endif
sound = LoadSoundFromWave(wave);
UnloadWave(wave);
return sound;
}
static void
@@ -763,6 +751,9 @@ inbe_app_init(void *vapp) {
if(app->globe_icon.id == 0) {
app->globe_icon = load_icon_texture("globe.png");
}
if(app->btc_icon.id == 0) {
app->btc_icon = load_icon_texture("btc.png");
}
if(app->monero_icon.id == 0) {
app->monero_icon = load_icon_texture("monero.png");
}
@@ -1040,6 +1031,7 @@ inbe_app_destroy(void *vapp)
SafeUnloadTexture(app->save_icon);
SafeUnloadTexture(app->discord_icon);
SafeUnloadTexture(app->telegram_icon);
SafeUnloadTexture(app->btc_icon);
SafeUnloadTexture(app->monero_icon);
SafeUnloadTexture(app->sound0_icon);
SafeUnloadTexture(app->sound1_icon);
+1
View File
@@ -133,6 +133,7 @@ struct InbeApp {
Texture2D discord_icon;
Texture2D telegram_icon;
Texture2D globe_icon;
Texture2D btc_icon;
Texture2D monero_icon;
Texture2D sound0_icon;
Texture2D sound1_icon;
+16 -6
View File
@@ -309,25 +309,35 @@ data_root(void)
return g_data_root;
#if defined(PLATFORM_WEB)
snprintf(g_data_root, sizeof(g_data_root), "/home/lotus");
snprintf(g_data_root, sizeof(g_data_root), "/home/inbe");
EM_ASM({
try {
FS.mkdir('/home');
FS.mkdir('/home/lotus');
FS.mkdir('/home/inbe');
} catch(e) {}
});
#elif defined(PLATFORM_ANDROID) || defined(__ANDROID__) || defined(ANDROID)
snprintf(g_data_root, sizeof(g_data_root), "/data/data/xyz.waozi.inbe/files/lotus");
snprintf(g_data_root, sizeof(g_data_root), "%s/inbe", GetWorkingDirectory());
#elif defined(_WIN32)
const char *local = getenv("LOCALAPPDATA");
const char *roaming = getenv("APPDATA");
if(local != NULL && local[0] != '\0')
snprintf(g_data_root, sizeof(g_data_root), "%s/Inbe", local);
else if(roaming != NULL && roaming[0] != '\0')
snprintf(g_data_root, sizeof(g_data_root), "%s/Inbe", roaming);
else
snprintf(g_data_root, sizeof(g_data_root), "Inbe");
#else
const char *xdg = getenv("XDG_DATA_HOME");
const char *home = getenv("HOME");
if(xdg != NULL && xdg[0] != '\0')
snprintf(g_data_root, sizeof(g_data_root), "%s/lotus", xdg);
snprintf(g_data_root, sizeof(g_data_root), "%s/inbe", xdg);
else if(home != NULL && home[0] != '\0')
snprintf(g_data_root, sizeof(g_data_root), "%s/.local/share/lotus", home);
snprintf(g_data_root, sizeof(g_data_root), "%s/.local/share/inbe", home);
else
snprintf(g_data_root, sizeof(g_data_root), ".local/lotus");
snprintf(g_data_root, sizeof(g_data_root), ".local/inbe");
#endif
ensure_dir(g_data_root);
+145 -19
View File
@@ -1,9 +1,18 @@
#include "raylib.h"
#include "app.h"
#include "flint_dpi.h"
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#if defined(_WIN32) && !defined(__ANDROID__)
__declspec(dllimport) int __stdcall MessageBoxA(void *hwnd, const char *text,
const char *caption, unsigned int type);
#define MB_OK 0x00000000u
#define MB_ICONERROR 0x00000010u
#define WIN_ERROR_LOG_CAP 2048
#endif
#if defined(PLATFORM_ANDROID) || defined(__ANDROID__) || defined(ANDROID)
#include "android_insets.h"
#include "android_wakelock.h"
@@ -20,6 +29,127 @@ extern struct android_app *GetAndroidApp(void);
static InbeApp inbe_app;
static InbeApp *g_inbe_app_ptr = NULL; // Global pointer for JNI access
#if defined(_WIN32) && !defined(__ANDROID__)
static FILE *win_log_file;
static char win_recent_errors[WIN_ERROR_LOG_CAP];
static int win_recent_errors_len;
static int
windows_text_contains(const char *text, const char *needle)
{
if(text == NULL || needle == NULL || needle[0] == '\0')
return 0;
for(const char *p = text; *p != '\0'; p++) {
const char *a = p;
const char *b = needle;
while(*a != '\0' && *b != '\0' && *a == *b) {
a++;
b++;
}
if(*b == '\0')
return 1;
}
return 0;
}
static void
windows_remember_error(const char *level, const char *message)
{
if(message == NULL || message[0] == '\0')
return;
int written = snprintf(win_recent_errors + win_recent_errors_len,
sizeof(win_recent_errors) - (size_t)win_recent_errors_len,
"[%s] %s\n",
level,
message);
if(written <= 0)
return;
if((size_t)written >= sizeof(win_recent_errors) - (size_t)win_recent_errors_len) {
win_recent_errors_len = (int)sizeof(win_recent_errors) - 1;
return;
}
win_recent_errors_len += written;
}
static void
windows_trace_log(int log_level, const char *text, va_list args)
{
const char *level = "INFO";
char message[1024];
va_list message_args;
va_copy(message_args, args);
vsnprintf(message, sizeof(message), text, message_args);
va_end(message_args);
switch(log_level) {
case LOG_TRACE: level = "TRACE"; break;
case LOG_DEBUG: level = "DEBUG"; break;
case LOG_INFO: level = "INFO"; break;
case LOG_WARNING: level = "WARNING"; break;
case LOG_ERROR: level = "ERROR"; break;
case LOG_FATAL: level = "FATAL"; break;
default: break;
}
if(log_level >= LOG_WARNING)
windows_remember_error(level, message);
if(win_log_file != NULL) {
fprintf(win_log_file, "[%s] %s\n", level, message);
fflush(win_log_file);
}
}
static void
windows_show_startup_error(void)
{
char dialog[3072];
const char *detail = win_recent_errors[0] != '\0' ?
win_recent_errors :
"No detailed startup error was reported.";
const char *hint = "";
if(windows_text_contains(detail, "OpenGL") ||
windows_text_contains(detail, "WGL") ||
windows_text_contains(detail, "GLFW")) {
hint = "\nThis is usually a graphics driver or virtual GPU problem. "
"Update the GPU driver, enable VM 3D acceleration, or install the VM guest graphics driver.\n";
}
snprintf(dialog,
sizeof(dialog),
"Inner Breeze could not create a window.\n\n%s%s\nA full log was written to inbe.log next to the executable.",
detail,
hint);
MessageBoxA(NULL, dialog, "Inner Breeze", MB_OK | MB_ICONERROR);
}
static void
windows_install_logger(void)
{
win_log_file = fopen("inbe.log", "ab");
if(win_log_file != NULL)
SetTraceLogCallback(windows_trace_log);
}
static void
windows_close_logger(void)
{
if(win_log_file != NULL) {
fclose(win_log_file);
win_log_file = NULL;
}
}
#endif
InbeApp* get_global_inbe_app(void) {
if (g_inbe_app_ptr == NULL) {
TraceLog(LOG_WARNING, "WARNING: get_global_inbe_app called with NULL pointer");
@@ -50,22 +180,6 @@ android_clamp_content_size(int size, int leading_inset, int trailing_inset)
}
#endif
#if !defined(PLATFORM_ANDROID) && !defined(__ANDROID__) && !defined(ANDROID) && !defined(PLATFORM_WEB)
static void
use_packaged_app_directory(void)
{
char probe_path[512];
const char *app_dir = GetApplicationDirectory();
if(app_dir == NULL || app_dir[0] == '\0')
return;
snprintf(probe_path, sizeof(probe_path), "%sassets/sounds/bell.ogg", app_dir);
if(FileExists(probe_path))
ChangeDirectory(app_dir);
}
#endif
static void
frame(void)
{
@@ -134,11 +248,12 @@ int main(int argc, char **argv) {
#endif
#if !defined(PLATFORM_ANDROID) && !defined(__ANDROID__) && !defined(ANDROID) && !defined(PLATFORM_WEB)
use_packaged_app_directory();
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
#endif
#if !defined(PLATFORM_ANDROID) && !defined(__ANDROID__) && !defined(ANDROID) && !defined(PLATFORM_WEB)
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
#if defined(_WIN32) && !defined(__ANDROID__)
windows_install_logger();
TraceLog(LOG_INFO, "INBE: Windows startup");
#endif
#if INBE_ANDROID_BUILD
@@ -155,6 +270,14 @@ int main(int argc, char **argv) {
InitWindow(window_w, window_h, config.title);
if(!IsWindowReady()) {
TraceLog(LOG_ERROR, "INBE: InitWindow failed");
#if defined(_WIN32) && !defined(__ANDROID__)
windows_show_startup_error();
windows_close_logger();
#endif
return 1;
}
flint_dpi_init();
inbe_app_init(&inbe_app);
@@ -177,6 +300,9 @@ int main(int argc, char **argv) {
}
CloseWindow();
#if defined(_WIN32) && !defined(__ANDROID__)
windows_close_logger();
#endif
#endif
return 0;
}
-27
View File
@@ -261,7 +261,6 @@ manual_tab_draw(InbeApp *app)
y += flint_px(18);
{
int progressive_speed = app->inbe.progressive_speed;
int progressive_start_speed = app->inbe.progressive_start_speed;
int toggle_w = flint_px(56);
int toggle_h = flint_px(30);
flint_text_draw(locale_get("progressive_speed_label"), content_x, y,
@@ -275,28 +274,6 @@ manual_tab_draw(InbeApp *app)
app->settings_dirty = 1;
}
y += toggle_h + flint_px(20);
if(app->inbe.progressive_speed) {
int max_speed = app->inbe.speed_level;
int modify_w = flint_text_measure(locale_get("modify_start_speed_button"), flint_ui_font()) + flint_px(24);
int modify_h = flint_px(36);
int modify_hover = 0;
if(modify_w > content_w)
modify_w = content_w;
if(progressive_start_speed != clampi(progressive_start_speed, SETTINGS_SPEED_MIN, max_speed)) {
app->inbe.progressive_start_speed = clampi(progressive_start_speed, SETTINGS_SPEED_MIN, max_speed);
app->settings_preview.progressive_start_speed = app->inbe.progressive_start_speed;
app->settings_dirty = 1;
}
if(ui_draw_generic_button(content_x, y, modify_w, modify_h,
locale_get("modify_start_speed_button"),
UI_BUTTON_STYLE_SECONDARY, &modify_hover)) {
app->modal.active = 1;
app->modal.type = UIModalEditProgressiveStartSpeed;
app->modal.selected_button = 0;
}
}
}
} else if(step == 3) {
int speed = app->inbe.speed_level;
@@ -397,10 +374,6 @@ manual_tab_draw(InbeApp *app)
}
}
if(app->modal.active && app->modal.type == UIModalEditProgressiveStartSpeed) {
settings_draw_progressive_start_speed_editor(app);
}
if(IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) {
app->settings_drag_slider = 0;
if(app->settings_dirty)
+16 -8
View File
@@ -192,11 +192,17 @@ settings_draw_exact_speed_preview(Inbe *preview, int *preview_speed,
if(preview == NULL || preview_speed == NULL)
return;
if(*preview_speed != speed || preview->phase != InbePhaseBreathe) {
if(preview->phase != InbePhaseBreathe) {
inbeinit(preview);
apply_settings(preview, speed, max_rounds, max_breaths, pause_seconds);
preview->progressive_speed = 0;
session_reset_round_breathe(preview);
} else if(*preview_speed != speed) {
apply_settings(preview, speed, max_rounds, max_breaths, pause_seconds);
preview->progressive_speed = 0;
}
if(*preview_speed != speed) {
*preview_speed = speed;
}
@@ -261,7 +267,6 @@ settings_draw_progressive_start_speed_editor(InbeApp *app)
modal_w - flint_px(48), locale_get("progressive_start_speed_label"),
SETTINGS_SPEED_MIN, max_speed, &start_speed, "")) {
app->inbe.progressive_start_speed = start_speed;
app->start_speed_preview_speed = 0;
app->settings_dirty = 1;
}
}
@@ -945,20 +950,23 @@ settings_tab_draw(InbeApp *app)
int icon_padding = flint_px(4);
int icon_spacing = flint_px(20);
int icon_btn_w = icon_size + icon_padding * 2;
int total_w = icon_btn_w * 3 + icon_spacing * 2;
int columns = total_w <= content_w ? 3 : 2;
int link_count = 4;
int max_columns = 4;
int total_w = icon_btn_w * max_columns + icon_spacing * (max_columns - 1);
int columns = total_w <= content_w ? max_columns : 2;
int grid_w = icon_btn_w * columns + icon_spacing * (columns - 1);
int links_start_x = content_x + (content_w - grid_w) / 2;
int row_spacing = flint_px(16);
Texture2D icons[3] = {app->discord_icon, app->telegram_icon, app->monero_icon};
UIIconType icon_types[3] = {UI_ICON_TYPE_NONE, UI_ICON_TYPE_TELEGRAM, UI_ICON_TYPE_MONERO};
const char *urls[3] = {
Texture2D icons[4] = {app->discord_icon, app->telegram_icon, app->btc_icon, app->monero_icon};
UIIconType icon_types[4] = {UI_ICON_TYPE_NONE, UI_ICON_TYPE_TELEGRAM, UI_ICON_TYPE_BTC, UI_ICON_TYPE_MONERO};
const char *urls[4] = {
"https://discord.gg/JbGZ4yENDt",
"https://t.me/lotusinbe",
"https://trocador.app/en/anonpay/?ticker_to=btc&network_to=Mainnet&address=bc1qxzcetg50f6epgddc09n82xqn3zswlmk44235y5&donation=True&simple_mode=True&amount=0.001&name=Inner+Breeze&[email protected]&ticker_from=btc&network_from=Mainnet&buttonbgcolor=445588&textcolor=ffffff&bgcolor=eaeaffff",
"https://trocador.app/en/anonpay/?ticker_to=xmr&network_to=Mainnet&address=86CbC3d4a2GhT9auh6X99JhmhTMFKVVk8Q9cLrKTHkBu8LLkoNWgkBeAT3YZrvDM6NczYe8brUJNsTiFmwpWDZYnFG5kzSH&donation=True&simple_mode=True&amount=0.1&name=Inner+Breeze&[email protected]&ticker_from=xmr&network_from=Mainnet&buttonbgcolor=445588&textcolor=ffffff&bgcolor=eaeaffff"
};
for(int i = 0; i < 3; i++) {
for(int i = 0; i < link_count; i++) {
int col = i % columns;
int row = i / columns;
int icon_x = links_start_x + col * (icon_btn_w + icon_spacing) + icon_padding;
+2 -2
View File
@@ -3,7 +3,7 @@
#define INBE_VERSION_MAJOR 1
#define INBE_VERSION_MINOR 2
#define INBE_VERSION_PATCH 4
#define INBE_VERSION_STRING "1.2.4"
#define INBE_VERSION_PATCH 5
#define INBE_VERSION_STRING "1.2.5"
#endif
-7
View File
@@ -1,7 +0,0 @@
# Lotus theme: inbe
background "#E2EEFCFF"
text "#24487CFF"
circle "#7EB7E6FF"
button "#A6CFF2FF"
button_hover "#689ED7FF"
icon "#24487CFF"
+12
View File
@@ -6,6 +6,7 @@ set -e
CHANGELOG_FILE="CHANGELOG.md"
GRADLE_FILE="droid/app/build.gradle"
WINDOWS_RC_FILE="windows/inbe.rc"
CHANGELOG_DIR="fastlane/metadata/android/en-US/changelogs"
# Extract all versions from CHANGELOG
@@ -54,6 +55,17 @@ sed -i "s/^#define INBE_VERSION_STRING .*/#define INBE_VERSION_STRING \"$LATEST_
echo "✓ Updated $VERSION_H_FILE"
if [ -f "$WINDOWS_RC_FILE" ]; then
WINDOWS_VERSION="$MAJOR,$MINOR,$PATCH,0"
sed -i "s/^ FILEVERSION .*/ FILEVERSION $WINDOWS_VERSION/" "$WINDOWS_RC_FILE"
sed -i "s/^ PRODUCTVERSION .*/ PRODUCTVERSION $WINDOWS_VERSION/" "$WINDOWS_RC_FILE"
sed -i "s/^\([[:space:]]*VALUE \"FileVersion\", \).*/\1\"$LATEST_VERSION\"/" "$WINDOWS_RC_FILE"
sed -i "s/^\([[:space:]]*VALUE \"ProductVersion\", \).*/\1\"$LATEST_VERSION\"/" "$WINDOWS_RC_FILE"
echo "✓ Updated $WINDOWS_RC_FILE"
else
echo "Warning: $WINDOWS_RC_FILE not found"
fi
update_website_version_in_file() {
local file="$1"
+1 -1
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB

+35
View File
@@ -0,0 +1,35 @@
#include <windows.h>
IDI_APP_ICON ICON "inbe.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,5,0
PRODUCTVERSION 1,2,5,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "waozi"
VALUE "FileDescription", "Inner Breeze"
VALUE "FileVersion", "1.2.5"
VALUE "InternalName", "inbe"
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
VALUE "ProductName", "Inner Breeze"
VALUE "ProductVersion", "1.2.5"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END