HGGitLab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
app
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luoliangyi
app
Commits
9826a356
Commit
9826a356
authored
Apr 19, 2022
by
luoliangyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决webservice在linux上的编译问题
parent
ee966c60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
build/uos/amd64/HGWebService/HGWebService.cbp
build/uos/amd64/HGWebService/HGWebService.cbp
+5
-0
release/bin/uos/amd64/HGWebService
release/bin/uos/amd64/HGWebService
+0
-0
sdk/webservice/Manager.cpp
sdk/webservice/Manager.cpp
+7
-7
No files found.
build/uos/amd64/HGWebService/HGWebService.cbp
View file @
9826a356
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
<Add
directory=
"../../../../third_party/sane"
/>
<Add
directory=
"../../../../third_party/sane"
/>
<Add
directory=
"../../../../release/include"
/>
<Add
directory=
"../../../../release/include"
/>
<Add
directory=
"../../../../third_party/libzip/uos/amd64/include"
/>
<Add
directory=
"../../../../third_party/libzip/uos/amd64/include"
/>
<Add
directory=
"../../../../third_party/json"
/>
</Compiler>
</Compiler>
<Linker>
<Linker>
<Add
option=
"-L../../../../release/bin/uos/amd64"
/>
<Add
option=
"-L../../../../release/bin/uos/amd64"
/>
...
@@ -63,6 +64,10 @@
...
@@ -63,6 +64,10 @@
<Unit
filename=
"../../../../sdk/webservice/main.cpp"
/>
<Unit
filename=
"../../../../sdk/webservice/main.cpp"
/>
<Unit
filename=
"../../../../third_party/base64/base64.cpp"
/>
<Unit
filename=
"../../../../third_party/base64/base64.cpp"
/>
<Unit
filename=
"../../../../third_party/base64/base64.h"
/>
<Unit
filename=
"../../../../third_party/base64/base64.h"
/>
<Unit
filename=
"../../../../third_party/json/cJSON.c"
>
<Option
compilerVar=
"CC"
/>
</Unit>
<Unit
filename=
"../../../../third_party/json/cJSON.h"
/>
<Unit
filename=
"../../../../third_party/sha1/sha1.cpp"
/>
<Unit
filename=
"../../../../third_party/sha1/sha1.cpp"
/>
<Unit
filename=
"../../../../third_party/sha1/sha1.h"
/>
<Unit
filename=
"../../../../third_party/sha1/sha1.h"
/>
<Extensions>
<Extensions>
...
...
release/bin/uos/amd64/HGWebService
View file @
9826a356
No preview for this file type
sdk/webservice/Manager.cpp
View file @
9826a356
...
@@ -166,7 +166,7 @@ bool Manager::GetDevNames(std::vector<std::string>& devNameList)
...
@@ -166,7 +166,7 @@ bool Manager::GetDevNames(std::vector<std::string>& devNameList)
return
true
;
return
true
;
}
}
bool
Manager
::
GetImageByDevId
(
const
std
::
string
&
devId
,
std
::
vector
<
std
::
string
>&
imgNameList
,
bool
Manager
::
GetImageByDevId
(
const
std
::
string
&
devId
,
std
::
vector
<
std
::
string
>&
imgNameList
,
std
::
vector
<
std
::
string
>&
imgBase64List
)
std
::
vector
<
std
::
string
>&
imgBase64List
)
{
{
imgNameList
.
clear
();
imgNameList
.
clear
();
...
@@ -365,7 +365,7 @@ bool Manager::ExportZipFile(HGByte** data, HGUInt* size)
...
@@ -365,7 +365,7 @@ bool Manager::ExportZipFile(HGByte** data, HGUInt* size)
{
{
*
data
=
NULL
;
*
data
=
NULL
;
*
size
=
0
;
*
size
=
0
;
std
::
string
devId
;
std
::
string
devId
;
GetCurDevId
(
devId
);
GetCurDevId
(
devId
);
...
@@ -395,7 +395,7 @@ bool Manager::ExportZipFile(HGByte** data, HGUInt* size)
...
@@ -395,7 +395,7 @@ bool Manager::ExportZipFile(HGByte** data, HGUInt* size)
{
{
HGImage
img
=
NULL
;
HGImage
img
=
NULL
;
std
::
string
fileName
=
filePath
+
fileNameList
[
i
];
std
::
string
fileName
=
filePath
+
fileNameList
[
i
];
zip_source_t
*
s
=
zip_source_file
(
z
,
fileName
.
c_str
(),
0
,
0
);
zip_source_t
*
s
=
zip_source_file
(
z
,
fileName
.
c_str
(),
0
,
0
);
if
(
NULL
!=
s
)
if
(
NULL
!=
s
)
{
{
...
@@ -774,7 +774,7 @@ std::string Manager::GetFilePath(const std::string& devId)
...
@@ -774,7 +774,7 @@ std::string Manager::GetFilePath(const std::string& devId)
#if defined(HG_CMP_MSC)
#if defined(HG_CMP_MSC)
sprintf
(
imgPath
,
"%sHuaGo/WebService/%s/"
,
docsPath
,
Utf8ToAnsi
(
devId
.
c_str
()).
c_str
());
sprintf
(
imgPath
,
"%sHuaGo/WebService/%s/"
,
docsPath
,
Utf8ToAnsi
(
devId
.
c_str
()).
c_str
());
#else
#else
sprintf
(
imgPath
,
"%sHuaGo/WebService/%s/"
,
docsPath
,
devId
.
c_str
()
.
c_str
()
);
sprintf
(
imgPath
,
"%sHuaGo/WebService/%s/"
,
docsPath
,
devId
.
c_str
());
#endif
#endif
HGChar
stdImgPath
[
512
];
HGChar
stdImgPath
[
512
];
HGBase_StandardiseFileName
(
imgPath
,
stdImgPath
,
512
);
HGBase_StandardiseFileName
(
imgPath
,
stdImgPath
,
512
);
...
@@ -913,7 +913,7 @@ HGByte* Manager::GetBuffer(const std::string& fileName, HGUInt* size)
...
@@ -913,7 +913,7 @@ HGByte* Manager::GetBuffer(const std::string& fileName, HGUInt* size)
if
(
*
size
>
0
)
if
(
*
size
>
0
)
{
{
data
=
new
HGByte
[
*
size
];
data
=
new
HGByte
[
*
size
];
HGUInt
readLen
=
(
HGUInt
)
fread
(
data
,
1
,
*
size
,
file
);
HGUInt
readLen
=
(
HGUInt
)
fread
(
data
,
1
,
*
size
,
file
);
if
(
readLen
!=
*
size
)
if
(
readLen
!=
*
size
)
{
{
...
@@ -971,7 +971,7 @@ int Manager::sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned i
...
@@ -971,7 +971,7 @@ int Manager::sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned i
if
(
p
->
m_devName
.
empty
())
if
(
p
->
m_devName
.
empty
())
{
{
p
->
m_devName
=
sane_dev
->
name
;
p
->
m_devName
=
sane_dev
->
name
;
}
}
HGBase_LeaveLock
(
p
->
m_lock
);
HGBase_LeaveLock
(
p
->
m_lock
);
}
}
break
;
break
;
...
@@ -1099,4 +1099,4 @@ int Manager::sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned i
...
@@ -1099,4 +1099,4 @@ int Manager::sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned i
}
}
return
0
;
return
0
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment