解决websdk在linux上编译不过的问题
This commit is contained in:
parent
2e85eb7f21
commit
5dede65275
|
@ -13,6 +13,7 @@
|
|||
#include <setjmp.h>
|
||||
#include <malloc.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
#include <windows.h>
|
||||
|
|
|
@ -278,7 +278,7 @@ void CvxText::GetStringLocation(const HGChar* text, HGUInt fontSize, HGBool bold
|
|||
#endif
|
||||
|
||||
HGInt origin = 0;
|
||||
HGInt minY = MAXINT, maxY = MININT;
|
||||
HGInt minY = INT_MAX, maxY = INT_MIN;
|
||||
|
||||
int i = 0;
|
||||
#if defined(HG_CMP_MSC)
|
||||
|
|
|
@ -2797,7 +2797,7 @@ namespace ver_2
|
|||
break;
|
||||
#else
|
||||
struct stat buf;
|
||||
int result = stat(lineContent, &buf);
|
||||
int result = stat(filePath, &buf);
|
||||
if (0 != result)
|
||||
break;
|
||||
#endif
|
||||
|
@ -3580,7 +3580,7 @@ namespace ver_2
|
|||
void ManagerV2::ClearBindFolder()
|
||||
{
|
||||
assert(!m_bindFolder.empty());
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
char szFind[MAX_PATH];
|
||||
sprintf(szFind, "%s*.*", m_bindFolder.c_str());
|
||||
|
||||
|
@ -3601,6 +3601,8 @@ namespace ver_2
|
|||
} while (FindNextFileA(hFind, &FindFileData));
|
||||
|
||||
FindClose(hFind);
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
void ManagerV2::UpdateBindFolder()
|
||||
|
@ -3654,7 +3656,11 @@ namespace ver_2
|
|||
sprintf(fileName, fmt, m_bindFolder.c_str(), m_bindNameBase + tables[i].idx, tables[i].format.c_str());
|
||||
char destName[256];
|
||||
sprintf(destName, fmt, m_bindFolder.c_str(), m_bindNameBase + tables[i].idx + 1, tables[i].format.c_str());
|
||||
#if defined(HG_CMP_MSC)
|
||||
MoveFileA(fileName, destName);
|
||||
#else
|
||||
rename(fileName, destName);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3736,7 +3742,11 @@ namespace ver_2
|
|||
sprintf(fileName, fmt, m_bindFolder.c_str(), m_bindNameBase + tables[i].idx, tables[i].format.c_str());
|
||||
char destName[256];
|
||||
sprintf(destName, fmt, m_bindFolder.c_str(), m_bindNameBase + tables[i].idx - value, tables[i].format.c_str());
|
||||
#if defined(HG_CMP_MSC)
|
||||
MoveFileA(fileName, destName);
|
||||
#else
|
||||
rename(fileName, destName);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3763,17 +3773,29 @@ namespace ver_2
|
|||
sprintf(fileName1, fmt, m_bindFolder.c_str(), m_bindNameBase + imageIndex1, format1.c_str());
|
||||
char TmpFileName[256];
|
||||
sprintf(TmpFileName, "%sTemp", m_bindFolder.c_str());
|
||||
#if defined(HG_CMP_MSC)
|
||||
MoveFileA(fileName1, TmpFileName);
|
||||
#else
|
||||
rename(fileName1, TmpFileName);
|
||||
#endif
|
||||
|
||||
char fileName2[256];
|
||||
sprintf(fileName2, fmt, m_bindFolder.c_str(), m_bindNameBase + imageIndex2, format2.c_str());
|
||||
char fileName2Dest[256];
|
||||
sprintf(fileName2Dest, fmt, m_bindFolder.c_str(), m_bindNameBase + imageIndex1, format2.c_str());
|
||||
#if defined(HG_CMP_MSC)
|
||||
MoveFileA(fileName2, fileName2Dest);
|
||||
#else
|
||||
rename(fileName2, fileName2Dest);
|
||||
#endif
|
||||
|
||||
char fileName1Dest[256];
|
||||
sprintf(fileName1Dest, fmt, m_bindFolder.c_str(), m_bindNameBase + imageIndex2, format1.c_str());
|
||||
#if defined(HG_CMP_MSC)
|
||||
MoveFileA(TmpFileName, fileName1Dest);
|
||||
#else
|
||||
rename(TmpFileName, fileName1Dest);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ManagerV2::ClearBindFolderImageList(const std::vector<BatchTableInfo>& tables)
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue