Use bundler.toml display name in MacOS bundles
This commit is contained in:
parent
7c121d0181
commit
6a6e7e0992
|
@ -226,7 +226,12 @@ fn bundle_binary(
|
||||||
.next()
|
.next()
|
||||||
.expect("Malformed standalone binary path"),
|
.expect("Malformed standalone binary path"),
|
||||||
);
|
);
|
||||||
maybe_create_macos_bundle_metadata(package, &standalone_bundle_home, compilation_target)?;
|
maybe_create_macos_bundle_metadata(
|
||||||
|
package,
|
||||||
|
&bundle_name,
|
||||||
|
&standalone_bundle_home,
|
||||||
|
compilation_target,
|
||||||
|
)?;
|
||||||
|
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Created a standalone bundle at '{}'",
|
"Created a standalone bundle at '{}'",
|
||||||
|
@ -276,7 +281,12 @@ fn bundle_plugin(
|
||||||
.next()
|
.next()
|
||||||
.expect("Malformed CLAP library path"),
|
.expect("Malformed CLAP library path"),
|
||||||
);
|
);
|
||||||
maybe_create_macos_bundle_metadata(package, &clap_bundle_home, compilation_target)?;
|
maybe_create_macos_bundle_metadata(
|
||||||
|
package,
|
||||||
|
&bundle_name,
|
||||||
|
&clap_bundle_home,
|
||||||
|
compilation_target,
|
||||||
|
)?;
|
||||||
|
|
||||||
eprintln!("Created a CLAP bundle at '{}'", clap_bundle_home.display());
|
eprintln!("Created a CLAP bundle at '{}'", clap_bundle_home.display());
|
||||||
}
|
}
|
||||||
|
@ -297,7 +307,12 @@ fn bundle_plugin(
|
||||||
.next()
|
.next()
|
||||||
.expect("Malformed VST2 library path"),
|
.expect("Malformed VST2 library path"),
|
||||||
);
|
);
|
||||||
maybe_create_macos_bundle_metadata(package, &vst2_bundle_home, compilation_target)?;
|
maybe_create_macos_bundle_metadata(
|
||||||
|
package,
|
||||||
|
&bundle_name,
|
||||||
|
&vst2_bundle_home,
|
||||||
|
compilation_target,
|
||||||
|
)?;
|
||||||
|
|
||||||
eprintln!("Created a VST2 bundle at '{}'", vst2_bundle_home.display());
|
eprintln!("Created a VST2 bundle at '{}'", vst2_bundle_home.display());
|
||||||
}
|
}
|
||||||
|
@ -317,7 +332,12 @@ fn bundle_plugin(
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.parent()
|
.parent()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
maybe_create_macos_bundle_metadata(package, vst3_bundle_home, compilation_target)?;
|
maybe_create_macos_bundle_metadata(
|
||||||
|
package,
|
||||||
|
&bundle_name,
|
||||||
|
vst3_bundle_home,
|
||||||
|
compilation_target,
|
||||||
|
)?;
|
||||||
|
|
||||||
eprintln!("Created a VST3 bundle at '{}'", vst3_bundle_home.display());
|
eprintln!("Created a VST3 bundle at '{}'", vst3_bundle_home.display());
|
||||||
}
|
}
|
||||||
|
@ -491,6 +511,7 @@ fn vst3_bundle_library_name(package: &str, target: CompilationTarget) -> String
|
||||||
/// yourself first.
|
/// yourself first.
|
||||||
pub fn maybe_create_macos_bundle_metadata(
|
pub fn maybe_create_macos_bundle_metadata(
|
||||||
package: &str,
|
package: &str,
|
||||||
|
display_name: &str,
|
||||||
bundle_home: &Path,
|
bundle_home: &Path,
|
||||||
target: CompilationTarget,
|
target: CompilationTarget,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
|
@ -498,8 +519,6 @@ pub fn maybe_create_macos_bundle_metadata(
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Use the display name from bundler.toml
|
|
||||||
|
|
||||||
// TODO: May want to add bundler.toml fields for the identifier, version and signature at some
|
// TODO: May want to add bundler.toml fields for the identifier, version and signature at some
|
||||||
// point.
|
// point.
|
||||||
fs::write(bundle_home.join("Contents").join("PkgInfo"), "BNDL????")
|
fs::write(bundle_home.join("Contents").join("PkgInfo"), "BNDL????")
|
||||||
|
@ -518,9 +537,9 @@ pub fn maybe_create_macos_bundle_metadata(
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.nih-plug.{package}</string>
|
<string>com.nih-plug.{package}</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>{package}</string>
|
<string>{display_name}</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>{package}</string>
|
<string>{display_name}</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>BNDL</string>
|
<string>BNDL</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
|
|
Loading…
Reference in a new issue