logic: Added Non-Commercial Use option and removed trial mode
* Added non-commercial use option to enter license window * Show enter license window on first start and force license selection * Added ApplicationSettings migration that removed private/academic license and switches user to non-commercial mode * Added commandline option to choose non-commercial use and provide better hints to license selection * Removed trial mode fortune cookie message = A secret admirer will soon send you a sign of affection.
This commit is contained in:
@@ -111,7 +111,7 @@ void CommandConfig::setup()
|
||||
("global-framework-search-paths,F", po::value<std::vector<std::string>>(),
|
||||
"Global include paths (once per path or comma separated)")
|
||||
("show,s", "displays all settings")
|
||||
;
|
||||
("non-commercial-use", po::value<bool>(), "Enable non-commercial use. <true/false>");
|
||||
|
||||
m_options.add(options);
|
||||
}
|
||||
@@ -142,9 +142,6 @@ void CommandConfig::printSettings(ApplicationSettings* settings)
|
||||
printVector("global-header-search-paths", settings->getHeaderSearchPaths());
|
||||
printVector("global-framework-search-paths", settings->getFrameworkSearchPaths());
|
||||
printVector("jre-system-library-paths", settings->getJreSystemLibraryPaths());
|
||||
License license;
|
||||
license.loadFromEncodedString(settings->getLicenseString(), AppPath::getAppPath());
|
||||
std::cout << "\nValid license: " << license.isValid() << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -205,6 +202,8 @@ ReturnStatus CommandConfig::parse(std::vector<std::string>& args)
|
||||
parseAndSetValue(&ApplicationSettings::setHeaderSearchPaths, "global-header-search-paths", settings, vm);
|
||||
parseAndSetValue(&ApplicationSettings::setFrameworkSearchPaths, "global-framework-search-paths", settings, vm);
|
||||
|
||||
parseAndSetValue(&ApplicationSettings::setNonCommercialUse, "non-commercial-use", settings, vm);
|
||||
|
||||
// license
|
||||
if (vm.count("license-string") || vm.count("license-file") )
|
||||
{
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef MESSAGE_DISPATCH_WHEN_LICENSE_VALID_H
|
||||
#define MESSAGE_DISPATCH_WHEN_LICENSE_VALID_H
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
class MessageDispatchWhenLicenseValid
|
||||
: public Message<MessageDispatchWhenLicenseValid>
|
||||
{
|
||||
public:
|
||||
MessageDispatchWhenLicenseValid(std::shared_ptr<MessageBase> content)
|
||||
: content(content)
|
||||
{
|
||||
}
|
||||
|
||||
static const std::string getStaticType()
|
||||
{
|
||||
return "MessageDispatchWhenLicenseValid";
|
||||
}
|
||||
|
||||
std::shared_ptr<MessageBase> content;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_DISPATCH_WHEN_LICENSE_VALID_H
|
||||
@@ -1,14 +1,15 @@
|
||||
#ifndef MESSAGE_FORCE_ENTER_LICENSE_H
|
||||
#define MESSAGE_FORCE_ENTER_LICENSE_H
|
||||
|
||||
#include "LicenseChecker.h"
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
class MessageForceEnterLicense
|
||||
: public Message<MessageForceEnterLicense>
|
||||
{
|
||||
public:
|
||||
MessageForceEnterLicense(bool licenseExpired)
|
||||
: licenseExpired(licenseExpired)
|
||||
MessageForceEnterLicense(LicenseChecker::LicenseState state)
|
||||
: state(state)
|
||||
{
|
||||
setSendAsTask(false);
|
||||
}
|
||||
@@ -18,7 +19,7 @@ public:
|
||||
return "MessageForceEnterLicense";
|
||||
}
|
||||
|
||||
bool licenseExpired;
|
||||
const LicenseChecker::LicenseState state;
|
||||
};
|
||||
|
||||
#endif // MESSAGE_FORCE_ENTER_LICENSE_H
|
||||
|
||||
Reference in New Issue
Block a user