The A/B/C harness series: sltest (Slint) / egtest (egui) / tttest (Tauri 2 → wry → Android WebView/Chromium). Identical scene to sltest: 8580 full-width rows, 150 px + 2 px divider, alternating colors, virtualized (26-element DOM pool), custom touch drag + exponential-decay fling (sltest decay constant 7.42), rAF-driven frame loop. FR logging: the rAF callback records gap/cost exactly like the Rust harnesses; lines batch (~120) and cross the Tauri event bridge once per second (JNI round trip kept off the per-frame path). Rust side drains to a dedicated writer thread → /sdcard/Android/data/wow.gmp.tttest/files/Documents/fr.log (Tauri document_dir = getExternalFilesDir(DOCUMENTS) — the framework CREATES it; a raw std::fs mkdir of the app's external tree is SELinux-denied on Android 11+). Same FR-line format → fr_capture.py is the referee (its launch check now falls back to the package's LAUNCHER activity via monkey for non-NativeActivity apps). Gotchas learned (see frontend/dist/index.html comments): - touch-action is NOT inherited: touches land on .row, so each row must declare touch-action:none or the WebView claims the pan and cancels the page's drag (only a few px register). - Fling velocity must be a per-EVENT EMA; frame-based tracking dies when touch events sample slower than rAF (adb swipe ≈ 17 Hz). - Drag sign: finger up → offset grows (offset -= finger dy). - Tauri v2 'brownfield' is the NORMAL direct-IPC mode (not an app-provides-content mode); the mobile schema rejects security.pattern entirely. - Custom #[tauri::command]s hit the two-pass app-command ACL chicken-and-egg; the core:default event bridge avoids it. - Rust log output needs a logcat backend (log/std + __android_log_write) or it is invisible. Emulator (60 Hz, scripted swipes): 1319 frames, median 16.70 ms, 5 isolated drops (0.38%), all at swipe-injection moments, render cost med 2 ms. aarch64 phone build compiles (11 MB APK); phone testing pending (personal-device policy). Build: harnesses/tttest/scripts/build.sh [x86_64|aarch64] — cargo-tauri CLI (v2.12.4, prebuilt) drives the gradle build; signed with the debug keystore.
83 lines
2.7 KiB
Batchfile
83 lines
2.7 KiB
Batchfile
@rem
|
|
@rem Copyright 2015 the original author or authors.
|
|
@rem
|
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
@rem you may not use this file except in compliance with the License.
|
|
@rem You may obtain a copy of the License at
|
|
@rem
|
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
@rem
|
|
@rem Unless required by applicable law or agreed to in writing, software
|
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
@rem See the License for the specific language governing permissions and
|
|
@rem limitations under the License.
|
|
@rem
|
|
@rem SPDX-License-Identifier: Apache-2.0
|
|
@rem
|
|
|
|
@if "%DEBUG%"=="" @echo off
|
|
@rem ##########################################################################
|
|
@rem
|
|
@rem gradlew startup script for Windows
|
|
@rem
|
|
@rem ##########################################################################
|
|
|
|
@rem Set local scope for the variables, and ensure extensions are enabled
|
|
setlocal EnableExtensions
|
|
|
|
set DIRNAME=%~dp0
|
|
if "%DIRNAME%"=="" set DIRNAME=.
|
|
@rem This is normally unused
|
|
set APP_BASE_NAME=%~n0
|
|
set APP_HOME=%DIRNAME%
|
|
|
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
|
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
|
|
@rem Find java.exe
|
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
|
|
set JAVA_EXE=java.exe
|
|
%JAVA_EXE% -version >NUL 2>&1
|
|
if %ERRORLEVEL% equ 0 goto execute
|
|
|
|
echo. 1>&2
|
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
echo. 1>&2
|
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
echo location of your Java installation. 1>&2
|
|
|
|
"%COMSPEC%" /c exit 1
|
|
|
|
:findJavaFromJavaHome
|
|
set JAVA_HOME=%JAVA_HOME:"=%
|
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
|
if exist "%JAVA_EXE%" goto execute
|
|
|
|
echo. 1>&2
|
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
echo. 1>&2
|
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
echo location of your Java installation. 1>&2
|
|
|
|
"%COMSPEC%" /c exit 1
|
|
|
|
:execute
|
|
@rem Setup the command line
|
|
|
|
|
|
|
|
@rem Execute gradlew
|
|
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
|
@rem which allows us to clear the local environment before executing the java command
|
|
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
|
|
|
:exitWithErrorLevel
|
|
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
|
"%COMSPEC%" /c exit %ERRORLEVEL%
|