feat: allow android apps with any name, fix android + windows for aarch64 target (#3213)

* use llvm objcopy to rename syms
* use handlebars
* it works!
* remove linker code
* better docs internally about dev.dioxus.main
* use bundle identifier
* double check bundle identifier is proper
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-11-13 18:48:21 -05:00
1 parent 1370bce182
commit 8a2922c663
13 files changed
+173 -79

No files matched your search

+11 -9
View File
@@ -47,19 +47,21 @@ pub fn root() {
dioxus_desktop::launch::launch(app, vec![], Default::default());
}
/// Expose the `Java_dev_dioxus_main_WryActivity_create` function to the JNI layer.
/// We hardcode these to have a single trampoline for host Java code to call into.
///
/// This saves us from having to plumb the top-level package name all the way down into
/// this file. This is better for modularity (ie just call dioxus' main to run the app) as
/// well as cache thrashing since this crate doesn't rely on external env vars.
///
/// The CLI is expecting to find `dev.dioxus.main` in the final library. If you find a need to
/// change this, you'll need to change the CLI as well.
#[cfg(target_os = "android")]
#[no_mangle]
#[inline(never)]
pub extern "C" fn start_app() {
tao::android_binding!(
com_example,
androidfinal,
WryActivity,
wry::android_setup,
root,
tao
);
wry::android_binding!(com_example, androidfinal, wry);
tao::android_binding!(dev_dioxus, main, WryActivity, wry::android_setup, root, tao);
wry::android_binding!(dev_dioxus, main, wry);
}
/// Call our `main` function to initialize the rust runtime and set the launch binding trampoline