From 06b83f85f73f901e00785c2d0702c42f771a0665 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 3 Jan 2016 17:46:27 +0100 Subject: [PATCH] Changed: Add an icon for crash_report under Windows --HG-- branch : develop --- .../tools/misc/crash_report/CMakeLists.txt | 14 ++++--- .../tools/misc/crash_report/crash_report.cpp | 6 ++- .../tools/misc/crash_report/crash_report.rc | 35 ++++++++++++++++++ .../tools/misc/crash_report/nevraxpill.ico | Bin 0 -> 3638 bytes .../nel/tools/misc/crash_report/resources.qrc | 5 +++ 5 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 code/nel/tools/misc/crash_report/crash_report.rc create mode 100644 code/nel/tools/misc/crash_report/nevraxpill.ico create mode 100644 code/nel/tools/misc/crash_report/resources.qrc diff --git a/code/nel/tools/misc/crash_report/CMakeLists.txt b/code/nel/tools/misc/crash_report/CMakeLists.txt index c1dc661ae..1169aab8d 100644 --- a/code/nel/tools/misc/crash_report/CMakeLists.txt +++ b/code/nel/tools/misc/crash_report/CMakeLists.txt @@ -1,7 +1,9 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SRC_DIR}) -FILE(GLOB CRASHREPORT_SRC *.cpp) +FILE(GLOB CRASHREPORT_SRC *.cpp *.rc) FILE(GLOB CRASHREPORT_HDR *.h) +SET(CRASHREPORT_QRC resources.qrc) + SET(CRASHREPORT_MOC_HDR crash_report_socket.h crash_report_widget.h @@ -22,22 +24,24 @@ IF(WITH_QT) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(${QT_DEFINITIONS}) + QT4_ADD_RESOURCES(CRASHREPORT_QRC_SRCS ${CRASHREPORT_QRC}) QT4_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR}) QT4_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI}) - + SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) ELSE() + QT5_ADD_RESOURCES(CRASHREPORT_QRC_SRCS ${CRASHREPORT_QRC}) QT5_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR}) QT5_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI}) ENDIF() -SOURCE_GROUP(QtResources FILES ${CRASHREPORT_UI}) +SOURCE_GROUP(QtResources FILES ${CRASHREPORT_UI} ${CRASHREPORT_QRC_SRCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${CRASHREPORT_UI_HDR}) -SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${CRASHREPORT_MOC_SRC}) +SOURCE_GROUP(QtGeneratedMocSrc FILES ${CRASHREPORT_MOC_SRC}) SOURCE_GROUP("source files" FILES ${CRASHREPORT_SRC}) SOURCE_GROUP("header files" FILES ${CRASHREPORT_HDR}) -ADD_EXECUTABLE(crash_report WIN32 ${CRASHREPORT_SRC} ${CRASHREPORT_HDR} ${CRASHREPORT_MOC_SRC} ${CRASHREPORT_UI_HDR}) +ADD_EXECUTABLE(crash_report WIN32 ${CRASHREPORT_SRC} ${CRASHREPORT_HDR} ${CRASHREPORT_MOC_SRC} ${CRASHREPORT_UI_HDR} ${CRASHREPORT_QRC_SRCS}) TARGET_LINK_LIBRARIES(crash_report ${QT_LIBRARIES}) NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report") diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index c6012a06b..f9191fde7 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -31,7 +31,7 @@ public: static void parse( int argc, char **argv, std::vector< std::pair< std::string, std::string > > &v ) { std::stack< std::string > stack; - std::string key; + std::string key; std::string value; for( int i = argc - 1 ; i >= 0; i-- ) @@ -105,7 +105,9 @@ int main(int argc, char **argv) } #endif - QApplication app( argc, argv ); + QApplication app(argc, argv); + + QApplication::setWindowIcon(QIcon(":/icons/nevraxpill.ico")); std::vector< std::pair< std::string, std::string > > params; diff --git a/code/nel/tools/misc/crash_report/crash_report.rc b/code/nel/tools/misc/crash_report/crash_report.rc new file mode 100644 index 000000000..e4949fd8f --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report.rc @@ -0,0 +1,35 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "nevraxpill.ico" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION NL_VERSION_RC +PRODUCTVERSION NL_VERSION_RC +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#else +FILEFLAGS 0x0L +#endif +FILEOS VOS__WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "Crash Report" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "crash_report.exe" + VALUE "ProductName", "Ryzom Core" + VALUE "ProductVersion", NL_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END diff --git a/code/nel/tools/misc/crash_report/nevraxpill.ico b/code/nel/tools/misc/crash_report/nevraxpill.ico new file mode 100644 index 0000000000000000000000000000000000000000..c5f25058384f0aba7d5193400e74efdc8a65ccc1 GIT binary patch literal 3638 zcmeH}y>1gh5Xb-b{cRiAJMh>Nt}K+7NFISE?|@SH73|6-RchB!9>8rZS|nF4DbnB) z(Sby<%H4cK7u6-OK?FTnq*W-}h&Vmg&O5@DCM`cfa~;R86ywdTvmqp;Chyl|)QZ zs;uYi?C7Qbc_y*fanJ8UMsY(vA;G8~O0gX#uiuN9@SB}s>pK(=w&_C=|0iQ|;x z^rFu^YfzN97T=cy>i3Gg==E*88&Lhp&Cj6g#|g)Kc@{-k#;q + + nevraxpill.ico + +