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

XFS filesystem problem & cool AllFontsGen .pro file

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63709 954022d7-b5bf-4e40-9824-e11837661b57
parent c7e343f9
...@@ -3,6 +3,57 @@ CONFIG += console ...@@ -3,6 +3,57 @@ CONFIG += console
CONFIG -= app_bundle CONFIG -= app_bundle
CONFIG -= qt 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 += \ DEFINES += \
_QT \ _QT \
FT2_BUILD_LIBRARY \ FT2_BUILD_LIBRARY \
...@@ -58,12 +109,4 @@ SOURCES += main.cpp ...@@ -58,12 +109,4 @@ SOURCES += main.cpp
INCLUDEPATH += \ INCLUDEPATH += \
../agg-2.4/include \ ../agg-2.4/include \
../freetype-2.5.2/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)
}
...@@ -69,13 +69,30 @@ namespace NSDirectory ...@@ -69,13 +69,30 @@ namespace NSDirectory
{ {
while ((dirp = readdir(dp)) != NULL) while ((dirp = readdir(dp)) != NULL)
{ {
int nType = 0;
if(DT_REG == dirp->d_type) 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)); std::wstring sName = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)dirp->d_name, strlen(dirp->d_name));
oArray.Add(strDirectory + L"/" + sName); oArray.Add(strDirectory + L"/" + sName);
} }
if (bIsRecursion && DT_DIR == dirp->d_type) if (bIsRecursion && (1 == nType))
{ {
if(dirp->d_name[0] != '.') if(dirp->d_name[0] != '.')
{ {
......
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