#5657 Removed serial key code from syntool
This commit is contained in:
parent
4be9fc1800
commit
82e55702ef
|
@ -201,22 +201,6 @@ ArgParser::parseToolArgs(ToolArgs& args, int argc, const char* const* argv)
|
|||
args.m_getArch = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(i, argc, argv, NULL, "--subscription-serial", 1)) {
|
||||
args.m_subscriptionSerial = argv[++i];
|
||||
if (args.m_subscriptionSerial.empty()) {
|
||||
LOG((CLOG_CRIT "subscription error: serial was not provided"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (isArg(i, argc, argv, NULL, "--get-subscription-filename", 0)) {
|
||||
args.m_getSubscriptionFilename = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(i, argc, argv, NULL, "--check-subscription", 0)) {
|
||||
args.m_checkSubscription = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(i, argc, argv, NULL, "--notify-activation", 0)) {
|
||||
args.m_notifyActivation = true;
|
||||
return true;
|
||||
|
|
|
@ -81,36 +81,6 @@ ToolApp::run(int argc, char** argv)
|
|||
else if (m_args.m_getArch) {
|
||||
std::cout << ARCH->getPlatformName() << std::endl;
|
||||
}
|
||||
else if (!m_args.m_subscriptionSerial.empty()) {
|
||||
try {
|
||||
SubscriptionManager subscriptionManager;
|
||||
subscriptionManager.activate(m_args.m_subscriptionSerial);
|
||||
}
|
||||
catch (XSubscription& e) {
|
||||
LOG((CLOG_CRIT "subscription error: %s", e.what()));
|
||||
return kExitSubscription;
|
||||
}
|
||||
}
|
||||
else if (m_args.m_getSubscriptionFilename) {
|
||||
try {
|
||||
SubscriptionManager subscriptionManager;
|
||||
subscriptionManager.printFilename();
|
||||
}
|
||||
catch (XSubscription& e) {
|
||||
LOG((CLOG_CRIT "subscription error: %s", e.what()));
|
||||
return kExitSubscription;
|
||||
}
|
||||
}
|
||||
else if (m_args.m_checkSubscription) {
|
||||
try {
|
||||
SubscriptionManager subscriptionManager;
|
||||
subscriptionManager.checkFile("");
|
||||
}
|
||||
catch (XSubscription& e) {
|
||||
LOG((CLOG_CRIT "subscription error: %s", e.what()));
|
||||
return kExitSubscription;
|
||||
}
|
||||
}
|
||||
else if (m_args.m_notifyActivation) {
|
||||
notifyActivation();
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@ ToolArgs::ToolArgs() :
|
|||
m_getInstalledDir(false),
|
||||
m_getProfileDir(false),
|
||||
m_getArch(false),
|
||||
m_getSubscriptionFilename(false),
|
||||
m_checkSubscription(false),
|
||||
m_notifyActivation(false),
|
||||
m_subscriptionSerial()
|
||||
m_notifyActivation(false)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -29,8 +29,5 @@ public:
|
|||
bool m_getInstalledDir;
|
||||
bool m_getProfileDir;
|
||||
bool m_getArch;
|
||||
bool m_getSubscriptionFilename;
|
||||
bool m_checkSubscription;
|
||||
bool m_notifyActivation;
|
||||
String m_subscriptionSerial;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue