mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
kill msbuild
This commit is contained in:
@@ -245,6 +245,9 @@ clipp::group build_command::do_group()
|
||||
(clipp::option("-n", "--new") >> clean_)
|
||||
% "deletes everything and starts from scratch",
|
||||
|
||||
(clipp::option("--keep-msbuild") >> keep_msbuild_)
|
||||
% "don't terminate msbuild.exe instances after building",
|
||||
|
||||
(clipp::opt_values(
|
||||
clipp::match::prefix_not("-"), "task", tasks_))
|
||||
% "tasks to run; specify 'super' to only build modorganizer "
|
||||
@@ -274,6 +277,9 @@ int build_command::do_run()
|
||||
else
|
||||
run_all_tasks();
|
||||
|
||||
if (!keep_msbuild_)
|
||||
terminate_msbuild();
|
||||
|
||||
mob::gcx().info(mob::context::generic, "mob done");
|
||||
return 0;
|
||||
}
|
||||
@@ -284,6 +290,14 @@ int build_command::do_run()
|
||||
}
|
||||
}
|
||||
|
||||
void build_command::terminate_msbuild()
|
||||
{
|
||||
if (conf::dry())
|
||||
return;
|
||||
|
||||
system("taskkill /im msbuild.exe /f > NUL");
|
||||
}
|
||||
|
||||
|
||||
clipp::group list_command::do_group()
|
||||
{
|
||||
|
||||
@@ -103,6 +103,9 @@ private:
|
||||
bool reextract_ = false;
|
||||
bool rebuild_ = false;
|
||||
bool clean_ = false;
|
||||
bool keep_msbuild_ = false;
|
||||
|
||||
void terminate_msbuild();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user