mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
XFS filesystem problem & cool AllFontsGen .pro file
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63709 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
c7e343f90d
commit
db6ec99062
@ -3,6 +3,57 @@ CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
############### destination path ###############
|
||||
DESTDIR = $$PWD/../../SDK/bin/AllFontsGen
|
||||
|
||||
# WINDOWS
|
||||
win32:contains(QMAKE_TARGET.arch, x86_64):{
|
||||
TARGET = windows_64
|
||||
}
|
||||
win32:!contains(QMAKE_TARGET.arch, x86_64):{
|
||||
TARGET = windows_32
|
||||
}
|
||||
|
||||
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
|
||||
TARGET = linux_64
|
||||
}
|
||||
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
|
||||
TARGET = linux_32
|
||||
}
|
||||
|
||||
################################################
|
||||
|
||||
################# dependencies #################
|
||||
DESTINATION_SDK_PATH = $$PWD/../../SDK/lib
|
||||
win32:contains(QMAKE_TARGET.arch, x86_64):{
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_64/DEBUG
|
||||
} else {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_64
|
||||
}
|
||||
}
|
||||
win32:!contains(QMAKE_TARGET.arch, x86_64):{
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_32/DEBUG
|
||||
} else {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_32
|
||||
}
|
||||
}
|
||||
|
||||
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/linux_64
|
||||
}
|
||||
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/linux_32
|
||||
}
|
||||
|
||||
LIBS += -L$$DESTINATION_SDK_PATH -lgraphics
|
||||
LIBS += -L$$DESTINATION_SDK_PATH -lASCOfficeUtilsLib
|
||||
linux-g++ | linux-g++-64 | linux-g++-32 {
|
||||
LIBS += -lz
|
||||
}
|
||||
################################################
|
||||
|
||||
DEFINES += \
|
||||
_QT \
|
||||
FT2_BUILD_LIBRARY \
|
||||
@ -58,12 +109,4 @@ SOURCES += main.cpp
|
||||
|
||||
INCLUDEPATH += \
|
||||
../agg-2.4/include \
|
||||
../freetype-2.5.2/include \
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS += -L../../Qt_build/graphics/Debug/debug -lgraphics
|
||||
message(debug)
|
||||
} else {
|
||||
LIBS += -L../../Qt_build/graphics/Release/release -lgraphics
|
||||
message(release)
|
||||
}
|
||||
../freetype-2.5.2/include
|
||||
|
||||
@ -69,13 +69,30 @@ namespace NSDirectory
|
||||
{
|
||||
while ((dirp = readdir(dp)) != NULL)
|
||||
{
|
||||
int nType = 0;
|
||||
if(DT_REG == dirp->d_type)
|
||||
nType = 2;
|
||||
else if (DT_DIR == dirp->d_type)
|
||||
nType = 1;
|
||||
else if (DT_UNKNOWN == dirp->d_type)
|
||||
{
|
||||
// XFS problem
|
||||
struct stat buff;
|
||||
std::string sTmp = std::string((char*)pUtf8) + "/" + std::string(dirp->d_name);
|
||||
stat(sTmp.c_str(), &buff);
|
||||
if (S_ISREG(buff.st_mode))
|
||||
nType = 2;
|
||||
else if (S_ISDIR(buff.st_mode))
|
||||
nType = 1;
|
||||
}
|
||||
|
||||
if (2 == nType)
|
||||
{
|
||||
std::wstring sName = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)dirp->d_name, strlen(dirp->d_name));
|
||||
oArray.Add(strDirectory + L"/" + sName);
|
||||
}
|
||||
|
||||
if (bIsRecursion && DT_DIR == dirp->d_type)
|
||||
if (bIsRecursion && (1 == nType))
|
||||
{
|
||||
if(dirp->d_name[0] != '.')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user