Commit 6bc818e5 authored by ElenaSubbotina's avatar ElenaSubbotina

fix errors linux build

parent 1fb27ca9
#-------------------------------------------------
#
# Project created by QtCreator 2014-10-10T14:24:04
#
#-------------------------------------------------
QT -= core gui
TARGET = ASCOfficeDocxFile2Lib
TEMPLATE = lib
CONFIG += staticlib
CONFIG += c++11
win32 {
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
CONFIG(debug, debug|release) {
QMAKE_CXXFLAGS += /bigobj
}
} else {
QMAKE_CXXFLAGS += -std=c++11 -Wall -Wno-ignored-qualifiers
}
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../../build/lib
# WINDOWS
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_64/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_64
}
}
win32:!contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_32/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_32
}
}
linux-g++ | linux-g++-64 | linux-g++-32:contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_64
}
linux-g++ | linux-g++-64 | linux-g++-32:!contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_32
}
mac {
DESTDIR = $$DESTINATION_SDK_PATH/mac_64
}
############### destination path ###############
DEFINES += UNICODE \
_UNICODE \
NODOCX \
_USE_XMLLITE_READER_ \
USE_LITE_READER \
USE_ATL_CSTRING \
USE_AVSOFFICESTUDIO_XMLUTILS \
SOLUTION_ASCOFFICEDOCXFILE2 \
#DISABLE_FILE_DOWNLOADER \
_USE_LIBXML2_READER_ \
LIBXML_READER_ENABLED
INCLUDEPATH += \
../../DesktopEditor/freetype-2.5.2/include
#################### WINDOWS #####################
win32 {
INCLUDEPATH += ../../Common/DocxFormat/Source/XML/libxml2/XML/include
}
#################### WINDOWS #####################
#################### LINUX ########################
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT
INCLUDEPATH += /usr/include/libxml2
}
mac {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT \
_MAC \
MAC
INCLUDEPATH += ../../DesktopEditor/xml/libxml2/include
}
#################### LINUX ########################
SOURCES += ../DocWrapper/DocxSerializer.cpp \
../DocWrapper/FontProcessor.cpp \
../DocWrapper/XlsxSerializer.cpp \
../../XlsxSerializerCom/Common/Common.cpp \
../../XlsxSerializerCom/Reader/ChartFromToBinary.cpp \
../../XlsxSerializerCom/Reader/CommonWriter.cpp \
../../XlsxSerializerCom/Reader/CSVReader.cpp \
../../XlsxSerializerCom/Writer/CSVWriter.cpp \
../DocWrapper/ChartWriter.cpp
HEADERS += ../DocWrapper/DocxSerializer.h \
../DocWrapper/FontProcessor.h \
../DocWrapper/XlsxSerializer.h \
../BinReader/ChartWriter.h \
../BinReader/CommentsWriter.h \
../BinReader/ContentTypesWriter.h \
../BinReader/DocumentRelsWriter.h \
../BinReader/DocumentWriter.h \
../BinReader/FileWriter.h \
../BinReader/fontTableWriter.h \
../BinReader/HeaderFooterWriter.h \
../BinReader/MediaWriter.h \
../BinReader/NumberingWriter.h \
../BinReader/ReaderClasses.h \
../BinReader/Readers.h \
../BinReader/SettingWriter.h \
../BinReader/StylesWriter.h \
../BinWriter/BinEquationWriter.h \
../BinWriter/BinReaderWriterDefines.h \
../BinWriter/BinWriters.h \
../../XlsxSerializerCom/Common/BinReaderWriterDefines.h \
../../XlsxSerializerCom/Common/Common.h \
../../XlsxSerializerCom/Reader/BinaryWriter.h \
../../XlsxSerializerCom/Reader/ChartFromToBinary.h \
../../XlsxSerializerCom/Reader/CommonWriter.h \
../../XlsxSerializerCom/Reader/CSVReader.h \
../../XlsxSerializerCom/Writer/BinaryCommonReader.h \
../../XlsxSerializerCom/Writer/BinaryReader.h \
../../XlsxSerializerCom/Writer/CSVWriter.h \
../BinReader/webSettingsWriter.h \
../../Common/FileDownloader/FileDownloader.h \
../BinReader/DefaultThemeWriter.h \
../DocWrapper/ChartWriter.h
unix {
target.path = /usr/lib
INSTALLS += target
}
#-------------------------------------------------
#
# Project created by QtCreator 2014-10-10T14:24:04
#
#-------------------------------------------------
QT -= core gui
TARGET = ASCOfficeDocxFile2Lib
TEMPLATE = lib
CONFIG += staticlib
CONFIG += c++11
win32 {
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
CONFIG(debug, debug|release) {
QMAKE_CXXFLAGS += /bigobj
}
} else {
QMAKE_CXXFLAGS += -std=c++11 -Wall -Wno-ignored-qualifiers
}
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../../build/lib
# WINDOWS
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_64/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_64
}
}
win32:!contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_32/DEBUG
} else {
DESTDIR = $$DESTINATION_SDK_PATH/win_32
}
}
linux-g++ | linux-g++-64 | linux-g++-32:contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_64
}
linux-g++ | linux-g++-64 | linux-g++-32:!contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_32
}
mac {
DESTDIR = $$DESTINATION_SDK_PATH/mac_64
}
############### destination path ###############
DEFINES += UNICODE \
_UNICODE \
NODOCX \
_USE_XMLLITE_READER_ \
USE_LITE_READER \
USE_ATL_CSTRING \
USE_AVSOFFICESTUDIO_XMLUTILS \
SOLUTION_ASCOFFICEDOCXFILE2 \
#DISABLE_FILE_DOWNLOADER \
_USE_LIBXML2_READER_ \
LIBXML_READER_ENABLED
INCLUDEPATH += \
../../DesktopEditor/freetype-2.5.2/include
#################### WINDOWS #####################
win32 {
INCLUDEPATH += ../../Common/DocxFormat/Source/XML/libxml2/XML/include
}
#################### WINDOWS #####################
#################### LINUX ########################
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT
INCLUDEPATH += /usr/include/libxml2
}
mac {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT \
_MAC \
MAC
INCLUDEPATH += ../../DesktopEditor/xml/libxml2/include
}
#################### LINUX ########################
SOURCES += ../DocWrapper/DocxSerializer.cpp \
../DocWrapper/FontProcessor.cpp \
../DocWrapper/XlsxSerializer.cpp \
../../XlsxSerializerCom/Common/Common.cpp \
../../XlsxSerializerCom/Reader/ChartFromToBinary.cpp \
../../XlsxSerializerCom/Reader/CommonWriter.cpp \
../../XlsxSerializerCom/Reader/CSVReader.cpp \
../../XlsxSerializerCom/Writer/CSVWriter.cpp \
../DocWrapper/ChartWriter.cpp \
../../OfficeCryptReader/source/ECMACryptReader.cpp \
../../OfficeCryptReader/source/CryptTransform.cpp
HEADERS += ../DocWrapper/DocxSerializer.h \
../DocWrapper/FontProcessor.h \
../DocWrapper/XlsxSerializer.h \
../BinReader/ChartWriter.h \
../BinReader/CommentsWriter.h \
../BinReader/ContentTypesWriter.h \
../BinReader/DocumentRelsWriter.h \
../BinReader/DocumentWriter.h \
../BinReader/FileWriter.h \
../BinReader/fontTableWriter.h \
../BinReader/HeaderFooterWriter.h \
../BinReader/MediaWriter.h \
../BinReader/NumberingWriter.h \
../BinReader/ReaderClasses.h \
../BinReader/Readers.h \
../BinReader/SettingWriter.h \
../BinReader/StylesWriter.h \
../BinWriter/BinEquationWriter.h \
../BinWriter/BinReaderWriterDefines.h \
../BinWriter/BinWriters.h \
../../XlsxSerializerCom/Common/BinReaderWriterDefines.h \
../../XlsxSerializerCom/Common/Common.h \
../../XlsxSerializerCom/Reader/BinaryWriter.h \
../../XlsxSerializerCom/Reader/ChartFromToBinary.h \
../../XlsxSerializerCom/Reader/CommonWriter.h \
../../XlsxSerializerCom/Reader/CSVReader.h \
../../XlsxSerializerCom/Writer/BinaryCommonReader.h \
../../XlsxSerializerCom/Writer/BinaryReader.h \
../../XlsxSerializerCom/Writer/CSVWriter.h \
../BinReader/webSettingsWriter.h \
../../Common/FileDownloader/FileDownloader.h \
../BinReader/DefaultThemeWriter.h \
../DocWrapper/ChartWriter.h \
../../OfficeCryptReader/source/ECMACryptReader.h \
../../OfficeCryptReader/source/CryptTransform.h
unix {
target.path = /usr/lib
INSTALLS += target
}
......@@ -197,7 +197,8 @@ _buf GenerateKey(_buf & salt, _buf & password, _buf & blockKey, int hashSize, in
for (int i = 0; i < spin; i++)
{
pHashBuf = HashAppend(_buf((unsigned char*)&i, 4, false), pHashBuf, algorithm);
_buf iterator((unsigned char*)&i, 4, false);
pHashBuf = HashAppend(iterator, pHashBuf, algorithm);
}
pHashBuf = HashAppend(pHashBuf, blockKey, algorithm);
......@@ -243,7 +244,8 @@ bool ECMADecryptor::SetPassword(std::wstring password_)
DecryptAES(verifierInputKey, pSalt, pEncVerInput, decryptedVerifierHashInputBytes);
//--------------------------------------------
_buf hashBuf = HashAppend(decryptedVerifierHashInputBytes, _buf(), cryptData.hashAlgorithm);
_buf empty(NULL,0,false);
_buf hashBuf = HashAppend(decryptedVerifierHashInputBytes, empty, cryptData.hashAlgorithm);
//--------------------------------------------
_buf decryptedVerifierHashBytes;
......@@ -299,4 +301,4 @@ void ECMADecryptor::Decrypt(unsigned char* data_inp, int size, unsigned char*&
pos += sz; i++;
}
}
\ No newline at end of file
}
......@@ -241,7 +241,7 @@ bool ECMACryptReader::DecryptOfficeFile(std::wstring file_name_inp, std::wstring
if (data_out)
{
NSFile::CFileBinary f;
f.CreateFile(file_name_out);
f.CreateFileW(file_name_out);
f.WriteFile(data_out, lengthData);
f.CloseFile();
......
......@@ -253,6 +253,7 @@ linux-g++ | linux-g++-64 | linux-g++-32 {
LIBS += -lz
LIBS += -lxml2
LIBS += -lcurl
LIBS += -lcrypto++
}
mac {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment