Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmclientUi
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
shuai.liu
FmclientUi
Commits
b8736882
Commit
b8736882
authored
Apr 09, 2019
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加测试工程文件
parent
3b63bf88
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
1 deletions
+172
-1
.gitignore
+0
-1
FmclientUi_test.pro
+63
-0
main_test.cpp
+68
-0
version.rc
+41
-0
No files found.
.gitignore
View file @
b8736882
...
...
@@ -30,7 +30,6 @@ ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
*.manifest
...
...
FmclientUi_test.pro
0 → 100644
View file @
b8736882
#-------------------------------------------------
#
# Project created by QtCreator 2017-12-12T18:08:21
#
#-------------------------------------------------
QT
+=
core
gui
greaterThan
(
QT_MAJOR_VERSION
,
4
)
:
QT
+=
widgets
TARGET
=
fmclient
TEMPLATE
=
app
LIBS
+=
-
L
$$
PWD
/
lib
/
LIBS
+=
-
lfmcrypt
LIBS
+=
-
L
$$
PWD
/
out32dll
INCLUDEPATH
+=
$$
PWD
/
openssl
INCLUDEPATH
+=
.
/
encrypt
\
$$
PWD
/
gtest
\
$$
PWD
/
base
include
(.
/
QsLog
/
QsLog
.
pri
)
CONFIG
(
debug
,
debug
|
release
){
DESTDIR
=
$$
PWD
/
bin
/
debug
}
else
{
DESTDIR
=
$$
PWD
/
bin
/
release
}
SOURCES
+=
main_test
.
cpp
\
widget
.
cpp
\
qfmclient
.
cpp
\
scanner
.
cpp
\
encrypt
/
encrypt
.
cpp
\
base
/
FmPee
.
cpp
\
base
/
FPe
.
cpp
\
base
/
md5
.
cpp
\
verifysign
.
cpp
HEADERS
+=
widget
.
h
\
fmcrypt
.
h
\
qfmclient
.
h
\
app_single
.
h
\
log
.
h
\
utility
.
h
\
scanner
.
h
\
encrypt
/
encrypt
.
h
\
qfmclient_test
.
h
\
encrypt
/
encrypt_test
.
h
\
app_single_test
.
h
\
base
/
FmPee
.
h
\
base
/
FPe
.
h
\
base
/
md5
.
h
\
verifysign
.
h
\
verifysign_test
.
h
FORMS
+=
widget
.
ui
\
scanner
.
ui
RC_FILE
+=
version
.
rc
main_test.cpp
0 → 100644
View file @
b8736882
#include "widget.h"
#include <QApplication>
#include "qfmclient.h"
#include "app_single.h"
#include "log.h"
#include "verifysign.h"
#include "base/FPe.h"
#include "scanner.h"
#include "gtest/gtest.h"
#include "qfmclient_test.h"
#include "encrypt/encrypt_test.h"
#include "app_single_test.h"
#include "verifysign_test.h"
#ifdef QT_DEBUG
#pragma comment (lib, "gtestd.lib")
#pragma comment (lib, "gtest_maind.lib")
#else
#pragma comment (lib, "gtest.lib")
#pragma comment (lib, "gtest_main.lib")
#endif
#define USE_TEST
int
main
(
int
argc
,
char
*
argv
[])
{
QApplication
a
(
argc
,
argv
);
#ifndef USE_TEST
if
(
!
checkOnly
())
{
OutputDebugString
(
L"FmclientUi running."
);
return
0
;
}
QString
filePath
=
QCoreApplication
::
applicationFilePath
();
FPE
::
SetMy
(
TRUE
);
std
::
string
rData
=
FPE
::
ReadDate
((
char
*
)
filePath
.
toStdString
().
c_str
());
OutputDebugStringA
(
rData
.
c_str
());
if
(
!
VerifySign
(
filePath
.
toStdString
(),
rData
))
{
qDebug
()
<<
"verify failed! this application can not run."
;
return
0
;
}
// QFmClient client;
// if(!client.verifyWhitelists())
// {
// OutputDebugStringA("verify whitelists failed");
// return 0;
// }
InitLogger
();
QLOG_INFO
()
<<
"start FmclientUi..."
;
Widget
w
;
scanner
s
;
QFmClient
client
;
QObject
::
connect
(
&
client
,
&
QFmClient
::
HideUi
,
&
w
,
&
Widget
::
hide
,
Qt
::
QueuedConnection
);
QObject
::
connect
(
&
client
,
&
QFmClient
::
ShowUi
,
&
w
,
&
Widget
::
showRequesting
,
Qt
::
QueuedConnection
);
QObject
::
connect
(
&
client
,
&
QFmClient
::
ShowRefundUi
,
&
s
,
&
scanner
::
showRefund
);
QObject
::
connect
(
&
s
,
SIGNAL
(
fetched
(
QString
)),
&
client
,
SLOT
(
SetTransactionId
(
QString
)));
QObject
::
connect
(
&
client
,
&
QFmClient
::
finished
,
&
a
,
&
a
.
quit
);
client
.
start
();
return
a
.
exec
();
#else
testing
::
InitGoogleTest
(
&
argc
,
argv
);
RUN_ALL_TESTS
();
return
0
;
#endif
}
version.rc
0 → 100644
View file @
b8736882
#if defined(UNDER_CE)
#include <winbase.h>
#else
#include <winver.h>
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080404b0"
BEGIN
VALUE "CompanyName", "Freemud\0"
VALUE "FileDescription", "Freemud client\0"
VALUE "FileVersion", "1.0.3.0\0"
VALUE "ProductVersion", "1.0.3.0\0"
VALUE "LegalCopyright", "Copyright (C) Freemud\0"
VALUE "LegalTrademarks", "Freemud\0"
VALUE "OriginalFilename", "fmclient.exe\0"
VALUE "ProductName", "client\0"
VALUE "InternalName", "fmclient.exe\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x804, 1200
END
END
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