Remove boost.
This commit is contained in:
parent
e033489f9b
commit
bc0edf8e91
@ -48,9 +48,6 @@ target_include_directories(dropshell PRIVATE
|
|||||||
|
|
||||||
# Link libraries
|
# Link libraries
|
||||||
target_link_libraries(dropshell PRIVATE
|
target_link_libraries(dropshell PRIVATE
|
||||||
Boost::program_options
|
|
||||||
Boost::filesystem
|
|
||||||
Boost::system
|
|
||||||
${CURSES_LIBRARIES}
|
${CURSES_LIBRARIES}
|
||||||
TBB::tbb
|
TBB::tbb
|
||||||
)
|
)
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include "utils/readmes.hpp"
|
#include "utils/readmes.hpp"
|
||||||
#include "autocomplete.hpp"
|
#include "autocomplete.hpp"
|
||||||
#include "main_commands.hpp"
|
#include "main_commands.hpp"
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#include "server_env.hpp"
|
#include "server_env.hpp"
|
||||||
#include "utils/envmanager.hpp"
|
#include "utils/envmanager.hpp"
|
||||||
#include "utils/directories.hpp"
|
#include "utils/directories.hpp"
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <filesystem>
|
||||||
namespace dropshell {
|
namespace dropshell {
|
||||||
|
|
||||||
bool server_env::is_valid() const {
|
bool server_env::is_valid() const {
|
||||||
@ -22,7 +21,7 @@ server_env::server_env(const std::string& server_name) : mValid(false) {
|
|||||||
std::string env_path = get_local_server_env_path(server_name);
|
std::string env_path = get_local_server_env_path(server_name);
|
||||||
|
|
||||||
// Check if file exists
|
// Check if file exists
|
||||||
if (!boost::filesystem::exists(env_path)) {
|
if (!std::filesystem::exists(env_path)) {
|
||||||
throw std::runtime_error("Server environment file not found: " + env_path);
|
throw std::runtime_error("Server environment file not found: " + env_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,11 +10,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <boost/algorithm/string.hpp>
|
|
||||||
#include <execution>
|
#include <execution>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
namespace fs = boost::filesystem;
|
|
||||||
|
|
||||||
namespace dropshell {
|
namespace dropshell {
|
||||||
|
|
||||||
@ -27,10 +24,10 @@ std::vector<ServerInfo> get_configured_servers() {
|
|||||||
|
|
||||||
for (int i = 0; i < local_config_directories.size(); i++) {
|
for (int i = 0; i < local_config_directories.size(); i++) {
|
||||||
std::string servers_dir = get_local_config_servers_path(i);
|
std::string servers_dir = get_local_config_servers_path(i);
|
||||||
if (!servers_dir.empty() && fs::exists(servers_dir)) {
|
if (!servers_dir.empty() && std::filesystem::exists(servers_dir)) {
|
||||||
|
|
||||||
for (const auto& entry : fs::directory_iterator(servers_dir)) {
|
for (const auto& entry : std::filesystem::directory_iterator(servers_dir)) {
|
||||||
if (fs::is_directory(entry)) {
|
if (std::filesystem::is_directory(entry)) {
|
||||||
std::string server_name = entry.path().filename().string();
|
std::string server_name = entry.path().filename().string();
|
||||||
|
|
||||||
server_env env(server_name);
|
server_env env(server_name);
|
||||||
@ -159,7 +156,7 @@ void create_server(const std::string &server_name)
|
|||||||
// 2. create a new directory in the user config directory
|
// 2. create a new directory in the user config directory
|
||||||
std::string config_servers_dir = get_local_config_servers_path(0);
|
std::string config_servers_dir = get_local_config_servers_path(0);
|
||||||
std::string server_dir = config_servers_dir + "/" + server_name;
|
std::string server_dir = config_servers_dir + "/" + server_name;
|
||||||
fs::create_directory(server_dir);
|
std::filesystem::create_directory(server_dir);
|
||||||
|
|
||||||
// 3. create a template server.env file in the server directory
|
// 3. create a template server.env file in the server directory
|
||||||
std::string user = getenv("USER");
|
std::string user = getenv("USER");
|
||||||
@ -174,7 +171,7 @@ void create_server(const std::string &server_name)
|
|||||||
|
|
||||||
// 4. add dropshell-agent service to server
|
// 4. add dropshell-agent service to server
|
||||||
std::string service_dir = server_dir + "/dropshell-agent";
|
std::string service_dir = server_dir + "/dropshell-agent";
|
||||||
fs::create_directory(service_dir);
|
std::filesystem::create_directory(service_dir);
|
||||||
std::string service_env_path = service_dir + "/service.env";
|
std::string service_env_path = service_dir + "/service.env";
|
||||||
std::filesystem::copy(get_local_system_templates_path() + "/dropshell-agent/example/service.env", service_env_path);
|
std::filesystem::copy(get_local_system_templates_path() + "/dropshell-agent/example/service.env", service_env_path);
|
||||||
|
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
#include "services.hpp"
|
#include "services.hpp"
|
||||||
#include "utils/directories.hpp"
|
#include "utils/directories.hpp"
|
||||||
#include "utils/utils.hpp"
|
#include "utils/utils.hpp"
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <filesystem>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
namespace dropshell {
|
namespace dropshell {
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
#include "utils/utils.hpp"
|
#include "utils/utils.hpp"
|
||||||
#include "server_env.hpp"
|
#include "server_env.hpp"
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
namespace dropshell {
|
namespace dropshell {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user