Update for new Entry class.

This commit is contained in:
XMRig 2021-09-03 23:34:53 +07:00
parent 26819f01e1
commit d7a6aaadea
No known key found for this signature in database
GPG key ID: 446A53638BE94409
7 changed files with 48 additions and 55 deletions

View file

@ -19,6 +19,12 @@
#include "App.h"
#include "base/kernel/Entry.h"
#include "base/kernel/Process.h"
#include "core/config/usage.h"
#ifdef XMRIG_FEATURE_OPENCL
# include "backend/opencl/wrappers/OclPlatform.h"
#endif
int main(int argc, char **argv)
@ -26,9 +32,18 @@ int main(int argc, char **argv)
using namespace xmrig;
Process process(argc, argv);
const auto entry = Entry::get();
if (entry) {
return Entry::exec(entry);
{
int rc = 0;
auto entry = std::make_unique<Entry>(usage);
# ifdef XMRIG_FEATURE_OPENCL
entry->add(OclPlatform::printPlatforms);
# endif
if (entry->exec(rc)) {
return rc;
}
}
App app;