Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9181c91a3a | ||
|
|
63e790f96a | ||
|
|
aef5f5441b | ||
|
|
827d5e350b | ||
|
|
f64195ec1d | ||
|
|
60b699f28b | ||
|
|
85b9d3daf5 | ||
|
|
89bb5a63ca | ||
|
|
94c004b923 | ||
|
|
9822180288 | ||
|
|
0976fb82bc | ||
|
|
8353f49f27 | ||
|
|
07b46d7bf0 | ||
|
|
99375c9c4b | ||
|
|
1381311e02 | ||
|
|
595f239015 | ||
|
|
d43a8de800 | ||
|
|
894f8f7da8 | ||
|
|
629aa739f6 | ||
|
|
323be33ec4 | ||
|
|
64480683d6 | ||
|
|
2a4d93f3b6 | ||
|
|
61f5a75634 | ||
|
|
085ed5393d | ||
|
|
015843c4d6 | ||
|
|
5d335ff637 | ||
|
|
61731bd680 | ||
|
|
e3f6a22d24 | ||
|
|
e00245e212 | ||
|
|
951309c75f | ||
|
|
c3d36d8d28 | ||
|
|
a9b615614b | ||
|
|
0fb8630dc9 | ||
|
|
bda1bf536d | ||
|
|
7e27498379 | ||
|
|
08ef56d788 | ||
|
|
a3f92aaf5c | ||
|
|
447e2b6187 | ||
|
|
72fd21dad0 | ||
|
|
f9da10204d | ||
|
|
1549f5e3bc | ||
|
|
0c650fc94f | ||
|
|
52716b1edb | ||
|
|
9e40eda25e | ||
|
|
92985e8a03 | ||
|
|
5aedde8d80 | ||
|
|
eb25d437a4 | ||
|
|
7690e04429 | ||
|
|
07ca47ee7c | ||
|
|
7c3275fee3 | ||
|
|
249702ca32 | ||
|
|
2797b3371d | ||
|
|
bc7514406b | ||
|
|
79bcf2c328 | ||
|
|
b5962360c1 | ||
|
|
83ecc17423 | ||
|
|
f01c4d7d81 | ||
|
|
03b714aa64 | ||
|
|
5f116c29cb | ||
|
|
cdbdcd20cb | ||
|
|
6a3362f59e | ||
|
|
43013c64ab | ||
|
|
3f86abb35a | ||
|
|
3e75089266 | ||
|
|
d51fdea355 | ||
|
|
5bc63e7b13 | ||
|
|
03e1fccab3 | ||
|
|
ed2e52c13a | ||
|
|
616ef0cb09 | ||
|
|
e7debfc68f | ||
|
|
796f1393de | ||
|
|
99567e68c1 | ||
|
|
f714674e62 | ||
|
|
3d75216483 | ||
|
|
ac485ea355 | ||
|
|
ad59bb0c51 | ||
|
|
efbeec104d | ||
|
|
f9d109182d | ||
|
|
ccb8c2f2b5 | ||
|
|
2405fb2fcf | ||
|
|
8c25a6630b | ||
|
|
97dd375822 | ||
|
|
93103cc0ea | ||
|
|
a0ded8e537 | ||
|
|
1f8ada56f9 | ||
|
|
e80097fb83 | ||
|
|
4e0dedf97d | ||
|
|
675b2c260a | ||
|
|
463c858565 | ||
|
|
8b739fcbd4 | ||
|
|
7b23749f7d | ||
|
|
3c3eb9e0f2 | ||
|
|
a896ad4f55 | ||
|
|
19ad586e0c | ||
|
|
bdb1e92a51 | ||
|
|
8d1cf2b8f9 | ||
|
|
6547bd9636 | ||
|
|
8d9117bd16 | ||
|
|
695aafa231 | ||
|
|
88598d830f | ||
|
|
0be5f925a7 | ||
|
|
39096d0dd4 | ||
|
|
2242553194 | ||
|
|
5d6985b2b5 | ||
|
|
ba216da8e6 | ||
|
|
13c469166a | ||
|
|
e1298bd262 | ||
|
|
6c1eb327e3 | ||
|
|
3ff05eac4e | ||
|
|
93f1bae5b7 | ||
|
|
896f0b1c22 | ||
|
|
615e32b0c6 | ||
|
|
77093f27a0 | ||
|
|
c13b7e743d | ||
|
|
5e61ef5351 | ||
|
|
79f44d353b | ||
|
|
e22e3f98ef | ||
|
|
14d4594d71 | ||
|
|
899500307c | ||
|
|
50527f15b8 | ||
|
|
94218efc5e | ||
|
|
cf9ff9fb1f | ||
|
|
81410ea4ae | ||
|
|
2add9f0f30 | ||
|
|
8bbc5625b7 | ||
|
|
ccc2032c50 | ||
|
|
df3d04fa26 | ||
|
|
4c5c76e51e | ||
|
|
a3db764783 | ||
|
|
80b2214af3 | ||
|
|
96ef714ca8 | ||
|
|
d808bdf985 | ||
|
|
c448e5d429 | ||
|
|
d592c943f0 | ||
|
|
d90336d710 | ||
|
|
c135464530 | ||
|
|
45a360f498 | ||
|
|
0fad496a0e | ||
|
|
7642a146cc | ||
|
|
d1633381f4 | ||
|
|
2825a41d02 | ||
|
|
c86d2da631 | ||
|
|
99d2433283 | ||
|
|
1650d50c72 |
No files matched your search
@@ -43,7 +43,7 @@ jobs:
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
echo "$KEYSTORE_BASE64" | base64 -d > ~/.android/inbe-release.keystore
|
||||
echo "$KEYSTORE_BASE64" | base64 -d > ~/.android/flint-release.keystore
|
||||
echo "Keystore decoded successfully"
|
||||
|
||||
- name: Copy Assets to Android Project
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
run: |
|
||||
./gradlew assembleRelease \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
-Pkeystore.path="/home/runner/.android/inbe-release.keystore" \
|
||||
-Pkeystore.path="/home/runner/.android/flint-release.keystore" \
|
||||
--stacktrace
|
||||
|
||||
- name: Rename APK
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
# Changelog
|
||||
## [1.2.6] - 2026-06-12
|
||||
### Fixed
|
||||
- Import now replaces only matching session files from the ZIP and never removes local sessions missing from the import.
|
||||
- Fixed web scaling behavior.
|
||||
|
||||
## [1.2.5] - 2026-06-12
|
||||
### Added
|
||||
- BTC address for donations
|
||||
|
||||
## [1.2.4] - 2026-06-11
|
||||
### Fixed
|
||||
- Android sessions continue correctly when the notification shade causes focus loss with background playback enabled.
|
||||
- Android safe-area insets now offset the viewport at the top instead of creating bottom-only padding.
|
||||
- Progressive start speed defaults to 3, normal speed defaults to 6, and the start speed editor preview animates at the exact selected speed.
|
||||
- Dropdown menu text is clipped cleanly while scrolling.
|
||||
|
||||
## [1.2.3] - 2026-06-10
|
||||
### Fixed
|
||||
- History editing now scrolls to the active field once and keeps 16px Unifont row text aligned without clipping.
|
||||
|
||||
## [1.2.2] - 2026-06-10
|
||||
### Fixed
|
||||
- Android touch targets now align correctly on devices with navigation bar window insets.
|
||||
|
||||
@@ -1,44 +1,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
|
||||
@@ -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:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 67 KiB |
-72
@@ -1,72 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<title>Inner Breeze - All Builds</title>
|
||||
<link href="/style.css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Inner Breeze - All available builds and implementations.">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="web-assets/icons/favicon-32x32.png">
|
||||
<meta name="theme-color" content="#5566aa">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<section>
|
||||
<h1>All Builds</h1>
|
||||
<p><a href="/">← Back to Inner Breeze</a></p>
|
||||
</section>
|
||||
<section>
|
||||
<div class="platform-section">
|
||||
<div class="platform-header">
|
||||
<img src="/web-assets/icons/ray.png" alt="raylib"/>
|
||||
<div>
|
||||
<strong><a href="https://raylib.com">Raylib</a></strong>
|
||||
<p>A C library for video game programming - the primary implementation.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="downloads-grid">
|
||||
<a href="/build/web/index.html" class="download-item">Web (WASM)</a>
|
||||
<a href="/build/linux/inbe-linux.tar.gz" class="download-item">Linux</a>
|
||||
<a href="/build/windows/inbe-windows.zip" class="download-item">Windows</a>
|
||||
<a href="/build/android/inbe-latest.apk" class="download-item">Android APK</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="platform-section">
|
||||
<div class="platform-header">
|
||||
<img src="/web-assets/icons/wasm4.png" alt="wasm4"/>
|
||||
<div>
|
||||
<strong><a href="https://wasm4.org">WASM-4</a></strong>
|
||||
<p>A tiny fantasy console that runs WebAssembly cartridges.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="downloads-grid">
|
||||
<a href="/wasm4/build/index.html" class="download-item">Web</a>
|
||||
<a href="/wasm4/build/cart.wasm" class="download-item">cart.wasm</a>
|
||||
<a href="/wasm4/build/inbe-windows.zip" class="download-item">Windows</a>
|
||||
<a href="/wasm4/build/inbe-linux.tar.gz" class="download-item">Linux</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="platform-section">
|
||||
<div class="platform-header">
|
||||
<img src="/web-assets/icons/uxn.png" alt="uxn"/>
|
||||
<div>
|
||||
<strong><a href="https://100r.co/site/uxn.html">Uxn</a></strong>
|
||||
<p>A small virtual computer; <code>.rom</code> runs in a Uxn emulator.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="downloads-grid">
|
||||
<a href="/uxn/index.html" class="download-item">Web</a>
|
||||
<a href="/uxn/inbe.rom" class="download-item">inbe.rom</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<p>© 2026 <a href="https://waozi.xyz">Waozi</a> | <a href="/privacy.html">Privacy Policy</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,7 +18,8 @@ android {
|
||||
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
||||
}
|
||||
|
||||
def getKeystorePath = { -> keystoreProps['keystore.path'] ?: System.getenv("HOME") + "/.android/inbe-release.keystore" }
|
||||
def getKeystorePath = { -> keystoreProps['keystore.path'] ?: System.getenv("HOME") + "/.android/flint-release.keystore" }
|
||||
def getKeystoreAlias = { -> keystoreProps['keystore.alias'] ?: "inbe-key" }
|
||||
|
||||
def releasePassword = project.findProperty('keystore.password') ?: ""
|
||||
|
||||
@@ -26,7 +27,7 @@ android {
|
||||
release {
|
||||
storeFile getKeystorePath() ? file(getKeystorePath()) : null
|
||||
storePassword releasePassword
|
||||
keyAlias "inbe-key"
|
||||
keyAlias getKeystoreAlias()
|
||||
keyPassword releasePassword
|
||||
}
|
||||
}
|
||||
@@ -34,8 +35,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdk 19
|
||||
targetSdk 35
|
||||
versionCode 23
|
||||
versionName "1.2.2"
|
||||
versionCode 27
|
||||
versionName "1.2.6"
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +75,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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -30,14 +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 nativeWakeLockReady();
|
||||
private native void nativeTimerActivate();
|
||||
private native void nativeTimerDeactivate();
|
||||
private native void nativeSetBackgroundActive(boolean active);
|
||||
private native int nativeGetPlayInBackground();
|
||||
private native void nativePauseSession();
|
||||
private native int nativePauseSession();
|
||||
private native void nativeResumeSession();
|
||||
private native void nativeImportSelectedFile(String path);
|
||||
private native void nativeImportCancelled();
|
||||
@@ -296,36 +299,52 @@ public class MainActivity extends NativeActivity {
|
||||
return result;
|
||||
}
|
||||
|
||||
private void syncLifecycleState(String reason) {
|
||||
int playInBackground = nativeGetPlayInBackground();
|
||||
boolean shouldRunInBackground = playInBackground != 0 && (activityPaused || !windowFocused);
|
||||
|
||||
Log.d(TAG, reason + ": play_in_background=" + playInBackground
|
||||
+ " activityPaused=" + activityPaused
|
||||
+ " windowFocused=" + windowFocused
|
||||
+ " backgroundActive=" + backgroundExecutionActive);
|
||||
|
||||
if (backgroundExecutionActive != shouldRunInBackground) {
|
||||
nativeSetBackgroundActive(shouldRunInBackground);
|
||||
backgroundExecutionActive = shouldRunInBackground;
|
||||
}
|
||||
|
||||
if (playInBackground == 0) {
|
||||
if (activityPaused && !autoPausedForLifecycle) {
|
||||
autoPausedForLifecycle = nativePauseSession() != 0;
|
||||
} else if (!activityPaused && autoPausedForLifecycle) {
|
||||
nativeResumeSession();
|
||||
autoPausedForLifecycle = false;
|
||||
}
|
||||
} else if (autoPausedForLifecycle) {
|
||||
nativeResumeSession();
|
||||
autoPausedForLifecycle = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
int playInBackground = nativeGetPlayInBackground();
|
||||
Log.d(TAG, "onPause: play_in_background = " + playInBackground);
|
||||
if (playInBackground == 0) {
|
||||
// Auto-pause if play in background is disabled
|
||||
Log.d(TAG, "onPause: Auto-pausing session (play in background disabled)");
|
||||
nativePauseSession();
|
||||
} else {
|
||||
// Continue in background
|
||||
Log.d(TAG, "onPause: Continuing in background (play in background enabled)");
|
||||
nativeTimerActivate();
|
||||
}
|
||||
activityPaused = true;
|
||||
syncLifecycleState("onPause");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
int playInBackground = nativeGetPlayInBackground();
|
||||
Log.d(TAG, "onResume: play_in_background = " + playInBackground);
|
||||
if (playInBackground == 0) {
|
||||
// Auto-resume if play in background is disabled
|
||||
Log.d(TAG, "onResume: Auto-resuming session (play in background disabled)");
|
||||
nativeResumeSession();
|
||||
} else {
|
||||
// Just deactivate timer (session continued in background)
|
||||
Log.d(TAG, "onResume: Deactivating background timer");
|
||||
nativeTimerDeactivate();
|
||||
}
|
||||
activityPaused = false;
|
||||
syncLifecycleState("onResume");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
windowFocused = hasFocus;
|
||||
syncLifecycleState("onWindowFocusChanged");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
### Fixed
|
||||
- History editing now scrolls to the active field once and keeps 16px Unifont row text aligned without clipping.
|
||||
@@ -0,0 +1,5 @@
|
||||
### Fixed
|
||||
- Android sessions continue correctly when the notification shade causes focus loss with background playback enabled.
|
||||
- Android safe-area insets now offset the viewport at the top instead of creating bottom-only padding.
|
||||
- Progressive start speed defaults to 3, normal speed defaults to 6, and the start speed editor preview animates at the exact selected speed.
|
||||
- Dropdown menu text is clipped cleanly while scrolling.
|
||||
@@ -0,0 +1,2 @@
|
||||
### Added
|
||||
- BTC address for donations
|
||||
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
- Import now replaces only matching session files from the ZIP and never removes local sessions missing from the import.
|
||||
- Fixed web scaling behavior.
|
||||
@@ -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"
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
[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/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"
|
||||
]
|
||||
keystore = "flint-release.keystore"
|
||||
key_alias = "inbe-key"
|
||||
@@ -1,5 +0,0 @@
|
||||
# Inbe app configuration
|
||||
name "inbe"
|
||||
title "Inner Breeze"
|
||||
width 320
|
||||
height 560
|
||||
-204
@@ -1,204 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<title>Inner Breeze - Guided Breathing Meditation</title>
|
||||
<link href="/style.css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Inner Breeze - A free, open-source guided breathing meditation app based on the Wim Hof method. Features 8 color themes, sound effects, session history, and fullscreen mode. Available for web, Android, Windows, and Linux.">
|
||||
<link rel="canonical" href="https://inbe.waozi.xyz/">
|
||||
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://inbe.waozi.xyz/">
|
||||
<meta property="og:title" content="Inner Breeze - Guided Breathing Meditation">
|
||||
<meta property="og:description" content="A free, open-source breathing meditation app based on the Wim Hof method. Features 8 color themes, sound effects, and session history.">
|
||||
<meta property="og:image" content="https://inbe.waozi.xyz/og.jpg">
|
||||
<meta property="og:site_name" content="Inner Breeze">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:url" content="https://inbe.waozi.xyz/">
|
||||
<meta name="twitter:title" content="Inner Breeze - Guided Breathing Meditation">
|
||||
<meta name="twitter:description" content="A free, open-source breathing meditation app based on the Wim Hof method.">
|
||||
<meta name="twitter:image" content="https://inbe.waozi.xyz/og.jpg">
|
||||
<meta name="twitter:site" content="@waozixyz">
|
||||
<meta name="twitter:creator" content="@waozixyz">
|
||||
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="web-assets/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="web-assets/icons/icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="web-assets/icons/icon-512x512.png">
|
||||
<link rel="apple-touch-icon" href="web-assets/icons/apple-touch-icon.png">
|
||||
<meta name="theme-color" content="#5566aa">
|
||||
|
||||
<!-- JSON-LD Structured Data -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "SoftwareApplication",
|
||||
"name": "Inner Breeze",
|
||||
"description": "A free, open-source guided breathing meditation app based on the Wim Hof method",
|
||||
"applicationCategory": "HealthApplication",
|
||||
"operatingSystem": "Android, Windows, Linux, Web Browser",
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "0",
|
||||
"priceCurrency": "USD"
|
||||
},
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "4.8",
|
||||
"ratingCount": "150"
|
||||
},
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Waozi",
|
||||
"url": "https://waozi.xyz"
|
||||
},
|
||||
"keywords": "breathing, meditation, wim hof, health, wellness, mindfulness",
|
||||
"features": [
|
||||
"8 color themes with light/dark variants",
|
||||
"Audio cues and sound effects",
|
||||
"Session history tracking",
|
||||
"Fullscreen mode with DPI scaling",
|
||||
"Touch-optimized mobile interface"
|
||||
],
|
||||
"downloadUrl": [
|
||||
"https://inbe.waozi.xyz/build/android/inbe-latest.apk",
|
||||
"https://inbe.waozi.xyz/build/windows/inbe-windows.zip",
|
||||
"https://inbe.waozi.xyz/build/linux/inbe-linux.tar.gz"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<main id="main-content">
|
||||
<section class="hero" aria-label="App introduction and download options">
|
||||
<img class="tk-img" src="/web-assets/icons/inbe.png" width="128px" alt="Inner Breeze app logo - a calming blue wind spiral icon"/>
|
||||
|
||||
<h1>Inner Breeze</h1>
|
||||
<p>guided breathing meditation based on the Wim Hof method</p>
|
||||
<p class="version">1.2.2</p>
|
||||
|
||||
<!-- Direct Downloads -->
|
||||
<nav aria-label="Platform downloads" class="platform-buttons">
|
||||
<a href="/build/web/index.html" class="platform-btn web">
|
||||
<img src="/web-assets/icons/wasm.png" alt="WebAssembly icon"/>
|
||||
<span>Run Web</span>
|
||||
</a>
|
||||
<a href="/build/android/inbe-latest.apk" class="platform-btn android">
|
||||
<img src="/web-assets/icons/droid.png" alt="Android icon"/>
|
||||
<span>Android</span>
|
||||
|
||||
</a>
|
||||
<a href="/build/windows/inbe-windows.zip" class="platform-btn windows">
|
||||
<img src="/web-assets/icons/win.png" alt="Windows icon"/>
|
||||
<span>Windows</span>
|
||||
|
||||
</a>
|
||||
<a href="/build/linux/inbe-linux.tar.gz" class="platform-btn linux">
|
||||
<img src="/web-assets/icons/tux.png" alt="Linux icon"/>
|
||||
<span>Linux</span>
|
||||
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<!-- App Stores -->
|
||||
<nav aria-label="App store downloads" class="platform-buttons">
|
||||
<a href="https://play.google.com/store/apps/details?id=xyz.waozi.inbe" class="platform-btn android">
|
||||
<img src="/web-assets/icons/playstore.png" alt="Play Store icon"/>
|
||||
<span>Play Store</span>
|
||||
</a>
|
||||
<a href="https://f-droid.org/packages/xyz.waozi.inbe/" class="platform-btn android">
|
||||
<img src="/web-assets/icons/fdroid.png" alt="F-Droid icon"/>
|
||||
<span>F-Droid</span>
|
||||
</a>
|
||||
<a href="https://waozi.itch.io/inbe" class="platform-btn web">
|
||||
<img src="/web-assets/icons/itch.png" alt="itch.io icon"/>
|
||||
<span>itch.io</span>
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<p style="text-align:center; margin-top:16px; font-size:14px;"><a href="/builds.html">Other builds (WASM-4, Uxn) →</a></p>
|
||||
</section>
|
||||
|
||||
<!-- Features Section - Clean simple styling -->
|
||||
<section class="features-section">
|
||||
<h2>Features</h2>
|
||||
<div class="features-grid">
|
||||
<div class="feature-item">
|
||||
<h3>8 Color Themes</h3>
|
||||
<p>Forest, Ocean, Sky, Sunset, and Lavender — each with light and dark variants</p>
|
||||
</div>
|
||||
<div class="feature-item">
|
||||
<h3>Audio Cues</h3>
|
||||
<p>Breath in/out sounds and completion bell for guided sessions</p>
|
||||
</div>
|
||||
<div class="feature-item">
|
||||
<h3>Session History</h3>
|
||||
<p>Track your breathing sessions with local storage</p>
|
||||
</div>
|
||||
<div class="feature-item">
|
||||
<h3>Fullscreen Mode</h3>
|
||||
<p>Immersive experience with proper DPI scaling</p>
|
||||
</div>
|
||||
<div class="feature-item">
|
||||
<h3>Touch Optimized</h3>
|
||||
<p>Designed for mobile devices with responsive controls</p>
|
||||
</div>
|
||||
<div class="feature-item">
|
||||
<h3>Open Source</h3>
|
||||
<p>Free and open-source under MIT license</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="migration-section">
|
||||
<h2>Migrating from inbe-legacy?</h2>
|
||||
<p>Use the web converter to turn an inbe-legacy JSON export into the ZIP format used by current Inner Breeze imports.</p>
|
||||
<p><a href="/legacy-converter.html">Open legacy data converter</a></p>
|
||||
</section>
|
||||
|
||||
<!-- About Section -->
|
||||
<section class="about-section">
|
||||
<h2>About the Wim Hof Method</h2>
|
||||
<p>The Wim Hof Method is a breathing technique that combines controlled hyperventilation and breath retention. Practitioners report benefits including:</p>
|
||||
<ul class="benefits-list">
|
||||
<li>Reduced stress and anxiety</li>
|
||||
<li>Improved focus and mental clarity</li>
|
||||
<li>Better sleep quality</li>
|
||||
<li>Enhanced cold tolerance</li>
|
||||
<li>Increased energy levels</li>
|
||||
</ul>
|
||||
<p class="safety-note"><em>Note: Always practice breathing exercises in a safe environment. Never practice while driving, swimming, or in situations where loss of consciousness could be dangerous.</em></p>
|
||||
</section>
|
||||
|
||||
<!-- Source & Donations -->
|
||||
<section class="info-section">
|
||||
<nav aria-label="Source code" class="platform-buttons">
|
||||
<a href="https://github.com/waozixyz/inbe" target="_blank" rel="noopener" class="platform-btn web">
|
||||
<img src="/web-assets/icons/github.png" alt="GitHub icon"/>
|
||||
<span>GitHub</span>
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<details class="dropdown">
|
||||
<summary>Privacy & Donations</summary>
|
||||
<div class="dropdown-content">
|
||||
<p><strong>Privacy:</strong> Inner Breeze respects your privacy. The app stores session history locally on your device and does not collect, transmit, or sell any personal data. No analytics, no tracking, no accounts required.</p>
|
||||
<p><strong>Free & Open Source:</strong> This app is completely free with no ads, in-app purchases, or premium features. Development is supported by voluntary donations.</p>
|
||||
<nav aria-label="Donation options" class="dropdown-links">
|
||||
<a href="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" target="_blank" rel="noopener">Donate via Crypto</a>
|
||||
</nav>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
<footer>
|
||||
<p>© 2026 <a href="https://waozi.xyz">Waozi</a> | <a href="/privacy.html">Privacy Policy</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,287 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8" />
|
||||
<head>
|
||||
<title>Inner Breeze Legacy Data Converter</title>
|
||||
<link href="/style.css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Convert inbe-legacy JSON exports into the current Inner Breeze import ZIP format.">
|
||||
<link rel="canonical" href="https://inbe.waozi.xyz/legacy-converter.html">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<main id="main-content">
|
||||
<section class="tool-section">
|
||||
<h1>Legacy Data Converter</h1>
|
||||
<p>Coming from inbe-legacy? Convert the old JSON export into the ZIP file used by the current Inner Breeze import tool.</p>
|
||||
<p class="safety-note"><em>This runs entirely in your browser. Your file is not uploaded.</em></p>
|
||||
|
||||
<div class="converter-panel">
|
||||
<label for="legacy-file">inbe-legacy JSON export</label>
|
||||
<input id="legacy-file" type="file" accept=".json,application/json">
|
||||
<button id="convert-button" type="button">Convert to Inbe ZIP</button>
|
||||
<p id="converter-status" class="converter-status" role="status">Choose an inbe-legacy JSON export.</p>
|
||||
</div>
|
||||
|
||||
<p><a href="/">Back to downloads</a></p>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<p>© 2026 <a href="https://waozi.xyz">Waozi</a> | <a href="/privacy.html">Privacy Policy</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var fileInput = document.getElementById("legacy-file");
|
||||
var convertButton = document.getElementById("convert-button");
|
||||
var statusEl = document.getElementById("converter-status");
|
||||
|
||||
function setStatus(message, isError) {
|
||||
statusEl.textContent = message;
|
||||
statusEl.className = isError ? "converter-status error" : "converter-status";
|
||||
}
|
||||
|
||||
function pad(value, width) {
|
||||
var text = String(value);
|
||||
while(text.length < width) text = "0" + text;
|
||||
return text;
|
||||
}
|
||||
|
||||
function dosDateTime(date) {
|
||||
var year = date.getFullYear();
|
||||
if(year < 1980) year = 1980;
|
||||
return {
|
||||
time: (date.getHours() << 11) | (date.getMinutes() << 5) | Math.floor(date.getSeconds() / 2),
|
||||
date: ((year - 1980) << 9) | ((date.getMonth() + 1) << 5) | date.getDate()
|
||||
};
|
||||
}
|
||||
|
||||
var crcTable = null;
|
||||
function makeCrcTable() {
|
||||
var table = [];
|
||||
for(var n = 0; n < 256; n++) {
|
||||
var c = n;
|
||||
for(var k = 0; k < 8; k++) {
|
||||
c = (c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1);
|
||||
}
|
||||
table[n] = c >>> 0;
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
function crc32(bytes) {
|
||||
if(crcTable === null) crcTable = makeCrcTable();
|
||||
var crc = 0 ^ -1;
|
||||
for(var i = 0; i < bytes.length; i++) {
|
||||
crc = (crc >>> 8) ^ crcTable[(crc ^ bytes[i]) & 0xff];
|
||||
}
|
||||
return (crc ^ -1) >>> 0;
|
||||
}
|
||||
|
||||
function writeU16(out, value) {
|
||||
out.push(value & 255, (value >>> 8) & 255);
|
||||
}
|
||||
|
||||
function writeU32(out, value) {
|
||||
out.push(value & 255, (value >>> 8) & 255, (value >>> 16) & 255, (value >>> 24) & 255);
|
||||
}
|
||||
|
||||
function appendBytes(out, bytes) {
|
||||
for(var i = 0; i < bytes.length; i++) out.push(bytes[i]);
|
||||
}
|
||||
|
||||
function makeZip(files) {
|
||||
var encoder = new TextEncoder();
|
||||
var out = [];
|
||||
var central = [];
|
||||
var now = dosDateTime(new Date());
|
||||
|
||||
files.forEach(function(file) {
|
||||
var nameBytes = encoder.encode(file.name);
|
||||
var dataBytes = encoder.encode(file.content);
|
||||
var crc = crc32(dataBytes);
|
||||
var offset = out.length;
|
||||
|
||||
writeU32(out, 0x04034b50);
|
||||
writeU16(out, 20);
|
||||
writeU16(out, 0);
|
||||
writeU16(out, 0);
|
||||
writeU16(out, now.time);
|
||||
writeU16(out, now.date);
|
||||
writeU32(out, crc);
|
||||
writeU32(out, dataBytes.length);
|
||||
writeU32(out, dataBytes.length);
|
||||
writeU16(out, nameBytes.length);
|
||||
writeU16(out, 0);
|
||||
appendBytes(out, nameBytes);
|
||||
appendBytes(out, dataBytes);
|
||||
|
||||
writeU32(central, 0x02014b50);
|
||||
writeU16(central, 20);
|
||||
writeU16(central, 20);
|
||||
writeU16(central, 0);
|
||||
writeU16(central, 0);
|
||||
writeU16(central, now.time);
|
||||
writeU16(central, now.date);
|
||||
writeU32(central, crc);
|
||||
writeU32(central, dataBytes.length);
|
||||
writeU32(central, dataBytes.length);
|
||||
writeU16(central, nameBytes.length);
|
||||
writeU16(central, 0);
|
||||
writeU16(central, 0);
|
||||
writeU16(central, 0);
|
||||
writeU16(central, 0);
|
||||
writeU32(central, 0);
|
||||
writeU32(central, offset);
|
||||
appendBytes(central, nameBytes);
|
||||
});
|
||||
|
||||
var centralOffset = out.length;
|
||||
appendBytes(out, central);
|
||||
writeU32(out, 0x06054b50);
|
||||
writeU16(out, 0);
|
||||
writeU16(out, 0);
|
||||
writeU16(out, files.length);
|
||||
writeU16(out, files.length);
|
||||
writeU32(out, central.length);
|
||||
writeU32(out, centralOffset);
|
||||
writeU16(out, 0);
|
||||
|
||||
return new Blob([new Uint8Array(out)], {type: "application/zip"});
|
||||
}
|
||||
|
||||
function sessionDate(session) {
|
||||
var id = session && session.id;
|
||||
var dateTime = session && session.dateTime;
|
||||
var numeric = Number(id);
|
||||
var date;
|
||||
|
||||
if(Number.isFinite(numeric) && numeric > 0) {
|
||||
date = new Date(numeric);
|
||||
} else if(typeof id === "string") {
|
||||
date = new Date(id);
|
||||
}
|
||||
|
||||
if((!date || Number.isNaN(date.getTime())) && typeof dateTime === "string") {
|
||||
date = new Date(dateTime);
|
||||
}
|
||||
|
||||
if(!date || Number.isNaN(date.getTime())) {
|
||||
return null;
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
function roundSeconds(value) {
|
||||
var number = Number(value);
|
||||
if(!Number.isFinite(number) || number <= 0) return 0;
|
||||
if(number > 999) number = Math.round(number / 1000);
|
||||
else number = Math.round(number);
|
||||
if(number < 1 || number > 999) return 0;
|
||||
return number;
|
||||
}
|
||||
|
||||
function convertLegacy(data) {
|
||||
var sessions = Array.isArray(data) ? data : data.sessions;
|
||||
var files = [];
|
||||
var usedPaths = {};
|
||||
|
||||
if(!Array.isArray(sessions)) {
|
||||
throw new Error("No sessions array found in the legacy export.");
|
||||
}
|
||||
|
||||
sessions.forEach(function(session) {
|
||||
var date = sessionDate(session);
|
||||
var rounds = session && session.rounds;
|
||||
var seconds = [];
|
||||
var path;
|
||||
|
||||
if(!date || !rounds || typeof rounds !== "object") return;
|
||||
|
||||
Object.keys(rounds).sort(function(a, b) {
|
||||
return Number(a) - Number(b);
|
||||
}).forEach(function(key) {
|
||||
var value = roundSeconds(rounds[key]);
|
||||
if(value > 0) seconds.push(value);
|
||||
});
|
||||
|
||||
if(seconds.length === 0) return;
|
||||
|
||||
path = "lotus-data/sessions/" +
|
||||
pad(date.getFullYear(), 4) + "/" +
|
||||
pad(date.getMonth() + 1, 2) + "/" +
|
||||
pad(date.getDate(), 2) + "/inbe-" +
|
||||
pad(date.getHours(), 2) +
|
||||
pad(date.getMinutes(), 2) +
|
||||
pad(date.getSeconds(), 2);
|
||||
|
||||
while(usedPaths[path]) {
|
||||
date = new Date(date.getTime() + 1000);
|
||||
path = "lotus-data/sessions/" +
|
||||
pad(date.getFullYear(), 4) + "/" +
|
||||
pad(date.getMonth() + 1, 2) + "/" +
|
||||
pad(date.getDate(), 2) + "/inbe-" +
|
||||
pad(date.getHours(), 2) +
|
||||
pad(date.getMinutes(), 2) +
|
||||
pad(date.getSeconds(), 2);
|
||||
}
|
||||
usedPaths[path] = true;
|
||||
|
||||
files.push({
|
||||
name: path,
|
||||
content: seconds.join("\n") + "\n"
|
||||
});
|
||||
});
|
||||
|
||||
if(files.length === 0) {
|
||||
throw new Error("No valid legacy sessions were found.");
|
||||
}
|
||||
|
||||
files.unshift({
|
||||
name: "lotus-data/metadata.txt",
|
||||
content: "Inner Breeze Data Export\nVersion: legacy-converter\nDate: " + new Date().toISOString() + "\nSessions: " + files.length + "\n"
|
||||
});
|
||||
|
||||
return {
|
||||
count: files.length - 1,
|
||||
blob: makeZip(files)
|
||||
};
|
||||
}
|
||||
|
||||
function downloadBlob(blob, filename) {
|
||||
var url = URL.createObjectURL(blob);
|
||||
var link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.download = filename;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
setTimeout(function() {
|
||||
URL.revokeObjectURL(url);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
convertButton.addEventListener("click", function() {
|
||||
var file = fileInput.files && fileInput.files[0];
|
||||
if(!file) {
|
||||
setStatus("Choose a legacy JSON export first.", true);
|
||||
return;
|
||||
}
|
||||
|
||||
file.text().then(function(text) {
|
||||
var data = JSON.parse(text);
|
||||
var result = convertLegacy(data);
|
||||
downloadBlob(result.blob, "inbe-legacy-converted.zip");
|
||||
setStatus("Converted " + result.count + " sessions. Import the downloaded ZIP in Inner Breeze.", false);
|
||||
}).catch(function(error) {
|
||||
setStatus(error.message || "Conversion failed.", true);
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -80,7 +80,7 @@ inbeinit(Inbe *l)
|
||||
l->rmin = 25;
|
||||
l->rmax = 50;
|
||||
l->dir = 0;
|
||||
l->speed_level = 3;
|
||||
l->speed_level = DefaultSpeedLevel;
|
||||
l->breath_frame = 0;
|
||||
l->breath_half_ticks = 120;
|
||||
l->frame = 0;
|
||||
@@ -90,7 +90,7 @@ inbeinit(Inbe *l)
|
||||
l->max_rounds = DefaultMaxRounds;
|
||||
l->pause_seconds = DefaultPauseSeconds;
|
||||
l->progressive_speed = 1;
|
||||
l->progressive_start_speed = 3;
|
||||
l->progressive_start_speed = DefaultProgressiveStartSpeed;
|
||||
#ifdef __ANDROID__
|
||||
l->play_in_background = 1; // Enabled by default on Android
|
||||
#else
|
||||
|
||||
+3
-1
@@ -22,9 +22,11 @@ enum {
|
||||
enum {
|
||||
CountSize = 4,
|
||||
MaxRounds = 12,
|
||||
DefaultSpeedLevel = 6,
|
||||
DefaultMaxRounds = 4,
|
||||
DefaultMaxBreaths = 30,
|
||||
DefaultPauseSeconds = 2
|
||||
DefaultPauseSeconds = 2,
|
||||
DefaultProgressiveStartSpeed = 3
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
+11
-2
@@ -112,8 +112,17 @@ Motiv
|
||||
[speed_label]
|
||||
Rychlost
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
Progresivni rychlost
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
Pocatecni rychlost
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Upravit pocatecni rychlost
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Pocatecni rychlost
|
||||
---
|
||||
[play_in_background_label]
|
||||
Přehrávat na pozadí
|
||||
|
||||
+11
-2
@@ -94,8 +94,17 @@ Thema
|
||||
[speed_label]
|
||||
Geschwindigkeit
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
Progressive Geschwindigkeit
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
Startgeschwindigkeit
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Startgeschwindigkeit andern
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Startgeschwindigkeit
|
||||
---
|
||||
[play_in_background_label]
|
||||
Im Hintergrund abspielen
|
||||
|
||||
@@ -118,6 +118,12 @@ Progressive speed
|
||||
[progressive_start_speed_label]
|
||||
Start speed
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Modify start speed
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Start speed
|
||||
---
|
||||
[play_in_background_label]
|
||||
Play in background
|
||||
---
|
||||
|
||||
+11
-2
@@ -94,8 +94,17 @@ Tema
|
||||
[speed_label]
|
||||
Velocidad
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
Velocidad progresiva
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
Velocidad inicial
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Modificar velocidad inicial
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Velocidad inicial
|
||||
---
|
||||
[play_in_background_label]
|
||||
Reproducir en segundo plano
|
||||
|
||||
+11
-2
@@ -94,8 +94,17 @@ Thème
|
||||
[speed_label]
|
||||
Vitesse
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
Vitesse progressive
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
Vitesse de depart
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Modifier la vitesse de depart
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Vitesse de depart
|
||||
---
|
||||
[play_in_background_label]
|
||||
Lecture en arrière-plan
|
||||
|
||||
+11
-2
@@ -112,8 +112,17 @@ Tema
|
||||
[speed_label]
|
||||
Kecepatan
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
Kecepatan progresif
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
Kecepatan awal
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Ubah kecepatan awal
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Kecepatan awal
|
||||
---
|
||||
[play_in_background_label]
|
||||
Putar di latar belakang
|
||||
|
||||
+11
-2
@@ -112,8 +112,17 @@
|
||||
[speed_label]
|
||||
速度
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
プログレッシブ速度
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
開始速度
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
開始速度を変更
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
開始速度
|
||||
---
|
||||
[play_in_background_label]
|
||||
バックグラウンド再生
|
||||
|
||||
+8
-2
@@ -94,8 +94,14 @@
|
||||
[speed_label]
|
||||
속도
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_start_speed_label]
|
||||
시작 속도
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
시작 속도 수정
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
시작 속도
|
||||
---
|
||||
[play_in_background_label]
|
||||
백그라운드 재생
|
||||
|
||||
+11
-2
@@ -94,8 +94,17 @@ Tema
|
||||
[speed_label]
|
||||
Velocidade
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
Velocidade progressiva
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
Velocidade inicial
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
Modificar velocidade inicial
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
Velocidade inicial
|
||||
---
|
||||
[play_in_background_label]
|
||||
Executar em segundo plano
|
||||
|
||||
+11
-2
@@ -112,8 +112,17 @@
|
||||
[speed_label]
|
||||
速度
|
||||
---
|
||||
|
||||
Start speed
|
||||
[progressive_speed_label]
|
||||
渐进速度
|
||||
---
|
||||
[progressive_start_speed_label]
|
||||
起始速度
|
||||
---
|
||||
[modify_start_speed_button]
|
||||
修改起始速度
|
||||
---
|
||||
[progressive_start_speed_editor_title]
|
||||
起始速度
|
||||
---
|
||||
[play_in_background_label]
|
||||
后台播放
|
||||
|
||||
-153
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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)
|
||||
@@ -1,64 +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_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_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)
|
||||
@@ -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)
|
||||
@@ -1,63 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Privacy Policy - Inner Breeze</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
max-width: 700px;
|
||||
margin: 40px auto;
|
||||
padding: 20px;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
h1 { color: #2563eb; }
|
||||
h2 { color: #1e40af; margin-top: 30px; }
|
||||
ul { margin: 10px 0; }
|
||||
li { margin: 5px 0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Privacy Policy</h1>
|
||||
<p>Last updated: May 26, 2026</p>
|
||||
|
||||
<h2>Inner Breeze</h2>
|
||||
<p>Inner Breeze is a free, open-source guided breathing meditation app based on the Wim Hof method.</p>
|
||||
|
||||
<h2>Data Collection</h2>
|
||||
<p><strong>Inner Breeze does NOT collect, store, or transmit any personal data.</strong></p>
|
||||
<ul>
|
||||
<li>No user accounts or authentication</li>
|
||||
<li>No personal information collection</li>
|
||||
<li>No analytics or tracking</li>
|
||||
<li>No network requests or data transmission</li>
|
||||
<li>No third-party services</li>
|
||||
</ul>
|
||||
|
||||
<h2>Local Data Storage</h2>
|
||||
<p>The app stores session history locally on your device:</p>
|
||||
<ul>
|
||||
<li>Breathing session timing data (duration of each breath round)</li>
|
||||
<li>Unlimited session history</li>
|
||||
<li>Data remains on your device only</li>
|
||||
<li>Clear app data to delete all stored sessions</li>
|
||||
</ul>
|
||||
|
||||
<h2>Data Deletion</h2>
|
||||
<p>To delete your session data: Clear the app's data through your device's settings.</p>
|
||||
|
||||
<h2>Permissions</h2>
|
||||
<p>Inner Breeze requires no special permissions on Android or other platforms.</p>
|
||||
|
||||
<h2>Children's Privacy</h2>
|
||||
<p>Inner Breeze is suitable for all ages. Since no personal data is collected, it is COPPA compliant.</p>
|
||||
|
||||
<h2>Contact</h2>
|
||||
<p>Questions: <a href="mailto:[email protected]">[email protected]</a></p>
|
||||
|
||||
<h2>Open Source</h2>
|
||||
<p>Source code available at: <a href="https://git.sr.ht/~waozi/inbe">https://git.sr.ht/~waozi/inbe</a> and <a href="https://github.com/waozixyz/inbe">https://github.com/waozixyz/inbe</a></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,44 +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 ""
|
||||
|
||||
butler push "$WEB_BUILD_DIR" "$ITCH_USER/$ITCH_GAME:$ITCH_CHANNEL" --userversion "$VERSION"
|
||||
|
||||
echo "✓ Published inbe v$VERSION to https://$ITCH_USER.itch.io/$ITCH_GAME"
|
||||
-159
@@ -1,159 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Publish inbe site to inbe.waozi.xyz
|
||||
|
||||
set -e
|
||||
SITE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
cd "$SITE_DIR"
|
||||
|
||||
# Check if hut is installed
|
||||
if ! command -v hut &> /dev/null; then
|
||||
echo "Error: 'hut' command not found"
|
||||
echo "Install it with: nix-shell -p hut"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Publishing inbe.waozi.xyz..."
|
||||
|
||||
# Update metadata before publishing
|
||||
if [ -f "./update_metadata.sh" ]; then
|
||||
echo "Running metadata update..."
|
||||
./update_metadata.sh || echo "Warning: Metadata update failed, continuing anyway"
|
||||
else
|
||||
echo "Warning: update_metadata.sh not found, skipping metadata update"
|
||||
fi
|
||||
|
||||
TMPDIR=$(mktemp -d -p /tmp)
|
||||
cleanup() {
|
||||
rm -rf "$TMPDIR"
|
||||
rm -f "$SITE_DIR/inbe.tar.gz"
|
||||
}
|
||||
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='*.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/"
|
||||
|
||||
mkdir -p "$TMPDIR/rc"
|
||||
[ -f "rc/inbe.rc" ] && cp rc/inbe.rc "$TMPDIR/rc/"
|
||||
|
||||
mkdir -p "$TMPDIR/uxn/devices"
|
||||
[ -f "uxn/index.html" ] && cp uxn/index.html "$TMPDIR/uxn/"
|
||||
[ -f "uxn/inbe.rom" ] && cp uxn/inbe.* "$TMPDIR/uxn/"
|
||||
if [ -d "uxn/devices" ]; then
|
||||
rsync -av --exclude='*.sym' uxn/devices/*.js "$TMPDIR/uxn/devices/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Raylib builds (primary implementation)
|
||||
mkdir -p "$TMPDIR/build/linux" "$TMPDIR/build/windows" "$TMPDIR/build/android"
|
||||
if [ -d "build/web" ]; then
|
||||
mkdir -p "$TMPDIR/build/web"
|
||||
for raylib_web_artifact in build/web/index.html build/web/index.js build/web/index.wasm build/web/index.data; do
|
||||
[ -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
|
||||
[ -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
|
||||
[ -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
|
||||
[ -f "$raylib_android_artifact" ] && cp "$raylib_android_artifact" "$TMPDIR/build/android/"
|
||||
done
|
||||
fi
|
||||
|
||||
mkdir -p "$TMPDIR/wasm4/build"
|
||||
[ -f "wasm4/build/index.html" ] && cp wasm4/build/index.html "$TMPDIR/wasm4/build/"
|
||||
[ -f "wasm4/build/inbe.wasm" ] && cp wasm4/build/inbe.wasm "$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"
|
||||
if [ -d "linux/build" ]; then
|
||||
for linux_bin in linux/build/inbe-* linux/build/inbefb-* linux/build/inbe-linux.tar.gz; do
|
||||
[ -f "$linux_bin" ] && cp "$linux_bin" "$TMPDIR/linux/build/"
|
||||
done
|
||||
fi
|
||||
|
||||
mkdir -p "$TMPDIR/love2d"
|
||||
[ -f "love2d/inbe.html" ] && cp love2d/inbe.* "$TMPDIR/love2d/"
|
||||
[ -d "love2d/build/inbe" ] && mkdir -p "$TMPDIR/love2d/build" && rsync -av --exclude='*.o' --exclude='*.d' --exclude='.npm' --exclude='.local' --exclude='.codex' love2d/build/inbe/ "$TMPDIR/love2d/build/inbe/"
|
||||
|
||||
mkdir -p "$TMPDIR/tcl"
|
||||
[ -f "tcl/inbe.tcl" ] && cp tcl/inbe.tcl "$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/"
|
||||
|
||||
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' \
|
||||
-e 's|/inbe/|/|g' \
|
||||
"$TMPDIR/index.html" > "$TMPDIR/index_.html" && mv "$TMPDIR/index_.html" "$TMPDIR/index.html"
|
||||
fi
|
||||
|
||||
# Create tarball directly in SITE_DIR
|
||||
echo "Creating inbe.tar.gz..."
|
||||
tar -czf "$SITE_DIR/inbe.tar.gz" -C "$TMPDIR" .
|
||||
|
||||
if [ ! -f "$SITE_DIR/inbe.tar.gz" ]; then
|
||||
echo "Error: inbe.tar.gz was not created!"
|
||||
rm -rf "$TMPDIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
hut pages publish -d inbe.waozi.xyz "$SITE_DIR/inbe.tar.gz"
|
||||
echo "✓ Published to https://inbe.waozi.xyz"
|
||||
|
||||
echo "✓ Done"
|
||||
@@ -1,4 +0,0 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
Sitemap: https://inbe.waozi.xyz/sitemap.xml
|
||||
@@ -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!"
|
||||
@@ -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"
|
||||
@@ -1,15 +0,0 @@
|
||||
speed 8
|
||||
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
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://inbe.waozi.xyz/</loc>
|
||||
<lastmod>2026-05-29</lastmod>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://inbe.waozi.xyz/builds.html</loc>
|
||||
<lastmod>2026-05-29</lastmod>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://inbe.waozi.xyz/privacy.html</loc>
|
||||
<lastmod>2026-05-26</lastmod>
|
||||
<priority>0.3</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
@@ -35,22 +35,6 @@ static void android_wakelock_set_activity_impl(JNIEnv *env, jobject thiz) {
|
||||
android_wakelock_set_activity(env, thiz);
|
||||
}
|
||||
|
||||
// Called from Java when activity is paused
|
||||
static void android_timer_activate_impl(JNIEnv *env, jobject thiz) {
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "JNI: Timer ACTIVATE callback");
|
||||
android_timer_activate();
|
||||
}
|
||||
|
||||
// Called from Java when activity is resumed
|
||||
static void android_timer_deactivate_impl(JNIEnv *env, jobject thiz) {
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
__android_log_write(ANDROID_LOG_INFO, LOG_TAG, "JNI: Timer DEACTIVATE callback");
|
||||
android_timer_deactivate();
|
||||
}
|
||||
|
||||
static JavaVM *g_jvm = NULL;
|
||||
static jobject g_activity = NULL;
|
||||
|
||||
@@ -105,9 +89,32 @@ static jint nativeGetPlayInBackground(JNIEnv *env, jobject thiz)
|
||||
return 0; // Default to disabled
|
||||
}
|
||||
|
||||
// JNI function - Auto-pause session when app goes to background
|
||||
static void nativePauseSession(JNIEnv *env, jobject thiz)
|
||||
static void nativeSetBackgroundActive(JNIEnv *env, jobject thiz, jboolean active)
|
||||
{
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
|
||||
void *app = get_global_inbe_app();
|
||||
InbeApp *inbe_app = (InbeApp*)app;
|
||||
if (inbe_app != NULL) {
|
||||
inbe_app->backgrounded = active ? 1 : 0;
|
||||
}
|
||||
|
||||
if (active) {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeSetBackgroundActive: activating background timer");
|
||||
android_timer_activate();
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeSetBackgroundActive: deactivating background timer");
|
||||
android_timer_deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
// JNI function - Auto-pause session when app goes to background
|
||||
static jint nativePauseSession(JNIEnv *env, jobject thiz)
|
||||
{
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: called");
|
||||
void *app = get_global_inbe_app();
|
||||
char msg[128];
|
||||
@@ -120,27 +127,25 @@ static void nativePauseSession(JNIEnv *env, jobject thiz)
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
if (!inbe_app->session_paused) {
|
||||
inbe_app->session_paused = 1;
|
||||
inbe_app->backgrounded = 1;
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: set session_paused = 1");
|
||||
#ifdef __ANDROID__
|
||||
if (inbe_app->inbe.play_in_background) {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: Releasing wake lock and stopping timer");
|
||||
android_wakelock_release();
|
||||
android_timer_stop();
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: SKIPPING wake lock/timer (play_in_background disabled)");
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativePauseSession: Session already paused, skipping");
|
||||
}
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_ERROR, "INBE_JNI", "nativePauseSession: app is NULL!");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// JNI function - Auto-resume session when app returns to foreground
|
||||
static void nativeResumeSession(JNIEnv *env, jobject thiz)
|
||||
{
|
||||
(void)env;
|
||||
(void)thiz;
|
||||
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: called");
|
||||
void *app = get_global_inbe_app();
|
||||
char msg[128];
|
||||
@@ -153,16 +158,8 @@ static void nativeResumeSession(JNIEnv *env, jobject thiz)
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", msg);
|
||||
if (inbe_app->session_paused) {
|
||||
inbe_app->session_paused = 0;
|
||||
inbe_app->backgrounded = 0;
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: set session_paused = 0");
|
||||
#ifdef __ANDROID__
|
||||
if (inbe_app->inbe.play_in_background) {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: Acquiring wake lock and starting timer");
|
||||
android_wakelock_acquire();
|
||||
android_timer_start();
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: SKIPPING wake lock/timer (play_in_background disabled)");
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_JNI", "nativeResumeSession: Session not paused, skipping");
|
||||
}
|
||||
@@ -175,10 +172,9 @@ static void nativeResumeSession(JNIEnv *env, jobject thiz)
|
||||
static const JNINativeMethod g_methods[] = {
|
||||
{"nativeSetInsets", "(IIIIII)V", (void*)nativeSetInsets},
|
||||
{"nativeWakeLockReady", "()V", (void*)android_wakelock_set_activity_impl},
|
||||
{"nativeTimerActivate", "()V", (void*)android_timer_activate_impl},
|
||||
{"nativeTimerDeactivate", "()V", (void*)android_timer_deactivate_impl},
|
||||
{"nativeSetBackgroundActive", "(Z)V", (void*)nativeSetBackgroundActive},
|
||||
{"nativeGetPlayInBackground", "()I", (void*)nativeGetPlayInBackground},
|
||||
{"nativePauseSession", "()V", (void*)nativePauseSession},
|
||||
{"nativePauseSession", "()I", (void*)nativePauseSession},
|
||||
{"nativeResumeSession", "()V", (void*)nativeResumeSession},
|
||||
{"nativeImportSelectedFile", "(Ljava/lang/String;)V", (void*)android_import_native_selected},
|
||||
{"nativeImportCancelled", "()V", (void*)android_import_native_cancelled},
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
#endif
|
||||
#include "version.h"
|
||||
#include "flint_ui.h"
|
||||
#include "flint_text_layout.h"
|
||||
#include "flint_dpi.h"
|
||||
#include "flint_text.h"
|
||||
#include "flint_embedded_assets.h"
|
||||
|
||||
#if !defined(LOTUS_BUILD)
|
||||
#define RINI_IMPLEMENTATION
|
||||
@@ -44,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;
|
||||
@@ -120,106 +121,24 @@ static UITab g_tabs[] = {
|
||||
|
||||
static UITabBar g_tab_bar = {g_tabs, 3};
|
||||
|
||||
typedef struct ChoppedGlyph {
|
||||
int32_t value;
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
int32_t w;
|
||||
int32_t h;
|
||||
int32_t offsetX;
|
||||
int32_t offsetY;
|
||||
int32_t advanceX;
|
||||
} ChoppedGlyph;
|
||||
|
||||
static Font
|
||||
load_chopped_font(const char *png_path, const char *dat_path)
|
||||
{
|
||||
Font font = {0};
|
||||
FILE *file = NULL;
|
||||
ChoppedGlyph *glyphs = NULL;
|
||||
GlyphInfo *glyph_infos = NULL;
|
||||
Rectangle *recs = NULL;
|
||||
int32_t glyph_count = 0;
|
||||
Image image = {0};
|
||||
Texture2D texture = {0};
|
||||
|
||||
file = fopen(dat_path, "rb");
|
||||
if(file == NULL)
|
||||
return font;
|
||||
|
||||
if(fread(&glyph_count, sizeof(glyph_count), 1, file) != 1 || glyph_count <= 0) {
|
||||
fclose(file);
|
||||
return font;
|
||||
}
|
||||
|
||||
glyphs = calloc((size_t)glyph_count, sizeof(*glyphs));
|
||||
glyph_infos = calloc((size_t)glyph_count, sizeof(*glyph_infos));
|
||||
recs = calloc((size_t)glyph_count, sizeof(*recs));
|
||||
if(glyphs == NULL || glyph_infos == NULL || recs == NULL)
|
||||
goto cleanup;
|
||||
|
||||
if(fread(glyphs, sizeof(*glyphs), (size_t)glyph_count, file) != (size_t)glyph_count)
|
||||
goto cleanup;
|
||||
fclose(file);
|
||||
file = NULL;
|
||||
|
||||
image = LoadImage(png_path);
|
||||
if(image.data == NULL)
|
||||
goto cleanup;
|
||||
|
||||
texture = LoadTextureFromImage(image);
|
||||
UnloadImage(image);
|
||||
image = (Image){0};
|
||||
if(texture.id == 0)
|
||||
goto cleanup;
|
||||
SetTextureFilter(texture, TEXTURE_FILTER_POINT);
|
||||
|
||||
for(int i = 0; i < glyph_count; i++) {
|
||||
glyph_infos[i].value = glyphs[i].value;
|
||||
glyph_infos[i].offsetX = glyphs[i].offsetX;
|
||||
glyph_infos[i].offsetY = glyphs[i].offsetY;
|
||||
glyph_infos[i].advanceX = glyphs[i].advanceX;
|
||||
glyph_infos[i].image = (Image){0};
|
||||
|
||||
recs[i].x = (float)glyphs[i].x;
|
||||
recs[i].y = (float)glyphs[i].y;
|
||||
recs[i].width = (float)glyphs[i].w;
|
||||
recs[i].height = (float)glyphs[i].h;
|
||||
}
|
||||
|
||||
font.texture = texture;
|
||||
font.glyphs = glyph_infos;
|
||||
font.recs = recs;
|
||||
font.glyphCount = glyph_count;
|
||||
font.baseSize = LOCALE_FONT_BASE_SIZE;
|
||||
font.glyphPadding = 0;
|
||||
|
||||
free(glyphs);
|
||||
return font;
|
||||
|
||||
cleanup:
|
||||
if(file != NULL)
|
||||
fclose(file);
|
||||
if(image.data != NULL)
|
||||
UnloadImage(image);
|
||||
if(texture.id != 0)
|
||||
UnloadTexture(texture);
|
||||
free(glyphs);
|
||||
free(glyph_infos);
|
||||
free(recs);
|
||||
return (Font){0};
|
||||
}
|
||||
|
||||
static int
|
||||
load_locale_font(InbeApp *app)
|
||||
{
|
||||
Font font;
|
||||
Image white;
|
||||
const FlintEmbeddedAsset *png;
|
||||
const FlintEmbeddedAsset *dat;
|
||||
|
||||
if(app == NULL)
|
||||
return 0;
|
||||
|
||||
font = load_chopped_font(LOCALE_FONT_PNG, LOCALE_FONT_DAT);
|
||||
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;
|
||||
|
||||
@@ -227,9 +146,7 @@ load_locale_font(InbeApp *app)
|
||||
app->font_shapes_texture = LoadTextureFromImage(white);
|
||||
UnloadImage(white);
|
||||
if(app->font_shapes_texture.id == 0) {
|
||||
UnloadTexture(font.texture);
|
||||
free(font.glyphs);
|
||||
free(font.recs);
|
||||
flint_text_unload_font(&font);
|
||||
return 0;
|
||||
}
|
||||
SetTextureFilter(app->font_shapes_texture, TEXTURE_FILTER_POINT);
|
||||
@@ -248,11 +165,7 @@ unload_locale_font(InbeApp *app)
|
||||
return;
|
||||
|
||||
flint_text_set_font((Font){0});
|
||||
if(app->locale_font.texture.id != 0)
|
||||
UnloadTexture(app->locale_font.texture);
|
||||
free(app->locale_font.glyphs);
|
||||
free(app->locale_font.recs);
|
||||
app->locale_font = (Font){0};
|
||||
flint_text_unload_font(&app->locale_font);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -402,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
|
||||
@@ -428,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;
|
||||
@@ -588,8 +462,9 @@ 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", 8);
|
||||
int speed = rini_get_value_fallback(settings, "speed", DefaultSpeedLevel);
|
||||
int max_rounds = rini_get_value_fallback(settings, "max_rounds", DefaultMaxRounds);
|
||||
int max_breaths = rini_get_value_fallback(settings, "max_breaths", DefaultMaxBreaths);
|
||||
int pause_seconds = rini_get_value_fallback(settings, "pause_seconds", DefaultPauseSeconds);
|
||||
@@ -606,7 +481,7 @@ load_settings(InbeApp *app)
|
||||
#endif
|
||||
app->sound_volume = clampi(sound_volume, SETTINGS_VOLUME_MIN, SETTINGS_VOLUME_MAX);
|
||||
app->inbe.progressive_speed = rini_get_value_fallback(settings, "progressive_speed", 1) != 0;
|
||||
app->inbe.progressive_start_speed = clampi(rini_get_value_fallback(settings, "progressive_start_speed", 3),
|
||||
app->inbe.progressive_start_speed = clampi(rini_get_value_fallback(settings, "progressive_start_speed", DefaultProgressiveStartSpeed),
|
||||
SETTINGS_SPEED_MIN, SETTINGS_SPEED_MAX);
|
||||
app->advanced_session_controls = rini_get_value_fallback(settings, "advanced_session_controls", 0) != 0;
|
||||
app->hold_display_mode = clampi(rini_get_value_fallback(settings, "hold_display_mode", HOLD_DISPLAY_CIRCLE),
|
||||
@@ -649,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;
|
||||
@@ -680,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
|
||||
@@ -794,7 +685,6 @@ inbe_app_init(void *vapp) {
|
||||
app->manual_drag_content = 0;
|
||||
app->manual_drag_content_y = 0;
|
||||
app->tutorial_step = 0;
|
||||
app->tutorial_layouts_initialized = 0;
|
||||
history_tab_reset(app);
|
||||
app->session_paused = 0;
|
||||
app->backgrounded = 0;
|
||||
@@ -802,6 +692,8 @@ inbe_app_init(void *vapp) {
|
||||
app->results_path[0] = '\0';
|
||||
update_session_sounds(app);
|
||||
reset_settings_preview(app);
|
||||
inbeinit(&app->start_speed_preview);
|
||||
app->start_speed_preview_speed = 0;
|
||||
|
||||
if(app->gear_icon.id == 0) {
|
||||
app->gear_icon = load_icon_texture("gear.png");
|
||||
@@ -859,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");
|
||||
}
|
||||
@@ -1136,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);
|
||||
@@ -1146,14 +1042,6 @@ inbe_app_destroy(void *vapp)
|
||||
SafeUnloadTexture(app->font_shapes_texture);
|
||||
unload_locale_font(app);
|
||||
|
||||
/* Cleanup tutorial text layouts */
|
||||
if(app->tutorial_layouts_initialized) {
|
||||
for(int i = 0; i < 5; i++) {
|
||||
flint_text_layout_free(app->tutorial_layouts[i]);
|
||||
free(app->tutorial_layouts[i]);
|
||||
}
|
||||
}
|
||||
|
||||
SafeUnloadSound(app->breath_in_sound);
|
||||
SafeUnloadSound(app->breath_out_sound);
|
||||
SafeUnloadSound(app->bell_sound);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "raylib.h"
|
||||
#include "../libinbe/inbe.h"
|
||||
#include "flint_text_layout.h"
|
||||
#include "app_fwd.h"
|
||||
|
||||
enum {
|
||||
@@ -78,6 +77,7 @@ typedef enum {
|
||||
UIModalConfirmExitSession,
|
||||
UIModalConfirmDeleteData,
|
||||
UIModalConfirmDeleteHistory,
|
||||
UIModalEditProgressiveStartSpeed,
|
||||
} UIModalType;
|
||||
|
||||
typedef struct {
|
||||
@@ -113,6 +113,8 @@ typedef enum HoldDisplayMode {
|
||||
struct InbeApp {
|
||||
Inbe inbe;
|
||||
Inbe settings_preview;
|
||||
Inbe start_speed_preview;
|
||||
int start_speed_preview_speed;
|
||||
Camera2D camera;
|
||||
int cursor_clickable;
|
||||
Texture2D gear_icon;
|
||||
@@ -131,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;
|
||||
@@ -174,9 +177,6 @@ struct InbeApp {
|
||||
int tutorial_step;
|
||||
int tutorial_seen;
|
||||
|
||||
FlintTextLayout *tutorial_layouts[6];
|
||||
int tutorial_layouts_initialized;
|
||||
|
||||
int theme_id;
|
||||
int dark_mode;
|
||||
#if defined(LOTUS_BUILD)
|
||||
@@ -228,5 +228,6 @@ void refresh_locale_dependent_text(InbeApp *app);
|
||||
void apply_language_selection(InbeApp *app, int language_index, int save_now);
|
||||
void draw_preview_inbe(Inbe *inbe, int center_x, int center_y);
|
||||
int draw_hold_display_mode_selector(InbeApp *app, int x, int y, int w);
|
||||
void settings_draw_progressive_start_speed_editor(InbeApp *app);
|
||||
|
||||
#endif
|
||||
+116
-37
@@ -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);
|
||||
@@ -834,6 +844,9 @@ parse_session_path(const char *zip_path, int *year, int *month, int *day, char *
|
||||
if(strncmp(p, "inbe-", 5) != 0)
|
||||
return 0;
|
||||
|
||||
if(strchr(p, '/') != NULL || strchr(p, '\\') != NULL)
|
||||
return 0;
|
||||
|
||||
// Copy filename
|
||||
if(strlen(p) >= FS_PATH_MAX - 1)
|
||||
return 0;
|
||||
@@ -848,14 +861,14 @@ parse_session_path(const char *zip_path, int *year, int *month, int *day, char *
|
||||
}
|
||||
|
||||
static int
|
||||
validate_session_content(const char *content, int *round_count)
|
||||
parse_session_content(const char *content, int *round_times, int max_rounds, int *round_count)
|
||||
{
|
||||
char *dup;
|
||||
char *line;
|
||||
int count = 0;
|
||||
int valid = 1;
|
||||
|
||||
if(content == NULL || round_count == NULL)
|
||||
if(content == NULL || round_times == NULL || round_count == NULL || max_rounds <= 0)
|
||||
return 0;
|
||||
|
||||
dup = strdup(content);
|
||||
@@ -870,8 +883,8 @@ validate_session_content(const char *content, int *round_count)
|
||||
|
||||
if(*line != '\0') {
|
||||
int seconds = atoi(line);
|
||||
if(seconds > 0 && seconds <= 999) {
|
||||
count++;
|
||||
if(seconds > 0 && seconds <= 999 && count < max_rounds) {
|
||||
round_times[count++] = seconds;
|
||||
} else {
|
||||
valid = 0;
|
||||
break;
|
||||
@@ -892,33 +905,66 @@ validate_session_content(const char *content, int *round_count)
|
||||
}
|
||||
|
||||
static int
|
||||
import_session_file(const char *zip_path, const char *local_path, mz_zip_archive *archive)
|
||||
write_session_content_atomic(const char *path, const int *round_times, int round_count)
|
||||
{
|
||||
char *content = NULL;
|
||||
size_t size;
|
||||
char temp_path[FS_PATH_MAX];
|
||||
char text[MaxRounds * 8];
|
||||
int offset = 0;
|
||||
FILE *fp;
|
||||
int round_count;
|
||||
|
||||
if(zip_path == NULL || local_path == NULL || archive == NULL)
|
||||
if(path == NULL || path[0] == '\0' || round_times == NULL || round_count <= 0 || round_count > MaxRounds)
|
||||
return 0;
|
||||
|
||||
// Extract file from ZIP
|
||||
size = 0;
|
||||
content = (char *)mz_zip_reader_extract_file_to_heap(archive, zip_path, &size, 0);
|
||||
if(content == NULL || size == 0) {
|
||||
TraceLog(LOG_WARNING, "DATA: failed to extract file from ZIP: %s", zip_path);
|
||||
snprintf(temp_path, sizeof(temp_path), "%s.importing", path);
|
||||
|
||||
for(int i = 0; i < round_count; i++) {
|
||||
if(round_times[i] <= 0)
|
||||
continue;
|
||||
if(offset >= (int)sizeof(text) - 8)
|
||||
break;
|
||||
offset += snprintf(text + offset, sizeof(text) - (size_t)offset,
|
||||
"%d\n", round_times[i]);
|
||||
}
|
||||
|
||||
if(offset <= 0)
|
||||
return 0;
|
||||
|
||||
fp = fopen(temp_path, "w");
|
||||
if(fp == NULL) {
|
||||
TraceLog(LOG_ERROR, "DATA: failed to open temp import file: %s", temp_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Validate session content
|
||||
if(!validate_session_content(content, &round_count)) {
|
||||
TraceLog(LOG_WARNING, "DATA: invalid session content: %s", zip_path);
|
||||
free(content);
|
||||
if(fwrite(text, 1, (size_t)offset, fp) != (size_t)offset) {
|
||||
TraceLog(LOG_ERROR, "DATA: failed to write temp import file: %s", temp_path);
|
||||
fclose(fp);
|
||||
remove(temp_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Create directory structure if needed
|
||||
if(fclose(fp) != 0) {
|
||||
TraceLog(LOG_ERROR, "DATA: failed to close temp import file: %s", temp_path);
|
||||
remove(temp_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(rename(temp_path, path) != 0) {
|
||||
TraceLog(LOG_ERROR, "DATA: failed to move temp import file to %s", path);
|
||||
remove(temp_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
ensure_session_parent_dir(const char *local_path)
|
||||
{
|
||||
char dir_path[FS_PATH_MAX];
|
||||
|
||||
if(local_path == NULL || local_path[0] == '\0')
|
||||
return 0;
|
||||
|
||||
strncpy(dir_path, local_path, sizeof(dir_path) - 1);
|
||||
dir_path[sizeof(dir_path) - 1] = '\0';
|
||||
|
||||
@@ -927,30 +973,63 @@ import_session_file(const char *zip_path, const char *local_path, mz_zip_archive
|
||||
*last_slash = '\0';
|
||||
if(!ensure_dir(dir_path)) {
|
||||
TraceLog(LOG_ERROR, "DATA: failed to create directory: %s", dir_path);
|
||||
free(content);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Write session file
|
||||
fp = fopen(local_path, "w");
|
||||
if(fp == NULL) {
|
||||
TraceLog(LOG_ERROR, "DATA: failed to open file for writing: %s", local_path);
|
||||
free(content);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
import_session_file(const char *zip_path, const char *local_path, mz_zip_archive *archive)
|
||||
{
|
||||
char *content = NULL;
|
||||
char *import_text = NULL;
|
||||
size_t size;
|
||||
int imported_rounds[MaxRounds];
|
||||
int imported_count = 0;
|
||||
|
||||
if(zip_path == NULL || local_path == NULL || archive == NULL)
|
||||
return 0;
|
||||
|
||||
size = 0;
|
||||
content = (char *)mz_zip_reader_extract_file_to_heap(archive, zip_path, &size, 0);
|
||||
if(content == NULL || size == 0) {
|
||||
TraceLog(LOG_WARNING, "DATA: failed to extract file from ZIP: %s", zip_path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(fwrite(content, 1, size, fp) != size) {
|
||||
TraceLog(LOG_ERROR, "DATA: failed to write session file: %s", local_path);
|
||||
fclose(fp);
|
||||
import_text = malloc(size + 1);
|
||||
if(import_text == NULL) {
|
||||
free(content);
|
||||
return 0;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
memcpy(import_text, content, size);
|
||||
import_text[size] = '\0';
|
||||
free(content);
|
||||
|
||||
TraceLog(LOG_INFO, "DATA: imported session: %s (%d rounds)", local_path, round_count);
|
||||
if(!parse_session_content(import_text, imported_rounds, MaxRounds, &imported_count)) {
|
||||
TraceLog(LOG_WARNING, "DATA: invalid session content: %s", zip_path);
|
||||
free(import_text);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!ensure_session_parent_dir(local_path)) {
|
||||
free(import_text);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(FileExists(local_path))
|
||||
TraceLog(LOG_INFO, "DATA: replacing existing imported session: %s", local_path);
|
||||
|
||||
if(!write_session_content_atomic(local_path, imported_rounds, imported_count)) {
|
||||
free(import_text);
|
||||
return 0;
|
||||
}
|
||||
|
||||
free(import_text);
|
||||
|
||||
TraceLog(LOG_INFO, "DATA: imported session: %s (%d rounds)", local_path, imported_count);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+161
-22
@@ -1,9 +1,19 @@
|
||||
#include "raylib.h"
|
||||
#include "app.h"
|
||||
#include "flint_dpi.h"
|
||||
#include "flint_web.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 +30,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,25 +181,13 @@ 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)
|
||||
{
|
||||
#if defined(PLATFORM_WEB)
|
||||
flint_web_sync_window_size();
|
||||
#endif
|
||||
|
||||
int width = GetScreenWidth();
|
||||
int height = GetScreenHeight();
|
||||
#if !defined(PLATFORM_WEB)
|
||||
@@ -91,8 +210,8 @@ frame(void)
|
||||
int safe_left = insets.cutout_left;
|
||||
int safe_right = insets.cutout_right;
|
||||
|
||||
int content_x = 0;
|
||||
int content_y = 0;
|
||||
int content_x = safe_left;
|
||||
int content_y = safe_top;
|
||||
int content_width = android_clamp_content_size(width, safe_left, safe_right);
|
||||
int content_height = android_clamp_content_size(height, safe_top, safe_bottom);
|
||||
|
||||
@@ -129,16 +248,25 @@ int main(int argc, char **argv) {
|
||||
int window_w = INBE_ANDROID_BUILD ? 0 : config.width;
|
||||
int window_h = INBE_ANDROID_BUILD ? 0 : config.height;
|
||||
|
||||
#if defined(PLATFORM_WEB)
|
||||
flint_web_viewport_size(config.width, config.height, &window_w, &window_h);
|
||||
config.width = window_w;
|
||||
config.height = window_h;
|
||||
#endif
|
||||
|
||||
#if INBE_ANDROID_BUILD
|
||||
__android_log_write(ANDROID_LOG_INFO, "INBE_MAIN", "=== MAIN START ===");
|
||||
#endif
|
||||
|
||||
#if !defined(PLATFORM_ANDROID) && !defined(__ANDROID__) && !defined(ANDROID) && !defined(PLATFORM_WEB)
|
||||
use_packaged_app_directory();
|
||||
#if defined(PLATFORM_WEB)
|
||||
SetConfigFlags(flint_web_window_flags());
|
||||
#elif !defined(PLATFORM_ANDROID) && !defined(__ANDROID__) && !defined(ANDROID)
|
||||
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 +283,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 +313,9 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
CloseWindow();
|
||||
#if defined(_WIN32) && !defined(__ANDROID__)
|
||||
windows_close_logger();
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
+116
-25
@@ -3,7 +3,6 @@
|
||||
#include "data.h"
|
||||
#include "locale.h"
|
||||
#include "flint_ui.h"
|
||||
#include "flint_text_layout.h"
|
||||
#include "raylib.h"
|
||||
|
||||
#include <dirent.h>
|
||||
@@ -290,7 +289,9 @@ draw_history_row(InbeApp *app, int x, int y, int w, int h, const char *text, int
|
||||
ui_draw_bevel(x, y, w, h, flint_lighten(c_button, 28), flint_darken(c_button, 20));
|
||||
}
|
||||
|
||||
flint_text_draw(text, x + flint_px(indent), y + flint_px(6), flint_px(16), c_text);
|
||||
flint_text_draw(text, x + flint_px(indent),
|
||||
flint_ui_text_y(text, y, h, flint_px(16)),
|
||||
flint_px(16), c_text);
|
||||
return hover && IsMouseButtonReleased(MOUSE_BUTTON_LEFT);
|
||||
}
|
||||
|
||||
@@ -317,7 +318,8 @@ draw_history_session_row(InbeApp *app, int x, int y, int w, int h, const char *t
|
||||
ui_draw_bevel(x, y, w, h, flint_lighten(c_button, 28), flint_darken(c_button, 20));
|
||||
}
|
||||
|
||||
flint_text_draw(text, x + flint_px(46), y + flint_px(6), font, c_text);
|
||||
flint_text_draw(text, x + flint_px(46),
|
||||
flint_ui_text_y(text, y, h, font), font, c_text);
|
||||
|
||||
if(hover && IsMouseButtonReleased(MOUSE_BUTTON_LEFT))
|
||||
return 1;
|
||||
@@ -712,7 +714,8 @@ history_keyboard_key(InbeApp *app, int x, int y, int w, int h, const char *label
|
||||
}
|
||||
|
||||
text_w = flint_text_measure(label, font);
|
||||
flint_text_draw(label, x + (w - text_w) / 2, y + (h - font) / 2 - 1, font, c_text);
|
||||
flint_text_draw(label, x + (w - text_w) / 2,
|
||||
flint_ui_text_y(label, y, h, font), font, c_text);
|
||||
return pressed;
|
||||
}
|
||||
|
||||
@@ -827,14 +830,13 @@ history_update_edit_input(InbeApp *app, const HistoryEntry *entry,
|
||||
}
|
||||
|
||||
static void
|
||||
history_draw_edit_field(InbeApp *app, const HistoryEntry *entry, int x, int y, int w, int h)
|
||||
history_draw_edit_field(InbeApp *app, const HistoryEntry *entry, int x, int y, int w, int h, int font)
|
||||
{
|
||||
int font = flint_px(16);
|
||||
int valid = 0;
|
||||
int field_y = y + flint_px(3);
|
||||
int field_h = h - flint_px(6);
|
||||
int text_x = x + flint_px(8);
|
||||
int text_y = y + flint_px(7);
|
||||
int text_y = flint_ui_text_y(app->history_edit_text, y, h, font);
|
||||
int caret_x;
|
||||
|
||||
history_update_edit_input(app, entry, x, field_y, w, field_h, text_x, font);
|
||||
@@ -1075,6 +1077,83 @@ history_fit_session_label(const HistoryEntry *entry, int available_w, char *out,
|
||||
snprintf(out, out_size, "%02d:%02d %ds", entry->hour, entry->minute, entry->avg_seconds);
|
||||
}
|
||||
|
||||
static int
|
||||
history_active_edit_row(const InbeApp *app, const HistoryEntry *entries, int count)
|
||||
{
|
||||
int row = 1;
|
||||
|
||||
if(app == NULL || entries == NULL || !app->history_edit_active ||
|
||||
app->history_level != HISTORY_LEVEL_EDIT_DAY)
|
||||
return -1;
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
if(entries[i].year != app->history_year ||
|
||||
entries[i].month != app->history_month ||
|
||||
entries[i].day != app->history_day)
|
||||
continue;
|
||||
|
||||
if(strcmp(app->history_edit_path, entries[i].path) == 0) {
|
||||
if(app->history_edit_kind == HISTORY_EDIT_TIME)
|
||||
return row;
|
||||
if(app->history_edit_kind == HISTORY_EDIT_ROUND &&
|
||||
app->history_edit_round >= 0 &&
|
||||
app->history_edit_round < entries[i].round_count)
|
||||
return row + 1 + app->history_edit_round;
|
||||
}
|
||||
|
||||
row += 1 + entries[i].round_count;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
history_scroll_edit_into_view(InbeApp *app, const HistoryEntry *entries, int count,
|
||||
int row_h, int viewport_h, int max_scroll)
|
||||
{
|
||||
static char last_path[FS_PATH_MAX] = "";
|
||||
static int last_kind = HISTORY_EDIT_NONE;
|
||||
static int last_round = -1;
|
||||
int row = history_active_edit_row(app, entries, count);
|
||||
int margin = flint_px(10);
|
||||
int row_top;
|
||||
int row_bottom;
|
||||
int changed;
|
||||
|
||||
if(app == NULL || !app->history_edit_active) {
|
||||
last_path[0] = '\0';
|
||||
last_kind = HISTORY_EDIT_NONE;
|
||||
last_round = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if(row < 0 || max_scroll <= 0 || viewport_h <= 0)
|
||||
return;
|
||||
|
||||
changed = last_kind != app->history_edit_kind ||
|
||||
last_round != app->history_edit_round ||
|
||||
strcmp(last_path, app->history_edit_path) != 0;
|
||||
if(!changed)
|
||||
return;
|
||||
|
||||
snprintf(last_path, sizeof(last_path), "%s", app->history_edit_path);
|
||||
last_kind = app->history_edit_kind;
|
||||
last_round = app->history_edit_round;
|
||||
|
||||
row_top = flint_px(12) + row * row_h;
|
||||
row_bottom = row_top + row_h;
|
||||
|
||||
if(row_top - margin < app->history_scroll)
|
||||
app->history_scroll = row_top - margin;
|
||||
else if(row_bottom + margin > app->history_scroll + viewport_h)
|
||||
app->history_scroll = row_bottom + margin - viewport_h;
|
||||
|
||||
if(app->history_scroll < 0)
|
||||
app->history_scroll = 0;
|
||||
if(app->history_scroll > max_scroll)
|
||||
app->history_scroll = max_scroll;
|
||||
}
|
||||
|
||||
void
|
||||
history_tab_draw(InbeApp *app)
|
||||
{
|
||||
@@ -1097,6 +1176,8 @@ history_tab_draw(InbeApp *app)
|
||||
int selected_index = -1;
|
||||
int content_x;
|
||||
int content_w;
|
||||
int scrollbar_w = flint_px(8);
|
||||
int scrollbar_gap = flint_px(6);
|
||||
|
||||
scan_history_tree(entries, &count);
|
||||
qsort(entries, (size_t)count, sizeof(entries[0]), compare_history_entries);
|
||||
@@ -1184,6 +1265,7 @@ history_tab_draw(InbeApp *app)
|
||||
|
||||
app->history_scroll -= (int)(GetMouseWheelMove() * 24.0f);
|
||||
app->history_scroll = (app->history_scroll < 0) ? 0 : (app->history_scroll > max_scroll ? max_scroll : app->history_scroll);
|
||||
history_scroll_edit_into_view(app, entries, count, row_h, viewport_h, max_scroll);
|
||||
|
||||
/* Use percentage of screen width like tutorial, not DPI-scaled CONTENT_MAX_W */
|
||||
int responsive_max_w = (int)(view_width * 0.96f);
|
||||
@@ -1192,6 +1274,8 @@ history_tab_draw(InbeApp *app)
|
||||
responsive_max_w = min_content_w;
|
||||
int side_padding = flint_page_side_padding();
|
||||
flint_centered_column(responsive_max_w, side_padding, &content_x, &content_w);
|
||||
if(max_scroll > 0 && content_w > flint_px(120) + scrollbar_w + scrollbar_gap)
|
||||
content_w -= scrollbar_w + scrollbar_gap;
|
||||
|
||||
close_clicked = ui_draw_screen_header(locale_get("history_title"), 1);
|
||||
if(close_clicked) {
|
||||
@@ -1208,10 +1292,13 @@ history_tab_draw(InbeApp *app)
|
||||
if(count == 0) {
|
||||
int font = flint_px(16);
|
||||
const char *empty_text = locale_get("history_empty");
|
||||
FlintTextLayout empty_layout = flint_text_layout_parse(empty_text, (Texture2D){0}, FLINT_ICON_TYPE_NONE, font);
|
||||
flint_text_layout_reflow(&empty_layout, content_w, font, flint_px(22));
|
||||
flint_text_layout_draw(&empty_layout, content_x, &y, font, c_text);
|
||||
flint_text_layout_free(&empty_layout);
|
||||
flint_ui_paragraph_draw((FlintUIParagraph){
|
||||
.text = empty_text,
|
||||
.width = content_w,
|
||||
.font = font,
|
||||
.line_gap = flint_px(22),
|
||||
.color = c_text,
|
||||
}, content_x, &y);
|
||||
} else {
|
||||
if(app->history_level == HISTORY_LEVEL_EDIT_DAY && has_day) {
|
||||
int return_hover = 0;
|
||||
@@ -1230,7 +1317,8 @@ history_tab_draw(InbeApp *app)
|
||||
char label[HISTORY_TEXT_SIZE];
|
||||
locale_format(label, sizeof(label), "history_day_label", app->history_day);
|
||||
flint_text_draw(label, content_x + icon_size + icon_padding * 2 + flint_px(10),
|
||||
y + flint_px(6), flint_px(14), c_text);
|
||||
flint_ui_text_y(label, y, row_h, flint_px(16)),
|
||||
flint_px(16), c_text);
|
||||
}
|
||||
y += row_h;
|
||||
|
||||
@@ -1248,8 +1336,8 @@ history_tab_draw(InbeApp *app)
|
||||
DrawRectangle(content_x, y, content_w, row_h, flint_darken(c_bg, 6));
|
||||
ui_draw_bevel(content_x, y, content_w, row_h, flint_lighten(c_button, 28), flint_darken(c_button, 20));
|
||||
if(history_edit_matches(app, &entries[i], HISTORY_EDIT_TIME, -1)) {
|
||||
history_draw_edit_field(app, &entries[i], content_x + flint_px(8), y,
|
||||
label_w, row_h);
|
||||
history_draw_edit_field(app, &entries[i], content_x + flint_px(2), y,
|
||||
label_w, row_h, flint_px(16));
|
||||
if(!app->history_edit_active) {
|
||||
app->history_scroll = 0;
|
||||
EndScissorMode();
|
||||
@@ -1264,8 +1352,9 @@ history_tab_draw(InbeApp *app)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
flint_text_draw(time_label, content_x + flint_px(10), y + flint_px(6),
|
||||
flint_px(14), c_text);
|
||||
flint_text_draw(time_label, content_x + flint_px(10),
|
||||
flint_ui_text_y(time_label, y, row_h, flint_px(16)),
|
||||
flint_px(16), c_text);
|
||||
if(draw_history_action_button(app, right_edge, y, row_h, 1,
|
||||
app->pencil_icon, UI_ICON_TYPE_PENCIL)) {
|
||||
history_begin_edit_time(app, &entries[i]);
|
||||
@@ -1285,8 +1374,8 @@ history_tab_draw(InbeApp *app)
|
||||
DrawRectangle(content_x, y, content_w, row_h, flint_darken(c_bg, 4));
|
||||
ui_draw_bevel(content_x, y, content_w, row_h, flint_lighten(c_button, 24), flint_darken(c_button, 18));
|
||||
if(history_edit_matches(app, &entries[i], HISTORY_EDIT_ROUND, r)) {
|
||||
history_draw_edit_field(app, &entries[i], content_x + flint_px(20), y,
|
||||
label_w - flint_px(12), row_h);
|
||||
history_draw_edit_field(app, &entries[i], content_x + flint_px(14), y,
|
||||
label_w - flint_px(12), row_h, flint_px(16));
|
||||
if(!app->history_edit_active) {
|
||||
app->history_scroll = 0;
|
||||
EndScissorMode();
|
||||
@@ -1301,8 +1390,9 @@ history_tab_draw(InbeApp *app)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
flint_text_draw(round_label, content_x + flint_px(22), y + flint_px(6),
|
||||
flint_px(14), c_text);
|
||||
flint_text_draw(round_label, content_x + flint_px(22),
|
||||
flint_ui_text_y(round_label, y, row_h, flint_px(16)),
|
||||
flint_px(16), c_text);
|
||||
if(draw_history_action_button(app, right_edge, y, row_h, 1,
|
||||
app->pencil_icon, UI_ICON_TYPE_PENCIL)) {
|
||||
history_begin_edit_round(app, &entries[i], r);
|
||||
@@ -1424,12 +1514,13 @@ history_tab_draw(InbeApp *app)
|
||||
|
||||
/* Draw scrollbar if needed */
|
||||
if(max_scroll > 0) {
|
||||
int scrollbar_w = flint_px(8);
|
||||
int scrollbar_h = (viewport_h * viewport_h) / (content_h + viewport_h);
|
||||
int scrollbar_x = content_x + content_w + flint_px(10);
|
||||
int scrollbar_y = title_h + (app->history_scroll * (viewport_h - scrollbar_h)) / max_scroll;
|
||||
int scrollbar_x = (int)(app->camera.offset.x + (content_x + content_w + scrollbar_gap) * app->camera.zoom);
|
||||
int scrollbar_y = (int)(app->camera.offset.y + title_h * app->camera.zoom);
|
||||
int scrollbar_viewport_h = (int)(viewport_h * app->camera.zoom);
|
||||
int scrollbar_content_h = (int)(content_h * app->camera.zoom);
|
||||
|
||||
DrawRectangle(scrollbar_x, scrollbar_y, scrollbar_w, scrollbar_h, flint_darken(c_text, 40));
|
||||
ui_draw_scrollbar(scrollbar_x, scrollbar_y, scrollbar_viewport_h,
|
||||
scrollbar_content_h, &app->history_scroll, max_scroll);
|
||||
}
|
||||
|
||||
if(history_should_show_keyboard(app) && keyboard_entry != NULL) {
|
||||
|
||||
+46
-87
@@ -2,11 +2,9 @@
|
||||
#include "app.h"
|
||||
#include "locale.h"
|
||||
#include "flint_ui.h"
|
||||
#include "flint_text_layout.h"
|
||||
#include "theme_meta.h"
|
||||
#include "raylib.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CONTENT_MAX_W 800 /* Responsive width for tutorial text reflow */
|
||||
|
||||
@@ -28,17 +26,6 @@ static const char *const TUTORIAL_KEYS[] = {
|
||||
#define TUTORIAL_STEPS_COUNT (sizeof(TUTORIAL_KEYS) / sizeof(TUTORIAL_KEYS[0]))
|
||||
#define TUTORIAL_LINE_SPACING flint_px(8) /* Normal readable line spacing */
|
||||
|
||||
/*
|
||||
* Wrapper for compatibility - using Flint's unified button utility
|
||||
* This function is deprecated - use ui_draw_generic_button() directly
|
||||
*/
|
||||
static int
|
||||
draw_tutorial_footer_button(InbeApp *app, int x, int y, int w, int h, const char *label, int *hover)
|
||||
{
|
||||
(void)app;
|
||||
return ui_draw_generic_button(x, y, w, h, label, UI_BUTTON_STYLE_PRIMARY, hover);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_tutorial_hold_preview(InbeApp *app, int center_x, int center_y, int radius)
|
||||
{
|
||||
@@ -66,16 +53,32 @@ draw_tutorial_hold_preview(InbeApp *app, int center_x, int center_y, int radius)
|
||||
flint_ui_draw_text_centered(text, center_x, center_y, font, c_text);
|
||||
}
|
||||
|
||||
static void
|
||||
init_tutorial_layouts(InbeApp *app, int body_font)
|
||||
static FlintUIParagraph
|
||||
tutorial_paragraph(InbeApp *app, int step, int content_w, int body_font)
|
||||
{
|
||||
if(!app->tutorial_layouts_initialized) {
|
||||
for(int i = 0; i < (int)TUTORIAL_STEPS_COUNT; i++) {
|
||||
app->tutorial_layouts[i] = calloc(1, sizeof(FlintTextLayout));
|
||||
*app->tutorial_layouts[i] = flint_text_layout_parse(locale_get(TUTORIAL_KEYS[i]), (Texture2D){0}, FLINT_ICON_TYPE_NONE, body_font);
|
||||
}
|
||||
app->tutorial_layouts_initialized = 1;
|
||||
}
|
||||
int has_icon = step == 1;
|
||||
return (FlintUIParagraph){
|
||||
.text = locale_get(TUTORIAL_KEYS[step]),
|
||||
.icon = has_icon ? app->gear_icon : (Texture2D){0},
|
||||
.icon_type = has_icon ? FLINT_ICON_TYPE_GEAR : FLINT_ICON_TYPE_NONE,
|
||||
.icon_size = has_icon ? flint_px(14) : 0,
|
||||
.width = content_w,
|
||||
.font = body_font,
|
||||
.line_gap = TUTORIAL_LINE_SPACING,
|
||||
.color = c_text,
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
tutorial_paragraph_height(InbeApp *app, int step, int content_w, int body_font)
|
||||
{
|
||||
return flint_ui_paragraph_height(tutorial_paragraph(app, step, content_w, body_font));
|
||||
}
|
||||
|
||||
static void
|
||||
draw_tutorial_paragraph(InbeApp *app, int step, int content_x, int *y, int content_w, int body_font)
|
||||
{
|
||||
flint_ui_paragraph_draw(tutorial_paragraph(app, step, content_w, body_font), content_x, y);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -84,14 +87,7 @@ manual_tab_reset_layouts(InbeApp *app)
|
||||
if(app == NULL)
|
||||
return;
|
||||
|
||||
for(int i = 0; i < (int)TUTORIAL_STEPS_COUNT; i++) {
|
||||
if(app->tutorial_layouts[i] != NULL) {
|
||||
flint_text_layout_free(app->tutorial_layouts[i]);
|
||||
free(app->tutorial_layouts[i]);
|
||||
app->tutorial_layouts[i] = NULL;
|
||||
}
|
||||
}
|
||||
app->tutorial_layouts_initialized = 0;
|
||||
app->manual_scroll = 0;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -165,16 +161,6 @@ manual_tab_draw(InbeApp *app)
|
||||
int side_padding = flint_page_side_padding();
|
||||
flint_centered_column(responsive_max_w, side_padding, &content_x, &content_w);
|
||||
|
||||
/* Auto-reflow every frame */
|
||||
if(!app->tutorial_layouts_initialized) {
|
||||
init_tutorial_layouts(app, body_font);
|
||||
}
|
||||
|
||||
/* Reflow all layouts for current container width */
|
||||
for(int i = 0; i < (int)TUTORIAL_STEPS_COUNT; i++) {
|
||||
flint_text_layout_reflow(app->tutorial_layouts[i], content_w, body_font, TUTORIAL_LINE_SPACING);
|
||||
}
|
||||
|
||||
close_clicked = ui_draw_screen_header(title, 1);
|
||||
if(close_clicked)
|
||||
manual_tab_close_tutorial(app, 1);
|
||||
@@ -183,19 +169,16 @@ manual_tab_draw(InbeApp *app)
|
||||
/* Don't include padding in this calculation - it's handled separately */
|
||||
int actual_content_h = 0; /* Content only, no padding */
|
||||
if(step == 0) {
|
||||
actual_content_h += flint_px(170) + flint_px(22) + flint_text_layout_get_height(app->tutorial_layouts[0]);
|
||||
actual_content_h += flint_px(170) + flint_px(22) +
|
||||
tutorial_paragraph_height(app, 0, content_w, body_font);
|
||||
} else if(step == 1) {
|
||||
/* Step 1 uses a fresh gear_layout for drawing - calculate height from it */
|
||||
FlintTextLayout temp_gear = flint_text_layout_parse(locale_get(TUTORIAL_KEYS[1]), app->gear_icon, FLINT_ICON_TYPE_GEAR, flint_px(14));
|
||||
flint_text_layout_reflow(&temp_gear, content_w, body_font, TUTORIAL_LINE_SPACING);
|
||||
actual_content_h += flint_text_layout_get_height(&temp_gear);
|
||||
flint_text_layout_free(&temp_gear);
|
||||
actual_content_h += tutorial_paragraph_height(app, 1, content_w, body_font);
|
||||
} else if(step == 2) {
|
||||
actual_content_h += flint_text_layout_get_height(app->tutorial_layouts[2]) + flint_px(68);
|
||||
actual_content_h += tutorial_paragraph_height(app, 2, content_w, body_font) + flint_px(68);
|
||||
if(app->inbe.progressive_speed)
|
||||
actual_content_h += flint_px(66);
|
||||
} else if(step == 3) {
|
||||
actual_content_h += flint_text_layout_get_height(app->tutorial_layouts[3]) + flint_px(20);
|
||||
actual_content_h += tutorial_paragraph_height(app, 3, content_w, body_font) + flint_px(20);
|
||||
/* Circle preview height - calculate actual rmax based on content_w */
|
||||
/* update_preview_bounds uses min(content_w, 132)/2 clamped to 60-120 for rmax */
|
||||
int preview_span = (content_w < flint_px(132)) ? content_w : flint_px(132);
|
||||
@@ -211,9 +194,10 @@ manual_tab_draw(InbeApp *app)
|
||||
int hold_preview_extent = hold_preview_radius + flint_px(8) + flint_px(5);
|
||||
actual_content_h += flint_px(26) + flint_px(36) + flint_px(20);
|
||||
actual_content_h += hold_preview_extent * 2 + flint_px(24);
|
||||
actual_content_h += flint_text_layout_get_height(app->tutorial_layouts[4]);
|
||||
actual_content_h += tutorial_paragraph_height(app, 4, content_w, body_font);
|
||||
} else {
|
||||
actual_content_h += flint_px(200) + flint_px(22) + flint_text_layout_get_height(app->tutorial_layouts[5]);
|
||||
actual_content_h += flint_px(200) + flint_px(22) +
|
||||
tutorial_paragraph_height(app, 5, content_w, body_font);
|
||||
}
|
||||
/* Calculate scroll range for virtual content space */
|
||||
int top_padding = flint_px(16);
|
||||
@@ -269,24 +253,14 @@ manual_tab_draw(InbeApp *app)
|
||||
ui_draw_tutorial_image(app->angel_image, "angel.jpg", content_x, y, content_w, img_h);
|
||||
y += img_h + flint_px(22);
|
||||
|
||||
if(app->tutorial_layouts_initialized && app->tutorial_layouts[0] != NULL) {
|
||||
flint_text_layout_draw(app->tutorial_layouts[0], content_x, &y, body_font, c_text);
|
||||
}
|
||||
draw_tutorial_paragraph(app, 0, content_x, &y, content_w, body_font);
|
||||
} else if(step == 1) {
|
||||
/* Step 1 text with gear icon - parse fresh each frame for proper icon binding */
|
||||
int icon_size = flint_px(14);
|
||||
FlintTextLayout gear_layout = flint_text_layout_parse(locale_get(TUTORIAL_KEYS[1]), app->gear_icon, FLINT_ICON_TYPE_GEAR, icon_size);
|
||||
flint_text_layout_reflow(&gear_layout, content_w, body_font, TUTORIAL_LINE_SPACING);
|
||||
flint_text_layout_draw(&gear_layout, content_x, &y, body_font, c_text);
|
||||
flint_text_layout_free(&gear_layout);
|
||||
draw_tutorial_paragraph(app, 1, content_x, &y, content_w, body_font);
|
||||
} else if(step == 2) {
|
||||
if(app->tutorial_layouts_initialized && app->tutorial_layouts[2] != NULL) {
|
||||
flint_text_layout_draw(app->tutorial_layouts[2], content_x, &y, body_font, c_text);
|
||||
}
|
||||
draw_tutorial_paragraph(app, 2, content_x, &y, content_w, body_font);
|
||||
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,
|
||||
@@ -300,24 +274,10 @@ 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;
|
||||
progressive_start_speed = clampi(progressive_start_speed, SETTINGS_SPEED_MIN, max_speed);
|
||||
if(ui_draw_slider(11, content_x, y, content_w,
|
||||
locale_get("progressive_start_speed_label"),
|
||||
SETTINGS_SPEED_MIN, max_speed,
|
||||
&progressive_start_speed, "")) {
|
||||
app->inbe.progressive_start_speed = progressive_start_speed;
|
||||
app->settings_preview.progressive_start_speed = progressive_start_speed;
|
||||
app->settings_dirty = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if(step == 3) {
|
||||
int speed = app->inbe.speed_level;
|
||||
if(app->tutorial_layouts_initialized && app->tutorial_layouts[3] != NULL) {
|
||||
flint_text_layout_draw(app->tutorial_layouts[3], content_x, &y, body_font, c_text);
|
||||
}
|
||||
draw_tutorial_paragraph(app, 3, content_x, &y, content_w, body_font);
|
||||
y += flint_px(20); /* Increased spacing between text and circle */
|
||||
|
||||
update_preview_bounds(&app->settings_preview, content_w, flint_px(132));
|
||||
@@ -353,16 +313,12 @@ manual_tab_draw(InbeApp *app)
|
||||
y += flint_px(36) + flint_px(20) + hold_preview_extent;
|
||||
draw_tutorial_hold_preview(app, content_x + content_w / 2, y, hold_preview_radius);
|
||||
y += hold_preview_extent + flint_px(24);
|
||||
if(app->tutorial_layouts_initialized && app->tutorial_layouts[4] != NULL) {
|
||||
flint_text_layout_draw(app->tutorial_layouts[4], content_x, &y, body_font, c_text);
|
||||
}
|
||||
draw_tutorial_paragraph(app, 4, content_x, &y, content_w, body_font);
|
||||
} else {
|
||||
int img_h = flint_px(200);
|
||||
ui_draw_tutorial_image(app->begin_image, "begin.jpg", content_x, y, content_w, img_h);
|
||||
y += img_h + flint_px(22);
|
||||
if(app->tutorial_layouts_initialized && app->tutorial_layouts[5] != NULL) {
|
||||
flint_text_layout_draw(app->tutorial_layouts[5], content_x, &y, body_font, c_text);
|
||||
}
|
||||
draw_tutorial_paragraph(app, 5, content_x, &y, content_w, body_font);
|
||||
}
|
||||
EndScissorMode();
|
||||
|
||||
@@ -397,16 +353,19 @@ manual_tab_draw(InbeApp *app)
|
||||
footer_y - page_font - counter_gap, page_font, c_text);
|
||||
|
||||
if(step == 0) {
|
||||
if(draw_tutorial_footer_button(app, content_x, footer_y, button_w, button_h, left_label, &left_hover))
|
||||
if(ui_draw_generic_button(content_x, footer_y, button_w, button_h,
|
||||
left_label, UI_BUTTON_STYLE_PRIMARY, &left_hover))
|
||||
manual_tab_close_tutorial(app, 1);
|
||||
} else {
|
||||
if(draw_tutorial_footer_button(app, content_x, footer_y, button_w, button_h, left_label, &left_hover)) {
|
||||
if(ui_draw_generic_button(content_x, footer_y, button_w, button_h,
|
||||
left_label, UI_BUTTON_STYLE_PRIMARY, &left_hover)) {
|
||||
app->tutorial_step--;
|
||||
app->manual_scroll = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(draw_tutorial_footer_button(app, content_x + button_w + footer_gap, footer_y, button_w, button_h, right_label, &right_hover)) {
|
||||
if(ui_draw_generic_button(content_x + button_w + footer_gap, footer_y, button_w, button_h,
|
||||
right_label, UI_BUTTON_STYLE_PRIMARY, &right_hover)) {
|
||||
if(step == (int)TUTORIAL_STEPS_COUNT - 1)
|
||||
manual_tab_close_tutorial(app, 1);
|
||||
else {
|
||||
|
||||
+144
-114
@@ -1,9 +1,9 @@
|
||||
#include "settings_tab.h"
|
||||
#include "app.h"
|
||||
#include "app_session.h"
|
||||
#include "language_tab.h"
|
||||
#include "locale.h"
|
||||
#include "flint_ui.h"
|
||||
#include "flint_text_layout.h"
|
||||
#if !defined(PLATFORM_ANDROID) && !defined(__ANDROID__) && !defined(ANDROID) && !defined(_WIN32) && !defined(PLATFORM_WEB)
|
||||
#define INBE_HAS_FLINT_FILE_DIALOG 1
|
||||
#include "flint_file_dialog.h"
|
||||
@@ -84,11 +84,14 @@ draw_category_card(InbeApp *app, const char *title, const char *description,
|
||||
int title_y = flint_ui_text_y(title, (int)rect.y + padding_y, title_font, title_font);
|
||||
flint_text_draw(title, (int)rect.x + padding_x, title_y, title_font, c_text);
|
||||
|
||||
FlintTextLayout desc_layout = flint_text_layout_parse(description, (Texture2D){0}, FLINT_ICON_TYPE_NONE, desc_font);
|
||||
flint_text_layout_reflow(&desc_layout, text_w, desc_font, flint_px(8));
|
||||
int desc_y = title_y + title_font + flint_px(8);
|
||||
flint_text_layout_draw(&desc_layout, (int)rect.x + padding_x, &desc_y, desc_font, flint_darken(c_text, 30));
|
||||
flint_text_layout_free(&desc_layout);
|
||||
flint_ui_paragraph_draw((FlintUIParagraph){
|
||||
.text = description,
|
||||
.width = text_w,
|
||||
.font = desc_font,
|
||||
.line_gap = flint_px(8),
|
||||
.color = flint_darken(c_text, 30),
|
||||
}, (int)rect.x + padding_x, &desc_y);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -180,84 +183,104 @@ settings_draw_subtab_bar(InbeApp *app, int x, int y, int w, int h,
|
||||
return clicked_tab;
|
||||
}
|
||||
|
||||
static void
|
||||
settings_draw_exact_speed_preview(Inbe *preview, int *preview_speed,
|
||||
int speed, int max_rounds, int max_breaths,
|
||||
int pause_seconds, int content_w, int content_h,
|
||||
int center_x, int center_y)
|
||||
{
|
||||
if(preview == NULL || preview_speed == NULL)
|
||||
return;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
update_preview_bounds(preview, content_w, content_h);
|
||||
inbestep(preview);
|
||||
draw_preview_inbe(preview, center_x, center_y);
|
||||
}
|
||||
|
||||
void
|
||||
settings_draw_progressive_start_speed_editor(InbeApp *app)
|
||||
{
|
||||
int modal_w = flint_px(340);
|
||||
int modal_h = flint_px(360);
|
||||
if(modal_w > view_width - flint_px(24))
|
||||
modal_w = view_width - flint_px(24);
|
||||
if(modal_h > view_height - flint_px(24))
|
||||
modal_h = view_height - flint_px(24);
|
||||
int modal_x = (view_width - modal_w) / 2;
|
||||
int modal_y = (view_height - modal_h) / 2;
|
||||
int title_font = flint_ui_font();
|
||||
int title_y = modal_y + flint_px(14);
|
||||
int close_size = flint_px(22);
|
||||
int close_padding = flint_px(8);
|
||||
int close_w = close_size + close_padding * 2;
|
||||
int close_hover = 0;
|
||||
int max_speed = app->inbe.speed_level;
|
||||
int start_speed = clampi(app->inbe.progressive_start_speed, SETTINGS_SPEED_MIN, max_speed);
|
||||
|
||||
DrawRectangle(0, 0, view_width, view_height, (Color){0, 0, 0, 180});
|
||||
DrawRectangle(modal_x, modal_y, modal_w, modal_h, c_button);
|
||||
ui_draw_bevel(modal_x, modal_y, modal_w, modal_h,
|
||||
flint_lighten(c_button, 40), flint_darken(c_button, 40));
|
||||
|
||||
const char *title = locale_get("progressive_start_speed_editor_title");
|
||||
int title_w = flint_text_measure(title, title_font);
|
||||
int title_max_w = modal_w - close_w * 2 - flint_px(24);
|
||||
while(title_font > flint_px(12) && title_w > title_max_w) {
|
||||
title_font--;
|
||||
title_w = flint_text_measure(title, title_font);
|
||||
}
|
||||
flint_text_draw(title, modal_x + (modal_w - title_w) / 2, title_y, title_font, c_text);
|
||||
|
||||
if(ui_draw_icon_btn_padded(modal_x + modal_w - close_w - flint_px(6), modal_y + flint_px(6),
|
||||
close_size, close_padding, app->x_icon, UI_ICON_TYPE_X, &close_hover)) {
|
||||
app->modal.active = 0;
|
||||
app->modal.type = UIModalNone;
|
||||
return;
|
||||
}
|
||||
|
||||
settings_draw_exact_speed_preview(&app->start_speed_preview,
|
||||
&app->start_speed_preview_speed,
|
||||
start_speed,
|
||||
app->inbe.max_rounds,
|
||||
int_from_count(app->inbe.maxbreaths),
|
||||
app->inbe.pause_seconds,
|
||||
modal_w - flint_px(48),
|
||||
flint_px(210),
|
||||
modal_x + modal_w / 2,
|
||||
modal_y + flint_px(150));
|
||||
|
||||
if(ui_draw_slider(12, modal_x + flint_px(24), modal_y + flint_px(250),
|
||||
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->settings_dirty = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(LOTUS_BUILD)
|
||||
static void
|
||||
draw_theme_selector(InbeApp *app, int x, int y, int w)
|
||||
{
|
||||
int font = flint_ui_font();
|
||||
int small_font = flint_ui_font_small();
|
||||
const char *label = locale_get("theme_label");
|
||||
|
||||
flint_text_draw(label, x, y, font, c_text);
|
||||
|
||||
/* Light/Dark toggle */
|
||||
const char *theme_light_label = locale_get("theme_light");
|
||||
const char *theme_dark_label = locale_get("theme_dark");
|
||||
int theme_light_w = flint_text_measure(theme_light_label, font);
|
||||
int theme_dark_w = flint_text_measure(theme_dark_label, font);
|
||||
int max_label_w = (theme_light_w > theme_dark_w ? theme_light_w : theme_dark_w);
|
||||
|
||||
/* Calculate toggle width based on text measurements with padding */
|
||||
int toggle_w = max_label_w * 2 + flint_px(32); /* Space for both labels + padding */
|
||||
int min_toggle_w = flint_px(100); /* Minimum width */
|
||||
if(toggle_w < min_toggle_w) toggle_w = min_toggle_w;
|
||||
|
||||
int toggle_h = flint_px(28);
|
||||
int toggle_x = x + w - toggle_w - flint_px(8); /* Right-aligned with reduced margin */
|
||||
int toggle_y = y - 2;
|
||||
|
||||
if(ui_draw_toggle_switch(toggle_x, toggle_y, toggle_w, toggle_h, &app->dark_mode,
|
||||
theme_light_label, theme_dark_label)) {
|
||||
if(ui_draw_theme_switcher(x, y, w, locale_get("theme_label"),
|
||||
locale_get("theme_light"), locale_get("theme_dark"),
|
||||
&app->theme_id, &app->dark_mode)) {
|
||||
refresh_theme_colors(app->theme_id, app->dark_mode);
|
||||
app->settings_dirty = 1;
|
||||
}
|
||||
|
||||
int circle_size = flint_px(36);
|
||||
int circle_spacing = flint_px(32);
|
||||
int row_spacing = flint_px(48);
|
||||
int per_row = 3;
|
||||
int row_width = per_row * circle_size + (per_row - 1) * circle_spacing;
|
||||
int start_x = x + (w - row_width) / 2;
|
||||
int circle_y = y + flint_px(64);
|
||||
Vector2 mouse_world = GetScreenToWorld2D(GetMousePosition(), app->camera);
|
||||
|
||||
for(int i = 0; i < THEME_COUNT; i++) {
|
||||
int row = i / per_row;
|
||||
int col = i % per_row;
|
||||
int cx = start_x + col * (circle_size + circle_spacing) + circle_size / 2;
|
||||
int cy = circle_y + row * (circle_size + row_spacing);
|
||||
|
||||
Color theme_color = c_circle;
|
||||
if(!flint_theme_catalog_color((FlintThemeId)i, app->dark_mode != 0, "circle", &theme_color)) {
|
||||
const char *scope = app->dark_mode ? g_themes[i].dark_scope : g_themes[i].light_scope;
|
||||
theme_color = theme_get(scope, "circle");
|
||||
}
|
||||
DrawCircle(cx, cy, circle_size / 2, theme_color);
|
||||
|
||||
/* Draw selection ring */
|
||||
if(app->theme_id == i) {
|
||||
DrawCircleLines(cx, cy, circle_size / 2 + 2, c_text);
|
||||
} else {
|
||||
DrawCircleLines(cx, cy, circle_size / 2 + 1, flint_darken(c_bg, 30));
|
||||
}
|
||||
|
||||
/* Check for click */
|
||||
Rectangle bounds = {cx - circle_size / 2 - 4, cy - circle_size / 2 - 4, circle_size + 8, circle_size + 8};
|
||||
if(CheckCollisionPointRec(mouse_world, bounds) && IsMouseButtonPressed(MOUSE_BUTTON_LEFT) &&
|
||||
!ui_dropdown_captures_click(mouse_world)) {
|
||||
app->theme_id = i;
|
||||
refresh_theme_colors(app->theme_id, app->dark_mode);
|
||||
app->settings_dirty = 1;
|
||||
}
|
||||
|
||||
if(CheckCollisionPointRec(mouse_world, bounds))
|
||||
app->cursor_clickable = 1;
|
||||
|
||||
/* Draw theme name below */
|
||||
const char *name = g_themes[i].name;
|
||||
int name_w = flint_text_measure(name, small_font);
|
||||
flint_text_draw(name, cx - name_w / 2, cy + circle_size / 2 + flint_px(6), small_font, c_text);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -524,14 +547,26 @@ settings_tab_draw(InbeApp *app)
|
||||
TraceLog(LOG_INFO, "INBE: Settings toggled progressive_speed to %d", progressive_speed);
|
||||
}
|
||||
if(app->inbe.progressive_speed) {
|
||||
progressive_start_speed = clampi(progressive_start_speed, SETTINGS_SPEED_MIN, speed);
|
||||
if(ui_draw_slider(5, content_x, progressive_toggle_y + toggle_h + flint_px(20),
|
||||
content_w, locale_get("progressive_start_speed_label"),
|
||||
SETTINGS_SPEED_MIN, speed, &progressive_start_speed, "")) {
|
||||
app->inbe.progressive_start_speed = progressive_start_speed;
|
||||
app->settings_preview.progressive_start_speed = progressive_start_speed;
|
||||
int modify_y = progressive_toggle_y + toggle_h + flint_px(20);
|
||||
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, speed)) {
|
||||
app->inbe.progressive_start_speed = clampi(progressive_start_speed, SETTINGS_SPEED_MIN, speed);
|
||||
app->settings_preview.progressive_start_speed = app->inbe.progressive_start_speed;
|
||||
app->settings_dirty = 1;
|
||||
}
|
||||
|
||||
if(ui_draw_generic_button(content_x, modify_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(app->settings_sub_tab == PRACTICE_SUBTAB_SESSION) {
|
||||
@@ -589,12 +624,12 @@ settings_tab_draw(InbeApp *app)
|
||||
if(ui_draw_generic_button(reset_x, reset_y, reset_w, reset_h,
|
||||
locale_get("reset_to_defaults_label"), UI_BUTTON_STYLE_SECONDARY, &reset_hover)) {
|
||||
/* Reset to default values */
|
||||
speed = 8;
|
||||
speed = DefaultSpeedLevel;
|
||||
max_rounds = DefaultMaxRounds;
|
||||
max_breaths = DefaultMaxBreaths;
|
||||
pause_seconds = DefaultPauseSeconds;
|
||||
app->inbe.progressive_start_speed = 3;
|
||||
app->settings_preview.progressive_start_speed = 3;
|
||||
app->inbe.progressive_start_speed = DefaultProgressiveStartSpeed;
|
||||
app->settings_preview.progressive_start_speed = DefaultProgressiveStartSpeed;
|
||||
app->advanced_session_controls = 0;
|
||||
app->hold_display_mode = HOLD_DISPLAY_CIRCLE;
|
||||
apply_settings(&app->inbe, speed, max_rounds, max_breaths, pause_seconds);
|
||||
@@ -778,7 +813,6 @@ settings_tab_draw(InbeApp *app)
|
||||
int import_y = text_y;
|
||||
int hover_import = 0;
|
||||
int hover_export = 0;
|
||||
Vector2 mouse_world = GetScreenToWorld2D(GetMousePosition(), app->camera);
|
||||
|
||||
/* Export button */
|
||||
int export_h = flint_px(36);
|
||||
@@ -859,24 +893,10 @@ settings_tab_draw(InbeApp *app)
|
||||
int delete_w = flint_text_measure(locale_get("delete_all_data_button"), font) + flint_px(24);
|
||||
int delete_x = content_x;
|
||||
int delete_y = export_y + export_h + flint_px(12);
|
||||
Rectangle delete_rect = {delete_x, delete_y, delete_w, export_h};
|
||||
|
||||
if(CheckCollisionPointRec(mouse_world, delete_rect)) {
|
||||
DrawRectangle(delete_x, delete_y, delete_w, export_h, c_button_hover);
|
||||
ui_draw_bevel(delete_x, delete_y, delete_w, export_h, flint_darken(c_button_hover, 40), flint_lighten(c_button_hover, 40));
|
||||
hover_delete = 1;
|
||||
app->cursor_clickable = 1;
|
||||
} else {
|
||||
DrawRectangle(delete_x, delete_y, delete_w, export_h, c_button);
|
||||
ui_draw_bevel(delete_x, delete_y, delete_w, export_h, flint_lighten(c_button, 40), flint_darken(c_button, 40));
|
||||
}
|
||||
flint_text_draw(locale_get("delete_all_data_button"), delete_x + flint_px(12),
|
||||
flint_ui_text_y(locale_get("delete_all_data_button"), delete_y, export_h, font),
|
||||
font, c_text);
|
||||
|
||||
/* Handle button clicks */
|
||||
if(hover_delete && IsMouseButtonReleased(MOUSE_BUTTON_LEFT) &&
|
||||
!ui_dropdown_captures_click(mouse_world)) {
|
||||
if(ui_draw_generic_button(delete_x, delete_y, delete_w, export_h,
|
||||
locale_get("delete_all_data_button"),
|
||||
UI_BUTTON_STYLE_DANGER, &hover_delete)) {
|
||||
if(data_has_any()) {
|
||||
app->modal.active = 1;
|
||||
app->modal.type = UIModalConfirmDeleteData;
|
||||
@@ -910,10 +930,13 @@ settings_tab_draw(InbeApp *app)
|
||||
|
||||
/* App description */
|
||||
const char *desc_text = locale_get("about_description");
|
||||
FlintTextLayout desc_layout = flint_text_layout_parse(desc_text, (Texture2D){0}, FLINT_ICON_TYPE_NONE, font);
|
||||
flint_text_layout_reflow(&desc_layout, content_w, font, flint_px(10));
|
||||
flint_text_layout_draw(&desc_layout, content_x, &text_y, font, c_text);
|
||||
flint_text_layout_free(&desc_layout);
|
||||
flint_ui_paragraph_draw((FlintUIParagraph){
|
||||
.text = desc_text,
|
||||
.width = content_w,
|
||||
.font = font,
|
||||
.line_gap = flint_px(10),
|
||||
.color = c_text,
|
||||
}, content_x, &text_y);
|
||||
|
||||
/* Version info */
|
||||
text_y += flint_px(20);
|
||||
@@ -927,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] = {
|
||||
"https://discord.gg/JbGZ4yENDt",
|
||||
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.com/invite/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;
|
||||
@@ -983,6 +1009,10 @@ settings_tab_draw(InbeApp *app)
|
||||
}
|
||||
}
|
||||
|
||||
if(app->modal.active && app->modal.type == UIModalEditProgressiveStartSpeed) {
|
||||
settings_draw_progressive_start_speed_editor(app);
|
||||
}
|
||||
|
||||
if(IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) {
|
||||
if(app->settings_dirty)
|
||||
save_settings(app);
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
#define INBE_VERSION_MAJOR 1
|
||||
#define INBE_VERSION_MINOR 2
|
||||
#define INBE_VERSION_PATCH 2
|
||||
#define INBE_VERSION_STRING "1.2.2"
|
||||
#define INBE_VERSION_PATCH 6
|
||||
#define INBE_VERSION_STRING "1.2.6"
|
||||
|
||||
#endif
|
||||
+8
-6
@@ -25,6 +25,7 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#status,
|
||||
@@ -34,7 +35,8 @@
|
||||
|
||||
.canvas-stage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -45,8 +47,9 @@
|
||||
}
|
||||
|
||||
.canvas-frame {
|
||||
width: min(100vw, calc(100vh * 4 / 7));
|
||||
aspect-ratio: 4 / 7;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -63,9 +66,8 @@
|
||||
|
||||
.canvas-frame:fullscreen,
|
||||
.canvas-frame:-webkit-full-screen {
|
||||
width: min(100vw, calc(100vh * 4 / 7));
|
||||
height: min(100vh, calc(100vw * 7 / 4));
|
||||
margin: auto;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -1,612 +0,0 @@
|
||||
@font-face {
|
||||
font-family: departure;
|
||||
src: url('/web-assets/fonts/DepartureMono-Regular.otf');
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
--page-bg: #000000;
|
||||
--page-tile: url('/web-assets/icons/tile2.png');
|
||||
--page-tile-opacity: 0.32;
|
||||
--panel-bg: #E2EEFC;
|
||||
--dark: #24487C;
|
||||
--shadow: #000000;
|
||||
--light: #ffffff;
|
||||
--button-bg: #A6CFF2;
|
||||
--button-highlight: #ffffff;
|
||||
--button-inset: #ffffff;
|
||||
--link: #4A90E2;
|
||||
--link-hover: #689ED7;
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--page-bg);
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
cursor: url('/web-assets/cursors/arrow.png') 0 0, auto;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
background-image: var(--page-tile);
|
||||
background-repeat: repeat;
|
||||
background-size: 128px 128px;
|
||||
image-rendering: pixelated;
|
||||
opacity: var(--page-tile-opacity);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
line-height: calc(1ex / 0.32);
|
||||
margin: 16px auto;
|
||||
padding: 16px 32px;
|
||||
font-family: departure;
|
||||
font-size: 16px;
|
||||
background-color: var(--panel-bg);
|
||||
max-width: 1028px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid var(--dark);
|
||||
box-shadow:
|
||||
inset 2px 2px 0 0 var(--dark),
|
||||
2px 2px 0 0 var(--light);
|
||||
}
|
||||
|
||||
.hero {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
section {
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
.hero .tk-img {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.version {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: var(--dark);
|
||||
margin: 8px 0 16px 0;
|
||||
opacity: 0.7;
|
||||
font-family: departure;
|
||||
}
|
||||
|
||||
.tk-img {
|
||||
border: 2px solid var(--dark);
|
||||
border-right-color: var(--button-highlight);
|
||||
border-bottom-color: var(--button-highlight);
|
||||
box-shadow:
|
||||
inset 1px 1px 0 0 var(--shadow),
|
||||
1px 1px 0 0 var(--button-highlight);
|
||||
}
|
||||
|
||||
a {
|
||||
font-family: departure;
|
||||
color: var(--link);
|
||||
text-decoration: none;
|
||||
cursor: url('/web-assets/cursors/sight.png') 0 0, pointer;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--link-hover);
|
||||
}
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
color: #000000;
|
||||
font-family: departure;
|
||||
font-size: 14px;
|
||||
padding: 6px 12px;
|
||||
cursor: url('/web-assets/cursors/sight.png') 0 0, pointer;
|
||||
outline: none;
|
||||
background-color: var(--button-bg);
|
||||
border: 2px solid var(--button-highlight);
|
||||
border-right-color: var(--dark);
|
||||
border-bottom-color: var(--dark);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--shadow),
|
||||
inset 1px 1px 0 0 var(--button-inset);
|
||||
}
|
||||
|
||||
button:active {
|
||||
border-color: var(--dark);
|
||||
border-right-color: var(--button-highlight);
|
||||
border-bottom-color: var(--button-highlight);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--button-highlight),
|
||||
inset 1px 1px 0 0 var(--shadow);
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
font-family: departure;
|
||||
font-size: 14px;
|
||||
padding: 6px 8px;
|
||||
outline: none;
|
||||
border: 2px solid var(--dark);
|
||||
border-right-color: var(--button-highlight);
|
||||
border-bottom-color: var(--button-highlight);
|
||||
box-shadow:
|
||||
inset 1px 1px 0 0 var(--shadow),
|
||||
1px 1px 0 0 var(--button-highlight);
|
||||
cursor: url('/web-assets/cursors/reading.png') 8 8, text;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
display: block;
|
||||
margin: 8px 0 16px 0;
|
||||
font-family: departure;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.converter-panel {
|
||||
margin: 24px 0;
|
||||
padding: 16px;
|
||||
background-color: #d7e8fa;
|
||||
border: 2px solid var(--dark);
|
||||
box-shadow:
|
||||
inset 1px 1px 0 0 var(--light),
|
||||
1px 1px 0 0 var(--button-highlight);
|
||||
}
|
||||
|
||||
.converter-panel label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
.converter-status {
|
||||
margin: 16px 0 0 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.converter-status.error {
|
||||
color: #9b1c1c;
|
||||
}
|
||||
|
||||
.platform-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
justify-content: center;
|
||||
margin: 24px 0;
|
||||
}
|
||||
|
||||
.platform-btn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 16px 12px;
|
||||
background-color: var(--button-bg);
|
||||
border: 2px solid var(--button-highlight);
|
||||
border-right-color: var(--dark);
|
||||
border-bottom-color: var(--dark);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--shadow),
|
||||
inset 1px 1px 0 0 var(--button-inset);
|
||||
text-decoration: none;
|
||||
color: var(--dark);
|
||||
border-radius: 8px;
|
||||
transition: transform 0.1s, box-shadow 0.1s;
|
||||
width: 110px;
|
||||
cursor: url('/web-assets/cursors/sight.png') 0 0, pointer;
|
||||
}
|
||||
|
||||
.platform-btn img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.platform-btn span {
|
||||
font-family: departure;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.platform-btn:active {
|
||||
border-color: var(--dark);
|
||||
border-right-color: var(--button-highlight);
|
||||
border-bottom-color: var(--button-highlight);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--button-highlight),
|
||||
inset 1px 1px 0 0 var(--shadow);
|
||||
transform: translate(1px, 1px);
|
||||
}
|
||||
|
||||
.platform-btn.web:hover {
|
||||
background-color: #ddeeff;
|
||||
}
|
||||
|
||||
.platform-btn.android:hover {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
.platform-btn.windows:hover {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
.platform-btn.linux:hover {
|
||||
background-color: #ffffdd;
|
||||
}
|
||||
|
||||
.platform-section {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.platform-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.platform-header img {
|
||||
flex: 0 0 48px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.platform-header p {
|
||||
margin: 4px 0 0 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.platform-header strong {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.downloads-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.download-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 8px 12px;
|
||||
background-color: var(--button-bg);
|
||||
border: 2px solid var(--button-highlight);
|
||||
border-right-color: var(--dark);
|
||||
border-bottom-color: var(--dark);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--shadow),
|
||||
inset 1px 1px 0 0 var(--button-inset);
|
||||
text-decoration: none;
|
||||
color: var(--dark);
|
||||
border-radius: 8px;
|
||||
transition: transform 0.1s, box-shadow 0.1s;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
min-height: 40px;
|
||||
cursor: url('/web-assets/cursors/sight.png') 0 0, pointer;
|
||||
}
|
||||
|
||||
.download-item:active {
|
||||
border-color: var(--dark);
|
||||
border-right-color: var(--button-highlight);
|
||||
border-bottom-color: var(--button-highlight);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--button-highlight),
|
||||
inset 1px 1px 0 0 var(--shadow);
|
||||
transform: translate(1px, 1px);
|
||||
}
|
||||
|
||||
.download-item:hover {
|
||||
background-color: var(--button-highlight);
|
||||
}
|
||||
|
||||
details {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.donation-buttons {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
footer {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Uxn emulator styles */
|
||||
#display {
|
||||
image-rendering: pixelated;
|
||||
image-rendering: crisp-edges;
|
||||
touch-action: none;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
cursor: none;
|
||||
}
|
||||
|
||||
#metadata {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
#metadata ul {
|
||||
margin-left: 25px;
|
||||
padding: 0;
|
||||
float: left;
|
||||
line-height: 24px;
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
|
||||
#metadata ul li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#metadata button {
|
||||
display: inline-block;
|
||||
border: 0;
|
||||
font-size: 12px;
|
||||
border-radius: 30px;
|
||||
padding: 2px 10px;
|
||||
line-height: 20px;
|
||||
margin-bottom: 1px;
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
#metadata kbd {
|
||||
border: 0;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
padding: 2px 2px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
#console {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#console > * {
|
||||
border: 0;
|
||||
font-family: mono;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.noscript {
|
||||
display: block;
|
||||
padding: 15px;
|
||||
margin: 30px auto;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
div.noscript img {
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
div.noscript a {
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Features section styling - retro tk look */
|
||||
.features-section {
|
||||
margin: 32px 0;
|
||||
}
|
||||
|
||||
.features-section h2 {
|
||||
margin-bottom: 16px;
|
||||
color: var(--dark);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.feature-item {
|
||||
padding: 12px;
|
||||
background-color: var(--panel-bg);
|
||||
border: 2px solid var(--button-highlight);
|
||||
border-right-color: var(--dark);
|
||||
border-bottom-color: var(--dark);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--shadow),
|
||||
inset 1px 1px 0 0 var(--button-inset);
|
||||
font-family: departure;
|
||||
}
|
||||
|
||||
.feature-item h3 {
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 14px;
|
||||
color: var(--dark);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.feature-item p {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
color: var(--dark);
|
||||
}
|
||||
|
||||
/* About section - retro tk look */
|
||||
.about-section {
|
||||
margin: 32px 0;
|
||||
}
|
||||
|
||||
.about-section h2 {
|
||||
margin-bottom: 12px;
|
||||
color: var(--dark);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.about-section p {
|
||||
margin: 12px 0;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.benefits-list {
|
||||
padding-left: 20px;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
.benefits-list li {
|
||||
margin-bottom: 6px;
|
||||
line-height: 1.3;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.safety-note {
|
||||
font-size: 12px;
|
||||
opacity: 0.7;
|
||||
margin-top: 12px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Info section with dropdowns - retro tk look */
|
||||
.info-section {
|
||||
margin: 32px 0;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.dropdown summary {
|
||||
cursor: url('/web-assets/cursors/sight.png') 0 0, pointer;
|
||||
font-weight: bold;
|
||||
padding: 8px 12px;
|
||||
background-color: var(--button-bg);
|
||||
border: 2px solid var(--button-highlight);
|
||||
border-right-color: var(--dark);
|
||||
border-bottom-color: var(--dark);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--shadow),
|
||||
inset 1px 1px 0 0 var(--button-inset);
|
||||
font-family: departure;
|
||||
}
|
||||
|
||||
.dropdown[open] summary {
|
||||
border-color: var(--dark);
|
||||
border-right-color: var(--button-highlight);
|
||||
border-bottom-color: var(--button-highlight);
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--button-highlight),
|
||||
inset 1px 1px 0 0 var(--shadow);
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
padding: 12px;
|
||||
background-color: var(--panel-bg);
|
||||
border: 2px solid var(--dark);
|
||||
border-right-color: var(--button-highlight);
|
||||
border-bottom-color: var(--button-highlight);
|
||||
margin-top: 8px;
|
||||
box-shadow:
|
||||
1px 1px 0 0 var(--shadow),
|
||||
inset 1px 1px 0 0 var(--button-inset);
|
||||
}
|
||||
|
||||
.dropdown-content p {
|
||||
margin-bottom: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.dropdown-links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.dropdown-links a {
|
||||
color: var(--link);
|
||||
text-decoration: none;
|
||||
padding: 6px 12px;
|
||||
background-color: var(--button-bg);
|
||||
border: 1px solid var(--dark);
|
||||
font-family: departure;
|
||||
font-size: 13px;
|
||||
cursor: url('/web-assets/cursors/sight.png') 0 0, pointer;
|
||||
}
|
||||
|
||||
.dropdown-links a:hover {
|
||||
background-color: var(--button-highlight);
|
||||
}
|
||||
|
||||
section h2 {
|
||||
margin-top: 32px;
|
||||
margin-bottom: 16px;
|
||||
color: var(--dark);
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
section ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
section ul li {
|
||||
margin-bottom: 8px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Improved responsive design */
|
||||
@media (max-width: 768px) {
|
||||
.content {
|
||||
padding: 12px 16px;
|
||||
margin: 8px auto;
|
||||
}
|
||||
|
||||
.platform-buttons {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.platform-btn {
|
||||
width: 100px;
|
||||
padding: 12px 8px;
|
||||
}
|
||||
|
||||
.features-list li {
|
||||
padding: 10px 12px;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Lotus theme: inbe
|
||||
background "#E2EEFCFF"
|
||||
text "#24487CFF"
|
||||
circle "#7EB7E6FF"
|
||||
button "#A6CFF2FF"
|
||||
button_hover "#689ED7FF"
|
||||
icon "#24487CFF"
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# update_metadata.sh - Simple version update for website
|
||||
# This runs automatically before publish to keep version info current
|
||||
|
||||
set -e
|
||||
|
||||
# Extract version from CHANGELOG.md
|
||||
get_version() {
|
||||
if [ -f "CHANGELOG.md" ]; then
|
||||
grep '^## \[' CHANGELOG.md | head -n 1 | sed 's/^## \[\([^]]*\)\].*/\1/'
|
||||
else
|
||||
echo "unknown"
|
||||
fi
|
||||
}
|
||||
|
||||
echo "=== Updating Build Metadata ==="
|
||||
|
||||
# Get current version
|
||||
VERSION=$(get_version)
|
||||
echo "Current version: $VERSION"
|
||||
|
||||
update_version_in_file() {
|
||||
local file="$1"
|
||||
|
||||
# Replace explicit placeholders in templates.
|
||||
sed -i "s|VERSION_PLACEHOLDER|$VERSION|g" "$file"
|
||||
|
||||
# Replace the already-rendered website version tag too. Older generated
|
||||
# pages no longer contain VERSION_PLACEHOLDER, so the previous script left
|
||||
# stale versions such as 1.1.5 in place forever.
|
||||
sed -i -E "s|(<p[[:space:]]+class=\"version\">)[^<]*(</p>)|\\1$VERSION\\2|g" "$file"
|
||||
}
|
||||
|
||||
# Update index.html
|
||||
if [ -f "index.html" ]; then
|
||||
echo "Updating index.html..."
|
||||
|
||||
# Create backup
|
||||
cp index.html index.html.bak
|
||||
|
||||
update_version_in_file index.html
|
||||
|
||||
echo "✓ index.html updated with version $VERSION"
|
||||
else
|
||||
echo "Warning: index.html not found"
|
||||
fi
|
||||
|
||||
# Update builds.html if it exists
|
||||
if [ -f "builds.html" ]; then
|
||||
echo "Updating builds.html..."
|
||||
|
||||
# Create backup
|
||||
cp builds.html builds.html.bak
|
||||
|
||||
update_version_in_file builds.html
|
||||
|
||||
echo "✓ builds.html updated with version $VERSION"
|
||||
else
|
||||
echo "builds.html not found, skipping"
|
||||
fi
|
||||
|
||||
echo "=== Metadata Update Complete ==="
|
||||
@@ -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
|
||||
|
||||
# Create changelog directory
|
||||
mkdir -p "$CHANGELOG_DIR"
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule vendor/flint updated: 56fa30f888...c33479f1fe.
Binary file not shown.
|
After Width: | Height: | Size: 417 KiB |
@@ -0,0 +1,35 @@
|
||||
#include <windows.h>
|
||||
|
||||
IDI_APP_ICON ICON "inbe.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,2,6,0
|
||||
PRODUCTVERSION 1,2,6,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.6"
|
||||
VALUE "InternalName", "inbe"
|
||||
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
|
||||
VALUE "ProductName", "Inner Breeze"
|
||||
VALUE "ProductVersion", "1.2.6"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
Reference in new issue
Block a user