mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-18 08:12:16 +03:00
Fixed DXVK applying using system wine
This commit is contained in:
parent
8efd07c7fd
commit
afafd6bbd1
1 changed files with 49 additions and 47 deletions
|
@ -83,12 +83,17 @@ impl Version {
|
|||
let apply_path = format!("{}/{}/setup_dxvk.sh", dxvks_folder.to_string(), self.name);
|
||||
let config = config::get()?;
|
||||
|
||||
match config.try_get_selected_wine_info() {
|
||||
let (wine_path, wineserver_path, wineboot_path) = match config.try_get_selected_wine_info() {
|
||||
Some(wine) => {
|
||||
let wine_path = format!("{}/{}/{}", &config.game.wine.builds, wine.name, wine.files.wine64);
|
||||
let wineserver_path = format!("{}/{}/{}", &config.game.wine.builds, wine.name, wine.files.wineserver);
|
||||
let wineboot_path = format!("{}/{}/{}", &config.game.wine.builds, wine.name, wine.files.wineboot);
|
||||
|
||||
(wine_path, wineserver_path, wineboot_path)
|
||||
},
|
||||
None => (String::from("wine64"), String::from("wineserver"), String::from("wineboot"))
|
||||
};
|
||||
|
||||
let mut apply_script = std::fs::read_to_string(&apply_path)?;
|
||||
|
||||
lazy_static! {
|
||||
|
@ -134,8 +139,5 @@ impl Version {
|
|||
else {
|
||||
Err(Error::new(ErrorKind::Other, String::from_utf8_lossy(&output.stderr)))
|
||||
}
|
||||
},
|
||||
None => Err(Error::new(ErrorKind::Other, "Wine is not selected"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue