diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-11-14 20:45:21 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-11-14 20:45:21 +0800 |
commit | c12df3744f04716e88e905888beeaaa4f331d687 (patch) | |
tree | cab30e38d8fc70065dc873483a69670754e300e5 | |
parent | b4c4cefb706f9c43a54fecb18cb8ee50f0f0e19a (diff) | |
download | QMidiPlayer-c12df3744f04716e88e905888beeaaa4f331d687.tar.xz |
Windows is such a brilliant operating system.
-rw-r--r-- | qmidiplayer-desktop/CMakeLists.txt | 7 | ||||
-rw-r--r-- | qmidiplayer-desktop/main.cpp | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/CMakeLists.txt b/qmidiplayer-desktop/CMakeLists.txt index a9b6bf1..7064e28 100644 --- a/qmidiplayer-desktop/CMakeLists.txt +++ b/qmidiplayer-desktop/CMakeLists.txt @@ -43,6 +43,13 @@ set(qmpdesktop_SOURCES resources.qrc ) +if(WIN32) + set(qmpdesktop_SOURCES + ${qmpdesktop_SOURCES} + qmidiplayer.rc + ) +endif(WIN32) + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) diff --git a/qmidiplayer-desktop/main.cpp b/qmidiplayer-desktop/main.cpp index 602aedc..ba44e99 100644 --- a/qmidiplayer-desktop/main.cpp +++ b/qmidiplayer-desktop/main.cpp @@ -21,9 +21,15 @@ #include <QTranslator> #include <QLibraryInfo> #include <QCommandLineParser> +#ifdef _WIN32 +#include <windows.h> +#endif int main(int argc,char **argv) { +#ifdef _WIN32 + FreeConsole(); +#endif QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QCoreApplication::setApplicationName("qmidiplayer"); QCoreApplication::setApplicationVersion(APP_VERSION); |