1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 10:42:29 +01:00

Fix wallpaper enum types

This commit is contained in:
Elias Steurer 2023-12-03 11:43:17 +01:00
parent e2447d3fa4
commit e17e2abd9d
24 changed files with 74 additions and 42 deletions

View File

@ -429,7 +429,7 @@ Item {
description: qsTr("If your ScreenPlay missbehaves this is a good way to look for answers. This shows all logs and warning during runtime.") description: qsTr("If your ScreenPlay missbehaves this is a good way to look for answers. This shows all logs and warning during runtime.")
buttonText: qsTr("Show Logs") buttonText: qsTr("Show Logs")
onButtonPressed: { onButtonPressed: {
const logsPath = StandardPaths.writableLocation(StandardPaths.GenericDataLocation) + "/ScreenPlay/Logs"; const logsPath = QCore.StandardPaths.writableLocation(QCore.StandardPaths.GenericDataLocation) + "/ScreenPlay/Logs";
App.util.openFolderInExplorer(logsPath); App.util.openFolderInExplorer(logsPath);
} }
} }

View File

@ -36,7 +36,7 @@ set(RESOURCES
assets/test_image_andras-vas-Bd7gNnWJBkU-unsplash.jpg) assets/test_image_andras-vas-Bd7gNnWJBkU-unsplash.jpg)
qt_add_library(${PROJECT_NAME} STATIC) qt_add_library(${PROJECT_NAME} STATIC)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Quick) target_link_libraries(${PROJECT_NAME} PUBLIC Qt6::Core Qt6::Quick ScreenPlayUtilplugin)
target_include_directories(${PROJECT_NAME} PUBLIC src/) target_include_directories(${PROJECT_NAME} PUBLIC src/)
qt_add_qml_module( qt_add_qml_module(

View File

@ -5,6 +5,7 @@
#include <QtQml/qqmlextensionplugin.h> #include <QtQml/qqmlextensionplugin.h>
Q_IMPORT_QML_PLUGIN(ScreenPlayShaderPlugin) Q_IMPORT_QML_PLUGIN(ScreenPlayShaderPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {

View File

@ -106,12 +106,13 @@ target_include_directories(
# Note making this public is so thatscreenplayutil_qmltyperegistrations.cpp # Note making this public is so thatscreenplayutil_qmltyperegistrations.cpp
# can find the #include <contenttypes.h> include # can find the #include <contenttypes.h> include
target_include_directories(${PROJECT_NAME} PUBLIC inc/public/ScreenPlayUtil) target_include_directories(${PROJECT_NAME} PUBLIC inc/public/ScreenPlayUtil)
target_include_directories(${PROJECT_NAME}plugin PUBLIC inc/public/ScreenPlayUtil)
target_link_libraries( target_link_libraries(
${PROJECT_NAME} ${PROJECT_NAME}
PRIVATE Qt6::Core Qt6::Quick
PUBLIC PUBLIC
Qt6::Core
Qt6::Quick
Qt6::Gui Qt6::Gui
fmt::fmt-header-only fmt::fmt-header-only
LibArchive::LibArchive LibArchive::LibArchive

View File

@ -15,7 +15,7 @@ class ContentTypes : public QObject {
QML_ELEMENT QML_ELEMENT
Q_CLASSINFO("RegisterEnumClassesUnscoped", "false") Q_CLASSINFO("RegisterEnumClassesUnscoped", "false")
/*! /*!
\brief Global enum for search types. Used in the "Installed" tab. \brief Used in the "Installed" tab.
*/ */
public: public:
ContentTypes(QObject* parent = nullptr); ContentTypes(QObject* parent = nullptr);
@ -57,7 +57,7 @@ class Video : public QObject {
public: public:
Video(QObject* parent = nullptr); Video(QObject* parent = nullptr);
/*! /*!
\brief Global enum for fill mode. This is a c++ representation \brief This is a c++ representation
of HTML fill modes. We use "_" instead of "-" for scale down, of HTML fill modes. We use "_" instead of "-" for scale down,
because c++ forbids "-" in enum names. because c++ forbids "-" in enum names.
*/ */

View File

@ -81,6 +81,7 @@ target_link_libraries(
${PROJECT_NAME} ${PROJECT_NAME}
PRIVATE ScreenPlaySDK PRIVATE ScreenPlaySDK
ScreenPlayUtil ScreenPlayUtil
ScreenPlayUtilplugin
ScreenPlayWeatherplugin ScreenPlayWeatherplugin
Qt6::Quick Qt6::Quick
Qt6::Gui Qt6::Gui

View File

@ -23,10 +23,11 @@ Q_IMPORT_QML_PLUGIN(ScreenPlaySysInfoPlugin)
#endif #endif
Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin) Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
using namespace ScreenPlay;
// Lets keep using it until: https://bugreports.qt.io/browse/QTBUG-109401 // Lets keep using it until: https://bugreports.qt.io/browse/QTBUG-109401
QtWebEngineQuick::initialize(); QtWebEngineQuick::initialize();
@ -83,14 +84,14 @@ int main(int argc, char* argv[])
} else { } else {
// 8 parameter + 1 OS working directory as the first default paramter // 8 parameter + 1 OS working directory as the first default paramter
if (argumentList.length() != 9) { if (argumentList.length() != 9) {
return static_cast<int>(ScreenPlay::WallpaperExit::Code::Invalid_ArgumentSize); return static_cast<int>(WallpaperExit::Code::Invalid_ArgumentSize);
} }
ScreenPlay::Util util; ScreenPlay::Util util;
const auto activeScreensList = util.parseStringToIntegerList(argumentList.at(1)); const auto activeScreensList = util.parseStringToIntegerList(argumentList.at(1));
if (!activeScreensList.has_value()) { if (!activeScreensList.has_value()) {
qCritical("Could not activeScreensList"); qCritical("Could not activeScreensList");
return static_cast<int>(ScreenPlay::WallpaperExit::Code::Invalid_ActiveScreensList); return static_cast<int>(WallpaperExit::Code::Invalid_ActiveScreensList);
} }
auto installedType = ScreenPlay::ContentTypes::InstalledType::Unknown; auto installedType = ScreenPlay::ContentTypes::InstalledType::Unknown;
@ -98,26 +99,26 @@ int main(int argc, char* argv[])
installedType = typeOpt.value(); installedType = typeOpt.value();
} else { } else {
qCritical() << "Cannot parse Wallpaper type from value" << argumentList.at(6); qCritical() << "Cannot parse Wallpaper type from value" << argumentList.at(6);
return static_cast<int>(ScreenPlay::WallpaperExit::Code::Invalid_InstalledType); return static_cast<int>(WallpaperExit::Code::Invalid_InstalledType);
} }
bool okParseCheckWallpaperVisible = false; bool okParseCheckWallpaperVisible = false;
const bool checkWallpaperVisible = argumentList.at(7).toInt(&okParseCheckWallpaperVisible); const bool checkWallpaperVisible = argumentList.at(7).toInt(&okParseCheckWallpaperVisible);
if (!okParseCheckWallpaperVisible) { if (!okParseCheckWallpaperVisible) {
qCritical("Could not parse checkWallpaperVisible"); qCritical("Could not parse checkWallpaperVisible");
return static_cast<int>(ScreenPlay::WallpaperExit::Code::Invalid_CheckWallpaperVisible); return static_cast<int>(WallpaperExit::Code::Invalid_CheckWallpaperVisible);
} }
bool okParseVolume = 0.0f; bool okParseVolume = 0.0f;
const float volume = argumentList.at(4).toFloat(&okParseVolume); const float volume = argumentList.at(4).toFloat(&okParseVolume);
if (!okParseVolume) { if (!okParseVolume) {
qCritical("Could not parse Volume"); qCritical("Could not parse Volume");
return static_cast<int>(ScreenPlay::WallpaperExit::Code::Invalid_Volume); return static_cast<int>(WallpaperExit::Code::Invalid_Volume);
} }
appID = argumentList.at(3); appID = argumentList.at(3);
if (!appID.startsWith("appID=")) { if (!appID.startsWith("appID=")) {
qCritical("Invalid appID"); qCritical("Invalid appID");
return static_cast<int>(ScreenPlay::WallpaperExit::Code::Invalid_AppID); return static_cast<int>(WallpaperExit::Code::Invalid_AppID);
} }
appID = appID.remove("appID="); appID = appID.remove("appID=");
@ -132,11 +133,11 @@ int main(int argc, char* argv[])
} }
const auto setupStatus = window->setup(); const auto setupStatus = window->setup();
if (setupStatus != ScreenPlay::WallpaperExit::Code::Ok) { if (setupStatus != WallpaperExit::Code::Ok) {
return static_cast<int>(setupStatus); return static_cast<int>(setupStatus);
} }
const auto startStatus = window->start(); const auto startStatus = window->start();
if (startStatus != ScreenPlay::WallpaperExit::Code::Ok) { if (startStatus != WallpaperExit::Code::Ok) {
return static_cast<int>(startStatus); return static_cast<int>(startStatus);
} }
emit window->qmlStart(); emit window->qmlStart();

View File

@ -20,7 +20,8 @@ Rectangle {
// macOS only supports h264 via the native Qt MM // macOS only supports h264 via the native Qt MM
if (Qt.platform.os === "osx") { if (Qt.platform.os === "osx") {
if ((Wallpaper.videoCodec === Video.VideoCodec.VP8 || Wallpaper.videoCodec === Util.Video.VideoCodec.VP9)) { print(ContentTypes.InstalledType.VideoWallpaper )
if ((Wallpaper.videoCodec === Video.VideoCodec.VP8 || Wallpaper.videoCodec === Video.VideoCodec.VP9)) {
loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaWebView.qml"; loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaWebView.qml";
} else { } else {
loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaView.qml"; loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaView.qml";

View File

@ -18,26 +18,27 @@
\brief . \brief .
*/ */
namespace ScreenPlay {
BaseWindow::BaseWindow() BaseWindow::BaseWindow()
{ {
QGuiApplication::instance()->installEventFilter(this); QGuiApplication::instance()->installEventFilter(this);
setOSVersion(QSysInfo::productVersion()); setOSVersion(QSysInfo::productVersion());
} }
ScreenPlay::WallpaperExit::Code BaseWindow::setup() WallpaperExit::Code BaseWindow::setup()
{ {
if (projectPath() == "test") { if (projectPath() == "test") {
setType(ScreenPlay::ContentTypes::InstalledType::QMLWallpaper); setType(ScreenPlay::ContentTypes::InstalledType::QMLWallpaper);
setProjectSourceFileAbsolute({ "qrc:/qml/ScreenPlayWallpaper/qml/Test.qml" }); setProjectSourceFileAbsolute({ "qrc:/qml/ScreenPlayWallpaper/qml/Test.qml" });
setupLiveReloading(); setupLiveReloading();
return ScreenPlay::WallpaperExit::Code::Ok; return WallpaperExit::Code::Ok;
} }
ScreenPlay::ProjectFile projectFile; ScreenPlay::ProjectFile projectFile;
projectFile.projectJsonFilePath = QFileInfo(projectPath() + "/project.json"); projectFile.projectJsonFilePath = QFileInfo(projectPath() + "/project.json");
if (!projectFile.init()) { if (!projectFile.init()) {
qWarning() << "Invalid project at " << projectPath(); qWarning() << "Invalid project at " << projectPath();
return ScreenPlay::WallpaperExit::Code::Invalid_Setup_ProjectParsingError; return WallpaperExit::Code::Invalid_Setup_ProjectParsingError;
} }
setType(projectFile.type); setType(projectFile.type);
setProjectSourceFile(projectFile.file); setProjectSourceFile(projectFile.file);
@ -68,7 +69,7 @@ ScreenPlay::WallpaperExit::Code BaseWindow::setup()
sdk()->start(); sdk()->start();
} }
return ScreenPlay::WallpaperExit::Code::Ok; return WallpaperExit::Code::Ok;
} }
/*! /*!
@ -240,5 +241,6 @@ void BaseWindow::setVideoCodec(ScreenPlay::Video::VideoCodec newVideoCodec)
m_videoCodec = newVideoCodec; m_videoCodec = newVideoCodec;
emit videoCodecChanged(newVideoCodec); emit videoCodecChanged(newVideoCodec);
} }
}
#include "moc_basewindow.cpp" #include "moc_basewindow.cpp"

View File

@ -19,15 +19,16 @@
#include <memory> #include <memory>
namespace ScreenPlay {
class BaseWindow : public QObject { class BaseWindow : public QObject {
Q_OBJECT Q_OBJECT
public: public:
BaseWindow(); BaseWindow();
virtual ScreenPlay::WallpaperExit::Code setup() final; virtual WallpaperExit::Code setup() final;
virtual ScreenPlay::WallpaperExit::Code start() = 0; virtual WallpaperExit::Code start() = 0;
Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged) Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged) Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
@ -357,3 +358,4 @@ protected:
QUrl m_projectSourceFileAbsolute; QUrl m_projectSourceFileAbsolute;
ScreenPlay::Video::VideoCodec m_videoCodec = ScreenPlay::Video::VideoCodec::Unknown; ScreenPlay::Video::VideoCodec m_videoCodec = ScreenPlay::Video::VideoCodec::Unknown;
}; };
}

View File

@ -6,7 +6,8 @@
#include <LayerShellQt/Shell> #include <LayerShellQt/Shell>
#include <LayerShellQt/Window> #include <LayerShellQt/Window>
ScreenPlay::WallpaperExitCode LinuxWaylandWindow::start() namespace ScreenPlay {
WallpaperExit::Code LinuxWaylandWindow::start()
{ {
if (!debugMode()) { if (!debugMode()) {
@ -31,7 +32,7 @@ ScreenPlay::WallpaperExitCode LinuxWaylandWindow::start()
} }
m_window.show(); m_window.show();
return ScreenPlay::WallpaperExitCode::Ok; return WallpaperExit::Code::Ok;
} }
void LinuxWaylandWindow::setupWallpaperForOneScreen(int activeScreen) void LinuxWaylandWindow::setupWallpaperForOneScreen(int activeScreen)
@ -60,3 +61,4 @@ void LinuxWaylandWindow::terminate()
{ {
QCoreApplication::quit(); QCoreApplication::quit();
} }
}

View File

@ -14,11 +14,12 @@
#include "basewindow.h" #include "basewindow.h"
namespace ScreenPlay {
class LinuxWaylandWindow : public BaseWindow { class LinuxWaylandWindow : public BaseWindow {
Q_OBJECT Q_OBJECT
public: public:
ScreenPlay::WallpaperExitCode start() override; WallpaperExit::Code start() override;
signals: signals:
@ -33,3 +34,4 @@ private:
void setupWallpaperForAllScreens(); void setupWallpaperForAllScreens();
void setupWallpaperForMultipleScreens(const QVector<int>& activeScreensList); void setupWallpaperForMultipleScreens(const QVector<int>& activeScreensList);
}; };
}

View File

@ -24,7 +24,8 @@
#define NAME "xwinwrap" #define NAME "xwinwrap"
#define ATOM(a) XInternAtom(display, #a, False) #define ATOM(a) XInternAtom(display, #a, False)
ScreenPlay::WallpaperExitCode LinuxX11Window::start() namespace ScreenPlay {
WallpaperExit::Code LinuxX11Window::start()
{ {
if (!debugMode()) { if (!debugMode()) {
@ -111,7 +112,7 @@ ScreenPlay::WallpaperExitCode LinuxX11Window::start()
m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView); m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView);
m_window.setSource(QUrl("qrc:/qml/ScreenPlayWallpaper/qml/Wallpaper.qml")); m_window.setSource(QUrl("qrc:/qml/ScreenPlayWallpaper/qml/Wallpaper.qml"));
m_window.show(); m_window.show();
return ScreenPlay::WallpaperExitCode::Ok; return WallpaperExit::Code::Ok;
} }
void LinuxX11Window::setupWallpaperForOneScreen(int activeScreen) void LinuxX11Window::setupWallpaperForOneScreen(int activeScreen)
@ -140,3 +141,4 @@ void LinuxX11Window::terminate()
{ {
QCoreApplication::quit(); QCoreApplication::quit();
} }
}

View File

@ -13,12 +13,12 @@
#include <QVector> #include <QVector>
#include "basewindow.h" #include "basewindow.h"
namespace ScreenPlay {
class LinuxX11Window : public BaseWindow { class LinuxX11Window : public BaseWindow {
Q_OBJECT Q_OBJECT
public: public:
ScreenPlay::WallpaperExitCode start() override; WallpaperExit::Code start() override;
signals: signals:
@ -33,3 +33,5 @@ private:
void setupWallpaperForAllScreens(); void setupWallpaperForAllScreens();
void setupWallpaperForMultipleScreens(const QVector<int>& activeScreensList); void setupWallpaperForMultipleScreens(const QVector<int>& activeScreensList);
}; };
}

View File

@ -4,7 +4,8 @@
#include <QGuiApplication> #include <QGuiApplication>
ScreenPlay::WallpaperExitCode MacWindow::start() namespace ScreenPlay {
WallpaperExit::Code MacWindow::start()
{ {
MacUtils::showDockIcon(false); MacUtils::showDockIcon(false);
@ -31,7 +32,7 @@ ScreenPlay::WallpaperExitCode MacWindow::start()
MacIntegration* macIntegration = new MacIntegration(this); MacIntegration* macIntegration = new MacIntegration(this);
macIntegration->SetBackgroundLevel(&m_window); macIntegration->SetBackgroundLevel(&m_window);
return ScreenPlay::WallpaperExitCode::Ok; return WallpaperExit::Code::Ok;
} }
void MacWindow::setVisible(bool show) void MacWindow::setVisible(bool show)
@ -53,5 +54,5 @@ void MacWindow::clearComponentCache()
{ {
m_window.engine()->clearComponentCache(); m_window.engine()->clearComponentCache();
} }
}
#include "moc_macwindow.cpp" #include "moc_macwindow.cpp"

View File

@ -15,10 +15,11 @@
#include "basewindow.h" #include "basewindow.h"
#include "macintegration.h" #include "macintegration.h"
namespace ScreenPlay {
class MacWindow : public BaseWindow { class MacWindow : public BaseWindow {
Q_OBJECT Q_OBJECT
public: public:
ScreenPlay::WallpaperExitCode start() override; WallpaperExit::Code start() override;
signals: signals:
@ -31,3 +32,4 @@ public slots:
private: private:
QQuickView m_window; QQuickView m_window;
}; };
}

View File

@ -13,7 +13,9 @@
\brief ScreenPlayWindow used for the Windows implementation. \brief ScreenPlayWindow used for the Windows implementation.
*/ */
ScreenPlay::WallpaperExit::Code WinWindow::start() namespace ScreenPlay {
WallpaperExit::Code WinWindow::start()
{ {
connect( connect(
&m_window, &QQuickView::statusChanged, this, [this](auto status) { &m_window, &QQuickView::statusChanged, this, [this](auto status) {
@ -41,7 +43,7 @@ ScreenPlay::WallpaperExit::Code WinWindow::start()
m_windowsIntegration.setWindowHandle(reinterpret_cast<HWND>(m_window.winId())); m_windowsIntegration.setWindowHandle(reinterpret_cast<HWND>(m_window.winId()));
if (!IsWindow(m_windowsIntegration.windowHandle())) { if (!IsWindow(m_windowsIntegration.windowHandle())) {
qCritical("Could not get a valid window handle!"); qCritical("Could not get a valid window handle!");
return ScreenPlay::WallpaperExit::Code::Invalid_Start_Windows_HandleError; return WallpaperExit::Code::Invalid_Start_Windows_HandleError;
} }
qRegisterMetaType<WindowsDesktopProperties*>(); qRegisterMetaType<WindowsDesktopProperties*>();
qRegisterMetaType<WinWindow*>(); qRegisterMetaType<WinWindow*>();
@ -131,7 +133,7 @@ ScreenPlay::WallpaperExit::Code WinWindow::start()
QCoreApplication::postEvent(&m_window, qEvent); QCoreApplication::postEvent(&m_window, qEvent);
}); });
}); });
return ScreenPlay::WallpaperExit::Code::Ok; return WallpaperExit::Code::Ok;
} }
/*! /*!
@ -415,5 +417,6 @@ void WinWindow::checkForFullScreenWindow()
setVisualsPaused(hasFullscreenWindow); setVisualsPaused(hasFullscreenWindow);
} }
}
#include "moc_winwindow.cpp" #include "moc_winwindow.cpp"

View File

@ -20,6 +20,8 @@
#include "windowsdesktopproperties.h" #include "windowsdesktopproperties.h"
#include "windowsintegration.h" #include "windowsintegration.h"
namespace ScreenPlay {
class WinWindow : public BaseWindow { class WinWindow : public BaseWindow {
Q_OBJECT Q_OBJECT
@ -28,7 +30,7 @@ class WinWindow : public BaseWindow {
public: public:
WindowsDesktopProperties* windowsDesktopProperties() const { return m_windowsDesktopProperties.get(); } WindowsDesktopProperties* windowsDesktopProperties() const { return m_windowsDesktopProperties.get(); }
ScreenPlay::WallpaperExit::Code start() override; WallpaperExit::Code start() override;
public slots: public slots:
void setVisible(bool show) override; void setVisible(bool show) override;
@ -67,3 +69,4 @@ private:
QTimer m_reconfigureTimer; QTimer m_reconfigureTimer;
std::unique_ptr<WindowsDesktopProperties> m_windowsDesktopProperties; std::unique_ptr<WindowsDesktopProperties> m_windowsDesktopProperties;
}; };
}

View File

@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(LibArchive REQUIRED)
find_package( find_package(
Qt6 Qt6
COMPONENTS Core Quick COMPONENTS Core Quick
@ -242,7 +243,7 @@ set(RESOURCES
assets/icons/wi-windy.svg) assets/icons/wi-windy.svg)
qt_add_library(${PROJECT_NAME} STATIC) qt_add_library(${PROJECT_NAME} STATIC)
target_link_libraries(${PROJECT_NAME} PUBLIC ScreenPlayUtil) target_link_libraries(${PROJECT_NAME} PUBLIC ScreenPlayUtil ScreenPlayUtilplugin)
target_include_directories(${PROJECT_NAME} PUBLIC src/) target_include_directories(${PROJECT_NAME} PUBLIC src/)
qt_add_qml_module( qt_add_qml_module(

View File

@ -4,6 +4,7 @@
#include <QtQml/qqmlextensionplugin.h> #include <QtQml/qqmlextensionplugin.h>
Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin) Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {

View File

@ -41,6 +41,7 @@ target_link_libraries(
${PROJECT_NAME} ${PROJECT_NAME}
PRIVATE ScreenPlaySDK PRIVATE ScreenPlaySDK
ScreenPlayUtil ScreenPlayUtil
ScreenPlayUtilplugin
ScreenPlayWeatherplugin ScreenPlayWeatherplugin
Qt6::Quick Qt6::Quick
Qt6::Gui Qt6::Gui
@ -52,7 +53,7 @@ target_link_libraries(
Qt6::WebEngineQuick) Qt6::WebEngineQuick)
if(WIN32) if(WIN32)
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlaySysInfoplugin) target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlaySysInfoplugin ScreenPlayUtilplugin)
endif() endif()
qt_add_qml_module( qt_add_qml_module(

View File

@ -19,6 +19,7 @@ Q_IMPORT_QML_PLUGIN(ScreenPlaySysInfoPlugin)
#endif #endif
Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin) Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {

View File

@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(LibArchive REQUIRED)
find_package( find_package(
Qt6 Qt6
COMPONENTS Core Quick QuickControls2 COMPONENTS Core Quick QuickControls2

View File

@ -6,6 +6,7 @@
#include <QtQml/qqmlextensionplugin.h> #include <QtQml/qqmlextensionplugin.h>
Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin) Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {