Skip to content

Commit

Permalink
In explicit (single plugin via cmake config) mode, include UI (#194)
Browse files Browse the repository at this point in the history
do this by still making a name etc... but skipping the if in the
explicit single-plugin mode.
  • Loading branch information
baconpaul authored Nov 4, 2023
1 parent 26e4876 commit 63ca9d8
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions src/detail/auv2/build-helper/build-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace fs = ghc::filesystem;
struct auInfo
{
std::string name, vers, type, subt, manu, manunm, clapid, desc, clapname;
bool explicitMode{false};

const std::string factoryBase{"wrapAsAUV2_inst"};

Expand Down Expand Up @@ -169,6 +170,7 @@ int main(int argc, char **argv)
}
int idx = 2;
auInfo u;
u.explicitMode = true;
u.name = std::string(argv[idx++]);
u.clapname = u.name;
u.vers = std::string(argv[idx++]);
Expand Down Expand Up @@ -357,7 +359,17 @@ int main(int argc, char **argv)
idx = 0;
for (const auto &u : units)
{
auto strcid = u.clapid;
std::string strcid;

if (u.explicitMode)
{
strcid = u.name + " " + u.type + " " + u.subt + " " + u.manunm + " " + u.manu;
}
else
{
strcid = u.clapid;
}

for (auto &c : strcid)
{
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'A') || (c >= '0' && c <= '9'))
Expand All @@ -382,9 +394,16 @@ int main(int argc, char **argv)
cppf << "#undef CLAP_WRAPPER_TIMER_CALLBACK" << std::endl;
cppf << "#undef CLAP_WRAPPER_FILL_AUCV" << std::endl;

fillOSS << "\n if (strcmp(_plugin->_plugin->desc->id,\"" << u.clapid << "\") == 0) {\n";
fillOSS << " return fillAUCV_" << on << "(viewInfo);\n";
fillOSS << " }\n";
if (u.explicitMode)
{
fillOSS << " return fillAUCV_" << on << "(viewInfo);\n";
}
else
{
fillOSS << "\n if (strcmp(_plugin->_plugin->desc->id,\"" << u.clapid << "\") == 0) {\n";
fillOSS << " return fillAUCV_" << on << "(viewInfo);\n";
fillOSS << " }\n";
}
}
idx++;
}
Expand Down

0 comments on commit 63ca9d8

Please sign in to comment.