@@ -287,12 +287,18 @@ pub struct BundleSettings {
287287 pub bin : Option < HashMap < String , BundleSettings > > ,
288288 /// External binaries to add to the bundle.
289289 ///
290- /// Note that each binary name will have the target platform's target triple appended,
291- /// so if you're bundling the `sqlite3` app, the bundler will look for e.g.
292- /// `sqlite3-x86_64-unknown-linux-gnu` on linux,
290+ /// Note that each binary name should have the target platform's target triple appended,
291+ /// as well as `.exe` for Windows.
292+ /// For example, if you're bundling a sidecar called `sqlite3`, the bundler expects
293+ /// a binary named `sqlite3-x86_64-unknown-linux-gnu` on linux,
293294 /// and `sqlite3-x86_64-pc-windows-gnu.exe` on windows.
294295 ///
295- /// The possible target triples can be seen by running `$ rustup target list`.
296+ /// Run `tauri build --help` for more info on targets.
297+ ///
298+ /// If you are building a universal binary for MacOS, the bundler expects
299+ /// your external binary to also be universal, and named after the target triple,
300+ /// e.g. `sqlite3-universal-apple-darwin`. See
301+ /// https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary
296302 pub external_bin : Option < Vec < String > > ,
297303 /// Debian-specific settings.
298304 pub deb : DebianSettings ,
@@ -617,7 +623,9 @@ impl Settings {
617623 let dest = path. join (
618624 src
619625 . file_name ( )
620- . expect ( "failed to extract external binary filename" ) ,
626+ . expect ( "failed to extract external binary filename" )
627+ . to_string_lossy ( )
628+ . replace ( & format ! ( "-{}" , self . target) , "" ) ,
621629 ) ;
622630 common:: copy_file ( & src, & dest) ?;
623631 }
0 commit comments