mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
removed instrumentation
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
namespace mob
|
||||
{
|
||||
|
||||
constexpr bool do_timings = false;
|
||||
|
||||
build_command::build_command()
|
||||
: command(requires_options | handle_sigint)
|
||||
{
|
||||
@@ -158,9 +156,6 @@ int build_command::do_run()
|
||||
|
||||
run_all_tasks();
|
||||
|
||||
if (do_timings)
|
||||
dump_timings();
|
||||
|
||||
if (!keep_msbuild_)
|
||||
terminate_msbuild();
|
||||
|
||||
@@ -191,48 +186,6 @@ void build_command::create_prefix_ini()
|
||||
}
|
||||
}
|
||||
|
||||
void build_command::dump_timings()
|
||||
{
|
||||
using namespace std::chrono;
|
||||
|
||||
std::ofstream out("timings.txt");
|
||||
|
||||
// generates a file with line being "task,start_time,end_time,step"
|
||||
//
|
||||
// uibase,0,1,fetch
|
||||
// uibase,1,2,configure
|
||||
// uibase,2,3,build
|
||||
// modorganizer,4,5,fetch
|
||||
// modorganizer,5,6,configure
|
||||
// modorganizer,6,7,build
|
||||
|
||||
auto write = [&](auto&& inst)
|
||||
{
|
||||
for (auto&& t : inst.instrumented_tasks())
|
||||
{
|
||||
for (auto&& tp : t.tps)
|
||||
{
|
||||
const auto start_ms = static_cast<double>(
|
||||
duration_cast<milliseconds>(tp.start).count());
|
||||
|
||||
const auto end_ms = static_cast<double>(
|
||||
duration_cast<milliseconds>(tp.end).count());
|
||||
|
||||
out
|
||||
<< inst.instrumentable_name() << "\t"
|
||||
<< (start_ms / 1000.0) << "\t"
|
||||
<< (end_ms / 1000.0) << "\t"
|
||||
<< t.name << "\n";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (auto&& tk : get_all_tasks())
|
||||
write(*tk);
|
||||
|
||||
write(git_submodule_adder::instance());
|
||||
}
|
||||
|
||||
void build_command::terminate_msbuild()
|
||||
{
|
||||
if (conf().global().dry())
|
||||
|
||||
@@ -230,10 +230,6 @@ private:
|
||||
// directory below it
|
||||
//
|
||||
void create_prefix_ini();
|
||||
|
||||
// for instrumentation
|
||||
//
|
||||
void dump_timings();
|
||||
};
|
||||
|
||||
|
||||
@@ -300,10 +296,6 @@ private:
|
||||
std::vector<std::string> tasks_;
|
||||
|
||||
void dump(const std::vector<task*>& v, std::size_t indent) const;
|
||||
|
||||
void dump_tasks(
|
||||
const std::vector<task*>& v, std::size_t indent, bool recurse) const;
|
||||
|
||||
void dump_aliases() const;
|
||||
};
|
||||
|
||||
|
||||
+60
-87
@@ -47,45 +47,42 @@ fs::path boost::root_lib_path(arch a)
|
||||
|
||||
void boost::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (prebuilt())
|
||||
{
|
||||
if (prebuilt())
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
}
|
||||
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!prebuilt())
|
||||
{
|
||||
if (is_set(c, clean::reconfigure))
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
op::delete_directory(cx(), source_path() / "bin.v2", op::optional);
|
||||
op::delete_file(cx(), b2_exe(), op::optional);
|
||||
}
|
||||
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
if (is_set(c, clean::rebuild))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
op::delete_directory(cx(), root_lib_path(arch::x86), op::optional);
|
||||
op::delete_directory(cx(), root_lib_path(arch::x64), op::optional);
|
||||
op::delete_file(cx(), config_jam_file(), op::optional);
|
||||
op::delete_file(cx(), source_path() / "project-config.jam", op::optional);
|
||||
}
|
||||
|
||||
|
||||
if (!prebuilt())
|
||||
{
|
||||
if (is_set(c, clean::reconfigure))
|
||||
{
|
||||
op::delete_directory(cx(), source_path() / "bin.v2", op::optional);
|
||||
op::delete_file(cx(), b2_exe(), op::optional);
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
{
|
||||
op::delete_directory(cx(), root_lib_path(arch::x86), op::optional);
|
||||
op::delete_directory(cx(), root_lib_path(arch::x64), op::optional);
|
||||
op::delete_file(cx(), config_jam_file(), op::optional);
|
||||
op::delete_file(cx(), source_path() / "project-config.jam", op::optional);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void boost::do_fetch()
|
||||
@@ -108,57 +105,39 @@ void boost::fetch_prebuilt()
|
||||
{
|
||||
cx().trace(context::generic, "using prebuilt boost");
|
||||
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(prebuilt_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(prebuilt_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void boost::build_and_install_prebuilt()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
lib_path(arch::x64) / python_dll(),
|
||||
conf().path().install_dlls());
|
||||
});
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
lib_path(arch::x64) / python_dll(),
|
||||
conf().path().install_dlls());
|
||||
}
|
||||
|
||||
void boost::fetch_from_source()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
}
|
||||
|
||||
void boost::bootstrap()
|
||||
{
|
||||
instrument<times::configure>([&]
|
||||
{
|
||||
write_config_jam();
|
||||
write_config_jam();
|
||||
|
||||
const auto bootstrap = source_path() / "bootstrap.bat";
|
||||
const auto bootstrap = source_path() / "bootstrap.bat";
|
||||
|
||||
run_tool(process_runner(process()
|
||||
.binary(bootstrap)
|
||||
.external_error_log(source_path() / "bootstrap.log")
|
||||
.cwd(source_path())));
|
||||
});
|
||||
run_tool(process_runner(process()
|
||||
.binary(bootstrap)
|
||||
.external_error_log(source_path() / "bootstrap.log")
|
||||
.cwd(source_path())));
|
||||
}
|
||||
|
||||
void boost::build_and_install_from_source()
|
||||
@@ -173,31 +152,25 @@ void boost::build_and_install_from_source()
|
||||
bootstrap();
|
||||
}
|
||||
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
do_b2(
|
||||
{"thread", "date_time", "filesystem", "locale", "program_options"},
|
||||
"static", "static", arch::x64);
|
||||
do_b2(
|
||||
{"thread", "date_time", "filesystem", "locale", "program_options"},
|
||||
"static", "static", arch::x64);
|
||||
|
||||
do_b2(
|
||||
{"thread", "date_time", "filesystem", "locale"},
|
||||
"static", "static", arch::x86);
|
||||
do_b2(
|
||||
{"thread", "date_time", "filesystem", "locale"},
|
||||
"static", "static", arch::x86);
|
||||
|
||||
do_b2(
|
||||
{"thread", "date_time", "locale", "program_options"},
|
||||
"static", "shared", arch::x64);
|
||||
do_b2(
|
||||
{"thread", "date_time", "locale", "program_options"},
|
||||
"static", "shared", arch::x64);
|
||||
|
||||
do_b2(
|
||||
{"thread", "date_time", "python", "atomic"},
|
||||
"shared", "shared", arch::x64);
|
||||
});
|
||||
do_b2(
|
||||
{"thread", "date_time", "python", "atomic"},
|
||||
"shared", "shared", arch::x64);
|
||||
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
lib_path(arch::x64) / python_dll(),
|
||||
conf().path().install_dlls());
|
||||
});
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
lib_path(arch::x64) / python_dll(),
|
||||
conf().path().install_dlls());
|
||||
}
|
||||
|
||||
void boost::do_b2(
|
||||
|
||||
+8
-14
@@ -26,25 +26,19 @@ fs::path boost_di::source_path()
|
||||
|
||||
void boost_di::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
});
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void boost_di::do_fetch()
|
||||
{
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("boost-experimental", "di"))
|
||||
.branch("cpp14")
|
||||
.root(source_path()));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("boost-experimental", "di"))
|
||||
.branch("cpp14")
|
||||
.root(source_path()));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
+12
-21
@@ -26,33 +26,24 @@ fs::path bzip2::source_path()
|
||||
|
||||
void bzip2::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void bzip2::do_fetch()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
url bzip2::source_url()
|
||||
|
||||
+16
-28
@@ -26,41 +26,29 @@ fs::path explorerpp::source_path()
|
||||
|
||||
void explorerpp::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void explorerpp::do_fetch()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
source_path() / "*",
|
||||
conf().path().install_bin() / "explorer++",
|
||||
op::copy_files);
|
||||
});
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
source_path() / "*",
|
||||
conf().path().install_bin() / "explorer++",
|
||||
op::copy_files);
|
||||
}
|
||||
|
||||
url explorerpp::source_url()
|
||||
|
||||
+18
-34
@@ -32,39 +32,30 @@ fs::path fmt::solution_path()
|
||||
|
||||
void fmt::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
if (is_set(c, clean::reconfigure))
|
||||
run_tool(create_cmake_tool(source_path(), cmake::clean));
|
||||
|
||||
if (is_set(c, clean::reconfigure))
|
||||
run_tool(create_cmake_tool(source_path(), cmake::clean));
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
});
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
}
|
||||
|
||||
void fmt::do_fetch()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
cmake fmt::create_cmake_tool(const fs::path& src_path, cmake::ops o)
|
||||
@@ -85,15 +76,8 @@ msbuild fmt::create_msbuild_tool(msbuild::ops o)
|
||||
|
||||
void fmt::do_build_and_install()
|
||||
{
|
||||
const auto build_path = instrument<times::configure>([&]
|
||||
{
|
||||
return run_tool(create_cmake_tool(source_path()));
|
||||
});
|
||||
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool(create_msbuild_tool());
|
||||
});
|
||||
run_tool(create_cmake_tool(source_path()));
|
||||
run_tool(create_msbuild_tool());
|
||||
}
|
||||
|
||||
url fmt::source_url()
|
||||
|
||||
+27
-35
@@ -26,37 +26,31 @@ fs::path gtest::source_path()
|
||||
|
||||
void gtest::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::reconfigure))
|
||||
{
|
||||
run_tool(create_cmake_tool(arch::x86, cmake::clean));
|
||||
run_tool(create_cmake_tool(arch::x64, cmake::clean));
|
||||
}
|
||||
if (is_set(c, clean::reconfigure))
|
||||
{
|
||||
run_tool(create_cmake_tool(arch::x86, cmake::clean));
|
||||
run_tool(create_cmake_tool(arch::x64, cmake::clean));
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
{
|
||||
run_tool(create_msbuild_tool(arch::x86, msbuild::clean));
|
||||
run_tool(create_msbuild_tool(arch::x64, msbuild::clean));
|
||||
}
|
||||
});
|
||||
if (is_set(c, clean::rebuild))
|
||||
{
|
||||
run_tool(create_msbuild_tool(arch::x86, msbuild::clean));
|
||||
run_tool(create_msbuild_tool(arch::x64, msbuild::clean));
|
||||
}
|
||||
}
|
||||
|
||||
void gtest::do_fetch()
|
||||
{
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("google", "googletest"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("google", "googletest"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
}
|
||||
|
||||
cmake gtest::create_cmake_tool(arch a, cmake::ops o)
|
||||
@@ -81,18 +75,16 @@ msbuild gtest::create_msbuild_tool(arch a, msbuild::ops o)
|
||||
|
||||
void gtest::do_build_and_install()
|
||||
{
|
||||
instrument<times::build>([&]{
|
||||
parallel({
|
||||
{"gtest64", [&] {
|
||||
run_tool(create_cmake_tool(arch::x64));
|
||||
run_tool(create_msbuild_tool(arch::x64));
|
||||
}},
|
||||
parallel({
|
||||
{"gtest64", [&] {
|
||||
run_tool(create_cmake_tool(arch::x64));
|
||||
run_tool(create_msbuild_tool(arch::x64));
|
||||
}},
|
||||
|
||||
{"gtest32", [&] {
|
||||
run_tool(create_cmake_tool(arch::x86));
|
||||
run_tool(create_msbuild_tool(arch::x86));
|
||||
}}
|
||||
});
|
||||
{"gtest32", [&] {
|
||||
run_tool(create_cmake_tool(arch::x86));
|
||||
run_tool(create_msbuild_tool(arch::x86));
|
||||
}}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+9
-18
@@ -26,35 +26,26 @@ fs::path installer::source_path()
|
||||
|
||||
void installer::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
if (is_set(c, clean::reclone))
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
op::delete_directory(cx(), conf().path().install_installer());
|
||||
});
|
||||
if (is_set(c, clean::rebuild))
|
||||
op::delete_directory(cx(), conf().path().install_installer());
|
||||
}
|
||||
|
||||
void installer::do_fetch()
|
||||
{
|
||||
const std::string repo = "modorganizer-Installer";
|
||||
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url(task_conf().mo_org(), repo))
|
||||
.branch(task_conf().mo_branch())
|
||||
.root(source_path()));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url(task_conf().mo_org(), repo))
|
||||
.branch(task_conf().mo_branch())
|
||||
.root(source_path()));
|
||||
}
|
||||
|
||||
void installer::do_build_and_install()
|
||||
{
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool<iscc>(source_path() / "dist" / "MO2-Installer.iss");
|
||||
});
|
||||
run_tool<iscc>(source_path() / "dist" / "MO2-Installer.iss");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
+15
-27
@@ -26,43 +26,31 @@ fs::path libbsarch::source_path()
|
||||
|
||||
void libbsarch::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void libbsarch::do_fetch()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void libbsarch::do_build_and_install()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "libbsarch.dll",
|
||||
conf().path().install_dlls());
|
||||
});
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "libbsarch.dll",
|
||||
conf().path().install_dlls());
|
||||
}
|
||||
|
||||
std::string libbsarch::dir_name()
|
||||
|
||||
+8
-14
@@ -26,25 +26,19 @@ fs::path libffi::source_path()
|
||||
|
||||
void libffi::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
});
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void libffi::do_fetch()
|
||||
{
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("python","cpython-bin-deps"))
|
||||
.branch("libffi")
|
||||
.root(source_path()));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("python","cpython-bin-deps"))
|
||||
.branch("libffi")
|
||||
.root(source_path()));
|
||||
}
|
||||
|
||||
fs::path libffi::include_path()
|
||||
|
||||
+15
-27
@@ -36,43 +36,31 @@ fs::path libloot::source_path()
|
||||
|
||||
void libloot::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void libloot::do_fetch()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void libloot::do_build_and_install()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "loot.dll",
|
||||
conf().path().install_loot());
|
||||
});
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "loot.dll",
|
||||
conf().path().install_loot());
|
||||
}
|
||||
|
||||
std::string libloot::release_name()
|
||||
|
||||
@@ -26,13 +26,10 @@ fs::path licenses::source_path()
|
||||
|
||||
void licenses::do_build_and_install()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
conf().path().licenses() / "*",
|
||||
conf().path().install_licenses(),
|
||||
op::copy_files|op::copy_dirs);
|
||||
});
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
conf().path().licenses() / "*",
|
||||
conf().path().install_licenses(),
|
||||
op::copy_files|op::copy_dirs);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
+46
-67
@@ -26,32 +26,29 @@ fs::path lz4::source_path()
|
||||
|
||||
void lz4::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (prebuilt())
|
||||
{
|
||||
if (prebuilt())
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
}
|
||||
}
|
||||
|
||||
void lz4::do_fetch()
|
||||
@@ -74,69 +71,51 @@ void lz4::fetch_prebuilt()
|
||||
{
|
||||
cx().trace(context::generic, "using prebuilt lz4");
|
||||
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(prebuilt_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(prebuilt_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void lz4::build_and_install_prebuilt()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "bin" / "liblz4.pdb",
|
||||
conf().path().install_pdbs());
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "bin" / "liblz4.pdb",
|
||||
conf().path().install_pdbs());
|
||||
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "bin" / "liblz4.dll",
|
||||
conf().path().install_dlls());
|
||||
});
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "bin" / "liblz4.dll",
|
||||
conf().path().install_dlls());
|
||||
}
|
||||
|
||||
void lz4::fetch_from_source()
|
||||
{
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("lz4","lz4"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("lz4","lz4"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
|
||||
run_tool(vs(vs::upgrade)
|
||||
.solution(solution_file()));
|
||||
});
|
||||
run_tool(vs(vs::upgrade)
|
||||
.solution(solution_file()));
|
||||
}
|
||||
|
||||
void lz4::build_and_install_from_source()
|
||||
{
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool(create_msbuild_tool());
|
||||
});
|
||||
run_tool(create_msbuild_tool());
|
||||
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
out_dir() / "*",
|
||||
source_path() / "bin",
|
||||
op::copy_files);
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
out_dir() / "*",
|
||||
source_path() / "bin",
|
||||
op::copy_files);
|
||||
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
out_dir() / "liblz4.dll",
|
||||
conf().path().install_dlls());
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
out_dir() / "liblz4.dll",
|
||||
conf().path().install_dlls());
|
||||
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
out_dir() / "liblz4.pdb",
|
||||
conf().path().install_pdbs());
|
||||
});
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
out_dir() / "liblz4.pdb",
|
||||
conf().path().install_pdbs());
|
||||
}
|
||||
|
||||
msbuild lz4::create_msbuild_tool(msbuild::ops o)
|
||||
|
||||
+15
-45
@@ -54,11 +54,6 @@ bool modorganizer::is_gamebryo_plugin() const
|
||||
return is_set(flags_, gamebryo);
|
||||
}
|
||||
|
||||
bool modorganizer::is_nuget_plugin() const
|
||||
{
|
||||
return is_set(flags_, nuget);
|
||||
}
|
||||
|
||||
fs::path modorganizer::source_path()
|
||||
{
|
||||
return {};
|
||||
@@ -97,36 +92,27 @@ std::string modorganizer::repo() const
|
||||
|
||||
void modorganizer::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), this_source_path());
|
||||
return;
|
||||
}
|
||||
git_wrap::delete_directory(cx(), this_source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::reconfigure))
|
||||
run_tool(create_this_cmake_tool(cmake::clean));
|
||||
if (is_set(c, clean::reconfigure))
|
||||
run_tool(create_this_cmake_tool(cmake::clean));
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_this_msbuild_tool(msbuild::clean));
|
||||
});
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_this_msbuild_tool(msbuild::clean));
|
||||
}
|
||||
|
||||
void modorganizer::do_fetch()
|
||||
{
|
||||
instrument<times::init_super>([&]
|
||||
{
|
||||
initialize_super(super_path());
|
||||
});
|
||||
initialize_super(super_path());
|
||||
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(git_url())
|
||||
.branch(task_conf().mo_branch())
|
||||
.root(this_source_path()));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(git_url())
|
||||
.branch(task_conf().mo_branch())
|
||||
.root(this_source_path()));
|
||||
}
|
||||
|
||||
void modorganizer::do_build_and_install()
|
||||
@@ -146,24 +132,8 @@ void modorganizer::do_build_and_install()
|
||||
return;
|
||||
}
|
||||
|
||||
instrument<times::configure>([&]
|
||||
{
|
||||
run_tool(create_this_cmake_tool());
|
||||
});
|
||||
|
||||
// until https://gitlab.kitware.com/cmake/cmake/-/issues/20646 is resolved,
|
||||
// we need a manual way of running the msbuild -t:restore
|
||||
if (is_nuget_plugin()) {
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool(create_this_msbuild_tool().targets({ "restore" }));
|
||||
});
|
||||
}
|
||||
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool(create_this_msbuild_tool());
|
||||
});
|
||||
run_tool(create_this_cmake_tool());
|
||||
run_tool(create_this_msbuild_tool());
|
||||
}
|
||||
|
||||
cmake modorganizer::create_this_cmake_tool(cmake::ops o)
|
||||
|
||||
+19
-31
@@ -27,49 +27,37 @@ fs::path ncc::source_path()
|
||||
|
||||
void ncc::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
});
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
}
|
||||
|
||||
void ncc::do_fetch()
|
||||
{
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url(task_conf().mo_org(), "modorganizer-NCC"))
|
||||
.branch(task_conf().mo_branch())
|
||||
.root(source_path()));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url(task_conf().mo_org(), "modorganizer-NCC"))
|
||||
.branch(task_conf().mo_branch())
|
||||
.root(source_path()));
|
||||
}
|
||||
|
||||
void ncc::do_build_and_install()
|
||||
{
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool(msbuild()
|
||||
.solution(source_path() / "NexusClient.sln")
|
||||
.targets({"NexusClientCLI"})
|
||||
.platform("Any CPU"));
|
||||
});
|
||||
run_tool(msbuild()
|
||||
.solution(source_path() / "NexusClient.sln")
|
||||
.targets({"NexusClientCLI"})
|
||||
.platform("Any CPU"));
|
||||
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
const auto publish = source_path() / "publish.bat";
|
||||
const auto publish = source_path() / "publish.bat";
|
||||
|
||||
run_tool(process_runner(process()
|
||||
.binary(publish)
|
||||
.stderr_level(context::level::trace)
|
||||
.arg(conf().path().install_bin())));
|
||||
});
|
||||
run_tool(process_runner(process()
|
||||
.binary(publish)
|
||||
.stderr_level(context::level::trace)
|
||||
.arg(conf().path().install_bin())));
|
||||
}
|
||||
|
||||
msbuild ncc::create_msbuild_tool(msbuild::ops o)
|
||||
|
||||
+28
-38
@@ -26,60 +26,50 @@ fs::path nmm::source_path()
|
||||
|
||||
void nmm::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
});
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
}
|
||||
|
||||
void nmm::do_fetch()
|
||||
{
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("Nexus-Mods", "Nexus-Mod-Manager"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
|
||||
run_tool(nuget(source_path() / "NexusClient.sln"));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("Nexus-Mods", "Nexus-Mod-Manager"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
|
||||
run_tool(nuget(source_path() / "NexusClient.sln"));
|
||||
}
|
||||
|
||||
void nmm::do_build_and_install()
|
||||
{
|
||||
instrument<times::build>([&]
|
||||
// nmm sometimes fails with files being locked
|
||||
const int max_tries = 3;
|
||||
|
||||
for (int tries=0; tries<max_tries; ++tries)
|
||||
{
|
||||
// nmm sometimes fails with files being locked
|
||||
const int max_tries = 3;
|
||||
const int exit_code = run_tool(create_msbuild_tool(
|
||||
msbuild::build, msbuild::allow_failure));
|
||||
|
||||
for (int tries=0; tries<max_tries; ++tries)
|
||||
{
|
||||
const int exit_code = run_tool(create_msbuild_tool(
|
||||
msbuild::build, msbuild::allow_failure));
|
||||
|
||||
if (exit_code == 0)
|
||||
return;
|
||||
|
||||
cx().debug(context::generic,
|
||||
"msbuild multiprocess sometimes fails with nmm because of race "
|
||||
"conditions; trying again");
|
||||
}
|
||||
if (exit_code == 0)
|
||||
return;
|
||||
|
||||
cx().debug(context::generic,
|
||||
"msbuild multiprocess has failed more than {} times for nmm, "
|
||||
"restarting one last time single process; that one should work",
|
||||
max_tries);
|
||||
"msbuild multiprocess sometimes fails with nmm because of race "
|
||||
"conditions; trying again");
|
||||
}
|
||||
|
||||
run_tool(create_msbuild_tool(msbuild::build, msbuild::single_job));
|
||||
});
|
||||
cx().debug(context::generic,
|
||||
"msbuild multiprocess has failed more than {} times for nmm, "
|
||||
"restarting one last time single process; that one should work",
|
||||
max_tries);
|
||||
|
||||
run_tool(create_msbuild_tool(msbuild::build, msbuild::single_job));
|
||||
}
|
||||
|
||||
msbuild nmm::create_msbuild_tool(msbuild::ops o, msbuild::flags_t f)
|
||||
|
||||
+33
-60
@@ -37,26 +37,23 @@ fs::path openssl::bin_path()
|
||||
|
||||
void openssl::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (prebuilt())
|
||||
{
|
||||
if (prebuilt())
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
}
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
}
|
||||
|
||||
if (is_any_set(c, clean::reextract|clean::reconfigure|clean::rebuild))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (is_any_set(c, clean::reextract|clean::reconfigure|clean::rebuild))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void openssl::do_fetch()
|
||||
@@ -79,65 +76,41 @@ void openssl::fetch_prebuilt()
|
||||
{
|
||||
cx().trace(context::generic, "using prebuilt openssl");
|
||||
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(prebuilt_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(prebuilt_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void openssl::fetch_from_source()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void openssl::build_and_install_prebuilt()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
copy_files();
|
||||
});
|
||||
copy_files();
|
||||
}
|
||||
|
||||
void openssl::build_and_install_from_source()
|
||||
{
|
||||
instrument<times::configure>([&]
|
||||
{
|
||||
if (fs::exists(source_path() / "makefile"))
|
||||
cx().trace(context::bypass, "openssl already configured");
|
||||
else
|
||||
configure();
|
||||
});
|
||||
if (fs::exists(source_path() / "makefile"))
|
||||
cx().trace(context::bypass, "openssl already configured");
|
||||
else
|
||||
configure();
|
||||
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
install_engines();
|
||||
});
|
||||
install_engines();
|
||||
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "ms" / "applink.c",
|
||||
include_path());
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "ms" / "applink.c",
|
||||
include_path());
|
||||
|
||||
copy_files();
|
||||
});
|
||||
copy_files();
|
||||
}
|
||||
|
||||
void openssl::configure()
|
||||
|
||||
+45
-69
@@ -37,36 +37,33 @@ fs::path pyqt::build_path()
|
||||
|
||||
void pyqt::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (prebuilt())
|
||||
{
|
||||
if (prebuilt())
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
}
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(source_url(), downloader::clean));
|
||||
}
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!prebuilt())
|
||||
if (!prebuilt())
|
||||
{
|
||||
if (is_set(c, clean::rebuild))
|
||||
{
|
||||
if (is_set(c, clean::rebuild))
|
||||
{
|
||||
op::delete_file(cx(),
|
||||
conf().path().cache() / sip_install_file(),
|
||||
op::optional);
|
||||
}
|
||||
op::delete_file(cx(),
|
||||
conf().path().cache() / sip_install_file(),
|
||||
op::optional);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void pyqt::do_fetch()
|
||||
@@ -87,68 +84,47 @@ void pyqt::do_build_and_install()
|
||||
|
||||
void pyqt::fetch_prebuilt()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(prebuilt_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(prebuilt_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void pyqt::build_and_install_prebuilt()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
source_path() / "*",
|
||||
python::source_path(),
|
||||
op::copy_files|op::copy_dirs);
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
source_path() / "*",
|
||||
python::source_path(),
|
||||
op::copy_files|op::copy_dirs);
|
||||
|
||||
copy_files();
|
||||
});
|
||||
copy_files();
|
||||
}
|
||||
|
||||
void pyqt::fetch_from_source()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(source_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(source_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void pyqt::build_and_install_from_source()
|
||||
{
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool(pip(pip::install)
|
||||
.package("PyQt-builder")
|
||||
.version(builder_version()));
|
||||
run_tool(pip(pip::install)
|
||||
.package("PyQt-builder")
|
||||
.version(builder_version()));
|
||||
|
||||
run_tool(patcher()
|
||||
.task(name())
|
||||
.file("builder.py.manual_patch")
|
||||
.root(python::site_packages_path() / "pyqtbuild"));
|
||||
run_tool(patcher()
|
||||
.task(name())
|
||||
.file("builder.py.manual_patch")
|
||||
.root(python::site_packages_path() / "pyqtbuild"));
|
||||
|
||||
sip_build();
|
||||
});
|
||||
sip_build();
|
||||
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
install_sip_file();
|
||||
copy_files();
|
||||
});
|
||||
install_sip_file();
|
||||
copy_files();
|
||||
}
|
||||
|
||||
void pyqt::sip_build()
|
||||
|
||||
+42
-66
@@ -65,32 +65,29 @@ fs::path python::build_path()
|
||||
|
||||
void python::do_clean(clean c)
|
||||
{
|
||||
instrument<times::clean>([&]
|
||||
if (prebuilt())
|
||||
{
|
||||
if (prebuilt())
|
||||
{
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
if (is_set(c, clean::redownload))
|
||||
run_tool(downloader(prebuilt_url(), downloader::clean));
|
||||
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (is_set(c, clean::reextract))
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
cx().trace(context::reextract, "deleting {}", source_path());
|
||||
op::delete_directory(cx(), source_path(), op::optional);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_set(c, clean::reclone))
|
||||
{
|
||||
git_wrap::delete_directory(cx(), source_path());
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_set(c, clean::rebuild))
|
||||
run_tool(create_msbuild_tool(msbuild::clean));
|
||||
}
|
||||
}
|
||||
|
||||
void python::do_fetch()
|
||||
@@ -111,68 +108,47 @@ void python::do_build_and_install()
|
||||
|
||||
void python::fetch_prebuilt()
|
||||
{
|
||||
const auto file = instrument<times::fetch>([&]
|
||||
{
|
||||
return run_tool(downloader(prebuilt_url()));
|
||||
});
|
||||
const auto file = run_tool(downloader(prebuilt_url()));
|
||||
|
||||
instrument<times::extract>([&]
|
||||
{
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
});
|
||||
run_tool(extractor()
|
||||
.file(file)
|
||||
.output(source_path()));
|
||||
}
|
||||
|
||||
void python::build_and_install_prebuilt()
|
||||
{
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
openssl::bin_path() / "*.dll",
|
||||
python::build_path(),
|
||||
op::copy_files);
|
||||
op::copy_glob_to_dir_if_better(cx(),
|
||||
openssl::bin_path() / "*.dll",
|
||||
python::build_path(),
|
||||
op::copy_files);
|
||||
|
||||
install_pip();
|
||||
copy_files();
|
||||
});
|
||||
install_pip();
|
||||
copy_files();
|
||||
}
|
||||
|
||||
void python::fetch_from_source()
|
||||
{
|
||||
instrument<times::fetch>([&]
|
||||
{
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("python", "cpython"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
});
|
||||
run_tool(task_conf().make_git()
|
||||
.url(task_conf().make_git_url("python", "cpython"))
|
||||
.branch(version())
|
||||
.root(source_path()));
|
||||
|
||||
instrument<times::configure>([&]
|
||||
{
|
||||
run_tool(vs(vs::upgrade)
|
||||
.solution(solution_file()));
|
||||
});
|
||||
run_tool(vs(vs::upgrade)
|
||||
.solution(solution_file()));
|
||||
}
|
||||
|
||||
void python::build_and_install_from_source()
|
||||
{
|
||||
instrument<times::build>([&]
|
||||
{
|
||||
run_tool(create_msbuild_tool());
|
||||
package();
|
||||
});
|
||||
run_tool(create_msbuild_tool());
|
||||
package();
|
||||
|
||||
instrument<times::install>([&]
|
||||
{
|
||||
install_pip();
|
||||
install_pip();
|
||||
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "PC" / "pyconfig.h",
|
||||
include_path());
|
||||
op::copy_file_to_dir_if_better(cx(),
|
||||
source_path() / "PC" / "pyconfig.h",
|
||||
include_path());
|
||||
|
||||
copy_files();
|
||||
});
|
||||
copy_files();
|
||||
}
|
||||
|
||||
void python::package()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user