Commit 85215cb4 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

no export graphics & libxml doctrenderer

also + build environment setup

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64045 954022d7-b5bf-4e40-9824-e11837661b57
parent 813383ed
......@@ -6,11 +6,7 @@
#include "nativecontrol.h"
#define _USE_LIBXML2_READER_
#define LIBXML_READER_ENABLED
#define _UNICODE
#include "../../Common/DocxFormat/Source/XML/xmlutils.h"
#include "../xml/include/xmlutils.h"
// TEST!!!
#if 0
......@@ -110,15 +106,15 @@ namespace NSDoctRenderer
if (!oNode.FromXmlString(strXml))
return FALSE;
m_strSrcFilePath = string2std_string( oNode.ReadValueString(L"SrcFilePath") );
m_strDstFilePath = string2std_string( oNode.ReadValueString(L"DstFilePath") );
m_strSrcFilePath = oNode.ReadValueString(L"SrcFilePath");
m_strDstFilePath = oNode.ReadValueString(L"DstFilePath");
m_eSrcFormat = (DoctRendererFormat::FormatFile)(oNode.ReadValueInt(L"SrcFileType"));
m_eDstFormat = (DoctRendererFormat::FormatFile)(oNode.ReadValueInt(L"DstFileType"));
m_strFontsDirectory = string2std_string( oNode.ReadValueString(L"FontsDirectory") );
m_strImagesDirectory = string2std_string( oNode.ReadValueString(L"ImagesDirectory") );
m_strThemesDirectory = string2std_string( oNode.ReadValueString(L"ThemesDirectory") );
m_strFontsDirectory = oNode.ReadValueString(L"FontsDirectory");
m_strImagesDirectory = oNode.ReadValueString(L"ImagesDirectory");
m_strThemesDirectory = oNode.ReadValueString(L"ThemesDirectory");
XmlUtils::CXmlNode oNodeChanges;
if (oNode.GetNode(L"Changes", oNodeChanges))
......@@ -134,17 +130,17 @@ namespace NSDoctRenderer
XmlUtils::CXmlNode _node;
oNodes.GetAt(i, _node);
m_arChanges.Add(string2std_string(_node.GetText()));
m_arChanges.Add(_node.GetText());
}
}
XmlUtils::CXmlNode oNodeMailMerge;
if (oNode.GetNode(L"MailMergeData", oNodeMailMerge))
{
m_strMailMergeDatabasePath = string2std_string( oNodeMailMerge.ReadAttribute(L"DatabasePath") );
m_strMailMergeDatabasePath = oNodeMailMerge.ReadAttribute(L"DatabasePath");
m_nMailMergeIndexStart = oNodeMailMerge.ReadAttributeInt(L"Start", -1);
m_nMailMergeIndexEnd = oNodeMailMerge.ReadAttributeInt(L"End", -1);
m_strMailMergeField = string2std_string( oNodeMailMerge.ReadAttribute(L"Field") );
m_strMailMergeField = oNodeMailMerge.ReadAttribute(L"Field");
}
return true;
......@@ -189,9 +185,10 @@ namespace NSDoctRenderer
for (int i = 0; i < nCount; ++i)
{
oNodes.GetAt(i, _node);
std::wstring strFilePath = string2std_string(_node.GetText());
std::wstring strFilePath = _node.GetText();
if (NSFile::CFileBinary::Exists(strFilePath))
if (NSFile::CFileBinary::Exists(strFilePath) &&
!NSFile::CFileBinary::Exists(m_strConfigDir + strFilePath))
m_arrFiles.Add(strFilePath);
else
m_arrFiles.Add(m_strConfigDir + strFilePath);
......@@ -205,15 +202,15 @@ namespace NSDoctRenderer
XmlUtils::CXmlNode oNodeSdk = oNode.ReadNode(L"DoctSdk");
if (oNodeSdk.IsValid())
m_strDoctSDK = string2std_string(oNodeSdk.GetText());
m_strDoctSDK = oNodeSdk.GetText();
oNodeSdk = oNode.ReadNode(L"PpttSdk");
if (oNodeSdk.IsValid())
m_strPpttSDK = string2std_string(oNodeSdk.GetText());
m_strPpttSDK = oNodeSdk.GetText();
oNodeSdk = oNode.ReadNode(L"XlstSdk");
if (oNodeSdk.IsValid())
m_strXlstSDK = string2std_string(oNodeSdk.GetText());
m_strXlstSDK = oNodeSdk.GetText();
if (!NSFile::CFileBinary::Exists(m_strDoctSDK))
m_strDoctSDK = m_strConfigDir + m_strDoctSDK;
......
......@@ -4,8 +4,7 @@
#include <string>
#include "../common/Types.h"
#include "../common/Array.h"
#include <QtCore/qglobal.h>
#include "../common/base_export.h"
namespace NSDoctRenderer
{
......
......@@ -7,53 +7,85 @@
QT -= core
QT -= gui
VERSION = 1.0.0.1
TARGET = doctrenderer
TEMPLATE = lib
CONFIG += static
CONFIG += shared
CONFIG += plugin
QMAKE_CXXFLAGS += -std=c++11
CONFIG += c++11
DEFINES += UNICODE
DEFINES += _UNICODE
DEFINES += _USE_LIBXML2_READER_
DEFINES += LIBXML_READER_ENABLED
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../../SDK/lib
V8_CHECKOUT_PATH = /home/oleg/v8
V8_BUILD_LIBRARY_PATH_WINDOWS = ../../../SDK/lib
QT_SETUP_INCLUDES_PATH = /home/oleg/Qt5.4.2/5.4/gcc_64/include
# 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
}
}
INCLUDEPATH += \
$$V8_CHECKOUT_PATH \
$$V8_CHECKOUT_PATH/include
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
DESTDIR = $$DESTINATION_SDK_PATH/linux_32
}
################################################
#################### WINDOWS #####################
win32 {
DEFINES += \
WIN32
V8_CHECKOUT_PATH = $$PWD/v8_windows/v8
} else {
V8_CHECKOUT_PATH = /home/oleg/v8
}
win32 {
LIBS += -lwinmm
LIBS += -ladvapi32
LIBS += -lShell32
TARGET_EXT = .dll
}
win32:contains(QMAKE_TARGET.arch, x86_64):{
linux-g++ | linux-g++-64 | linux-g++-32 {
CONFIG += plugin
CONFIG(debug, debug|release) {
LIBS += -L../../Qt_build/graphics/Debug/debug -lgraphics
QMAKE_CXXFLAGS += -fvisibility=hidden
QMAKE_CFLAGS += -fvisibility=hidden
LIBS += -L../../../SDK/lib/win_64/DEBUG -llibxml2
TARGET_EXT = .so
}
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_64/DEBUG -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_64/DEBUG -licui18n -licuuc
} else {
LIBS += -L../../Qt_build/graphics/Release/release -lgraphics
INCLUDEPATH += \
$$V8_CHECKOUT_PATH \
$$V8_CHECKOUT_PATH/include
LIBS += -L../../../SDK/lib/win_64 -llibxml2
#################### WINDOWS #####################
DESKTOPEDITOR_PATH = ..
include(../Qt_build/graphics/project/graphics_fonts.pri)
LIB_XML_PRI_PATH = ../xml
include(../xml/build/qt/libxml2.pri)
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_64 -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_64 -licui18n -licuuc
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
LIBS += -L$$V8_CHECKOUT_PATH/build/Debug/lib -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_CHECKOUT_PATH/build/Debug/lib -licui18n -licuuc
} else {
LIBS += -L$$V8_CHECKOUT_PATH/build/Release/lib -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_CHECKOUT_PATH/build/Release/lib -licui18n -licuuc
}
message(windows64)
......@@ -61,19 +93,11 @@ CONFIG(debug, debug|release) {
win32:!contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
LIBS += -L../../Qt_build/graphics/Debug/debug -lgraphics
LIBS += -L../../../SDK/lib/win_32/DEBUG -llibxml2
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_32/DEBUG -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_32/DEBUG -licui18n -licuuc
LIBS += -L$$V8_CHECKOUT_PATH/build/Debug/lib -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_CHECKOUT_PATH/build/Debug/lib -licui18n -licuuc
} else {
LIBS += -L../../Qt_build/graphics/Release/release -lgraphics
LIBS += -L../../../SDK/lib/win_32 -llibxml2
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_32 -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_BUILD_LIBRARY_PATH_WINDOWS/win_32 -licui18n -licuuc
LIBS += -L$$V8_CHECKOUT_PATH/build/Release/lib -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_CHECKOUT_PATH/build/Release/lib -licui18n -licuuc
}
message(windows32)
......@@ -90,9 +114,6 @@ linux-g++ | linux-g++-64 | linux-g++-32 {
LIBS += -L$$V8_CHECKOUT_PATH/out/native/obj.target/tools/gyp -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_snapshot
LIBS += -L$$V8_CHECKOUT_PATH/out/native/obj.target/third_party/icu -licui18n -licuuc -licudata
LIBS += -L../../Qt_build/graphics/Release -lgraphics
LIBS += -L../../../Common/DocxFormat/Source/XML/libxml2/linux_build/Release -llibxml2
}
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
......@@ -122,17 +143,7 @@ mac {
}
##################################################
INCLUDEPATH += \
../agg-2.4/include \
../freetype-2.5.2/include \
../../../Common/DocxFormat/Source/XML/libxml2/XML/include
INCLUDEPATH += $$QT_SETUP_INCLUDES_PATH
SOURCES += doctrenderer.cpp \
../../../Common/DocxFormat/Source/XML/libxml2/libxml2.cpp \
../../../Common/DocxFormat/Source/XML/stringcommon.cpp \
../../../Common/DocxFormat/Source/Base/unicode_util.cpp
SOURCES += doctrenderer.cpp
HEADERS += doctrenderer.h \
memorystream.h \
......
......@@ -12,42 +12,42 @@ TARGET = doctrenderer_test
CONFIG += console
CONFIG -= app_bundle
DEFINES += UNICODE
DEFINES += _UNICODE
DEFINES += _USE_LIBXML2_READER_
DEFINES += LIBXML_READER_ENABLED
mac {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT \
_MAC \
QT_MAC
}
TEMPLATE = app
win32 {
DEFINES += \
WIN32
}
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../../../SDK/lib
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT \
# WINDOWS
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTINATION_SDK_PATH_DOCTRENDERER = $$DESTINATION_SDK_PATH/win_64/DEBUG
} else {
DESTINATION_SDK_PATH_DOCTRENDERER = $$DESTINATION_SDK_PATH/win_64
}
}
win32:!contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) {
DESTINATION_SDK_PATH_DOCTRENDERER = $$DESTINATION_SDK_PATH/win_32/DEBUG
} else {
DESTINATION_SDK_PATH_DOCTRENDERER = $$DESTINATION_SDK_PATH/win_32
}
}
TEMPLATE = app
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
DESTINATION_SDK_PATH_DOCTRENDERER = $$DESTINATION_SDK_PATH/linux_64
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
DESTINATION_SDK_PATH_DOCTRENDERER = $$DESTINATION_SDK_PATH/linux_32
}
CONFIG(debug, debug|release) {
LIBS += -L../../Debug -ldoctrenderer
message(debug)
DESTDIR = $$PWD/Debug
} else {
LIBS += -L../../Release -ldoctrenderer
message(release)
DESTDIR = $$PWD/Release
}
INCLUDEPATH += C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/include
################################################
LIBS += -L$$DESTINATION_SDK_PATH_DOCTRENDERER -ldoctrenderer
SOURCES += main.cpp
......@@ -2,7 +2,7 @@
int main(int argc, char *argv[])
{
#if 0
#if 1
#if 1
std::wstring strXml = L"<Settings>\
......
windows:
1) install git:
http://msysgit.github.io/
2) checkout v8
cd .../ServerComponents/DesktopEditor/doctrenderer
create folder v8_windows
cd v8_windows
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
add System Environment Path:
.../ServerComponents/DesktopEditor/doctrenderer/v8_windows/depot_tools;
.../ServerComponents/DesktopEditor/doctrenderer/v8_windows/depot_tools/python276_bin;
fetch v8
cd v8
git checkout 3.30.34
3) generate visual studio project
32bit: python build/gyp_v8
64bit: python build/gyp_v8 -Dtarget_arch=x64
build project in visual studio ( - , )
a) open all.sln
b) select projects:
icui18n
icuuc
mksnapshot
v8_base
v8_libbase
v8_libplatform
v8_nosnapshot
) Project Properies -> Configuration Properties -> C/C++ ->Code Generation
for Debug Configuration change "Runtime Library" to "Multi-threaded Debug DLL (/MDd)"
for Release Configuration change "Runtime Library" to "Multi-threaded Debug (/MD)"
Rebuild All
4) Rebuild doctrenderer project
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