Lagrange [work/v1.10]

Android: Show build version and date in Settings > About

=> ffdbd9444fc436c6f85412da45fa76d6147044f3

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42927c99..0312e115 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,6 +28,11 @@ if (IOS)
     set (IOS_BUNDLE_VERSION 9)
     set (IOS_BUILD_DATE "2022-01-01")
 endif ()
+if (ANDROID)
+    set (PROJECT_VERSION 1.10)
+    set (ANDROID_BUILD_VERSION a3)  # remember to update Gradle, AndroidManifest.xml
+    set (ANDROID_BUILD_DATE "2022-01-01")
+endif ()
 
 # Defaults that depend on environment.
 set (DEFAULT_RESIZE_DRAW ON)
@@ -444,6 +449,12 @@ if (APPLE)
         )
     endif ()
 endif ()
+if (ANDROID)
+    target_compile_definitions (app PUBLIC
+        LAGRANGE_ANDROID_VERSION="${ANDROID_BUILD_VERSION}"
+        LAGRANGE_ANDROID_BUILD_DATE="${ANDROID_BUILD_DATE}"
+    )
+endif ()
 if (MSYS)
     target_link_libraries (app PUBLIC d2d1 uuid dwmapi) # querying DPI
     if (ENABLE_WINSPARKLE)
diff --git a/src/ui/util.c b/src/ui/util.c
index c590caa9..e631a092 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -2571,6 +2571,10 @@ iWidget *makePreferences_Widget(void) {
 #if defined (iPlatformAppleMobile)
             appendFormat_String(aboutText, " (" LAGRANGE_IOS_VERSION ") %s" LAGRANGE_IOS_BUILD_DATE,
                                 escape_Color(uiTextDim_ColorId));
+#endif
+#if defined (iPlatformAndroidMobile)
+            appendFormat_String(aboutText, " (" LAGRANGE_ANDROID_VERSION ") %s" LAGRANGE_ANDROID_BUILD_DATE,
+                                escape_Color(uiTextDim_ColorId));
 #endif
         }
         const iMenuItem aboutPanelItems[] = {
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.10/cdiff/ffdbd9444fc436c6f85412da45fa76d6147044f3
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
30.549969 milliseconds
Gemini-to-HTML Time
0.17302 milliseconds

This content has been proxied by September (ba2dc).