ui: fixed naming of 64 bit windows path detector
* also removed LibLincense dependencies on Lib because they are linked the other way round
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
#include "utility/logging/logging.h"
|
#include "utility/logging/logging.h"
|
||||||
|
|
||||||
CxxVsHeaderPathDetector::CxxVsHeaderPathDetector(int version, bool isExpress, ApplicationArchitectureType architecture)
|
CxxVsHeaderPathDetector::CxxVsHeaderPathDetector(int version, bool isExpress, ApplicationArchitectureType architecture)
|
||||||
: PathDetector("Visual Studio " + std::to_string(version) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? "64 Bit" : ""))
|
: PathDetector("Visual Studio " + std::to_string(version) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? " 64 Bit" : ""))
|
||||||
, m_version(version)
|
, m_version(version)
|
||||||
, m_isExpress(isExpress)
|
, m_isExpress(isExpress)
|
||||||
, m_architecture(architecture)
|
, m_architecture(architecture)
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ std::string License::getLicenseTypeLine() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint License::getSeats() const
|
unsigned int License::getSeats() const
|
||||||
{
|
{
|
||||||
std::string licenseTypeLine = getLicenseTypeLine();
|
std::string licenseTypeLine = getLicenseTypeLine();
|
||||||
std::size_t found = licenseTypeLine.find(":");
|
std::size_t found = licenseTypeLine.find(":");
|
||||||
@@ -171,7 +171,7 @@ int License::getTimeLeft() const
|
|||||||
|
|
||||||
void License::create(
|
void License::create(
|
||||||
const std::string& user, const std::string& version,
|
const std::string& user, const std::string& version,
|
||||||
Botan::RSA_PrivateKey* privateKey, const std::string& type, const uint seats)
|
Botan::RSA_PrivateKey* privateKey, const std::string& type, const unsigned int seats)
|
||||||
{
|
{
|
||||||
m_version = version;
|
m_version = version;
|
||||||
if (seats > 0)
|
if (seats > 0)
|
||||||
@@ -392,7 +392,7 @@ bool License::loadPublicKeyFromFile(const std::string& filename)
|
|||||||
if(boost::filesystem::exists(getPublicKeyFilename()))
|
if(boost::filesystem::exists(getPublicKeyFilename()))
|
||||||
{
|
{
|
||||||
Botan::RSA_PublicKey *rsaPublicKey = dynamic_cast<Botan::RSA_PublicKey *>(Botan::X509::load_key(getPublicKeyFilename()));
|
Botan::RSA_PublicKey *rsaPublicKey = dynamic_cast<Botan::RSA_PublicKey *>(Botan::X509::load_key(getPublicKeyFilename()));
|
||||||
|
|
||||||
if (!rsaPublicKey)
|
if (!rsaPublicKey)
|
||||||
{
|
{
|
||||||
std::cout << "The loaded key is not a RSA key" << std::endl;
|
std::cout << "The loaded key is not a RSA key" << std::endl;
|
||||||
@@ -416,8 +416,8 @@ bool License::loadPublicKeyFromString(const std::string& publicKey)
|
|||||||
|
|
||||||
Botan::DataSource_Memory in(publicKey);
|
Botan::DataSource_Memory in(publicKey);
|
||||||
Botan::RSA_PublicKey *rsaPublicKey = dynamic_cast<Botan::RSA_PublicKey *>(Botan::X509::load_key(in));
|
Botan::RSA_PublicKey *rsaPublicKey = dynamic_cast<Botan::RSA_PublicKey *>(Botan::X509::load_key(in));
|
||||||
|
|
||||||
if (!rsaPublicKey)
|
if (!rsaPublicKey)
|
||||||
{
|
{
|
||||||
std::cout << "The loaded key is not a RSA key" << std::endl;
|
std::cout << "The loaded key is not a RSA key" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
@@ -486,7 +486,7 @@ std::string License::getLicenseEncodedString(const std::string& applicationLocat
|
|||||||
|
|
||||||
fileContents.insert(fileContents.end(), filebuffer, filebuffer + got);
|
fileContents.insert(fileContents.end(), filebuffer, filebuffer + got);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fileContents.size() <= 0)
|
if(fileContents.size() <= 0)
|
||||||
{
|
{
|
||||||
std::cout << "Failed to read licence string" << std::endl;
|
std::cout << "Failed to read licence string" << std::endl;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public:
|
|||||||
|
|
||||||
std::string getPublicKeyFilename() const;
|
std::string getPublicKeyFilename() const;
|
||||||
std::string getVersion() const;
|
std::string getVersion() const;
|
||||||
uint getSeats() const;
|
unsigned int getSeats() const;
|
||||||
|
|
||||||
/// if Test License return >=0 or -1 if expired
|
/// if Test License return >=0 or -1 if expired
|
||||||
/// for non Test License -2
|
/// for non Test License -2
|
||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
void create(
|
void create(
|
||||||
const std::string& user, const std::string& version,
|
const std::string& user, const std::string& version,
|
||||||
Botan::RSA_PrivateKey* privateKey, const std::string& type="Private License",
|
Botan::RSA_PrivateKey* privateKey, const std::string& type="Private License",
|
||||||
const uint seats = 0
|
const unsigned int seats = 0
|
||||||
);
|
);
|
||||||
|
|
||||||
std::string getLicenseString() const;
|
std::string getLicenseString() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user