Compare commits
No commits in common. "d82ecf74ac28179c174a13255a038bafd6fd41a8" and "73f27262f715e7b22d818bb17f47e4224245db6b" have entirely different histories.
d82ecf74ac
...
73f27262f7
5
.gitignore
vendored
|
|
@ -1,8 +1,3 @@
|
||||||
/target
|
/target
|
||||||
*.apk
|
*.apk
|
||||||
vendor/*/target/
|
vendor/*/target/
|
||||||
tools/.fr_*.log
|
|
||||||
harnesses/tttest/gen/android/.gradle/
|
|
||||||
harnesses/tttest/gen/android/app/build/
|
|
||||||
harnesses/tttest/gen/android/build/
|
|
||||||
harnesses/tttest/gen/android/local.properties
|
|
||||||
|
|
|
||||||
3993
Cargo.lock
generated
121
Cargo.toml
|
|
@ -3,68 +3,59 @@ name = "gallery"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# Android: cdylib so the NDK toolchain's -soname flag (libgallery.so) does
|
|
||||||
# not conflict with the lib crate's (libgallery.rlib). The NativeActivity
|
|
||||||
# loader finds the .so; android_main is the entry point (src/lib.rs).
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gallery"
|
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
||||||
# The desktop entry (cargo run).
|
|
||||||
[[bin]]
|
|
||||||
name = "gallery"
|
|
||||||
path = "src/main.rs"
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# UI: egui + egui_glow (OpenGL ES 3.0 on Android via EGL) + egui-winit.
|
|
||||||
# egtest proved this stack at 120 Hz on the phone: 0.12% slot drops
|
|
||||||
# (vs 0.33-0.83% for every Slint variant, same referee, same scene).
|
|
||||||
# See docs/BUGS/scroll-jank-120hz.md §egui and harnesses/egtest.
|
|
||||||
egui = "0.31"
|
|
||||||
egui_glow = { version = "0.31", features = ["winit"] }
|
|
||||||
egui-winit = "0.31"
|
|
||||||
winit = { version = "0.30", features = ["android-native-activity"] }
|
|
||||||
android-activity = "0.6"
|
|
||||||
glow = "0.16"
|
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
# EGL context + surface for egui_glow (Android: eglCreateWindowSurface over
|
slint = { version = "1.18.1", features = [
|
||||||
# the native_window). egui_glow takes the API as a trait object — the
|
"backend-android-activity-06",
|
||||||
# context must live (in `World`) until the painter drops.
|
# Exposes `slint::wgpu_30` + `Image: TryFrom<wgpu::Texture>` +
|
||||||
egl = "0.2"
|
# GraphicsAPI::WGPU30 — used by gputex to upload thumbnail textures
|
||||||
|
# off the UI thread (auto-enabled on Android already; explicit for
|
||||||
# App layer (renderer-agnostic; carried over 1:1 from the Slint build):
|
# host builds).
|
||||||
# rusqlite with `bundled` (vendor libsqlite3.a — no system library).
|
"unstable-wgpu-30",
|
||||||
# Build needs the NDK clang (cc crate); scripts/build.sh exports it.
|
] }
|
||||||
rusqlite = { version = "0.41.0", features = ["bundled"] }
|
|
||||||
|
|
||||||
# M2: libjpeg-turbo for thumbnails + viewer. The crate compiles libjpeg-
|
|
||||||
# turbo from source (CMake) — needs the NDK CMake toolchain on Android,
|
|
||||||
# nasm on x86_64. See docs/THUMBS.md + HANDOFF.md §10.
|
|
||||||
turbojpeg = { version = "1.5.1", features = ["cmake"] }
|
|
||||||
# M2: EXIF orientation (JPGs) for decode-time rotation.
|
|
||||||
kamadak-exif = "0.6.1"
|
|
||||||
# M2 (PNGs only): the `image` crate's PNG decoder for non-JPG files.
|
|
||||||
image = { version = "0.25.10", default-features = false, features = ["png"] }
|
|
||||||
# M3: SHA1 of (path, mtime, size) as the thumbnail cache key.
|
|
||||||
sha1 = "0.11.0"
|
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
parking_lot = "0.12"
|
rusqlite = { version = "0.41.0", features = ["bundled"] }
|
||||||
|
sha1 = "0.11.0"
|
||||||
[profile.release]
|
turbojpeg = { version = "1.5.1", features = ["cmake"] }
|
||||||
# Thin LTO keeps builds minutes (not tens of minutes) while keeping release
|
image = { version = "0.25.10", default-features = false, features = ["png"] }
|
||||||
# quality for the hot paths; the decode workers are C (libjpeg-turbo
|
kamadak-exif = "0.6.1"
|
||||||
# SIMD), so the Rust side is not the decode bottleneck.
|
# STG event-loop stage timestamps, read by the jank-hunt `perf` feature
|
||||||
lto = "thin"
|
# (docs/BUGS/scroll-jank-120hz.md); and the 120Hz scroll-fix flags
|
||||||
codegen-units = 1
|
# (stg::VSYNC_LOCKED_RENDER). Already in the graph transitively via slint;
|
||||||
opt-level = 3
|
# direct so the app can set the fix flags unconditionally.
|
||||||
|
i-slint-backend-android-activity = { version = "1.18.1" }
|
||||||
[profile.release.package."*"]
|
|
||||||
opt-level = 2
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# FR frame-gap lines (docs/BUGS tooling): the fr_capture.py referee.
|
# Jank-hunt instrumentation: per-frame frame-gap + render cost (FR),
|
||||||
|
# event-loop stage costs (STG), and per-job decode cost (DECODE), mirrored
|
||||||
|
# to a file on Android. OFF by default — dead-code-eliminated, zero runtime
|
||||||
|
# overhead. To capture, build with `--features perf` (format + analysis:
|
||||||
|
# docs/BUGS/scroll-jank-120hz.md).
|
||||||
|
# Pure code flag: gates the FR/STG/DECODE file-mirror instrumentation
|
||||||
|
# (no dependencies — the backend dep is now unconditional for the fix).
|
||||||
|
perf = []
|
||||||
|
# Baseline-60 CONTROL build (2026-11-01): stock crates.io Slint (build.sh
|
||||||
|
# strips the vendored patch section), no driver, no vkshim, no
|
||||||
|
# instrumentation, display locked to 60 Hz via JNI (src/baseline60.rs).
|
||||||
|
# Build: `./scripts/build.sh baseline`.
|
||||||
|
baseline60 = [] # marker; the 60Hz lock is a device setting (peak_refresh_rate)
|
||||||
|
# Public-API per-frame logger (FR line: frame gap + render cost). Works in
|
||||||
|
# stock AND vendored builds — the A/B measurement tool for the 60 Hz
|
||||||
|
# baseline-vs-vendored comparison.
|
||||||
framelog = []
|
framelog = []
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
slint-build = "1.18.1"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tempfile = "3.27.0"
|
||||||
|
|
||||||
|
# --- Android packaging (cargo-apk2 1.5) ---
|
||||||
|
# NOTE: uses_permission is a TOP-LEVEL android key (ndk-build2 manifest layer),
|
||||||
|
# not under [package.metadata.android.application]. max_sdk_version supported.
|
||||||
[package.metadata.android]
|
[package.metadata.android]
|
||||||
package = "wow.gmp.gallery"
|
package = "wow.gmp.gallery"
|
||||||
build_targets = ["x86_64-linux-android", "aarch64-linux-android"]
|
build_targets = ["x86_64-linux-android", "aarch64-linux-android"]
|
||||||
|
|
@ -78,11 +69,11 @@ label = "Gallery"
|
||||||
# Not debuggable: a debuggable app shows the system 16 KB compatibility
|
# Not debuggable: a debuggable app shows the system 16 KB compatibility
|
||||||
# dialog on EVERY cold launch — that dialog is its own activity, it pauses
|
# dialog on EVERY cold launch — that dialog is its own activity, it pauses
|
||||||
# us, and its lifecycle was a source of lost surfaces / black windows.
|
# us, and its lifecycle was a source of lost surfaces / black windows.
|
||||||
|
# (Jank-hunt is over; simpleperf no longer needed.)
|
||||||
debuggable = false
|
debuggable = false
|
||||||
|
|
||||||
[[package.metadata.android.application.activity]]
|
[[package.metadata.android.application.activity]]
|
||||||
name = "android.app.NativeActivity"
|
name = "android.app.NativeActivity"
|
||||||
config_changes = "orientation|screenSize|screenLayout|smallestScreenSize|keyboard|keyboardHidden|navigation|uiMode|touchscreen"
|
|
||||||
|
|
||||||
[[package.metadata.android.application.activity.meta_data]]
|
[[package.metadata.android.application.activity.meta_data]]
|
||||||
name = "android.app.lib_name"
|
name = "android.app.lib_name"
|
||||||
|
|
@ -93,14 +84,34 @@ actions = ["android.intent.action.MAIN"]
|
||||||
categories = ["android.intent.category.LAUNCHER"]
|
categories = ["android.intent.category.LAUNCHER"]
|
||||||
|
|
||||||
# --- Permissions (runtime flow: HANDOFF.md §7) ---
|
# --- Permissions (runtime flow: HANDOFF.md §7) ---
|
||||||
|
# NOTE: the Permission schema supports only `name` + `max_sdk_version`.
|
||||||
|
# READ_MEDIA_IMAGES is a no-op on API < 33 (unknown perms are ignored).
|
||||||
[[package.metadata.android.uses_permission]]
|
[[package.metadata.android.uses_permission]]
|
||||||
name = "android.permission.READ_MEDIA_IMAGES"
|
name = "android.permission.READ_MEDIA_IMAGES"
|
||||||
|
|
||||||
|
# API <= 32: legacy external storage read.
|
||||||
[[package.metadata.android.uses_permission]]
|
[[package.metadata.android.uses_permission]]
|
||||||
name = "android.permission.READ_EXTERNAL_STORAGE"
|
name = "android.permission.READ_EXTERNAL_STORAGE"
|
||||||
max_sdk_version = 32
|
max_sdk_version = 32
|
||||||
|
|
||||||
# "All files access" — same special-access pattern as passgo; needed to
|
# "All files access" — same special-access pattern as passgo; needed to browse
|
||||||
# browse arbitrary directories outside the media collection.
|
# arbitrary directories outside the media collection.
|
||||||
[[package.metadata.android.uses_permission]]
|
[[package.metadata.android.uses_permission]]
|
||||||
name = "android.permission.MANAGE_EXTERNAL_STORAGE"
|
name = "android.permission.MANAGE_EXTERNAL_STORAGE"
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
# Vendored Slint Skia renderer: removes a redundant per-frame synchronous
|
||||||
|
# flush that caused 19-24 ms scroll stalls on Mali (see
|
||||||
|
# docs/BUGS/slint-skia-final-flush-jank.md). Pinned to the 1.18.1 source;
|
||||||
|
# re-apply the one hunk when bumping Slint.
|
||||||
|
i-slint-renderer-skia = { path = "vendor/i-slint-renderer-skia" }
|
||||||
|
# STG (jank-hunt): event-loop stage timestamps, read by the `perf` feature
|
||||||
|
# (docs/BUGS/scroll-jank-120hz.md). Pinned to the 1.18.1 source.
|
||||||
|
i-slint-backend-android-activity = { path = "vendor/i-slint-backend-android-activity-1.18.1" }
|
||||||
|
# Vendored Slint Core: for layout engine / scrolling optimization.
|
||||||
|
i-slint-core = { path = "vendor/i-slint-core" }
|
||||||
|
# Jank-hunt (VK_LIBRARY): zygote preloads the system libvulkan.so into every
|
||||||
|
# app, so dlopen-by-name can't be shadowed; an absolute path (the app's own
|
||||||
|
# shim, see shim/vkshim.c) is the only reliable intercept. One hunk in
|
||||||
|
# vulkan/instance.rs; re-apply when bumping wgpu.
|
||||||
|
wgpu-hal = { path = "vendor/wgpu-hal-30.0.1" }
|
||||||
|
|
|
||||||
4
build.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
slint_build::compile("src/main.slint")?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "tttest"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# Tauri v2 mobile (Android): the CLI builds a cdylib .so loaded by the
|
|
||||||
# Tauri activity; staticlib/rlib for the template's other targets.
|
|
||||||
[lib]
|
|
||||||
name = "tttest_lib"
|
|
||||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
tauri-build = { version = "2", features = [] }
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
tauri = { version = "2", features = [] }
|
|
||||||
tauri-runtime-wry = "2"
|
|
||||||
serde = { version = "1", features = ["derive"] }
|
|
||||||
serde_json = "1"
|
|
||||||
log = { version = "0.4", features = ["std"] }
|
|
||||||
|
Before Width: | Height: | Size: 5.3 KiB |
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
tauri_build::build()
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "../gen/schemas/desktop-schema.json",
|
|
||||||
"identifier": "default",
|
|
||||||
"description": "tttest: FR batching + lifecycle logs from the webview",
|
|
||||||
"windows": [
|
|
||||||
"main"
|
|
||||||
],
|
|
||||||
"permissions": [
|
|
||||||
"core:default"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
215
harnesses/tttest/frontend/dist/index.html
vendored
|
|
@ -1,215 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
||||||
<title>tttest</title>
|
|
||||||
<style>
|
|
||||||
/* Full-screen, no native scroll of ANY kind: all motion is ours, on
|
|
||||||
the compositor layer (transform: translate3d). Mirrors sltest:
|
|
||||||
full-width rows, 150 px + 2 px white divider, alternating colors. */
|
|
||||||
html, body {
|
|
||||||
margin: 0; padding: 0;
|
|
||||||
position: fixed; inset: 0;
|
|
||||||
width: 100%; height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
background: #0a0a0c;
|
|
||||||
touch-action: none;
|
|
||||||
overscroll-behavior: none;
|
|
||||||
-webkit-user-select: none; user-select: none;
|
|
||||||
}
|
|
||||||
#rows { position: absolute; left: 0; top: 0; width: 100%; height: 0; will-change: transform; }
|
|
||||||
.row {
|
|
||||||
position: absolute; left: 0; width: 100%; height: 150px;
|
|
||||||
will-change: transform;
|
|
||||||
/* touch-action is NOT inherited — touches land on .row, so each must
|
|
||||||
claim the gesture. Otherwise the WebView sees touch-action:auto at
|
|
||||||
the hit element and takes over the pan (page gets touchcancel),
|
|
||||||
leaving only a few px of drag registered. */
|
|
||||||
touch-action: none;
|
|
||||||
}
|
|
||||||
.row .div {
|
|
||||||
position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="rows"></div>
|
|
||||||
<script>
|
|
||||||
"use strict";
|
|
||||||
let frames = 0;
|
|
||||||
|
|
||||||
// ---- scene (sltest mirror) -------------------------------------------
|
|
||||||
const N = 8580; // rows (same as the big sltest scene)
|
|
||||||
const ROW = 150, DIV = 2, RH = ROW + DIV;
|
|
||||||
const W = () => window.innerWidth;
|
|
||||||
const H = () => window.innerHeight;
|
|
||||||
const MAXOFF = () => Math.max(0, N * RH - H());
|
|
||||||
const COLOR = [
|
|
||||||
[60, 90, 130], // blue
|
|
||||||
[130, 70, 90], // maroon
|
|
||||||
];
|
|
||||||
|
|
||||||
// ---- virtualization: a fixed pool of rows, repositioned per frame ----
|
|
||||||
const POOL = 26;
|
|
||||||
const wrap = document.getElementById("rows");
|
|
||||||
const pool = [];
|
|
||||||
for (let i = 0; i < POOL; i++) {
|
|
||||||
const d = document.createElement("div");
|
|
||||||
d.className = "row";
|
|
||||||
const v = document.createElement("div");
|
|
||||||
v.className = "div";
|
|
||||||
d.appendChild(v);
|
|
||||||
wrap.appendChild(d);
|
|
||||||
pool.push({ el: d, color: -1, y: -1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- scroll state ------------------------------------------------------
|
|
||||||
let offset = 0; // content px scrolled (0 = top)
|
|
||||||
let dragging = false;
|
|
||||||
let dragY0 = 0, dragOff0 = 0;
|
|
||||||
let vel = 0; // content px/s (positive = scrolling down)
|
|
||||||
let lastT = 0, lastY = 0;
|
|
||||||
|
|
||||||
function clampOffset(o) {
|
|
||||||
if (o < 0) return 0;
|
|
||||||
const m = MAXOFF();
|
|
||||||
return o > m ? m : o;
|
|
||||||
}
|
|
||||||
|
|
||||||
function applyOffset() {
|
|
||||||
wrap.style.transform = "translate3d(0," + (-offset).toFixed(2) + "px,0)";
|
|
||||||
}
|
|
||||||
|
|
||||||
function paint() {
|
|
||||||
const h = H();
|
|
||||||
const first = Math.max(0, Math.floor(offset / RH) - 2);
|
|
||||||
const last = Math.min(N - 1, Math.ceil((offset + h) / RH) + 2);
|
|
||||||
for (let i = 0; i < POOL; i++) {
|
|
||||||
const p = pool[i];
|
|
||||||
const r = first + i;
|
|
||||||
if (r > last) { p.el.style.display = "none"; continue; }
|
|
||||||
p.el.style.display = "block";
|
|
||||||
if (r % 2 !== p.color) {
|
|
||||||
const c = COLOR[r % 2];
|
|
||||||
p.el.style.background = "rgb(" + c[0] + "," + c[1] + "," + c[2] + ")";
|
|
||||||
p.color = r % 2;
|
|
||||||
}
|
|
||||||
const y = Math.round(r * RH * 100) / 100;
|
|
||||||
if (y !== p.y) {
|
|
||||||
p.el.style.transform = "translate3d(0," + y + "px,0)";
|
|
||||||
p.y = y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- FR logging (fr_capture.py convention) -----------------------------
|
|
||||||
// The rAF timestamp is the Chromium render thread's high-res clock.
|
|
||||||
// gap = time since the PREVIOUS frame callback (the frame period the
|
|
||||||
// user sees); cost = this callback's own work. Batches ~1/s keep the
|
|
||||||
// Tauri IPC (a JNI round trip) at 1/s, off the per-frame path.
|
|
||||||
let frLast = -1;
|
|
||||||
let frBatch = [];
|
|
||||||
let frLines = 0;
|
|
||||||
function frLog(t) {
|
|
||||||
const work = performance.now() - t;
|
|
||||||
if (frLast >= 0) {
|
|
||||||
const gap = t - frLast;
|
|
||||||
frBatch.push("FR " + t.toFixed(2).padStart(11) +
|
|
||||||
" gap=" + gap.toFixed(2).padStart(7) +
|
|
||||||
" cost=" + work.toFixed(2).padStart(6) + " drew=1");
|
|
||||||
if (++frLines % 120 === 0) {
|
|
||||||
flushFr();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
frLast = t;
|
|
||||||
}
|
|
||||||
function flushFr() {
|
|
||||||
if (frBatch.length === 0) return;
|
|
||||||
const payload = frBatch.join("\n") + "\n";
|
|
||||||
frBatch = [];
|
|
||||||
try {
|
|
||||||
window.__TAURI__.event.emit("tttest-fr", payload);
|
|
||||||
} catch (e) { /* pre-bridge (desktop) */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- frame loop (runs ALWAYS; Chromium drives the rate) ----------------
|
|
||||||
function frame(t) {
|
|
||||||
frames++;
|
|
||||||
const t0 = performance.now();
|
|
||||||
if (dragging) {
|
|
||||||
// 1:1 finger follow (velocity is tracked per-EVENT in touchmove —
|
|
||||||
// frame-based EMA dies when touch events sample slower than rAF).
|
|
||||||
offset = clampOffset(dragOff0 - (yNow - dragY0));
|
|
||||||
lastT = t;
|
|
||||||
} else if (Math.abs(vel) > 0) {
|
|
||||||
const dt = Math.min(0.1, (t - lastT) / 1000);
|
|
||||||
offset = clampOffset(offset + vel * dt);
|
|
||||||
vel = vel * Math.exp(-7.42 * dt); // sltest/gallery decay (0.94 @120fps)
|
|
||||||
if (Math.abs(vel) < 1100) vel = 0;
|
|
||||||
lastT = t;
|
|
||||||
}
|
|
||||||
paint();
|
|
||||||
applyOffset();
|
|
||||||
frLog(t);
|
|
||||||
requestAnimationFrame(frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- touch (pointer events; single finger) ------------------------------
|
|
||||||
let yNow = 0;
|
|
||||||
// Per-event velocity (the gallery's fixed estimator): delta between
|
|
||||||
// successive touch events ÷ time between them, EMA 0.8/0.2 (~60 ms
|
|
||||||
// memory at 120 Hz). Frame-based tracking breaks when events sample
|
|
||||||
// slower than rAF (adb swipes arrive ~17 Hz).
|
|
||||||
let evY = 0, evT = 0;
|
|
||||||
window.addEventListener("touchstart", (e) => {
|
|
||||||
const t = e.changedTouches[0];
|
|
||||||
yNow = t.clientY;
|
|
||||||
dragging = true;
|
|
||||||
dragY0 = yNow;
|
|
||||||
dragOff0 = offset;
|
|
||||||
vel = 0;
|
|
||||||
evY = yNow;
|
|
||||||
evT = performance.now();
|
|
||||||
lastT = performance.now();
|
|
||||||
e.preventDefault();
|
|
||||||
}, { passive: false });
|
|
||||||
|
|
||||||
window.addEventListener("touchmove", (e) => {
|
|
||||||
const t = e.changedTouches[0];
|
|
||||||
yNow = t.clientY;
|
|
||||||
const now = performance.now();
|
|
||||||
const dtv = (now - evT) / 1000;
|
|
||||||
if (dtv > 0.002) {
|
|
||||||
const inst = (evY - yNow) / dtv; // finger up → positive (offset grows)
|
|
||||||
vel = 0.8 * vel + 0.2 * inst;
|
|
||||||
evY = yNow;
|
|
||||||
evT = now;
|
|
||||||
}
|
|
||||||
e.preventDefault();
|
|
||||||
}, { passive: false });
|
|
||||||
|
|
||||||
window.addEventListener("touchend", (e) => {
|
|
||||||
dragging = false;
|
|
||||||
lastT = performance.now();
|
|
||||||
e.preventDefault();
|
|
||||||
}, { passive: false });
|
|
||||||
|
|
||||||
window.addEventListener("touchcancel", () => { dragging = false; vel = 0; }, { passive: false });
|
|
||||||
|
|
||||||
// ---- lifecycle ------------------------------------------------------------
|
|
||||||
window.addEventListener("load", () => {
|
|
||||||
paint();
|
|
||||||
applyOffset();
|
|
||||||
requestAnimationFrame(frame);
|
|
||||||
try {
|
|
||||||
window.__TAURI__.event.emit("tttest-log", {
|
|
||||||
msg: "webview up " + window.innerWidth + "x" + window.innerHeight +
|
|
||||||
" dpr=" + window.devicePixelRatio,
|
|
||||||
});
|
|
||||||
} catch (e) { /* desktop */ }
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# EditorConfig is awesome: https://EditorConfig.org
|
|
||||||
|
|
||||||
# top-most EditorConfig file
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
insert_final_newline = false
|
|
||||||
20
harnesses/tttest/gen/android/.gitignore
vendored
|
|
@ -1,20 +0,0 @@
|
||||||
*.iml
|
|
||||||
.gradle
|
|
||||||
/local.properties
|
|
||||||
/.idea/caches
|
|
||||||
/.idea/libraries
|
|
||||||
/.idea/modules.xml
|
|
||||||
/.idea/workspace.xml
|
|
||||||
/.idea/navEditor.xml
|
|
||||||
/.idea/assetWizardSettings.xml
|
|
||||||
.DS_Store
|
|
||||||
build
|
|
||||||
/captures
|
|
||||||
.externalNativeBuild
|
|
||||||
.cxx
|
|
||||||
local.properties
|
|
||||||
key.properties
|
|
||||||
keystore.properties
|
|
||||||
|
|
||||||
/.tauri
|
|
||||||
/tauri.settings.gradle
|
|
||||||
6
harnesses/tttest/gen/android/app/.gitignore
vendored
|
|
@ -1,6 +0,0 @@
|
||||||
/src/main/**/generated
|
|
||||||
/src/main/jniLibs/**/*.so
|
|
||||||
/src/main/assets/tauri.conf.json
|
|
||||||
/tauri.build.gradle.kts
|
|
||||||
/proguard-tauri.pro
|
|
||||||
/tauri.properties
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
import java.util.Properties
|
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id("com.android.application")
|
|
||||||
id("org.jetbrains.kotlin.android")
|
|
||||||
id("rust")
|
|
||||||
}
|
|
||||||
|
|
||||||
val tauriProperties = Properties().apply {
|
|
||||||
val propFile = file("tauri.properties")
|
|
||||||
if (propFile.exists()) {
|
|
||||||
propFile.inputStream().use { load(it) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdk = 37
|
|
||||||
namespace = "wow.gmp.tttest"
|
|
||||||
defaultConfig {
|
|
||||||
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
|
||||||
applicationId = "wow.gmp.tttest"
|
|
||||||
minSdk = 24
|
|
||||||
targetSdk = 37
|
|
||||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
|
||||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
|
||||||
}
|
|
||||||
buildTypes {
|
|
||||||
getByName("debug") {
|
|
||||||
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
|
||||||
isDebuggable = true
|
|
||||||
isJniDebuggable = true
|
|
||||||
isMinifyEnabled = false
|
|
||||||
packaging {
|
|
||||||
jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
|
|
||||||
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
|
|
||||||
jniLibs.keepDebugSymbols.add("*/x86/*.so")
|
|
||||||
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getByName("release") {
|
|
||||||
optimization {
|
|
||||||
enable = true
|
|
||||||
}
|
|
||||||
proguardFiles(
|
|
||||||
*fileTree(".") {
|
|
||||||
include("**/*.pro")
|
|
||||||
exclude("build/**")
|
|
||||||
}.files.toTypedArray()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
compilerOptions {
|
|
||||||
jvmTarget = JvmTarget.JVM_1_8
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rust {
|
|
||||||
rootDirRel = "../../../"
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation("androidx.webkit:webkit:1.14.0")
|
|
||||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
|
||||||
implementation("androidx.activity:activity-ktx:1.10.1")
|
|
||||||
implementation("com.google.android.material:material:1.12.0")
|
|
||||||
implementation("androidx.lifecycle:lifecycle-process:2.10.0")
|
|
||||||
testImplementation("junit:junit:4.13.2")
|
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
|
||||||
}
|
|
||||||
|
|
||||||
apply(from = file("tauri.build.gradle.kts"))
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
# Add project specific ProGuard rules here.
|
|
||||||
# You can control the set of applied configuration files using the
|
|
||||||
# proguardFiles setting in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
|
||||||
# debugging stack traces.
|
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
|
||||||
# hide the original source file name.
|
|
||||||
#-renamesourcefileattribute SourceFile
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
|
|
||||||
<!-- AndroidTV support -->
|
|
||||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:label="@string/app_name"
|
|
||||||
android:theme="@style/Theme.tttest"
|
|
||||||
android:usesCleartextTraffic="${usesCleartextTraffic}">
|
|
||||||
<activity
|
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:label="@string/main_activity_title"
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:exported="true">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
<!-- AndroidTV support -->
|
|
||||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<provider
|
|
||||||
android:name="androidx.core.content.FileProvider"
|
|
||||||
android:authorities="${applicationId}.fileprovider"
|
|
||||||
android:exported="false"
|
|
||||||
android:grantUriPermissions="true">
|
|
||||||
<meta-data
|
|
||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
||||||
android:resource="@xml/file_paths" />
|
|
||||||
</provider>
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
package wow.gmp.tttest
|
|
||||||
|
|
||||||
import android.os.Bundle
|
|
||||||
import androidx.activity.enableEdgeToEdge
|
|
||||||
|
|
||||||
class MainActivity : TauriActivity() {
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
enableEdgeToEdge()
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
|
||||||
<aapt:attr name="android:fillColor">
|
|
||||||
<gradient
|
|
||||||
android:endX="85.84757"
|
|
||||||
android:endY="92.4963"
|
|
||||||
android:startX="42.9492"
|
|
||||||
android:startY="49.59793"
|
|
||||||
android:type="linear">
|
|
||||||
<item
|
|
||||||
android:color="#44000000"
|
|
||||||
android:offset="0.0" />
|
|
||||||
<item
|
|
||||||
android:color="#00000000"
|
|
||||||
android:offset="1.0" />
|
|
||||||
</gradient>
|
|
||||||
</aapt:attr>
|
|
||||||
</path>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:strokeColor="#00000000" />
|
|
||||||
</vector>
|
|
||||||
|
|
@ -1,170 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path
|
|
||||||
android:fillColor="#3DDC84"
|
|
||||||
android:pathData="M0,0h108v108h-108z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M9,0L9,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,0L19,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,0L29,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,0L39,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,0L49,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,0L59,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,0L69,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,0L79,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M89,0L89,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M99,0L99,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,9L108,9"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,19L108,19"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,29L108,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,39L108,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,49L108,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,59L108,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,69L108,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,79L108,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,89L108,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,99L108,99"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,29L89,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,39L89,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,49L89,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,59L89,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,69L89,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,79L89,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,19L29,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,19L39,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,19L49,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,19L59,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,19L69,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,19L79,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
</vector>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
tools:context=".MainActivity">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Hello World!"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
|
@ -1,6 +0,0 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<!-- Base application theme. -->
|
|
||||||
<style name="Theme.tttest" parent="Theme.Material3.DayNight.NoActionBar">
|
|
||||||
<!-- Customize your theme here. -->
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="purple_200">#FFBB86FC</color>
|
|
||||||
<color name="purple_500">#FF6200EE</color>
|
|
||||||
<color name="purple_700">#FF3700B3</color>
|
|
||||||
<color name="teal_200">#FF03DAC5</color>
|
|
||||||
<color name="teal_700">#FF018786</color>
|
|
||||||
<color name="black">#FF000000</color>
|
|
||||||
<color name="white">#FFFFFFFF</color>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<resources>
|
|
||||||
<string name="app_name">"tttest"</string>
|
|
||||||
<string name="main_activity_title">"tttest"</string>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<!-- Base application theme. -->
|
|
||||||
<style name="Theme.tttest" parent="Theme.Material3.DayNight.NoActionBar">
|
|
||||||
<!-- Customize your theme here. -->
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<external-path name="my_images" path="." />
|
|
||||||
<cache-path name="my_cache_images" path="." />
|
|
||||||
</paths>
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath("com.android.tools.build:gradle:9.3.1")
|
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.10")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("clean").configure {
|
|
||||||
delete("build")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
plugins {
|
|
||||||
`kotlin-dsl`
|
|
||||||
}
|
|
||||||
|
|
||||||
gradlePlugin {
|
|
||||||
plugins {
|
|
||||||
create("pluginsForCoolKids") {
|
|
||||||
id = "rust"
|
|
||||||
implementationClass = "RustPlugin"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly(gradleApi())
|
|
||||||
implementation("com.android.tools.build:gradle:9.3.1")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
import java.io.File
|
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
|
||||||
import org.gradle.api.DefaultTask
|
|
||||||
import org.gradle.api.GradleException
|
|
||||||
import org.gradle.api.logging.LogLevel
|
|
||||||
import org.gradle.api.tasks.Input
|
|
||||||
import org.gradle.api.tasks.TaskAction
|
|
||||||
import javax.inject.Inject
|
|
||||||
import org.gradle.process.ExecOperations
|
|
||||||
|
|
||||||
abstract class BuildTask : DefaultTask() {
|
|
||||||
@get:Inject
|
|
||||||
abstract val execOperations: ExecOperations
|
|
||||||
|
|
||||||
@Input
|
|
||||||
var rootDirRel: String? = null
|
|
||||||
@Input
|
|
||||||
var projectDir: String? = null
|
|
||||||
@Input
|
|
||||||
var target: String? = null
|
|
||||||
@Input
|
|
||||||
var release: Boolean? = null
|
|
||||||
|
|
||||||
@TaskAction
|
|
||||||
fun assemble() {
|
|
||||||
val executable = """cargo""";
|
|
||||||
try {
|
|
||||||
runTauriCli(executable)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
||||||
// Try different Windows-specific extensions
|
|
||||||
val fallbacks = listOf(
|
|
||||||
"$executable.exe",
|
|
||||||
"$executable.cmd",
|
|
||||||
"$executable.bat",
|
|
||||||
)
|
|
||||||
|
|
||||||
var lastException: Exception = e
|
|
||||||
for (fallback in fallbacks) {
|
|
||||||
try {
|
|
||||||
runTauriCli(fallback)
|
|
||||||
return
|
|
||||||
} catch (fallbackException: Exception) {
|
|
||||||
lastException = fallbackException
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw lastException
|
|
||||||
} else {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun runTauriCli(executable: String) {
|
|
||||||
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
|
||||||
val target = target ?: throw GradleException("target cannot be null")
|
|
||||||
val release = release ?: throw GradleException("release cannot be null")
|
|
||||||
val args = listOf("tauri", "android", "android-studio-script");
|
|
||||||
|
|
||||||
execOperations.exec {
|
|
||||||
workingDir(File(projectDir, rootDirRel))
|
|
||||||
executable(executable)
|
|
||||||
args(args)
|
|
||||||
if (logger.isEnabled(LogLevel.DEBUG)) {
|
|
||||||
args("-vv")
|
|
||||||
} else if (logger.isEnabled(LogLevel.INFO)) {
|
|
||||||
args("-v")
|
|
||||||
}
|
|
||||||
if (release) {
|
|
||||||
args("--release")
|
|
||||||
}
|
|
||||||
args(listOf("--target", target))
|
|
||||||
}.assertNormalExitValue()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
import com.android.build.api.dsl.ApplicationExtension
|
|
||||||
import org.gradle.api.DefaultTask
|
|
||||||
import org.gradle.api.Plugin
|
|
||||||
import org.gradle.api.Project
|
|
||||||
import org.gradle.kotlin.dsl.configure
|
|
||||||
import org.gradle.kotlin.dsl.get
|
|
||||||
|
|
||||||
const val TASK_GROUP = "rust"
|
|
||||||
|
|
||||||
open class Config {
|
|
||||||
lateinit var rootDirRel: String
|
|
||||||
}
|
|
||||||
|
|
||||||
open class RustPlugin : Plugin<Project> {
|
|
||||||
private lateinit var config: Config
|
|
||||||
|
|
||||||
override fun apply(project: Project) = with(project) {
|
|
||||||
config = extensions.create("rust", Config::class.java)
|
|
||||||
|
|
||||||
val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
|
|
||||||
val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
|
|
||||||
|
|
||||||
val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
|
|
||||||
val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
|
|
||||||
|
|
||||||
val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
|
|
||||||
|
|
||||||
extensions.configure<ApplicationExtension> {
|
|
||||||
@Suppress("UnstableApiUsage")
|
|
||||||
flavorDimensions.add("abi")
|
|
||||||
productFlavors {
|
|
||||||
create("universal") {
|
|
||||||
dimension = "abi"
|
|
||||||
ndk {
|
|
||||||
abiFilters += abiList
|
|
||||||
}
|
|
||||||
}
|
|
||||||
defaultArchList.forEachIndexed { index, arch ->
|
|
||||||
create(arch) {
|
|
||||||
dimension = "abi"
|
|
||||||
ndk {
|
|
||||||
abiFilters.add(defaultAbiList[index])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
for (profile in listOf("debug", "release")) {
|
|
||||||
val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
|
|
||||||
val buildTask = tasks.maybeCreate(
|
|
||||||
"rustBuildUniversal$profileCapitalized",
|
|
||||||
DefaultTask::class.java
|
|
||||||
).apply {
|
|
||||||
group = TASK_GROUP
|
|
||||||
description = "Build dynamic library in $profile mode for all targets"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
|
|
||||||
|
|
||||||
for (targetPair in targetsList.withIndex()) {
|
|
||||||
val targetName = targetPair.value
|
|
||||||
val targetArch = archList[targetPair.index]
|
|
||||||
val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
|
|
||||||
val targetBuildTask = project.tasks.register(
|
|
||||||
"rustBuild$targetArchCapitalized$profileCapitalized",
|
|
||||||
BuildTask::class.java
|
|
||||||
) {
|
|
||||||
group = TASK_GROUP
|
|
||||||
description = "Build dynamic library in $profile mode for $targetArch"
|
|
||||||
rootDirRel = config.rootDirRel
|
|
||||||
projectDir = project.projectDir.path
|
|
||||||
target = targetName
|
|
||||||
release = profile == "release"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTask.dependsOn(targetBuildTask)
|
|
||||||
tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
|
|
||||||
targetBuildTask
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
# Project-wide Gradle settings.
|
|
||||||
# IDE (e.g. Android Studio) users:
|
|
||||||
# Gradle settings configured through the IDE *will override*
|
|
||||||
# any settings specified in this file.
|
|
||||||
# For more details on how to configure your build environment visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
|
||||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|
||||||
org.gradle.configuration-cache=true
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
||||||
# org.gradle.parallel=true
|
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
|
||||||
kotlin.code.style=official
|
|
||||||
|
|
||||||
# Our old plugin template had a bug that caused missing `consumer-rules.pro` files
|
|
||||||
# so we have to disable it for now.
|
|
||||||
# See https://github.com/tauri-apps/tauri/pull/15828#issuecomment-5199937796
|
|
||||||
android.proguard.failOnMissingFiles=false
|
|
||||||
|
|
||||||
# Keeping Gradle 9 compatible with current plugins
|
|
||||||
# TODO: Remove this in v3
|
|
||||||
android.builtInKotlin=false
|
|
||||||
android.newDsl=false
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
#Tue May 10 19:22:52 CST 2022
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
zipStorePath=wrapper/dists
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
248
harnesses/tttest/gen/android/gradlew
vendored
|
|
@ -1,248 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright © 2015 the original authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# gradlew start up script for POSIX generated by Gradle.
|
|
||||||
#
|
|
||||||
# Important for running:
|
|
||||||
#
|
|
||||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
||||||
# noncompliant, but you have some other compliant shell such as ksh or
|
|
||||||
# bash, then to run this script, type that shell name before the whole
|
|
||||||
# command line, like:
|
|
||||||
#
|
|
||||||
# ksh gradlew
|
|
||||||
#
|
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
|
||||||
# requires all of these POSIX shell features:
|
|
||||||
# * functions;
|
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
|
||||||
#
|
|
||||||
# Important for patching:
|
|
||||||
#
|
|
||||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
||||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
||||||
#
|
|
||||||
# The "traditional" practice of packing multiple parameters into a
|
|
||||||
# space-separated string is a well documented source of bugs and security
|
|
||||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
||||||
# options in "$@", and eventually passing that to Java.
|
|
||||||
#
|
|
||||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
||||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
||||||
# see the in-line comments for details.
|
|
||||||
#
|
|
||||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
||||||
# Darwin, MinGW, and NonStop.
|
|
||||||
#
|
|
||||||
# (3) This script is generated from the Groovy template
|
|
||||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
||||||
# within the Gradle project.
|
|
||||||
#
|
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
app_path=$0
|
|
||||||
|
|
||||||
# Need this for daisy-chained symlinks.
|
|
||||||
while
|
|
||||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
|
||||||
[ -h "$app_path" ]
|
|
||||||
do
|
|
||||||
ls=$( ls -ld "$app_path" )
|
|
||||||
link=${ls#*' -> '}
|
|
||||||
case $link in #(
|
|
||||||
/*) app_path=$link ;; #(
|
|
||||||
*) app_path=$APP_HOME$link ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# This is normally unused
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
APP_BASE_NAME=${0##*/}
|
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD=maximum
|
|
||||||
|
|
||||||
warn () {
|
|
||||||
echo "$*"
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
die () {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
} >&2
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
nonstop=false
|
|
||||||
case "$( uname )" in #(
|
|
||||||
CYGWIN* ) cygwin=true ;; #(
|
|
||||||
Darwin* ) darwin=true ;; #(
|
|
||||||
MSYS* | MINGW* ) msys=true ;; #(
|
|
||||||
NONSTOP* ) nonstop=true ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
|
||||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
|
||||||
else
|
|
||||||
JAVACMD=$JAVA_HOME/bin/java
|
|
||||||
fi
|
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
JAVACMD=java
|
|
||||||
if ! command -v java >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
|
||||||
location of your Java installation."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
||||||
case $MAX_FD in #(
|
|
||||||
max*)
|
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
|
||||||
warn "Could not query maximum file descriptor limit"
|
|
||||||
esac
|
|
||||||
case $MAX_FD in #(
|
|
||||||
'' | soft) :;; #(
|
|
||||||
*)
|
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
ulimit -n "$MAX_FD" ||
|
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Collect all arguments for the java command, stacking in reverse order:
|
|
||||||
# * args from the command line
|
|
||||||
# * the main class name
|
|
||||||
# * -classpath
|
|
||||||
# * -D...appname settings
|
|
||||||
# * --module-path (only if needed)
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if "$cygwin" || "$msys" ; then
|
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
||||||
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
for arg do
|
|
||||||
if
|
|
||||||
case $arg in #(
|
|
||||||
-*) false ;; # don't mess with options #(
|
|
||||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
||||||
[ -e "$t" ] ;; #(
|
|
||||||
*) false ;;
|
|
||||||
esac
|
|
||||||
then
|
|
||||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
||||||
fi
|
|
||||||
# Roll the args list around exactly as many times as the number of
|
|
||||||
# args, so each arg winds up back in the position where it started, but
|
|
||||||
# possibly modified.
|
|
||||||
#
|
|
||||||
# NB: a `for` loop captures its iteration list before it begins, so
|
|
||||||
# changing the positional parameters here affects neither the number of
|
|
||||||
# iterations, nor the values presented in `arg`.
|
|
||||||
shift # remove old arg
|
|
||||||
set -- "$@" "$arg" # push replacement arg
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
||||||
# and any embedded shellness will be escaped.
|
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
||||||
# treated as '${Hostname}' itself on the command line.
|
|
||||||
|
|
||||||
set -- \
|
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
||||||
"$@"
|
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
|
||||||
if ! command -v xargs >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "xargs is not available"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
|
||||||
#
|
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
||||||
#
|
|
||||||
# In Bash we could simply go:
|
|
||||||
#
|
|
||||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
||||||
# set -- "${ARGS[@]}" "$@"
|
|
||||||
#
|
|
||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
||||||
# character that might be a shell metacharacter, then use eval to reverse
|
|
||||||
# that process (while maintaining the separation between arguments), and wrap
|
|
||||||
# the whole thing up as a single "set" statement.
|
|
||||||
#
|
|
||||||
# This will of course break if any of these variables contains a newline or
|
|
||||||
# an unmatched quote.
|
|
||||||
#
|
|
||||||
|
|
||||||
eval "set -- $(
|
|
||||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
||||||
xargs -n1 |
|
|
||||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
||||||
tr '\n' ' '
|
|
||||||
)" '"$@"'
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
|
||||||
82
harnesses/tttest/gen/android/gradlew.bat
vendored
|
|
@ -1,82 +0,0 @@
|
||||||
@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%
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
include ':app'
|
|
||||||
|
|
||||||
apply from: 'tauri.settings.gradle'
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{"default":{"identifier":"default","description":"tttest: FR batching + lifecycle logs from the webview","local":true,"windows":["main"],"permissions":["core:default"]}}
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
|
||||||
</adaptive-icon>
|
|
||||||
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="ic_launcher_background">#FFFFFF</color>
|
|
||||||
</resources>
|
|
||||||
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 867 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 977 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |