diff --git a/.gitignore b/.gitignore index 187a11d751..1499c92650 100644 --- a/.gitignore +++ b/.gitignore @@ -138,6 +138,7 @@ CMakeCache.txt /desktop/run-app.sh /desktop/CMakeFiles/ /desktop/reportApp/Makefile +/deployment/windows/Status.rc *_autogen/ CompleteBundleWin.cmake logger_settings.ini diff --git a/deployment/macos/create-icon.sh b/deployment/macos/create-icon.sh index af02e3c7aa..fd1bb76da2 100755 --- a/deployment/macos/create-icon.sh +++ b/deployment/macos/create-icon.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash function make_icns { - local file="status-icon.png" + local file="../status-icon.png" local iconset="$(mktemp -d)" local output_icon="status-icon.icns" diff --git a/deployment/macos/status-icon.png b/deployment/status-icon.png similarity index 100% rename from deployment/macos/status-icon.png rename to deployment/status-icon.png diff --git a/deployment/macos/status-icon.svg b/deployment/status-icon.svg similarity index 100% rename from deployment/macos/status-icon.svg rename to deployment/status-icon.svg diff --git a/deployment/windows/Status.rc.in b/deployment/windows/Status.rc.in new file mode 100644 index 0000000000..6e4bd8e946 --- /dev/null +++ b/deployment/windows/Status.rc.in @@ -0,0 +1,71 @@ +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE resource. +// +#ifndef APSTUDIO_INVOKED +#include "targetver.h" +#endif +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE 9, 1 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. + +IDI_STATUS ICON "${ICO_RESOURCE_PATH}" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#ifndef APSTUDIO_INVOKED\r\n" + "#include ""targetver.h""\r\n" + "#endif\r\n" + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE resource. +// + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/deployment/windows/resource.h b/deployment/windows/resource.h new file mode 100644 index 0000000000..8f7a0e1fca --- /dev/null +++ b/deployment/windows/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// clang-format off +// Used by Status.rc + +#define IDI_STATUS 107 +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS + +#define _APS_NO_MFC 130 +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git a/deployment/windows/status.ico b/deployment/windows/status.ico new file mode 100644 index 0000000000..5a8f1b5c0e Binary files /dev/null and b/deployment/windows/status.ico differ diff --git a/deployment/windows/targetver.h b/deployment/windows/targetver.h new file mode 100644 index 0000000000..94495af9a9 --- /dev/null +++ b/deployment/windows/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include \ No newline at end of file diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 32daa7fb5d..84c54eb9f1 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -26,6 +26,17 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/") set(USED_QT_MODULES Core Qml Quick WebSockets Svg) include(QtConfiguration) +set(ICON_PNG_RESOURCE_PATH "${CMAKE_SOURCE_DIR}/../deployment/status-icon.png") +if (WIN32) + set(ICO_RESOURCE_PATH "${CMAKE_SOURCE_DIR}/../deployment/windows/status.ico") + set(APPLICATION_MAIN_RC_PATH "${CMAKE_SOURCE_DIR}/../deployment/windows/Status.rc") + + configure_file( + ${CMAKE_SOURCE_DIR}/../deployment/windows/Status.rc.in + ${APPLICATION_MAIN_RC_PATH} + ) +endif() + message(STATUS "EXTERNAL_MODULES_DIR: ${EXTERNAL_MODULES_DIR}") string(REGEX MATCH "BUILD_FOR_BUNDLE" BUILD_FOR_BUNDLE "${CMAKE_CXX_FLAGS}") diff --git a/desktop/main.cpp b/desktop/main.cpp index 08e340304b..6a1162b0a3 100644 --- a/desktop/main.cpp +++ b/desktop/main.cpp @@ -228,6 +228,8 @@ int main(int argc, char **argv) { #ifdef BUILD_FOR_BUNDLE runUbuntuServer(); + + app.setWindowIcon(QIcon(":/icon.png")); #endif QQuickView view;