mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
feat: Add VERSIONINFO resource for windows (#4912)
This commit is contained in:
parent
8f99af5b7e
commit
b3ed3285ee
|
@ -49,6 +49,7 @@
|
|||
- Dev: Changed lifetime of context menus. (#4924)
|
||||
- Dev: Refactor `ChannelView`, removing a bunch of clang-tidy warnings. (#4926)
|
||||
- Dev: Refactor `IrcMessageHandler`, removing a bunch of clang-tidy warnings & changing its public API. (#4927)
|
||||
- Dev: `Details` file properties tab is now populated on Windows. (#4912)
|
||||
|
||||
## 2.4.6
|
||||
|
||||
|
|
|
@ -36,7 +36,11 @@ if(BUILD_BENCHMARKS)
|
|||
list(APPEND VCPKG_MANIFEST_FEATURES "benchmarks")
|
||||
endif()
|
||||
|
||||
project(chatterino VERSION 2.4.6)
|
||||
project(chatterino
|
||||
VERSION 2.4.6
|
||||
DESCRIPTION "Chat client for twitch.tv"
|
||||
HOMEPAGE_URL "https://chatterino.com/"
|
||||
)
|
||||
|
||||
if(CHATTERINO_LTO)
|
||||
include(CheckIPOSupported)
|
||||
|
|
|
@ -6,7 +6,6 @@ set(
|
|||
qt.conf
|
||||
resources.qrc
|
||||
resources_autogenerated.qrc
|
||||
windows.rc
|
||||
themes/ChatterinoTheme.schema.json
|
||||
)
|
||||
set(RES_IMAGE_EXCLUDE_FILTER ^linuxinstall/)
|
||||
|
@ -78,7 +77,16 @@ endforeach ()
|
|||
list(JOIN RES_HEADER_CONTENT "\n" RES_HEADER_CONTENT)
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/ResourcesAutogen.hpp.in ${CMAKE_BINARY_DIR}/autogen/ResourcesAutogen.hpp @ONLY)
|
||||
|
||||
set(RES_AUTOGEN_FILES
|
||||
if (WIN32)
|
||||
if (NOT PROJECT_VERSION_TWEAK)
|
||||
set(PROJECT_VERSION_TWEAK 0)
|
||||
endif()
|
||||
string(TIMESTAMP CURRENT_YEAR "%Y")
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/windows.rc.in ${CMAKE_BINARY_DIR}/autogen/windows.rc @ONLY)
|
||||
list(APPEND RES_AUTOGEN_FILES "${CMAKE_BINARY_DIR}/autogen/windows.rc")
|
||||
endif ()
|
||||
|
||||
list(APPEND RES_AUTOGEN_FILES
|
||||
"${CMAKE_SOURCE_DIR}/resources/resources_autogenerated.qrc"
|
||||
"${CMAKE_BINARY_DIR}/autogen/ResourcesAutogen.cpp"
|
||||
"${CMAKE_BINARY_DIR}/autogen/ResourcesAutogen.hpp"
|
||||
|
|
34
cmake/resources/windows.rc.in
Normal file
34
cmake/resources/windows.rc.in
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <winver.h>
|
||||
|
||||
IDI_ICON1 ICON "@RES_DIR@/icon.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS VS_FF_SPECIALBUILD
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "ProductName", "Chatterino"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@"
|
||||
VALUE "CompanyName", "Chatterino, @PROJECT_HOMEPAGE_URL@"
|
||||
VALUE "FileDescription", "Chatterino"
|
||||
VALUE "FileVersion", "@PROJECT_VERSION@"
|
||||
VALUE "SpecialBuild", "@GIT_COMMIT@"
|
||||
VALUE "InternalName", "Chatterino"
|
||||
VALUE "OriginalFilename", "Chatterino"
|
||||
VALUE "LegalCopyright", "Project contributors 2016-@CURRENT_YEAR@"
|
||||
VALUE "Licence", "MIT"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
|
@ -1 +0,0 @@
|
|||
IDI_ICON1 ICON DISCARDABLE "icon.ico"
|
|
@ -646,13 +646,7 @@ set(SOURCE_FILES
|
|||
${CMAKE_SOURCE_DIR}/resources/resources.qrc
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
# clang-cl doesn't support resource files
|
||||
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
list(APPEND SOURCE_FILES "${CMAKE_SOURCE_DIR}/resources/windows.rc")
|
||||
endif ()
|
||||
|
||||
elseif (APPLE)
|
||||
if (APPLE)
|
||||
set(MACOS_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/resources/chatterino.icns")
|
||||
list(APPEND SOURCE_FILES "${MACOS_BUNDLE_ICON_FILE}")
|
||||
set_source_files_properties(${MACOS_BUNDLE_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
|
Loading…
Reference in a new issue