diff --git a/rust/src/modules/segatools.rs b/rust/src/modules/segatools.rs index d4c6987..8811c8c 100644 --- a/rust/src/modules/segatools.rs +++ b/rust/src/modules/segatools.rs @@ -1,3 +1,5 @@ +use std::path::PathBuf; + use anyhow::{anyhow, Result}; use ini::Ini; use crate::{model::{config::Segatools, segatools_base::segatools_base}, profiles::ProfilePaths, util::{self, PathStr}}; @@ -59,7 +61,7 @@ impl Segatools { if let Some(io) = &self.io { ini_out.with_section(Some("mu3io")) - .set("path", util::pkg_dir().join(io.to_string()).join("mu3io.dll").stringify()?); + .set("path", util::pkg_dir().join(io.to_string()).join("segatools").join("mu3io.dll").stringify()?); } else { ini_out.with_section(Some("mu3io")) .set("path", ""); @@ -78,8 +80,22 @@ impl Segatools { } } + if !exe_dir.join("DEVICE").join("ca.crt").exists() { + util::copy_directory( + util::pkg_dir().join(self.hook_dir()?).join("DEVICE"), + exe_dir.join("DEVICE"), + false + )?; + } + log::debug!("end line-up: segatools"); Ok(ini_out) } + + pub fn hook_dir(&self) -> Result { + Ok(util::pkg_dir() + .join(self.hook.as_ref().ok_or_else(|| anyhow!("No hook"))?.to_string()) + .join("segatools")) + } } \ No newline at end of file diff --git a/rust/src/profiles/ongeki.rs b/rust/src/profiles/ongeki.rs index be36b45..63e76f0 100644 --- a/rust/src/profiles/ongeki.rs +++ b/rust/src/profiles/ongeki.rs @@ -88,9 +88,7 @@ impl Profile for OngekiProfile { let target_path = PathBuf::from(&self.sgt.target); let exe_dir = target_path.parent().ok_or_else(|| anyhow!("Invalid target path"))?; - let sgt_dir = util::pkg_dir() - .join(self.sgt.hook.as_ref().ok_or_else(|| anyhow!("No hook"))?.to_string()) - .join("segatools"); + let sgt_dir = self.sgt.hook_dir()?; #[cfg(target_os = "windows")] { diff --git a/src/components/OptionList.vue b/src/components/OptionList.vue index 12dda48..945a203 100644 --- a/src/components/OptionList.vue +++ b/src/components/OptionList.vue @@ -81,18 +81,7 @@ const extraDisplayOptionsDisabled = computed(() => { :callback="(value: string) => (prf.current!.sgt.target = value)" > - - - + { " > + + +