mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +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() {
|
std::string get_wine_version() {
|
||||||
// The '*.exe' scripts generated by winegcc allow you to override the binary
|
// The '*.exe' scripts generated by winegcc allow you to override the binary
|
||||||
// used to run Wine, so will will respect this as well
|
// used to run Wine, so will will handle this in the same way for our Wine
|
||||||
std::string wine_path;
|
// version detection
|
||||||
|
fs::path wine_path;
|
||||||
bp::environment env = boost::this_process::environment();
|
bp::environment env = boost::this_process::environment();
|
||||||
const std::string wineloader_path = env["WINELOADER"].to_string();
|
if (const std::string wineloader_path = env["WINELOADER"].to_string();
|
||||||
if (access(wineloader_path.c_str(), X_OK) == 0) {
|
access(wineloader_path.c_str(), X_OK) == 0) {
|
||||||
wine_path = wineloader_path;
|
wine_path = wineloader_path;
|
||||||
} else {
|
} else {
|
||||||
wine_path = bp::search_path("wine");
|
wine_path = bp::search_path("wine").string();
|
||||||
}
|
}
|
||||||
|
|
||||||
bp::ipstream output;
|
bp::ipstream output;
|
||||||
|
|||||||
Reference in New Issue
Block a user