mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
`wine_path` was a string, and `boost::process::search_path()` returns an `boost::filesystem::path`. We should just be using paths here anyways.
This commit is contained in:
@@ -343,14 +343,15 @@ std::vector<boost::filesystem::path> get_augmented_search_path() {
|
||||
|
||||
std::string get_wine_version() {
|
||||
// The '*.exe' scripts generated by winegcc allow you to override the binary
|
||||
// used to run Wine, so will will respect this as well
|
||||
std::string wine_path;
|
||||
// used to run Wine, so will will handle this in the same way for our Wine
|
||||
// version detection
|
||||
fs::path wine_path;
|
||||
bp::environment env = boost::this_process::environment();
|
||||
const std::string wineloader_path = env["WINELOADER"].to_string();
|
||||
if (access(wineloader_path.c_str(), X_OK) == 0) {
|
||||
if (const std::string wineloader_path = env["WINELOADER"].to_string();
|
||||
access(wineloader_path.c_str(), X_OK) == 0) {
|
||||
wine_path = wineloader_path;
|
||||
} else {
|
||||
wine_path = bp::search_path("wine");
|
||||
wine_path = bp::search_path("wine").string();
|
||||
}
|
||||
|
||||
bp::ipstream output;
|
||||
|
||||
Reference in New Issue
Block a user