Commit fdbd735e authored by konovalovsergey's avatar konovalovsergey

Add X2tConverterDll.pro to build x2t as dll

parent 621acc78
#-------------------------------------------------
#
# Project created by QtCreator 2014-10-03T18:30:31
#
#-------------------------------------------------
QT -= core
QT -= gui
VERSION = 2.0.2.402
DEFINES += INTVER=$$VERSION
TARGET = x2t
CORE_ROOT_DIR = $$PWD/../../..
PWD_ROOT_DIR = $$PWD
CONFIG += core_static_link_libstd
CONFIG += core_x2t
include(../../../Common/base.pri)
include(../../../Common/3dParty/icu/icu.pri)
core_windows {
QMAKE_LFLAGS += /INCREMENTAL:NO
contains(QMAKE_TARGET.arch, x86_64):{
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.02
} else {
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
}
} else {
QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}
#CONFIG += build_for_centos6
build_for_centos6 {
QMAKE_LFLAGS += -Wl,--dynamic-linker=./ld-linux-x86-64.so.2
}
DEFINES += UNICODE \
_UNICODE \
_USE_LIBXML2_READER_ \
_USE_XMLLITE_READER_ \
USE_LITE_READER \
PPTX_DEF\
PPT_DEF\
ENABLE_PPT_TO_PPTX_CONVERT\
NODOCX \
#DISABLE_FILE_DOWNLOADER \
FILTER_FLATE_DECODE_ENABLED \
CXIMAGE_DONT_DECLARE_TCHAR \
BUILD_CONFIG_FULL_VERSION \
DONT_WRITE_EMBEDDED_FONTS \
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML \
LIBXML_READER_ENABLED
DEFINES += PDFREADER_USE_DYNAMIC_LIBRARY
DEFINES += PDFWRITER_USE_DYNAMIC_LIBRARY
DEFINES += XPS_USE_DYNAMIC_LIBRARY
DEFINES += DJVU_USE_DYNAMIC_LIBRARY
DEFINES += HTMLRENDERER_USE_DYNAMIC_LIBRARY
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
core_windows {
INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}
core_mac {
INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}
INCLUDEPATH += ../../../DesktopEditor/xml/libxml2/include
INCLUDEPATH += ../../../DesktopEditor/freetype-2.5.2/include
INCLUDEPATH += ../../../DesktopEditor/agg-2.4/include
INCLUDEPATH += $$PWD/../../../Common/DocxFormat
DEPENDPATH += $$PWD/../../../Common/DocxFormat
INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/
INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/
INCLUDEPATH += $$PWD/../../../OfficeUtils/src
DEPENDPATH += $$PWD/../../../OfficeUtils/src
INCLUDEPATH += $$PWD/../../../ASCOfficeDocxFile2
DEPENDPATH += $$PWD/../../../ASCOfficeDocxFile2
##############################################################################################################
SOURCES += ../../src/cextracttools.cpp \
../../../Common/OfficeFileFormatChecker2.cpp \
../../src/ASCConverters.cpp
HEADERS += ../../src/cextracttools.h \
../../../Common/OfficeFileFormatChecker.h \
../../src/ASCConverters.h \
../../../DesktopEditor/graphics/MetafileToGraphicsRenderer.h
#Xls file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXlsFormatLib
# odf format writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileWriterLib
# odf format reader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileReaderLib
#doc file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocFormatLib
# ppt file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPptFormatLib
#rtf file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lRtfFormatLib
#txt(xml) file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lTxtXmlFormatLib
# pdf writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfWriter
#docxfile2
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lASCOfficeDocxFile2Lib
#pptxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPPTXFormatLib
#docxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocxFormatLib
#office utils
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOfficeUtils
#graphics
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lgraphics
#doctrenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -ldoctrenderer
#HtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfReader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDjVuFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXpsFile
#HtmlFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlFile
#UnicodeConverter
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter
#Crypto++
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lCryptoPPLib
#####################################################
# внешнее подключение сторонних библиотек
#BOOST
CONFIG += core_boost_regex
include($$PWD/../../../Common/3dParty/boost/boost.pri)
core_windows {
LIBS += -lurlmon
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
}
core_linux {
LIBS += -lz
LIBS += -lxml2
LIBS += -lcurl
}
mac {
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
LIBS += -framework AppKit
}
########################################################
......@@ -4,105 +4,13 @@
#
#-------------------------------------------------
QT -= core
QT -= gui
VERSION = 2.0.2.402
DEFINES += INTVER=$$VERSION
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
TARGET = x2t
CORE_ROOT_DIR = $$PWD/../../..
PWD_ROOT_DIR = $$PWD
CONFIG += core_static_link_libstd
CONFIG += core_x2t
include(../../../Common/base.pri)
include(../../../Common/3dParty/icu/icu.pri)
core_windows {
QMAKE_LFLAGS += /INCREMENTAL:NO
contains(QMAKE_TARGET.arch, x86_64):{
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.02
} else {
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
}
} else {
QMAKE_CXXFLAGS += -Wall -Wno-ignored-qualifiers
}
#CONFIG += build_for_centos6
build_for_centos6 {
QMAKE_LFLAGS += -Wl,--dynamic-linker=./ld-linux-x86-64.so.2
}
DEFINES += UNICODE \
_UNICODE \
_USE_LIBXML2_READER_ \
_USE_XMLLITE_READER_ \
USE_LITE_READER \
PPTX_DEF\
PPT_DEF\
ENABLE_PPT_TO_PPTX_CONVERT\
NODOCX \
#DISABLE_FILE_DOWNLOADER \
FILTER_FLATE_DECODE_ENABLED \
CXIMAGE_DONT_DECLARE_TCHAR \
BUILD_CONFIG_FULL_VERSION \
DONT_WRITE_EMBEDDED_FONTS \
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML \
LIBXML_READER_ENABLED
DEFINES += PDFREADER_USE_DYNAMIC_LIBRARY
DEFINES += PDFWRITER_USE_DYNAMIC_LIBRARY
DEFINES += XPS_USE_DYNAMIC_LIBRARY
DEFINES += DJVU_USE_DYNAMIC_LIBRARY
DEFINES += HTMLRENDERER_USE_DYNAMIC_LIBRARY
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
core_windows {
INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}
core_mac {
INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
}
INCLUDEPATH += ../../../DesktopEditor/xml/libxml2/include
INCLUDEPATH += ../../../DesktopEditor/freetype-2.5.2/include
INCLUDEPATH += ../../../DesktopEditor/agg-2.4/include
include(X2tConverter.pri)
INCLUDEPATH += $$PWD/../../../Common/DocxFormat
DEPENDPATH += $$PWD/../../../Common/DocxFormat
INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/
INCLUDEPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/
DEPENDPATH += $$PWD/../../../ASCOfficePPTXFile/Editor/
INCLUDEPATH += $$PWD/../../../OfficeUtils/src
DEPENDPATH += $$PWD/../../../OfficeUtils/src
INCLUDEPATH += $$PWD/../../../ASCOfficeDocxFile2
DEPENDPATH += $$PWD/../../../ASCOfficeDocxFile2
##############################################################################################################
SOURCES += ../../src/main.cpp \
../../src/cextracttools.cpp \
../../../Common/OfficeFileFormatChecker2.cpp \
../../src/ASCConverters.cpp
HEADERS += ../../src/cextracttools.h \
../../../Common/OfficeFileFormatChecker.h \
../../src/ASCConverters.h \
../../../DesktopEditor/graphics/MetafileToGraphicsRenderer.h
SOURCES += ../../src/main.cpp
###############################################################################################################
......@@ -126,68 +34,3 @@ core_linux_32 {
core_mac {
DESTDIR = $$DESTDIR/mac
}
\ No newline at end of file
#Xls file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXlsFormatLib
# odf format writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileWriterLib
# odf format reader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOdfFileReaderLib
#doc file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocFormatLib
# ppt file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPptFormatLib
#rtf file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lRtfFormatLib
#txt(xml) file
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lTxtXmlFormatLib
# pdf writer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfWriter
#docxfile2
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lASCOfficeDocxFile2Lib
#pptxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPPTXFormatLib
#docxformat
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDocxFormatLib
#office utils
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lOfficeUtils
#graphics
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lgraphics
#doctrenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -ldoctrenderer
#HtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlRenderer
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfReader
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lDjVuFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lXpsFile
#HtmlFile
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lHtmlFile
#UnicodeConverter
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter
#Crypto++
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lCryptoPPLib
#####################################################
# внешнее подключение сторонних библиотек
#BOOST
CONFIG += core_boost_regex
include($$PWD/../../../Common/3dParty/boost/boost.pri)
core_windows {
LIBS += -lurlmon
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
}
core_linux {
LIBS += -lz
LIBS += -lxml2
LIBS += -lcurl
}
mac {
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -llibxml
LIBS += -framework AppKit
}
########################################################
#-------------------------------------------------
#
# Project created by QtCreator 2014-10-03T18:30:31
#
#-------------------------------------------------
TEMPLATE = lib
CONFIG += shared
CONFIG += plugin
include(X2tConverter.pri)
DEFINES += X2T_USE_DYNAMIC_LIBRARY
\ No newline at end of file
TEMPLATE = subdirs
CORE_ROOT_DIR = $$PWD/../../..
PWD_ROOT_DIR = $$PWD
include(../../../Common/base.pri)
SUBDIRS = \
OfficeUtils \
graphics \
cryptopp \
DocxFormatLib \
PPTXFormatLib \
ASCOfficeDocxFile2Lib \
TxtXmlFormatLib \
RtfFormatLib \
PptFormatLib \
DocFormatLib \
OdfFileReaderLib \
OdfFileWriterLib \
XlsFormatLib \
XmlLib \
X2tConverter
OfficeUtils.file = ../../../OfficeUtils/OfficeUtils.pro
graphics.file = ../../../DesktopEditor/Qt_build/graphics/project/graphics.pro
cryptopp.file = ../../../Common/3dParty/cryptopp/project/cryptopp.pro
DocxFormatLib.file = ../../../Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
PPTXFormatLib.file = ../../../ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro
ASCOfficeDocxFile2Lib.file = ../../../ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro
TxtXmlFormatLib.file = ../../../ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro
RtfFormatLib.file = ../../../ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro
PptFormatLib.file = ../../../ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro
DocFormatLib.file = ../../../ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro
OdfFileReaderLib.file = ../../../ASCOfficeOdfFile/linux/OdfFileReaderLib.pro
OdfFileWriterLib.file = ../../../ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro
XlsFormatLib.file = ../../../ASCOfficeXlsFile2/source/linux/XlsFormatLib.pro
XmlLib.file = ../../../DesktopEditor/xml/build/qt/libxml2.pro
X2tConverter.depends = \
OfficeUtils \
graphics \
cryptopp \
DocxFormatLib \
PPTXFormatLib \
ASCOfficeDocxFile2Lib \
TxtXmlFormatLib \
RtfFormatLib \
PptFormatLib \
DocFormatLib \
OdfFileReaderLib \
OdfFileWriterLib \
XlsFormatLib
core_windows {
X2tConverter.depends += XmlLib
}
# for run in qt from this solution
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH
include(../../../Common/3dParty/icu/icu.pri)
TEMPLATE = subdirs
CORE_ROOT_DIR = $$PWD/../../..
PWD_ROOT_DIR = $$PWD
include(X2tSLN.pri)
include(../../../Common/base.pri)
SUBDIRS = \
OfficeUtils \
graphics \
cryptopp \
DocxFormatLib \
PPTXFormatLib \
ASCOfficeDocxFile2Lib \
TxtXmlFormatLib \
RtfFormatLib \
PptFormatLib \
DocFormatLib \
OdfFileReaderLib \
OdfFileWriterLib \
XlsFormatLib \
XmlLib \
X2tConverter
OfficeUtils.file = ../../../OfficeUtils/OfficeUtils.pro
graphics.file = ../../../DesktopEditor/Qt_build/graphics/project/graphics.pro
cryptopp.file = ../../../Common/3dParty/cryptopp/project/cryptopp.pro
DocxFormatLib.file = ../../../Common/DocxFormat/DocxFormatLib/DocxFormatLib.pro
PPTXFormatLib.file = ../../../ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro
ASCOfficeDocxFile2Lib.file = ../../../ASCOfficeDocxFile2/Linux/ASCOfficeDocxFile2Lib.pro
TxtXmlFormatLib.file = ../../../ASCOfficeTxtFile/TxtXmlFormatLib/Linux/TxtXmlFormatLib.pro
RtfFormatLib.file = ../../../ASCOfficeRtfFile/RtfFormatLib/Linux/RtfFormatLib.pro
PptFormatLib.file = ../../../ASCOfficePPTFile/PPTFormatLib/Linux/PPTFormatLib.pro
DocFormatLib.file = ../../../ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro
OdfFileReaderLib.file = ../../../ASCOfficeOdfFile/linux/OdfFileReaderLib.pro
OdfFileWriterLib.file = ../../../ASCOfficeOdfFileW/linux/OdfFileWriterLib.pro
XlsFormatLib.file = ../../../ASCOfficeXlsFile2/source/linux/XlsFormatLib.pro
XmlLib.file = ../../../DesktopEditor/xml/build/qt/libxml2.pro
X2tConverter.file = ./X2tConverter.pro
\ No newline at end of file
X2tConverter.depends = \
OfficeUtils \
graphics \
cryptopp \
DocxFormatLib \
PPTXFormatLib \
ASCOfficeDocxFile2Lib \
TxtXmlFormatLib \
RtfFormatLib \
PptFormatLib \
DocFormatLib \
OdfFileReaderLib \
OdfFileWriterLib \
XlsFormatLib
core_windows {
X2tConverter.depends += XmlLib
}
# for run in qt from this solution
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH
include(../../../Common/3dParty/icu/icu.pri)
include(X2tSLN.pri)
X2tConverter.file = ./X2tConverterDll.pro
\ No newline at end of file
This diff is collapsed.
......@@ -32,6 +32,13 @@
#ifndef ASCCONVERTERS_H
#define ASCCONVERTERS_H
#ifndef X2T_USE_DYNAMIC_LIBRARY
#define X2T_DECL_EXPORT
#else
#include "../../DesktopEditor/common/base_export.h"
#define X2T_DECL_EXPORT Q_DECL_EXPORT
#endif
#include <string>
namespace NExtractTools
......@@ -141,5 +148,9 @@ namespace NExtractTools
int fromT(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromCrossPlatform(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromCanvasPdf(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
int fromInputParams(InputParams& oInputParams);
X2T_DECL_EXPORT int FromFile(const std::wstring& file);
X2T_DECL_EXPORT int FromXml(const std::wstring& xml);
}
#endif // ASCCONVERTERS_H
......@@ -381,10 +381,31 @@ namespace NExtractTools
RELEASEOBJECT(m_sPassword);
}
bool FromXmlFile(std::wstring sFilename)
bool FromXmlFile(const std::wstring& sFilename)
{
XmlUtils::CXmlNode oRoot;
if(TRUE == oRoot.FromXmlFile2(std_string2string(sFilename)))
{
return FromXmlNode(oRoot);
}
else
{
return false;
}
}
bool FromXml(const std::wstring& sXml)
{
XmlUtils::CXmlNode oRoot;
if(TRUE == oRoot.FromXmlString(std_string2string(sXml)))
{
return FromXmlNode(oRoot);
}
else
{
return false;
}
}
bool FromXmlNode(XmlUtils::CXmlNode& oRoot)
{
XmlUtils::CXmlNodes oXmlNodes;
if(TRUE == oRoot.GetChilds(oXmlNodes))
......@@ -447,7 +468,6 @@ namespace NExtractTools
}
}
}
}
return true;
}
std::wstring getPassword() const
......
This diff is collapsed.
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