Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmupdate
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李定达
fmupdate
Commits
165cd6fb
Commit
165cd6fb
authored
Feb 27, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加服务延迟启动
parent
e02b03c4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
fmscupd/qtservice/src/qtservice.cpp
+2
-2
fmscupd/qtservice/src/qtservice_win.cpp
+3
-0
No files found.
fmscupd/qtservice/src/qtservice.cpp
View file @
165cd6fb
...
...
@@ -774,7 +774,7 @@ int QtServiceBase::exec()
{
if
(
d_ptr
->
args
.
size
()
>
1
)
{
QString
a
=
d_ptr
->
args
.
at
(
1
);
if
(
a
==
QLatin1String
(
"-i"
)
||
a
==
QLatin1String
(
"-install"
))
{
if
(
a
==
QLatin1String
(
"-i"
)
||
a
==
QLatin1String
(
"-install"
)
||
a
==
QLatin1String
(
"/i"
)
||
a
==
QLatin1String
(
"i"
)
)
{
if
(
!
d_ptr
->
controller
.
isInstalled
())
{
QString
account
;
QString
password
;
...
...
@@ -818,7 +818,7 @@ int QtServiceBase::exec()
if
(
ec
==
-
1
)
qErrnoWarning
(
"The service could not be executed."
);
return
ec
;
}
else
if
(
a
==
QLatin1String
(
"-t"
)
||
a
==
QLatin1String
(
"-terminate"
))
{
}
else
if
(
a
==
QLatin1String
(
"-t"
)
||
a
==
QLatin1String
(
"-terminate"
)
||
a
==
QLatin1String
(
"/t"
)
||
a
==
QLatin1String
(
"t"
)
)
{
if
(
!
d_ptr
->
controller
.
stop
())
qErrnoWarning
(
"The service could not be stopped."
);
return
0
;
...
...
fmscupd/qtservice/src/qtservice_win.cpp
View file @
165cd6fb
...
...
@@ -894,8 +894,11 @@ bool QtServiceBasePrivate::install(const QString &account, const QString &passwo
result
=
true
;
if
(
!
serviceDescription
.
isEmpty
())
{
SERVICE_DESCRIPTION
sdesc
;
SERVICE_DELAYED_AUTO_START_INFO
delaystart
=
{
TRUE
};
sdesc
.
lpDescription
=
(
wchar_t
*
)
serviceDescription
.
utf16
();
pChangeServiceConfig2
(
hService
,
SERVICE_CONFIG_DESCRIPTION
,
&
sdesc
);
pChangeServiceConfig2
(
hService
,
SERVICE_CONFIG_DELAYED_AUTO_START_INFO
,
&
delaystart
);
}
SERVICE_FAILURE_ACTIONS
servFailActions
;
SC_ACTION
failActions
[
3
];
...
...
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