命令/etc/issue获取出来的麒麟系统是大写,编译目录改为小写
This commit is contained in:
parent
ec0dd51d03
commit
2752f7a9b2
2
build.sh
2
build.sh
|
@ -14,7 +14,7 @@ echo $arch
|
|||
if [ ${systype} = "UnionTech" ]
|
||||
then
|
||||
system="uos"
|
||||
elif [ ${systype} = "kylin" ]
|
||||
elif [ ${systype} = "Kylin" ]
|
||||
then
|
||||
system="kylin"
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "base/HGDef.h"
|
||||
#include "base/HGInc.h"
|
||||
#include "base/HGMsgPump.h"
|
||||
|
||||
class Manager
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "Manager.h"
|
||||
#include "Msg.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ver_1
|
||||
{
|
||||
|
|
|
@ -89,6 +89,10 @@ namespace ver_2
|
|||
if (0 == imgType)
|
||||
return -1;
|
||||
|
||||
int ret = LoadBase64(Utf8ToStdString(imagePath), imgBase64);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
std::string prefix = "data:image/jpeg;base64,";
|
||||
if (HGIMGFMT_TYPE_BMP == imgType)
|
||||
prefix = "data:image/bmp;base64,";
|
||||
|
@ -100,11 +104,6 @@ namespace ver_2
|
|||
prefix = "data:image/pdf;base64,";
|
||||
else if (HGIMGFMT_TYPE_OFD == imgType)
|
||||
prefix = "data:image/ofd;base64,";
|
||||
|
||||
int ret = GetBase64(Utf8ToStdString(imagePath), imgBase64);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
imgBase64.insert(0, prefix);
|
||||
return 0;
|
||||
}
|
||||
|
@ -132,10 +131,12 @@ namespace ver_2
|
|||
suffix = "ofd";
|
||||
|
||||
std::string imagePath2 = GetFilePath(suffix);
|
||||
int ret = SaveBase64(imagePath2, imagePath.c_str() + pos + 1);
|
||||
if (0 == ret)
|
||||
imagePath = StdStringToUtf8(imagePath2);
|
||||
int ret = SaveBase64(imgBase64.c_str() + pos + 1, imagePath2);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
imagePath = StdStringToUtf8(imagePath2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::DeleteLocalFile(const std::string& filePath)
|
||||
|
@ -143,6 +144,44 @@ namespace ver_2
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::ClearGlobalFileSavePath()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::MergeLocalImage(const std::vector<std::string>& imagePathList, const std::string& mode,
|
||||
const std::string& align, int interval, std::string& outImagePath)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::LocalMakeMultiImage(const std::vector<std::string>& imagePathList, const std::string& format,
|
||||
const std::string& tiffCompression, int tiffJpegQuality, std::string& outImagePath)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::SplitLocalImage(const std::string& imagePath, const std::string& mode, int location,
|
||||
std::vector<std::string>& outImagePathList)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::LocalMakeZipFile(const std::vector<std::string>& filePathList, std::string& outZipPath)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::LocalImageDeskew(const std::string& imagePath, std::string& outImagePath)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManagerV2::UploadLocalFile(const std::string& filePath, const std::string& mode, const std::string& remoteFilePath)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string ManagerV2::GetCfgStringValue(const std::string& app, const std::string& key, const std::string& def)
|
||||
{
|
||||
HGChar cfgPath[256];
|
||||
|
@ -206,7 +245,7 @@ namespace ver_2
|
|||
return (HGBASE_ERR_OK == HGBase_SetProfileInt(cfgPath, app.c_str(), key.c_str(), (HGInt)val));
|
||||
}
|
||||
|
||||
int ManagerV2::GetBase64(const std::string& fileName, std::string& base64)
|
||||
int ManagerV2::LoadBase64(const std::string& fileName, std::string& base64)
|
||||
{
|
||||
base64.clear();
|
||||
|
||||
|
@ -243,7 +282,7 @@ namespace ver_2
|
|||
return ret;
|
||||
}
|
||||
|
||||
int ManagerV2::SaveBase64(const std::string& fileName, const std::string& base64)
|
||||
int ManagerV2::SaveBase64(const std::string& base64, const std::string& fileName)
|
||||
{
|
||||
if (base64.empty())
|
||||
return -1;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "Manager.h"
|
||||
#include "Msg.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ver_2
|
||||
{
|
||||
|
@ -53,18 +54,35 @@ namespace ver_2
|
|||
int SaveLocalImage(const std::string& imgBase64, std::string& imagePath);
|
||||
// 删除本地文件
|
||||
int DeleteLocalFile(const std::string& filePath);
|
||||
// 清理全局文件保存目录
|
||||
int ClearGlobalFileSavePath();
|
||||
// 合成本地图像
|
||||
int MergeLocalImage(const std::vector<std::string>& imagePathList, const std::string& mode,
|
||||
const std::string& align, int interval, std::string& outImagePath);
|
||||
// 本地合成多张图像
|
||||
int LocalMakeMultiImage(const std::vector<std::string>& imagePathList, const std::string& format,
|
||||
const std::string& tiffCompression, int tiffJpegQuality, std::string& outImagePath);
|
||||
// 拆分本地图像
|
||||
int SplitLocalImage(const std::string& imagePath, const std::string& mode, int location,
|
||||
std::vector<std::string>& outImagePathList);
|
||||
// 本地生成压缩文件
|
||||
int LocalMakeZipFile(const std::vector<std::string>& filePathList, std::string& outZipPath);
|
||||
// 本地图像纠偏
|
||||
int LocalImageDeskew(const std::string& imagePath, std::string& outImagePath);
|
||||
// 上传文件
|
||||
int UploadLocalFile(const std::string& filePath, const std::string& mode, const std::string& remoteFilePath);
|
||||
|
||||
private:
|
||||
std::string GetCfgStringValue(const std::string& app, const std::string& key, const std::string& def);
|
||||
int GetCfgIntValue(const std::string& app, const std::string& key, int def);
|
||||
bool GetCfgBoolValue(const std::string& app, const std::string& key, bool def);
|
||||
bool SetCfgStringValue(const std::string& app, const std::string& key, const std::string& val);
|
||||
bool SetCfgIntValue(const std::string& app, const std::string& key, int val);
|
||||
bool SetCfgBoolValue(const std::string& app, const std::string& key, bool val);
|
||||
static int GetBase64(const std::string& fileName, std::string& base64);
|
||||
static int SaveBase64(const std::string& fileName, const std::string& base64);
|
||||
std::string GetFilePath(const std::string& suffix);
|
||||
std::string GetImagePath();
|
||||
static std::string GetCfgStringValue(const std::string& app, const std::string& key, const std::string& def);
|
||||
static int GetCfgIntValue(const std::string& app, const std::string& key, int def);
|
||||
static bool GetCfgBoolValue(const std::string& app, const std::string& key, bool def);
|
||||
static bool SetCfgStringValue(const std::string& app, const std::string& key, const std::string& val);
|
||||
static bool SetCfgIntValue(const std::string& app, const std::string& key, int val);
|
||||
static bool SetCfgBoolValue(const std::string& app, const std::string& key, bool val);
|
||||
static int LoadBase64(const std::string& fileName, std::string& base64);
|
||||
static int SaveBase64(const std::string& base64, const std::string& fileName);
|
||||
static std::string GetFilePath(const std::string& suffix);
|
||||
static std::string GetImagePath();
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Reference in New Issue