Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
ctltool
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
李定达
ctltool
Commits
3962c81c
Commit
3962c81c
authored
Oct 14, 2020
by
OFFICE\dingda.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数增加参数传入
parent
9aa38f92
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
10 deletions
+51
-10
ctltool.pro
+1
-2
main.cpp
+50
-2
twmain.cpp
+0
-6
No files found.
ctltool.pro
View file @
3962c81c
...
...
@@ -15,6 +15,5 @@ CONFIG -= app_bundle
TEMPLATE
=
app
SOURCES
+=
main
.
cpp
\
twmain
.
cpp
SOURCES
+=
main
.
cpp
main.cpp
View file @
3962c81c
...
...
@@ -626,6 +626,46 @@ void CreatSuccess(QString path)
}
//修改前
//ctltool.exe %1 %2 %3 %4 %5 "report_update.bat" "7"
//修改后 argv[8] 使用空格分隔形式如下 {sosftp地址 sosftp用户名 sosftp密码 anosftp地址 anosftp用户名 anosftp密码 cashftp地址 cashftp用户名 cashftp密码}
//ctltool.exe %1 %2 %3 %4 %5 "report_update.bat" "7" "sos_ftp sos_ftp_user sos_ftp_pwd anos_ftp anos_ftp_user anos_ftp_pwd cash_ftp cash_ftp_user cash_ftp_pwd"
void
initConf
(
QString
serList
)
{
QStringList
list
=
serList
.
split
(
" "
);
if
(
list
.
size
()
>=
3
)
{
ftp1ur
=
list
[
0
];
ftp1un
=
list
[
1
];
ftp1pw
=
list
[
2
];
}
if
(
list
.
size
()
>=
6
)
{
ftp2ur
=
list
[
3
];
ftp2un
=
list
[
4
];
ftp2pw
=
list
[
5
];
}
if
(
list
.
size
()
>=
9
)
{
ftp3ur
=
list
[
6
];
ftp3un
=
list
[
7
];
ftp3pw
=
list
[
8
];
}
if
(
upmin
==
0
)
upmin
=
10
;
QLOG_INFO
()
<<
"sos ftp : "
<<
ftp1ur
<<
ftp1un
<<
ftp1pw
;
QLOG_INFO
()
<<
"anos ftp : "
<<
ftp2ur
<<
ftp2un
<<
ftp2pw
;
QLOG_INFO
()
<<
"cash ftp : "
<<
ftp3ur
<<
ftp3un
<<
ftp3pw
;
QLOG_INFO
()
<<
"upmin : "
<<
upmin
;
}
void
init
()
{
ftp1ur
=
QSettings
(
qApp
->
applicationDirPath
()
+
"/"
+
"ctl.ini"
,
QSettings
::
IniFormat
).
value
(
"all/ftp1"
).
toString
();
...
...
@@ -914,7 +954,7 @@ int main(int argc, char *argv[])
// getDay(2, tmpdays);
// QLOG_INFO() << tmpdays;
if
(
argc
<
6
)
if
(
argc
<
7
)
{
QLOG_ERROR
()
<<
"error argc : "
<<
argc
;
return
1
;
...
...
@@ -945,7 +985,15 @@ int main(int argc, char *argv[])
QLOG_INFO
()
<<
"brgin init ..."
;
if
(
argc
>
8
)
{
initConf
(
QString
(
argv
[
8
]));
}
else
{
init
();
}
// if(battype.isEmpty())
// {
...
...
@@ -953,7 +1001,7 @@ int main(int argc, char *argv[])
// return 1;
// }
if
(
argc
>
=
7
)
if
(
argc
>
7
)
{
checkday
=
QString
(
argv
[
7
]).
toInt
();
}
...
...
twmain.cpp
deleted
100644 → 0
View file @
9aa38f92
//#include<QCoreApplication>
//int main(int argc, char **argv)
//{
//}
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