Merge pull request #792 from nil-andreas/linux-boost-fix

This commit is contained in:
Yukino Song
2025-06-01 10:36:45 +08:00
committed by GitHub
5 changed files with 22 additions and 9 deletions

View File

@@ -14,8 +14,10 @@
// lib includes
#include <boost/core/noncopyable.hpp>
#ifndef _WIN32
#include <boost/asio.hpp>
#include <boost/process.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/process/v1/child.hpp>
#include <boost/process/v1/group.hpp>
#include <boost/process/v1/environment.hpp>
#endif
// local includes

View File

@@ -22,7 +22,14 @@
// lib includes
#include <boost/asio/ip/address.hpp>
#include <boost/asio/ip/host_name.hpp>
#include <boost/process/v1.hpp>
#include <boost/process/v1/group.hpp>
#include <boost/process/v1/child.hpp>
#include <boost/process/v1/env.hpp>
#include <boost/process/v1/environment.hpp>
#include <boost/process/v1/group.hpp>
#include <boost/process/v1/handles.hpp>
#include <boost/process/v1/io.hpp>
#include <boost/process/v1/start_dir.hpp>
#include <fcntl.h>
#include <unistd.h>
@@ -45,7 +52,7 @@
using namespace std::literals;
namespace fs = std::filesystem;
namespace bp = boost::process;
namespace bp = boost::process::v1;
window_system_e window_system;

View File

@@ -4,6 +4,9 @@
*/
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#ifndef BOOST_PROCESS_VERSION
#define BOOST_PROCESS_VERSION 1
#endif
// standard includes
#include <filesystem>
#include <string>

View File

@@ -134,7 +134,7 @@ namespace proc {
std::string get_app_image(int app_id);
std::string get_last_run_app_name();
std::string get_running_app_uuid();
boost::process::environment get_env();
boost::process::v1::environment get_env();
void terminate(bool immediate = false, bool needs_refresh = true);
private:
@@ -162,7 +162,7 @@ namespace proc {
};
boost::filesystem::path
find_working_directory(const std::string &cmd, boost::process::environment &env);
find_working_directory(const std::string &cmd, boost::process::v1::environment &env);
/**
* @brief Calculate a stable id based on name and image data
@@ -199,4 +199,4 @@ namespace proc {
#ifdef BOOST_PROCESS_VERSION
#undef BOOST_PROCESS_VERSION
#endif
#endif

View File

@@ -56,12 +56,13 @@ namespace video {
// }
if (devices.empty()) {
#ifdef _WIN32
// We'll create a temporary virtual display for probing anyways.
if (proc::vDisplayDriverStatus == VDISPLAY::DRIVER_STATUS::OK) {
return false;
} else {
return true;
}
#endif
return true;
}
// Since Windows 11 24H2, it is possible that there will be no active devices present