mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Add steam deployable version
No now use the same folder for ScreenPlay and ScreenPlayWindow because I gave up on setting the dll dir for ScreenPlayWindow. This means we cannot have two C++ classes with the same name :(
This commit is contained in:
parent
02f6dd23e7
commit
c5a9e06922
@ -1,7 +1,7 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = \
|
||||
ScreenPlay/ScreenPlay.pro \
|
||||
ScreenPlayWindow/ScreenPlayWindow.pro \
|
||||
ScreenPlaySDK/Screenplaysdk.pro
|
||||
ScreenPlay/ScreenPlay.pro \
|
||||
ScreenPlaySDK/Screenplaysdk.pro \
|
||||
ScreenPlayWindow/ScreenPlayWindow.pro
|
||||
|
||||
ScreenPlayWindow.depends = ScreenPlaySDK
|
||||
|
@ -88,7 +88,7 @@ int main(int argc, char* argv[])
|
||||
Settings settings(&profileListModel, &monitorListModel, &installedListModel, &sdkConnector, steamID);
|
||||
|
||||
QDir SPWorkingDir(QDir::currentPath());
|
||||
qDebug() << "1 " << SPWorkingDir.path();
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
if (SPWorkingDir.cdUp()) {
|
||||
settings.setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow/debug/ScreenPlayWindow.exe"));
|
||||
@ -103,10 +103,13 @@ int main(int argc, char* argv[])
|
||||
SPWorkingDir.cd("ScreenPlayWindow");
|
||||
|
||||
if (QDir(SPWorkingDir.path() + "/release").exists()) {
|
||||
// If started by QtCreator
|
||||
SPWorkingDir.cd("release");
|
||||
qDebug() << "3 " << settings.getScreenPlayWindowPath();
|
||||
settings.setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow.exe"));
|
||||
} else {
|
||||
// If started by Steam
|
||||
settings.setScreenPlayWindowPath(QUrl("ScreenPlayWindow.exe"));
|
||||
}
|
||||
settings.setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow.exe"));
|
||||
|
||||
#endif
|
||||
SteamWorkshop steamWorkshop(steamID, &steamWorkshopListModel, &settings);
|
||||
|
@ -107,11 +107,19 @@ void Settings::setWallpaper(int monitorIndex, QUrl absoluteStoragePath)
|
||||
}
|
||||
|
||||
increaseActiveWallpaperCounter();
|
||||
|
||||
// We do not want to parent the QProcess because the
|
||||
// Process manages its lifetime and destructing (animation) itself
|
||||
// via a disconnection from the ScreenPlay SDK
|
||||
QProcess* pro = new QProcess();
|
||||
m_windows.append(pro);
|
||||
connect(pro, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [=](int exitCode, QProcess::ExitStatus exitStatus) {
|
||||
qDebug() << "EX: " <<exitCode ;
|
||||
qDebug() << "EX: " << exitCode;
|
||||
});
|
||||
connect(pro, &QProcess::errorOccurred, [=](QProcess::ProcessError error) {
|
||||
qDebug() << "EX: " << error;
|
||||
});
|
||||
|
||||
|
||||
QStringList proArgs;
|
||||
proArgs.append(QString::number(monitorIndex));
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <QSettings>
|
||||
#include <QProcess>
|
||||
#include <QObject>
|
||||
#include <QProcessEnvironment>
|
||||
|
||||
#include "sdkconnector.h"
|
||||
#include "installedlistmodel.h"
|
||||
|
@ -1,12 +1,10 @@
|
||||
#include "src/mainwindow.h"
|
||||
#include "src/SPWmainwindow.h"
|
||||
#include <QApplication>
|
||||
#include <QStringList>
|
||||
#include "qt_windows.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//QCoreApplication::addLibraryPath("C:/msys64/mingw64/bin");
|
||||
//SetDllDirectory((LPCWSTR)L"C:\\msys64\\mingw64\\bin");
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||
QApplication a(argc, argv);
|
||||
@ -26,5 +24,6 @@ int main(int argc, char* argv[])
|
||||
|
||||
MainWindow w(monitor,argumentList.at(2));
|
||||
//MainWindow w(0,"D:/672870/827148653");
|
||||
|
||||
return a.exec();
|
||||
}
|
@ -6,14 +6,14 @@ CONFIG += c++17
|
||||
TARGETPATH = ScreenPlayWindow
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
src/mainwindow.cpp
|
||||
SPWmain.cpp \
|
||||
src/SPWmainwindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
src/mainwindow.h
|
||||
src/SPWmainwindow.h
|
||||
|
||||
RESOURCES += \
|
||||
Resources.qrc \
|
||||
SPWResources.qrc
|
||||
|
||||
|
||||
INCLUDEPATH += \
|
||||
|
@ -5,16 +5,17 @@ Rectangle {
|
||||
color: "gray"
|
||||
anchors.fill: parent
|
||||
property string tmpVideoPath
|
||||
//Component.onCompleted: mainwindow.init()
|
||||
|
||||
ScreenPlaySDK {
|
||||
contentType: "wallpaper"
|
||||
|
||||
onIncommingMessageError: {
|
||||
//name.text = msg
|
||||
|
||||
}
|
||||
|
||||
onSdkConnected: {
|
||||
//name.text = "connected"
|
||||
|
||||
}
|
||||
|
||||
onSdkDisconnected: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "mainwindow.h"
|
||||
#include "SPWmainwindow.h"
|
||||
|
||||
BOOL WINAPI SearchForWorkerWindow(HWND hwnd, LPARAM lparam)
|
||||
{
|
||||
@ -31,7 +31,6 @@ MainWindow::MainWindow(int i, QString projectPath, QScreen* parent)
|
||||
|
||||
if (!(parseError.error == QJsonParseError::NoError)) {
|
||||
qWarning("Settings Json Parse Error ");
|
||||
QApplication::exit(-4);
|
||||
}
|
||||
|
||||
m_project = configJsonDocument.object();
|
||||
@ -102,6 +101,11 @@ MainWindow::MainWindow(int i, QString projectPath, QScreen* parent)
|
||||
m_quickRenderer.data()->setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView);
|
||||
m_quickRenderer.data()->setFlags(flags | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint);
|
||||
|
||||
connect(m_quickRenderer.data(), &QQuickView::statusChanged, [=](QQuickView::Status status) {
|
||||
if (status == QQuickView::Error) {
|
||||
QApplication::exit(-16);
|
||||
}
|
||||
});
|
||||
if (m_project.contains("type")) {
|
||||
if (m_project.value("type") == "video") {
|
||||
QString tmpPath = m_projectPath.toString() + "/" + m_projectFile;
|
||||
@ -116,7 +120,7 @@ void MainWindow::init()
|
||||
ShowWindow(m_worker_hwnd, SW_SHOWDEFAULT);
|
||||
ShowWindow(m_hwnd, SW_SHOWDEFAULT);
|
||||
m_quickRenderer.data()->show();
|
||||
this->setVisible(true);
|
||||
//this->setVisible(true);
|
||||
setOpacity(0);
|
||||
QPropertyAnimation* animation = new QPropertyAnimation(this, "opacity");
|
||||
animation->setDuration(250);
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include <QEasingCurve>
|
||||
#include <QJsonDocument>
|
||||
@ -14,7 +13,9 @@
|
||||
#include <QWindow>
|
||||
#include <QtQuick/QQuickView>
|
||||
#include <QtQuick/QQuickWindow>
|
||||
#include <QDir>
|
||||
#include "qt_windows.h"
|
||||
|
||||
class MainWindow : public QWindow {
|
||||
Q_OBJECT
|
||||
|
@ -9,12 +9,10 @@ skip="$1"
|
||||
|
||||
array=(librhash.dll libopenblas.dll liblz4.dll libjsoncpp.dll libidn2-0.dll libgcrypt-20.dll libicudt58.dll libicuuc58.dll libpcre2-16-0.dll libicuin58.dll QtAVWidgets1.dll QtAV1.dll zlib1.dll libbz2-1.dll libfreetype-6.dll libgcc_s_seh-1.dll libglib-2.0-0.dll libgraphite2.dll libharfbuzz-0.dll libiconv-2.dll libintl-8.dll libpcre-1.dll libpcre16-0.dll libpng16-16.dll libpng16-config libpng-config libstdc++-6.dll libvorbisenc-2.dll libvorbisfile-3.dll libvorbis-0.dll xvidcore.dll libschroedinger-1.0-0.dll libtheora-0.dll libtheoradec-1.dll libtheoraenc-1.dll libmodplug-1.dll libcaca++-0.dll libcaca-0.dll libmp3lame-0.dll libspeexdsp-1.dll libcelt0-2.dll libogg-0.dll libgmodule-2.0-0.dll libgobject-2.0-0.dll libgthread-2.0-0.dll libgio-2.0-0.dll libglib-2.0-0.dll swresample-2.dll swscale-4.dll postproc-54.dll avutil-55.dll avformat-57.dll avresample-3.dll avcodec-57.dll avdevice-57.dll avfilter-6.dll libssp-0.dll libstdc++-6.dll libgomp-1.dll libquadmath-0.dll libatomic-1.dll libgcc_s_seh-1.dll libfreetype-6.dll libwinpthread-1.dll libopencore-amrwb-0.dll libopencore-amrnb-0.dll libopus-0.dll libwavpack-1.dll libbluray-2.dll libvpx-1.dll libx265.dll libx265_main10.dll libtiffxx-5.dll libtiff-5.dll libopenmj2-7.dll libopenjpip-7.dll libopenjpwl-7.dll libopenjp2-7.dll libopenjp3d-7.dll libpng16-16.dll libwebpdecoder-3.dll libwebpdemux-2.dll libwebpmux-3.dll libwebp-7.dll edit.dll libharfbuzz-icu-0.dll libharfbuzz-0.dll libharfbuzz-gobject-0.dll libp11-kit-0.dll libgnutlsxx-28.dll libgnutls-30.dll libcharset-1.dll libiconv-2.dll liblzo2-2.dll libsystre-0.dll libtre-5.dll librtmp-1.dll libintl-8.dll libgettextpo-0.dll libgettextsrc-0-19-8-1.dll libasprintf-0.dll libgettextlib-0-19-8-1.dll libcppunit-1-13-0.dll libpcre32-0.dll libpcrecpp-0.dll libpcreposix-0.dll libpcre-1.dll libpcre16-0.dll zlib1.dll libminizip-1.dll libbz2-1.dll libass-9.dll libspeex-1.dll libcairo-script-interpreter-2.dll libcairo-2.dll libcairo-gobject-2.dll libunistring-2.dll liblzma-5.dll libgmp-10.dll libgmpxx-4.dll libexpat-1.dll libfontconfig-1.dll libxml2-2.dll libgraphite2.dll SDL2.dll libnettle-6.dll libhogweed-4.dll libturbojpeg-0.dll libjpeg-8.dll libx265.dll libx265_main10.dll libx264-155.dll liblsmash.dll liblsmash-2.dll liblcms2-2.dll libpixman-1-0.dll liborc-0.4-0.dll liborc-test-0.4-0.dll libtasn1-6.dll libidn-11.dll libffi-6.dll libgsm.dll libgif-7.dll libopenal-1.dll libfribidi-0.dll libquazip5.dll)
|
||||
|
||||
|
||||
echo 'This is script will now copy'
|
||||
echo 'all depenecies into the release folder'
|
||||
echo ''
|
||||
|
||||
|
||||
if [[ $skip -eq 0 ]]
|
||||
then
|
||||
echo Is your default msys2 path $Msys2Path ? [Y/N]
|
||||
@ -52,10 +50,6 @@ if [ ! -d $DeployPath'ScreenPlaySDK' ]
|
||||
then
|
||||
mkdir $DeployPath'ScreenPlaySDK'
|
||||
fi
|
||||
if [ ! -d $DeployPath'ScreenPlayWindow' ]
|
||||
then
|
||||
mkdir $DeployPath'ScreenPlayWindow'
|
||||
fi
|
||||
|
||||
echo 'Copying files from Release to Deploy path'
|
||||
cp -r ./* $DeployPath'ScreenPlay'
|
||||
@ -72,7 +66,7 @@ cd ..
|
||||
cd ..
|
||||
cd 'ScreenPlayWindow'
|
||||
cd 'release'
|
||||
cp -r ./* $DeployPath'ScreenPlayWindow'
|
||||
cp -r ./* $DeployPath'ScreenPlay'
|
||||
|
||||
|
||||
echo ''
|
||||
|
Loading…
Reference in New Issue
Block a user