forked from BesLyric-for-X/BesLyric-for-X
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
53 lines (38 loc) · 1.26 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "StackFrame.h"
#include "AppHelper.h"
#include "MyApplication.h"
//------------------- test ----------------------
#include "BesMessageBox.h"
#include "Define/Define.h"
#include "LyricSearcherFactory/LyricSearcherFactory.h"
#include <QDebug>
#include <LyricListManager.h>
#ifdef Q_OS_WIN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
void test()
{
}
//------------------- test ----------------------
int main(int argc, char *argv[])
{
#ifdef Q_OS_WIN
// They are used to prevent the installer and the uninstaller of
// Inno Setup from being executed while BesLyric-for-X is running.
CreateMutex(NULL, FALSE, TEXT("AppMutex_{7ACD3BB0-DE1F-416E-A8DC-5C6EE4AECB50}"));
CreateMutex(NULL, FALSE, TEXT("Global\\AppMutex_{7ACD3BB0-DE1F-416E-A8DC-5C6EE4AECB50}"));
#endif
#if defined(Q_OS_WIN) || defined(Q_OS_LINUX)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
MyApplication app(argc, argv);
app.setApplicationName("BesLyric-for-X");
QGuiApplication::setWindowIcon(QIcon(":/Beslyric.ico"));
StackFrame MainFrameWidget(&app);
app.SetMakingLyricNotifyWidget(MainFrameWidget.mainWidget);
app.SetStackFrame(&MainFrameWidget);
MainFrameWidget.show();
//test();
return app.exec();
}