mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
add flags for plugins using nuget package
This commit is contained in:
@@ -111,6 +111,7 @@ void add_tasks()
|
||||
.add_task<mo>("modorganizer-installer_quick")
|
||||
.add_task<mo>("modorganizer-installer_fomod")
|
||||
.add_task<mo>("modorganizer-installer_fomod_csharp")
|
||||
.add_task<mo>("modorganizer-installer_omod", mo::nuget)
|
||||
.add_task<mo>("modorganizer-installer_ncc")
|
||||
.add_task<mo>("modorganizer-bsa_extractor")
|
||||
.add_task<mo>("modorganizer-plugin_python")
|
||||
|
||||
@@ -54,6 +54,11 @@ 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 {};
|
||||
@@ -146,6 +151,15 @@ void modorganizer::do_build_and_install()
|
||||
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());
|
||||
|
||||
+3
-1
@@ -288,7 +288,8 @@ public:
|
||||
enum flags
|
||||
{
|
||||
noflags = 0x00,
|
||||
gamebryo = 0x01
|
||||
gamebryo = 0x01,
|
||||
nuget = 0x02,
|
||||
};
|
||||
|
||||
modorganizer(std::string name, flags f=noflags);
|
||||
@@ -306,6 +307,7 @@ public:
|
||||
|
||||
bool is_super() const override;
|
||||
bool is_gamebryo_plugin() const;
|
||||
bool is_nuget_plugin() const;
|
||||
|
||||
url git_url() const;
|
||||
std::string org() const;
|
||||
|
||||
Reference in New Issue
Block a user