From 9f5477c433fab0ce266ab1182e36491ec8f5c111 Mon Sep 17 00:00:00 2001 From: Edgar Date: Sat, 19 Nov 2022 12:29:12 +0100 Subject: [PATCH] :hammer: Automatically generate resources files with cmake (#4159) Co-authored-by: pajlada Fixes https://github.com/Chatterino/chatterino2/issues/3949 --- .gitignore | 3 + CHANGELOG.md | 1 + CMakeLists.txt | 3 + cmake/resources/ResourcesAutogen.cpp.in | 13 ++ cmake/resources/ResourcesAutogen.hpp.in | 17 +++ cmake/resources/generate_resources.cmake | 82 +++++++++++ .../resources/resources_autogenerated.qrc.in | 9 ++ resources/_generate_resources.py | 39 ----- resources/generate_resources.py | 70 --------- resources/resources_autogenerated.qrc | 133 ------------------ src/CMakeLists.txt | 11 +- src/autogenerated/ResourcesAutogen.cpp | 80 ----------- src/autogenerated/ResourcesAutogen.hpp | 96 ------------- src/singletons/Resources.hpp | 2 +- 14 files changed, 134 insertions(+), 425 deletions(-) create mode 100644 cmake/resources/ResourcesAutogen.cpp.in create mode 100644 cmake/resources/ResourcesAutogen.hpp.in create mode 100644 cmake/resources/generate_resources.cmake create mode 100644 cmake/resources/resources_autogenerated.qrc.in delete mode 100644 resources/_generate_resources.py delete mode 100755 resources/generate_resources.py delete mode 100644 resources/resources_autogenerated.qrc delete mode 100644 src/autogenerated/ResourcesAutogen.cpp delete mode 100644 src/autogenerated/ResourcesAutogen.hpp diff --git a/.gitignore b/.gitignore index 9ef6b83f..c09b3bef 100644 --- a/.gitignore +++ b/.gitignore @@ -115,3 +115,6 @@ vcpkg_installed/ # NatVis files qt5.natvis qt6.natvis + +# Autogenerated resource file +resources/resources_autogenerated.qrc diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dd89ea9..70b5d8df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -132,6 +132,7 @@ - Dev: Batched checking live status for all channels after startup. (#3757, #3762, #3767) - Dev: Moved most command context into the command controller. (#3824) - Dev: Error NetworkResults now include the body data. (#3987) +- Dev: Automatically generate resources files with cmake. (#4159) ## 2.3.5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 309deb78..2800a628 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,9 @@ if (BUILD_TESTS OR BUILD_BENCHMARKS) add_definitions(-DCHATTERINO_TEST) endif () +# Generate resource files +include(cmake/resources/generate_resources.cmake) + add_subdirectory(src) if (BUILD_TESTS) diff --git a/cmake/resources/ResourcesAutogen.cpp.in b/cmake/resources/ResourcesAutogen.cpp.in new file mode 100644 index 00000000..ac5ad6b7 --- /dev/null +++ b/cmake/resources/ResourcesAutogen.cpp.in @@ -0,0 +1,13 @@ +/**************************************************************************** +** WARNING! This file is autogenerated by cmake +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ +#include "ResourcesAutogen.hpp" + +namespace chatterino { + +Resources2::Resources2() +{ +@RES_SOURCE_CONTENT@ +} +} // namespace chatterino diff --git a/cmake/resources/ResourcesAutogen.hpp.in b/cmake/resources/ResourcesAutogen.hpp.in new file mode 100644 index 00000000..b047192d --- /dev/null +++ b/cmake/resources/ResourcesAutogen.hpp.in @@ -0,0 +1,17 @@ +/**************************************************************************** +** WARNING! This file is autogenerated by cmake +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ +#include +#include "common/Singleton.hpp" + +namespace chatterino { + +class Resources2 : public Singleton +{ +public: + Resources2(); + +@RES_HEADER_CONTENT@ +}; +} // namespace chatterino \ No newline at end of file diff --git a/cmake/resources/generate_resources.cmake b/cmake/resources/generate_resources.cmake new file mode 100644 index 00000000..5acf1065 --- /dev/null +++ b/cmake/resources/generate_resources.cmake @@ -0,0 +1,82 @@ +set(RES_DIR "${CMAKE_SOURCE_DIR}/resources") +# Note: files in this ignorelist should be relative to ${RES_DIR} +set( + RES_IGNORED_FILES + .gitignore + qt.conf + resources.qrc + resources_autogenerated.qrc + windows.rc +) + +file(GLOB_RECURSE RES_ALL_FILES RELATIVE "${RES_DIR}" LIST_DIRECTORIES false CONFIGURE_DEPENDS "${RES_DIR}/*") +file(GLOB_RECURSE RES_IMAGE_FILES RELATIVE "${RES_DIR}" LIST_DIRECTORIES false CONFIGURE_DEPENDS "${RES_DIR}/*.png") + +list(REMOVE_ITEM RES_ALL_FILES ${RES_IGNORED_FILES}) + +############################### +# Generate resources_autogenerated.qrc +############################### +message(STATUS "Generating resources_autogenerated.qrc") +foreach (_file ${RES_ALL_FILES}) + list(APPEND RES_RESOURCES_CONTENT " ${_file}") +endforeach () +list(JOIN RES_RESOURCES_CONTENT "\n" RES_RESOURCES_CONTENT) +configure_file(${CMAKE_CURRENT_LIST_DIR}/resources_autogenerated.qrc.in ${RES_DIR}/resources_autogenerated.qrc @ONLY) + +############################### +# Generate ResourcesAutogen.cpp +############################### +message(STATUS "Generating ResourcesAutogen.cpp") +foreach (_file ${RES_IMAGE_FILES}) + get_filename_component(_ext "${_file}" EXT) + string(REPLACE "${_ext}" "" _var_name ${_file}) + string(REPLACE "/" "." _var_name ${_var_name}) + list(APPEND RES_SOURCE_CONTENT " this->${_var_name} = QPixmap(\":/${_file}\")\;") + list(APPEND RES_VAR_NAMES "${_var_name}") +endforeach () +list(JOIN RES_SOURCE_CONTENT "\n" RES_SOURCE_CONTENT) +configure_file(${CMAKE_CURRENT_LIST_DIR}/ResourcesAutogen.cpp.in ${CMAKE_BINARY_DIR}/autogen/ResourcesAutogen.cpp @ONLY) + +############################### +# Generate ResourcesAutogen.hpp +############################### +message(STATUS "Generating ResourcesAutogen.hpp") +set(_struct_list "") + +foreach (_file ${RES_IMAGE_FILES}) + get_filename_component(_dir "${_file}" DIRECTORY) + get_filename_component(_name "${_file}" NAME_WE) + string(REPLACE "/" "_" _dir "${_dir}") + if (NOT _dir) + set(_dir "root") + endif () + list(APPEND ${_dir} "${_name}") + list(APPEND _struct_list "${_dir}") +endforeach () + +list(REMOVE_DUPLICATES _struct_list) + +foreach (_str_name ${_struct_list}) + if (NOT "${_str_name}" STREQUAL "root") + list(APPEND RES_HEADER_CONTENT " struct {") + set(_indent " ") + else () + set(_indent " ") + endif () + foreach (_name ${${_str_name}}) + list(APPEND RES_HEADER_CONTENT "${_indent}QPixmap ${_name}\;") + endforeach () + if (NOT "${_str_name}" STREQUAL "root") + list(APPEND RES_HEADER_CONTENT " } ${_str_name}\;") + endif () +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 + "${CMAKE_SOURCE_DIR}/resources/resources_autogenerated.qrc" + "${CMAKE_BINARY_DIR}/autogen/ResourcesAutogen.cpp" + "${CMAKE_BINARY_DIR}/autogen/ResourcesAutogen.hpp" + ) \ No newline at end of file diff --git a/cmake/resources/resources_autogenerated.qrc.in b/cmake/resources/resources_autogenerated.qrc.in new file mode 100644 index 00000000..cce67fae --- /dev/null +++ b/cmake/resources/resources_autogenerated.qrc.in @@ -0,0 +1,9 @@ + + + +@RES_RESOURCES_CONTENT@ + + \ No newline at end of file diff --git a/resources/_generate_resources.py b/resources/_generate_resources.py deleted file mode 100644 index 7f1ee7a5..00000000 --- a/resources/_generate_resources.py +++ /dev/null @@ -1,39 +0,0 @@ -resources_header = \ -''' - ''' - -resources_footer = \ -''' -\n''' - -header_header = \ -'''#include -#include "common/Singleton.hpp" - -namespace chatterino { - -class Resources2 : public Singleton -{ -public: - Resources2(); - -''' - -header_footer = \ -'''}; - -} // namespace chatterino\n''' - -source_header = \ -'''#include "ResourcesAutogen.hpp" - -namespace chatterino { - -Resources2::Resources2() -{ -''' - -source_footer = \ -'''} - -} // namespace chatterino\n''' diff --git a/resources/generate_resources.py b/resources/generate_resources.py deleted file mode 100755 index 732f7cc0..00000000 --- a/resources/generate_resources.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python3 -from pathlib import Path - -from _generate_resources import * - -ignored_files = ['qt.conf', 'resources.qrc', 'resources_autogenerated.qrc', 'windows.rc', - 'generate_resources.py', '_generate_resources.py'] - -ignored_names = ['.gitignore', '.DS_Store'] - -# to ignore all files in a/b, add a/b to ignored_directories. -# this will ignore a/b/c/d.txt and a/b/xd.txt -ignored_directories = ['__pycache__', 'linuxinstall'] - -def isNotIgnored(file): - # check if file exists in an ignored direcory - for ignored_directory in ignored_directories: - if file.parent.as_posix().startswith(ignored_directory): - return False - - return file.as_posix() not in ignored_files and file.name not in ignored_names - -all_files = sorted(list(filter(isNotIgnored, \ - filter(Path.is_file, Path('.').glob('**/*'))))) -image_files = sorted(list(filter(isNotIgnored, \ - filter(Path.is_file, Path('.').glob('**/*.png'))))) - -with open('./resources_autogenerated.qrc', 'w') as out: - out.write(resources_header + '\n') - for file in all_files: - out.write(f" {file.as_posix()}\n") - out.write(resources_footer) - -with open('../src/autogenerated/ResourcesAutogen.cpp', 'w') as out: - out.write(source_header) - for file in sorted(image_files): - var_name = file.with_suffix("").as_posix().replace("/",".") - out.write(f' this->{var_name}') - out.write(f' = QPixmap(":/{file.as_posix()}");\n') - out.write(source_footer) - -def writeHeader(out, name, element, indent): - if isinstance(element, dict): - if name != "": - out.write(f"{indent}struct {{\n") - for (key, value) in element.items(): - writeHeader(out, key, value, indent + ' ') - if name != "": - out.write(f"{indent}}} {name};\n"); - else: - out.write(f"{indent}QPixmap {element};\n") - -with open('../src/autogenerated/ResourcesAutogen.hpp', 'w') as out: - out.write(header_header) - - elements = {} - for file in sorted(image_files): - elements_ref = elements - directories = file.as_posix().split('/')[:-1] - filename = file.stem - for directory in directories: - if directory not in elements_ref: - elements_ref[directory] = {} - elements_ref = elements_ref[directory] - elements_ref[filename] = filename - - writeHeader(out, "", elements, '') - - out.write(header_footer) - diff --git a/resources/resources_autogenerated.qrc b/resources/resources_autogenerated.qrc deleted file mode 100644 index 4d84f4fd..00000000 --- a/resources/resources_autogenerated.qrc +++ /dev/null @@ -1,133 +0,0 @@ - - - avatars/_1xelerate.png - avatars/alazymeme.png - avatars/brian6932.png - avatars/explooosion_code.png - avatars/fourtf.png - avatars/hicupalot.png - avatars/iprodigy.png - avatars/jaxkey.png - avatars/kararty.png - avatars/karlpolice.png - avatars/matthewde.jpg - avatars/mm2pl.png - avatars/mohad12211.png - avatars/pajlada.png - avatars/revolter.jpg - avatars/slch.png - avatars/xheaveny.png - avatars/zneix.png - buttons/addSplit.png - buttons/addSplitDark.png - buttons/ban.png - buttons/banRed.png - buttons/cancel.svg - buttons/cancelDark.svg - buttons/clearSearch.png - buttons/copyDark.png - buttons/copyDark.svg - buttons/copyLight.png - buttons/copyLight.svg - buttons/emote.svg - buttons/emoteDark.svg - buttons/menuDark.png - buttons/menuLight.png - buttons/mod.png - buttons/modModeDisabled.png - buttons/modModeDisabled2.png - buttons/modModeEnabled.png - buttons/modModeEnabled2.png - buttons/pinDisabledDark.png - buttons/pinDisabledDark.svg - buttons/pinDisabledLight.png - buttons/pinDisabledLight.svg - buttons/pinEnabled.png - buttons/pinEnabled.svg - buttons/replyDark.png - buttons/replyDark.svg - buttons/replyThreadDark.png - buttons/replyThreadDark.svg - buttons/search.png - buttons/timeout.png - buttons/trashCan.png - buttons/trashcan.svg - buttons/unban.png - buttons/unmod.png - buttons/unvip.png - buttons/update.png - buttons/updateError.png - buttons/viewersDark.png - buttons/viewersLight.png - buttons/vip.png - chatterino.icns - com.chatterino.chatterino.appdata.xml - com.chatterino.chatterino.desktop - contributors.txt - emoji.json - error.png - examples/moving.gif - examples/splitting.gif - icon.ico - icon.png - licenses/boost_boost.txt - licenses/emoji-data-source.txt - licenses/libcommuni_BSD3.txt - licenses/lrucache.txt - licenses/magic_enum.txt - licenses/openssl.txt - licenses/pajlada_settings.txt - licenses/pajlada_signals.txt - licenses/qt_lgpl-3.0.txt - licenses/qtkeychain.txt - licenses/rapidjson.txt - licenses/websocketpp.txt - pajaDank.png - qss/settings.qss - scrolling/downScroll.png - scrolling/downScroll.svg - scrolling/neutralScroll.png - scrolling/neutralScroll.svg - scrolling/upScroll.png - scrolling/upScroll.svg - settings/about.svg - settings/aboutlogo.png - settings/accounts.svg - settings/advanced.svg - settings/behave.svg - settings/browser.svg - settings/commands.svg - settings/emote.svg - settings/externaltools.svg - settings/filters.svg - settings/ignore.svg - settings/keybinds.svg - settings/moderation.svg - settings/notification2.svg - settings/notifications.svg - settings/theme.svg - sounds/ping2.wav - split/down.png - split/left.png - split/move.png - split/right.png - split/up.png - streamerMode.png - switcher/plus.svg - switcher/popup.svg - switcher/switch.svg - tlds.txt - twitch/admin.png - twitch/automod.png - twitch/broadcaster.png - twitch/cheer1.png - twitch/globalmod.png - twitch/moderator.png - twitch/prime.png - twitch/staff.png - twitch/subscriber.png - twitch/turbo.png - twitch/verified.png - twitch/vip.png - - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 79ef5e1e..97964150 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -537,11 +537,7 @@ set(SOURCE_FILES widgets/splits/SplitOverlay.cpp widgets/splits/SplitOverlay.hpp - autogenerated/ResourcesAutogen.cpp - autogenerated/ResourcesAutogen.hpp - ${CMAKE_SOURCE_DIR}/resources/resources.qrc - ${CMAKE_SOURCE_DIR}/resources/resources_autogenerated.qrc ) if (WIN32) @@ -559,6 +555,9 @@ endif () # Generate source groups for use in IDEs source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${SOURCE_FILES}) +# Add autogenerated files +list(APPEND SOURCE_FILES ${RES_AUTOGEN_FILES}) + add_library(${LIBRARY_PROJECT} OBJECT ${SOURCE_FILES}) if (CHATTERINO_GENERATE_COVERAGE) @@ -616,7 +615,7 @@ if (BUILD_APP) endif() add_sanitizers(${EXECUTABLE_PROJECT}) - target_include_directories(${EXECUTABLE_PROJECT} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories(${EXECUTABLE_PROJECT} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/autogen/) target_link_libraries(${EXECUTABLE_PROJECT} PUBLIC ${LIBRARY_PROJECT}) @@ -740,7 +739,7 @@ if (APPLE AND BUILD_APP) ) endif () -target_include_directories(${LIBRARY_PROJECT} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(${LIBRARY_PROJECT} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/autogen/) if (WinToast_FOUND) target_link_libraries(${LIBRARY_PROJECT} diff --git a/src/autogenerated/ResourcesAutogen.cpp b/src/autogenerated/ResourcesAutogen.cpp deleted file mode 100644 index d5a718af..00000000 --- a/src/autogenerated/ResourcesAutogen.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "ResourcesAutogen.hpp" - -namespace chatterino { - -Resources2::Resources2() -{ - this->avatars._1xelerate = QPixmap(":/avatars/_1xelerate.png"); - this->avatars.alazymeme = QPixmap(":/avatars/alazymeme.png"); - this->avatars.brian6932 = QPixmap(":/avatars/brian6932.png"); - this->avatars.explooosion_code = QPixmap(":/avatars/explooosion_code.png"); - this->avatars.fourtf = QPixmap(":/avatars/fourtf.png"); - this->avatars.hicupalot = QPixmap(":/avatars/hicupalot.png"); - this->avatars.iprodigy = QPixmap(":/avatars/iprodigy.png"); - this->avatars.jaxkey = QPixmap(":/avatars/jaxkey.png"); - this->avatars.kararty = QPixmap(":/avatars/kararty.png"); - this->avatars.karlpolice = QPixmap(":/avatars/karlpolice.png"); - this->avatars.mm2pl = QPixmap(":/avatars/mm2pl.png"); - this->avatars.mohad12211 = QPixmap(":/avatars/mohad12211.png"); - this->avatars.pajlada = QPixmap(":/avatars/pajlada.png"); - this->avatars.slch = QPixmap(":/avatars/slch.png"); - this->avatars.xheaveny = QPixmap(":/avatars/xheaveny.png"); - this->avatars.zneix = QPixmap(":/avatars/zneix.png"); - this->buttons.addSplit = QPixmap(":/buttons/addSplit.png"); - this->buttons.addSplitDark = QPixmap(":/buttons/addSplitDark.png"); - this->buttons.ban = QPixmap(":/buttons/ban.png"); - this->buttons.banRed = QPixmap(":/buttons/banRed.png"); - this->buttons.clearSearch = QPixmap(":/buttons/clearSearch.png"); - this->buttons.copyDark = QPixmap(":/buttons/copyDark.png"); - this->buttons.copyLight = QPixmap(":/buttons/copyLight.png"); - this->buttons.menuDark = QPixmap(":/buttons/menuDark.png"); - this->buttons.menuLight = QPixmap(":/buttons/menuLight.png"); - this->buttons.mod = QPixmap(":/buttons/mod.png"); - this->buttons.modModeDisabled = QPixmap(":/buttons/modModeDisabled.png"); - this->buttons.modModeDisabled2 = QPixmap(":/buttons/modModeDisabled2.png"); - this->buttons.modModeEnabled = QPixmap(":/buttons/modModeEnabled.png"); - this->buttons.modModeEnabled2 = QPixmap(":/buttons/modModeEnabled2.png"); - this->buttons.pinDisabledDark = QPixmap(":/buttons/pinDisabledDark.png"); - this->buttons.pinDisabledLight = QPixmap(":/buttons/pinDisabledLight.png"); - this->buttons.pinEnabled = QPixmap(":/buttons/pinEnabled.png"); - this->buttons.replyDark = QPixmap(":/buttons/replyDark.png"); - this->buttons.replyThreadDark = QPixmap(":/buttons/replyThreadDark.png"); - this->buttons.search = QPixmap(":/buttons/search.png"); - this->buttons.timeout = QPixmap(":/buttons/timeout.png"); - this->buttons.trashCan = QPixmap(":/buttons/trashCan.png"); - this->buttons.unban = QPixmap(":/buttons/unban.png"); - this->buttons.unmod = QPixmap(":/buttons/unmod.png"); - this->buttons.unvip = QPixmap(":/buttons/unvip.png"); - this->buttons.update = QPixmap(":/buttons/update.png"); - this->buttons.updateError = QPixmap(":/buttons/updateError.png"); - this->buttons.viewersDark = QPixmap(":/buttons/viewersDark.png"); - this->buttons.viewersLight = QPixmap(":/buttons/viewersLight.png"); - this->buttons.vip = QPixmap(":/buttons/vip.png"); - this->error = QPixmap(":/error.png"); - this->icon = QPixmap(":/icon.png"); - this->pajaDank = QPixmap(":/pajaDank.png"); - this->scrolling.downScroll = QPixmap(":/scrolling/downScroll.png"); - this->scrolling.neutralScroll = QPixmap(":/scrolling/neutralScroll.png"); - this->scrolling.upScroll = QPixmap(":/scrolling/upScroll.png"); - this->settings.aboutlogo = QPixmap(":/settings/aboutlogo.png"); - this->split.down = QPixmap(":/split/down.png"); - this->split.left = QPixmap(":/split/left.png"); - this->split.move = QPixmap(":/split/move.png"); - this->split.right = QPixmap(":/split/right.png"); - this->split.up = QPixmap(":/split/up.png"); - this->streamerMode = QPixmap(":/streamerMode.png"); - this->twitch.admin = QPixmap(":/twitch/admin.png"); - this->twitch.automod = QPixmap(":/twitch/automod.png"); - this->twitch.broadcaster = QPixmap(":/twitch/broadcaster.png"); - this->twitch.cheer1 = QPixmap(":/twitch/cheer1.png"); - this->twitch.globalmod = QPixmap(":/twitch/globalmod.png"); - this->twitch.moderator = QPixmap(":/twitch/moderator.png"); - this->twitch.prime = QPixmap(":/twitch/prime.png"); - this->twitch.staff = QPixmap(":/twitch/staff.png"); - this->twitch.subscriber = QPixmap(":/twitch/subscriber.png"); - this->twitch.turbo = QPixmap(":/twitch/turbo.png"); - this->twitch.verified = QPixmap(":/twitch/verified.png"); - this->twitch.vip = QPixmap(":/twitch/vip.png"); -} - -} // namespace chatterino diff --git a/src/autogenerated/ResourcesAutogen.hpp b/src/autogenerated/ResourcesAutogen.hpp deleted file mode 100644 index 200a3fbd..00000000 --- a/src/autogenerated/ResourcesAutogen.hpp +++ /dev/null @@ -1,96 +0,0 @@ -#include -#include "common/Singleton.hpp" - -namespace chatterino { - -class Resources2 : public Singleton -{ -public: - Resources2(); - - struct { - QPixmap _1xelerate; - QPixmap alazymeme; - QPixmap brian6932; - QPixmap explooosion_code; - QPixmap fourtf; - QPixmap hicupalot; - QPixmap iprodigy; - QPixmap jaxkey; - QPixmap kararty; - QPixmap karlpolice; - QPixmap mm2pl; - QPixmap mohad12211; - QPixmap pajlada; - QPixmap slch; - QPixmap xheaveny; - QPixmap zneix; - } avatars; - struct { - QPixmap addSplit; - QPixmap addSplitDark; - QPixmap ban; - QPixmap banRed; - QPixmap clearSearch; - QPixmap copyDark; - QPixmap copyLight; - QPixmap menuDark; - QPixmap menuLight; - QPixmap mod; - QPixmap modModeDisabled; - QPixmap modModeDisabled2; - QPixmap modModeEnabled; - QPixmap modModeEnabled2; - QPixmap pinDisabledDark; - QPixmap pinDisabledLight; - QPixmap pinEnabled; - QPixmap replyDark; - QPixmap replyThreadDark; - QPixmap search; - QPixmap timeout; - QPixmap trashCan; - QPixmap unban; - QPixmap unmod; - QPixmap unvip; - QPixmap update; - QPixmap updateError; - QPixmap viewersDark; - QPixmap viewersLight; - QPixmap vip; - } buttons; - QPixmap error; - QPixmap icon; - QPixmap pajaDank; - struct { - QPixmap downScroll; - QPixmap neutralScroll; - QPixmap upScroll; - } scrolling; - struct { - QPixmap aboutlogo; - } settings; - struct { - QPixmap down; - QPixmap left; - QPixmap move; - QPixmap right; - QPixmap up; - } split; - QPixmap streamerMode; - struct { - QPixmap admin; - QPixmap automod; - QPixmap broadcaster; - QPixmap cheer1; - QPixmap globalmod; - QPixmap moderator; - QPixmap prime; - QPixmap staff; - QPixmap subscriber; - QPixmap turbo; - QPixmap verified; - QPixmap vip; - } twitch; -}; - -} // namespace chatterino diff --git a/src/singletons/Resources.hpp b/src/singletons/Resources.hpp index f4217ca8..79103935 100644 --- a/src/singletons/Resources.hpp +++ b/src/singletons/Resources.hpp @@ -1,6 +1,6 @@ #pragma once -#include "autogenerated/ResourcesAutogen.hpp" +#include "ResourcesAutogen.hpp" namespace chatterino {