diff --git a/ScreenPlay/qml/Workshop/WorkshopItemDetail.qml b/ScreenPlay/qml/Workshop/WorkshopItemDetail.qml index 9fdd8b23..0da4983e 100644 --- a/ScreenPlay/qml/Workshop/WorkshopItemDetail.qml +++ b/ScreenPlay/qml/Workshop/WorkshopItemDetail.qml @@ -115,7 +115,7 @@ Drawer { opacity: 0 property bool ready: false - url: Qt.resolvedUrl(".") + "WorkshopPreview.html" + url: "qrc:/assets/WorkshopPreview.html" onUrlChanged: print(url) Behavior on opacity { diff --git a/ScreenPlayWallpaper/SPWResources.qrc b/ScreenPlayWallpaper/SPWResources.qrc index fb3e04ca..f044004e 100644 --- a/ScreenPlayWallpaper/SPWResources.qrc +++ b/ScreenPlayWallpaper/SPWResources.qrc @@ -5,5 +5,6 @@ dot.png qtquickcontrols2.conf WebView.qml + index.html diff --git a/ScreenPlayWallpaper/ScreenPlayWallpaper.pro b/ScreenPlayWallpaper/ScreenPlayWallpaper.pro deleted file mode 100644 index 78bf037e..00000000 --- a/ScreenPlayWallpaper/ScreenPlayWallpaper.pro +++ /dev/null @@ -1,99 +0,0 @@ -TEMPLATE = app -QT += qml quick quickcontrols2 widgets core webengine -CONFIG += c++17 - -DEFINES += QT_DEPRECATED_WARNINGS - -TARGETPATH = ScreenPlayWallpaper - - - -RESOURCES += \ - SPWResources.qrc - - -SOURCES += \ - main.cpp \ - src/basewindow.cpp \ - -HEADERS += \ - src/basewindow.h \ - -win32 { - include($$PWD/../Common/qt-breakpad/qt-breakpad.pri) - LIBS += -luser32 - SOURCES += \ - src/windowsdesktopproperties.cpp \ - src/winwindow.cpp - - HEADERS += \ - src/windowsdesktopproperties.h \ - src/winwindow.h - - CONFIG(debug, debug|release) { - install_it.path = $${OUT_PWD}/debug/ - install_it.files += \ - $$PWD/../Common/vcpkg/installed/x64-windows/debug/bin/libcrypto-1_1-x64.dll \ - $$PWD/../Common/vcpkg/installed/x64-windows/debug/bin/libssl-1_1-x64.dll \ - - } else { - install_it.path = $${OUT_PWD}/release/ - install_it.files += \ - $$PWD/../Common/vcpkg/installed/x64-windows/bin/libcrypto-1_1-x64.dll \ - $$PWD/../Common/vcpkg/installed/x64-windows/bin/libssl-1_1-x64.dll \ - } -} - -include(../ScreenPlaySDK/ScreenPlaySDK.pri) - -macx { - QMAKE_LIBDIR += $$OUT_PWD/ - install_it.path = $${OUT_PWD}/../ScreenPlaySDK - - html_data.files = index.html - html_data.path = Contents/MacOS - QMAKE_BUNDLE_DATA += html_data - - QMAKE_LFLAGS += -framework Cocoa - SOURCES += src/macintegration.cpp - HEADERS += src/macintegration.h \ - src/macbridge.h - OBJECTIVE_SOURCES += src/MacBridge.mm - - SOURCES += \ - src/macwindow.cpp - - HEADERS += \ - src/macwindow.h -} - -unix:!macx { - - install_it.path = $${OUT_PWD}/ - - LIBS += -lX11 - - SOURCES += \ - src/linuxwindow.cpp - - HEADERS += \ - src/linuxwindow.h - - CONFIG(debug, debug|release) { - install_it.files += \ - $$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/libcrypto-1_1-x64.so \ - $$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/libssl-1_1-x64.so \ - - } else { - - install_it.files += \ - $$PWD/../Common/vcpkg/installed/x64-linux/bin/libcrypto-1_1-x64.so \ - $$PWD/../Common/vcpkg/installed/x64-linux/bin/libssl-1_1-x64.so \ - } -} - -install_it.files += index.html \ - -INSTALLS += install_it -DISTFILES += \ - index.html diff --git a/ScreenPlayWallpaper/WebView.qml b/ScreenPlayWallpaper/WebView.qml index 61042beb..b55b3661 100644 --- a/ScreenPlayWallpaper/WebView.qml +++ b/ScreenPlayWallpaper/WebView.qml @@ -37,18 +37,8 @@ Item { WebEngineView { id: webView - anchors.fill: parent - url: { - - if (Wallpaper.type === Wallpaper.WallpaperType.Video) { - return Qt.resolvedUrl(Wallpaper.getApplicationPath( - ) + "/index.html") - } - if (Wallpaper.type === Wallpaper.WallpaperType.Html) { - return Qt.resolvedUrl(Wallpaper.fullContentPath + "/index.html") - } - } + url: "qrc:/index.html" onJavaScriptConsoleMessage: print(lineNumber, message) onLoadProgressChanged: { if ((loadProgress === 100)) {