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

поправлены проблемы с компиляцией под линукс.

полностью реализован механизм билда статичечской и динамической библиотеки

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63666 954022d7-b5bf-4e40-9824-e11837661b57
parent fe6ed4a3
...@@ -13,35 +13,59 @@ TEMPLATE = lib ...@@ -13,35 +13,59 @@ TEMPLATE = lib
#CONFIG += staticlib #CONFIG += staticlib
CONFIG += shared CONFIG += shared
############### destination path ###############
DESTINATION_SDK_PATH = $$PWD/../SDK/lib
# WINDOWS
win32:contains(QMAKE_TARGET.arch, x86_64):{
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
DESTDIR = Debug DESTDIR = $$DESTINATION_SDK_PATH/win_64/DEBUG
} else { } else {
DESTDIR = Release DESTDIR = $$DESTINATION_SDK_PATH/win_64
} }
}
staticlib { win32:!contains(QMAKE_TARGET.arch, x86_64):{
message(static) CONFIG(debug, debug|release) {
DESTDIR = $$DESTINATION_SDK_PATH/win_32/DEBUG
} else { } else {
DESTDIR = $$DESTINATION_SDK_PATH/win_32
}
}
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
}
################################################
############# dynamic dependencies #############
shared {
DEFINES += PDF_USE_DYNAMIC_LIBRARY DEFINES += PDF_USE_DYNAMIC_LIBRARY
LIBS += -L$$DESTDIR -lASCOfficeUtilsLib
LIBS += -L$$DESTDIR -lgraphics
LIBS += -L$$DESTDIR -llibxml
message(dynamic) message(dynamic)
win32 { win32 {
DEFINES += \ LIBS += -lgdi32 \
WIN32 \ -ladvapi32 \
_WIN32 -luser32 \
-lshell32
LIBS += -L../../ASCOfficeUtils/ASCOfficeUtilsLib/Win/x64/Debug -lASCOfficeUtilsLib
LIBS += -L../../DesktopEditor/Qt_build/graphics/Debug/debug -lgraphics TARGET_EXT = .dll
LIBS += -L../../SDK/lib/win_64/DEBUG -llibxml }
LIBS += -lgdi32 \
-ladvapi32 \
-luser32 \
-lshell32
TARGET_EXT = .dll
}
linux-g++ | linux-g++-64 | linux-g++-32 {
CONFIG += plugin
TARGET_EXT = .so
}
} }
################################################
DEFINES += PDFREADER_LIBRARY DEFINES += PDFREADER_LIBRARY
......
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <shlobj.h>
#include "MemoryUtils.h" #include "MemoryUtils.h"
#include "StringExt.h" #include "StringExt.h"
...@@ -227,4 +226,4 @@ namespace PdfReader ...@@ -227,4 +226,4 @@ namespace PdfReader
return L""; return L"";
} }
} }
\ No newline at end of file
...@@ -3594,7 +3594,7 @@ namespace PdfReader ...@@ -3594,7 +3594,7 @@ namespace PdfReader
m_pOut->EndStringOperator(m_pGState); m_pOut->EndStringOperator(m_pGState);
} }
// \ // '\'
void Graphics::OperatorMoveSetShowText(Object arrArguments[], int nArgumentsCount) void Graphics::OperatorMoveSetShowText(Object arrArguments[], int nArgumentsCount)
{ {
if (m_pGState->GetFont()) if (m_pGState->GetFont())
...@@ -4940,4 +4940,4 @@ namespace PdfReader ...@@ -4940,4 +4940,4 @@ namespace PdfReader
else else
m_pResources = NULL; m_pResources = NULL;
} }
} }
\ No newline at end of file
...@@ -306,7 +306,7 @@ private: ...@@ -306,7 +306,7 @@ private:
} }
inline void SetAlpha(const LONG& lAlpha) inline void SetAlpha(const LONG& lAlpha)
{ {
m_nAlpha = (BYTE)max(0, min(255, lAlpha)); m_nAlpha = (BYTE)max(0, min(255, (int)lAlpha));
} }
inline double GetSize() inline double GetSize()
{ {
...@@ -536,7 +536,7 @@ private: ...@@ -536,7 +536,7 @@ private:
} }
inline void SetAlpha1(const LONG& lAlpha) inline void SetAlpha1(const LONG& lAlpha)
{ {
m_nAlpha1 = (BYTE)max(0, min(255, lAlpha)); m_nAlpha1 = (BYTE)max(0, min(255, (int)lAlpha));
} }
inline LONG GetAlpha2() inline LONG GetAlpha2()
{ {
...@@ -544,7 +544,7 @@ private: ...@@ -544,7 +544,7 @@ private:
} }
inline void SetAlpha2(const LONG& lAlpha) inline void SetAlpha2(const LONG& lAlpha)
{ {
m_nAlpha2 = (BYTE)max(0, min(255, lAlpha)); m_nAlpha2 = (BYTE)max(0, min(255, (int)lAlpha));
} }
inline std::wstring GetTexturePath() inline std::wstring GetTexturePath()
{ {
...@@ -568,7 +568,7 @@ private: ...@@ -568,7 +568,7 @@ private:
} }
inline void SetTextureAlpha(const LONG& lAlpha) inline void SetTextureAlpha(const LONG& lAlpha)
{ {
m_nTextureAlpha = (BYTE)max(0, min(255, lAlpha)); m_nTextureAlpha = (BYTE)max(0, min(255, (int)lAlpha));
} }
inline double GetLinearAngle() inline double GetLinearAngle()
{ {
...@@ -863,10 +863,10 @@ private: ...@@ -863,10 +863,10 @@ private:
TColor oColor1 = lColor1; TColor oColor1 = lColor1;
TColor oColor2 = lColor2; TColor oColor2 = lColor2;
BYTE r = (BYTE)max(0, min(255, (oColor1.r + (oColor2.r - oColor1.r) / dDiff * (dDstPoint - dPoint1)))); BYTE r = (BYTE)max(0, min(255, (int)(oColor1.r + (oColor2.r - oColor1.r) / dDiff * (dDstPoint - dPoint1))));
BYTE g = (BYTE)max(0, min(255, (oColor1.g + (oColor2.g - oColor1.g) / dDiff * (dDstPoint - dPoint1)))); BYTE g = (BYTE)max(0, min(255, (int)(oColor1.g + (oColor2.g - oColor1.g) / dDiff * (dDstPoint - dPoint1))));
BYTE b = (BYTE)max(0, min(255, (oColor1.b + (oColor2.b - oColor1.b) / dDiff * (dDstPoint - dPoint1)))); BYTE b = (BYTE)max(0, min(255, (int)(oColor1.b + (oColor2.b - oColor1.b) / dDiff * (dDstPoint - dPoint1))));
BYTE a = (BYTE)max(0, min(255, (oColor1.a + (oColor2.a - oColor1.a) / dDiff * (dDstPoint - dPoint1)))); BYTE a = (BYTE)max(0, min(255, (int)(oColor1.a + (oColor2.a - oColor1.a) / dDiff * (dDstPoint - dPoint1))));
TColor oResColor; TColor oResColor;
oResColor.Set(r, g, b, a); oResColor.Set(r, g, b, a);
...@@ -1432,4 +1432,4 @@ private: ...@@ -1432,4 +1432,4 @@ private:
int m_nCounter; // TODO: для теста, убрать потом int m_nCounter; // TODO: для теста, убрать потом
}; };
#endif // _PDF_WRITER_PDFRENDERER_H #endif // _PDF_WRITER_PDFRENDERER_H
\ No newline at end of file
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