Add the Android shell, APK build, bridge test, sweet config and CI
android/: HomeActivity (derived from the legacy MainActivity, same package dev.ultra.launcher and class name as the Qt build so the default-home choice carries over), Updater reduced to httpGet + PackageInstaller, RecentsService, manifest and resources, the committed debug keystore. android/build.sh builds the APK with aapt2, javac, d8, zipalign and apksigner (no Gradle). tests/android-sim.cjs drives the page against a stub of window.Android. .sweet.config.yml / .sweet.yml with moon.mod as the annotated version file. CI: test job (moon test on js and wasm-gc, browser tests) and an apk job that publishes a Gitea release. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
637129aa4e
commit
dccbfd7d86
24 files changed
+1571
-30
No files matched your search
@@ -314,6 +314,10 @@ extern "js" fn h_http_get(url : String, tag : Int) -> Unit =
|
||||
extern "js" fn h_install_apk(url : String, version : Int) -> Unit =
|
||||
#|(url, v) => window.Android.installApk(url, v)
|
||||
|
||||
///|
|
||||
extern "js" fn h_declined_version() -> Int =
|
||||
#|() => window.Android.declinedVersion()
|
||||
|
||||
///|
|
||||
extern "js" fn h_installed_version() -> Int =
|
||||
#|() => window.Android.installedVersion()
|
||||
|
||||
+2
-7
@@ -133,7 +133,6 @@ fn exec(e : @app.Effect) -> Unit {
|
||||
}
|
||||
SaveHome(json) => storage_set("launcher.home", json)
|
||||
SaveLastCheck(t) => storage_set("launcher.update.lastCheck", t.to_string())
|
||||
SaveDeclined(n) => storage_set("launcher.update.declined", n.to_string())
|
||||
Delay(ms, msg) => set_timeout(ms, fn() { dispatch(msg) })
|
||||
HoldTimer(ms, token) => set_timeout(ms, fn() { feed(Hold(token)) })
|
||||
FetchRelease(url) =>
|
||||
@@ -414,7 +413,6 @@ fn expose_api() -> Unit {
|
||||
state.val.placed = ""
|
||||
place()
|
||||
})
|
||||
expose1("updateDeclined", fn(n) { dispatch(UpdateDeclined(n)) })
|
||||
expose_json("icons", got_icons)
|
||||
expose_result("httpResult", fn(tag, ok, text) {
|
||||
if state.val.http.get(tag) is Some(f) {
|
||||
@@ -447,11 +445,8 @@ fn main {
|
||||
let legacy = if saved is None { Some(storage_legacy()) } else { None }
|
||||
dispatch(Restore(saved~, legacy~))
|
||||
if is_android() {
|
||||
let declined = if storage_has("launcher.update.declined") {
|
||||
num("launcher.update.declined").to_int()
|
||||
} else {
|
||||
-1
|
||||
}
|
||||
// the shell keeps the build whose install the user cancelled (-1: none)
|
||||
let declined = h_declined_version()
|
||||
dispatch(
|
||||
Started(
|
||||
now=now_ms().to_int64(),
|
||||
|
||||
Reference in new issue
Block a user