diff --git a/src/tools/msbuild.cpp b/src/tools/msbuild.cpp index 7742262..285ba46 100644 --- a/src/tools/msbuild.cpp +++ b/src/tools/msbuild.cpp @@ -60,8 +60,6 @@ int msbuild::result() const void msbuild::do_run() { - write_custom_props_file(); - // 14.2 to v142 const auto toolset = "v" + replace_all(tools::vs::toolset(), ".", ""); @@ -134,27 +132,4 @@ void msbuild::do_run() execute_and_join(); } -void msbuild::write_custom_props_file() -{ - const fs::path file = sln_.parent_path() / "Directory.Build.props"; - if (fs::exists(file)) - { - cx_->trace(context::generic, "props file {} already exists", file); - return; - } - - const std::string content = R"( - - - - 4566 - - - -)"; - - op::write_text_file(*cx_, file, content); - -} - } // namespace diff --git a/src/tools/patcher.cpp b/src/tools/patcher.cpp index 03f7825..56845de 100644 --- a/src/tools/patcher.cpp +++ b/src/tools/patcher.cpp @@ -49,6 +49,15 @@ void patcher::do_run() cx_->trace(context::generic, "looking for patches in {}", patches); + if (!fs::exists(patches)) + { + cx_->trace(context::generic, + "patch directory {} doesn't exist, assuming no patches", + patches); + + return; + } + for (auto e : fs::directory_iterator(patches)) { if (!e.is_regular_file()) diff --git a/src/tools/tools.cpp b/src/tools/tools.cpp index 30e3117..50c1c3f 100644 --- a/src/tools/tools.cpp +++ b/src/tools/tools.cpp @@ -126,6 +126,10 @@ void pip_install::do_run() { process_ .binary(python::python_exe()) + .chcp(65001) + .stdout_encoding(encodings::utf8) + .stderr_encoding(encodings::utf8) + .arg("-X", "utf8") .arg("-m", "pip") .arg("install") .arg("--no-warn-script-location") @@ -136,6 +140,10 @@ void pip_install::do_run() else if (!file_.empty()) process_.arg(file_); + process_ + .env(this_env::get() + .set("PYTHONUTF8", "1")); + execute_and_join(); } diff --git a/src/tools/tools.h b/src/tools/tools.h index 320adbb..bb3b95d 100644 --- a/src/tools/tools.h +++ b/src/tools/tools.h @@ -285,8 +285,6 @@ private: std::string platform_; arch arch_; flags_t flags_; - - void write_custom_props_file(); };