uprava souboru
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "pugixml.hpp"
|
#include "pugixml.hpp"
|
||||||
|
|
||||||
|
|
||||||
#define CID_LENGTH 32
|
#define CID_LENGTH 32
|
||||||
#define CSD_LENGTH 32
|
#define CSD_LENGTH 32
|
||||||
|
|
||||||
@@ -60,8 +59,13 @@ PlcLicence::PlcLicence()
|
|||||||
/// @param dataFileName
|
/// @param dataFileName
|
||||||
void PlcLicence::processConfigFile(string &dataFileName)
|
void PlcLicence::processConfigFile(string &dataFileName)
|
||||||
{
|
{
|
||||||
|
string fullFile = getCompletePath(dataFileName);
|
||||||
|
const int fileNameLength = fullFile.length();
|
||||||
|
char fileName[fileNameLength] = {};
|
||||||
|
getCharsFromString(fullFile, fileName, fileNameLength);
|
||||||
|
|
||||||
pugi::xml_document doc;
|
pugi::xml_document doc;
|
||||||
pugi::xml_parse_result result = doc.load_file("licData.xml");
|
pugi::xml_parse_result result = doc.load_file(fileName);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
this->stationName = doc.child("data").child("station").child_value();
|
this->stationName = doc.child("data").child("station").child_value();
|
||||||
@@ -531,7 +535,7 @@ bool PlcLicence::CreateLicence()
|
|||||||
// for (int i=0;i<totalEncryptedLength;i++) cout << totalEncryptedArray[i];
|
// for (int i=0;i<totalEncryptedLength;i++) cout << totalEncryptedArray[i];
|
||||||
|
|
||||||
string fullFile = getCompletePath(licenseFileName);
|
string fullFile = getCompletePath(licenseFileName);
|
||||||
|
|
||||||
if (binaryGeneration == BinaryGenerationType::File)
|
if (binaryGeneration == BinaryGenerationType::File)
|
||||||
{
|
{
|
||||||
std::ofstream outputFile(fullFile);
|
std::ofstream outputFile(fullFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user