Skip to content

Commit c83e95d

Browse files
committed
Bundle OpenFX plugin icon
1 parent 210ec3a commit c83e95d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

xtask/src/build_ofx_plugin.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,22 @@ pub fn main(args: &clap::ArgMatches) -> Result<(), Box<dyn Error>> {
193193

194194
let plugin_bundle_path = output_dir.plus_iter(["NtscRs.ofx.bundle", "Contents"]);
195195
let plugin_bin_path = plugin_bundle_path.plus_iter([ofx_architecture, "NtscRs.ofx"]);
196+
let plugin_resources_path = plugin_bundle_path.plus_iter(["Resources"]);
196197

197198
fs::create_dir_all(plugin_bin_path.parent().unwrap())?;
199+
fs::create_dir_all(&plugin_resources_path)?;
198200
fs::copy(built_library_path, plugin_bin_path)?;
199201
if ofx_architecture == "MacOS" {
200202
get_info_plist().to_file_xml(plugin_bundle_path.plus("Info.plist"))?;
203+
fs::copy(
204+
workspace_dir().plus_iter(["assets", "macos_icon_less_detail.png"]),
205+
plugin_resources_path.plus("wtf.vala.NtscRs.png"),
206+
)?;
207+
} else {
208+
fs::copy(
209+
workspace_dir().plus_iter(["assets", "icon.png"]),
210+
plugin_resources_path.plus("wtf.vala.NtscRs.png"),
211+
)?;
201212
}
202213

203214
Ok(())

0 commit comments

Comments
 (0)