From 2068c2424dbea37d693504ed8bd09fdd66c7a488 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 3 Dec 2022 23:29:26 +1000 Subject: [PATCH] Fix mpv being placed in incorrect bundle location on macOS --- qt/bundle/mac/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qt/bundle/mac/src/main.rs b/qt/bundle/mac/src/main.rs index 91cb49ab0..350e9ba29 100644 --- a/qt/bundle/mac/src/main.rs +++ b/qt/bundle/mac/src/main.rs @@ -173,11 +173,11 @@ fn fixup_perms(dir: &Utf8Path) -> Result<()> { } /// Copy everything at the provided path into the Contents/ folder of our app. -fn extend_app_contents(source: &Utf8Path, bundle_dir: &Utf8Path) -> Result<()> { +fn extend_app_contents(source: &Utf8Path, target_dir: &Utf8Path) -> Result<()> { let status = Command::new("rsync") .arg("-a") .arg(format!("{}/", source.as_str())) - .arg(bundle_dir.join("Contents/")) + .arg(target_dir) .status()?; if !status.success() { bail!("error syncing {source:?}"); @@ -195,12 +195,12 @@ fn copy_in_audio(bundle_dir: &Utf8Path) -> Result<()> { "out/extracted/mac_amd_audio" }, ); - extend_app_contents(src_folder, bundle_dir) + extend_app_contents(src_folder, &bundle_dir.join("Contents/Resources")) } fn copy_in_qt(bundle_dir: &Utf8Path, kind: DistKind) -> Result<()> { println!("Copying in Qt..."); - extend_app_contents(kind.qt_repo(), bundle_dir) + extend_app_contents(kind.qt_repo(), &bundle_dir.join("Contents")) } fn fix_rpath(exe_path: Utf8PathBuf) -> Result<()> {