mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 04:03:52 +03:00
fix: fails to build universal fat binary if main bin is renamed to another name (#10550)
* fix: fails to build universal fat binary if main bin is renamed to another name * lint --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
parent
bba1a44191
commit
4bfe4880fb
6
.changes/universal-bin-build-fails.md
Normal file
6
.changes/universal-bin-build-fails.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-cli": patch:bug
|
||||
"@tauri-apps/cli": patch:bug
|
||||
---
|
||||
|
||||
fails to build universal fat binary if main bin is renamed to another name in `Cargo.toml`
|
2
tooling/cli/Cargo.lock
generated
2
tooling/cli/Cargo.lock
generated
@ -5340,7 +5340,7 @@ dependencies = [
|
||||
"glob",
|
||||
"html5ever",
|
||||
"infer 0.15.0",
|
||||
"json-patch 1.2.0",
|
||||
"json-patch 2.0.0",
|
||||
"json5",
|
||||
"kuchikiki",
|
||||
"log",
|
||||
|
@ -860,7 +860,12 @@ impl AppSettings for RustAppSettings {
|
||||
}
|
||||
|
||||
fn app_binary_path(&self, options: &Options) -> crate::Result<PathBuf> {
|
||||
let bin_name = self.cargo_package_settings().name.clone();
|
||||
let binaries = self.get_binaries(&self.target_triple)?;
|
||||
let bin_name = binaries
|
||||
.iter()
|
||||
.find(|x| x.main())
|
||||
.expect("failed to find main binary")
|
||||
.name();
|
||||
|
||||
let out_dir = self
|
||||
.out_dir(options)
|
||||
@ -1082,10 +1087,6 @@ impl RustAppSettings {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn cargo_package_settings(&self) -> &CargoPackageSettings {
|
||||
&self.cargo_package_settings
|
||||
}
|
||||
|
||||
fn target<'a>(&'a self, options: &'a Options) -> Option<&'a str> {
|
||||
options
|
||||
.target
|
||||
|
@ -29,6 +29,7 @@ const TEMPLATE_DIR: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/templates/mobile
|
||||
|
||||
// unprefixed app_root seems pretty dangerous!!
|
||||
// TODO: figure out what cargo-mobile meant by that
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn gen(
|
||||
tauri_config: &TauriConfig,
|
||||
config: &Config,
|
||||
|
Loading…
Reference in New Issue
Block a user