mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-25 12:13:00 +01:00
Fix some linux compile issues
This commit is contained in:
parent
9c49732de2
commit
dddab507ce
@ -65,17 +65,19 @@ HEADERS += \
|
|||||||
INCLUDEPATH += \
|
INCLUDEPATH += \
|
||||||
$$PWD/src/\
|
$$PWD/src/\
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
|
||||||
install_it.path = $${OUT_PWD}/debug/
|
|
||||||
} else {
|
|
||||||
install_it.path = $${OUT_PWD}/release/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
RC_ICONS += favicon.ico
|
RC_ICONS += favicon.ico
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG(debug, debug|release) {
|
||||||
|
install_it.path = $${OUT_PWD}/debug/
|
||||||
|
} else {
|
||||||
|
install_it.path = $${OUT_PWD}/release/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../Common/vcpkg/installed/x64-windows/include
|
INCLUDEPATH += $$PWD/../Common/vcpkg/installed/x64-windows/include
|
||||||
DEPENDPATH += $$PWD/../Common/vcpkg/installed/x64-windows/include
|
DEPENDPATH += $$PWD/../Common/vcpkg/installed/x64-windows/include
|
||||||
|
|
||||||
@ -121,5 +123,32 @@ macx {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unix {
|
||||||
|
INCLUDEPATH += $$PWD/../Common/vcpkg/installed/x64-linux/include
|
||||||
|
DEPENDPATH += $$PWD/../Common/vcpkg/installed/x64-linux/include
|
||||||
|
|
||||||
|
LIBS += -L$$PWD/../Common/vcpkg/installed/x64-linux/lib/ -llibzippp -lzip
|
||||||
|
|
||||||
|
install_it.path = $${OUT_PWD}
|
||||||
|
|
||||||
|
CONFIG(debug, debug|release) {
|
||||||
|
install_it.files += $$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/zip.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/zlibd1.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/libzippp.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/bz2d.so \
|
||||||
|
$$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/zip.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/bin/zlib1.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/bin/libzippp.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/bin/bz2.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/bin/libcrypto-1_1-x64.so \
|
||||||
|
$$PWD/../Common/vcpkg/installed/x64-linux/bin/libssl-1_1-x64.so \
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
INSTALLS += install_it
|
INSTALLS += install_it
|
||||||
|
|
||||||
|
@ -14,8 +14,9 @@
|
|||||||
#include "screenplaywallpaper.h"
|
#include "screenplaywallpaper.h"
|
||||||
#include "screenplaywidget.h"
|
#include "screenplaywidget.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
|
#endif
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
|
@ -322,12 +322,14 @@ void Util::downloadFFMPEG()
|
|||||||
|
|
||||||
string path = QGuiApplication::instance()->applicationDirPath().toStdString() + "/";
|
string path = QGuiApplication::instance()->applicationDirPath().toStdString() + "/";
|
||||||
|
|
||||||
|
ZipEntry entryFFMPEG;
|
||||||
|
std::string entryFFMPEGPath;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
ZipEntry entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffmpeg.exe");
|
entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffmpeg.exe");
|
||||||
std::string entryFFMPEGPath = path + "ffmpeg.exe";
|
entryFFMPEGPath = path + "ffmpeg.exe";
|
||||||
#elif defined(Q_OS_OSX)
|
#elif defined(Q_OS_OSX)
|
||||||
ZipEntry entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffmpeg");
|
entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffmpeg");
|
||||||
std::string entryFFMPEGPath = path + "ffmpeg";
|
entryFFMPEGPath = path + "ffmpeg";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (entryFFMPEG.isNull()) {
|
if (entryFFMPEG.isNull()) {
|
||||||
@ -344,12 +346,14 @@ void Util::downloadFFMPEG()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZipEntry entryFFPROBE;
|
||||||
|
std::string entryFFPROBEPath;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
ZipEntry entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffprobe.exe");
|
entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffprobe.exe");
|
||||||
std::string entryFFPROBEPath = path + "ffprobe.exe";
|
entryFFPROBEPath = path + "ffprobe.exe";
|
||||||
#elif defined(Q_OS_OSX)
|
#elif defined(Q_OS_OSX)
|
||||||
ZipEntry entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffprobe");
|
entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffprobe");
|
||||||
std::string entryFFPROBEPath = path + "ffprobe";
|
entryFFPROBEPath = path + "ffprobe";
|
||||||
#endif
|
#endif
|
||||||
if (entryFFPROBE.isNull()) {
|
if (entryFFPROBE.isNull()) {
|
||||||
qDebug() << "null";
|
qDebug() << "null";
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
SOURCES += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.cpp \
|
|
||||||
$$PWD/screenplaysdk.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.h \
|
|
||||||
$$PWD/screenplaysdk.h
|
|
@ -1,35 +0,0 @@
|
|||||||
TEMPLATE = lib
|
|
||||||
TARGET = ScreenPlaySDK
|
|
||||||
TARGET = $$qtLibraryTarget($$TARGET)
|
|
||||||
|
|
||||||
QT += qml quick
|
|
||||||
CONFIG += plugin c++17
|
|
||||||
|
|
||||||
uri = ScreenPlay.screenplaysdk
|
|
||||||
|
|
||||||
# Input
|
|
||||||
SOURCES += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.cpp \
|
|
||||||
$$PWD/screenplaysdk.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.h \
|
|
||||||
$$PWD/screenplaysdk.h
|
|
||||||
|
|
||||||
DISTFILES = qmldir
|
|
||||||
|
|
||||||
!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
|
|
||||||
copy_qmldir.target = $$OUT_PWD/qmldir
|
|
||||||
copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
|
|
||||||
copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
|
|
||||||
QMAKE_EXTRA_TARGETS += copy_qmldir
|
|
||||||
PRE_TARGETDEPS += $$copy_qmldir.target
|
|
||||||
}
|
|
||||||
|
|
||||||
qmldir.files = qmldir
|
|
||||||
|
|
||||||
installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
|
|
||||||
qmldir.path = $$installPath
|
|
||||||
target.path = $$installPath
|
|
||||||
INSTALLS += target qmldir
|
|
||||||
|
|
@ -74,14 +74,20 @@ macx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
!macx {
|
!macx {
|
||||||
|
|
||||||
|
install_it.path = $${OUT_PWD}/
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
LIBS += -lScreenPlaySDKd
|
install_it.files += \
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
$$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/libcrypto-1_1-x64.so \
|
||||||
} else {
|
$$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/libssl-1_1-x64.so \
|
||||||
LIBS += -lScreenPlaySDK
|
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release
|
} else {
|
||||||
}
|
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK
|
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 \
|
install_it.files += index.html \
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QtWebEngine>
|
#include <QtWebEngine>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include "src/winwindow.h"
|
#include "src/winwindow.h"
|
||||||
@ -44,10 +45,10 @@ int main(int argc, char* argv[])
|
|||||||
//WinWindow window(list, "D:/672870/827874818", "appid", "1", "fill");
|
//WinWindow window(list, "D:/672870/827874818", "appid", "1", "fill");
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
LinuxWindow window(list, "test", "appid", "1");
|
LinuxWindow window(QVector<int>{ 0 }, "test", "appid", "1", "fill");
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_OSX)
|
#if defined(Q_OS_OSX)
|
||||||
MacWindow window(list, "test", "appid", "1");
|
MacWindow window({ 0 }, "test", "appid", "1", "fill");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
@ -103,7 +104,7 @@ int main(int argc, char* argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
LinuxWindow window(list, argumentList.at(2), argumentList.at(3), argumentList.at(5));
|
LinuxWindow window(list, argumentList.at(2), argumentList.at(3), argumentList.at(4), argumentList.at(5));
|
||||||
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &LinuxWindow::destroyThis);
|
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &LinuxWindow::destroyThis);
|
||||||
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &LinuxWindow::messageReceived);
|
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &LinuxWindow::messageReceived);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "linuxwindow.h"
|
#include "linuxwindow.h"
|
||||||
|
|
||||||
LinuxWindow::LinuxWindow(QVector<int>& activeScreensList, QString projectPath, QString id, QString volume, QObject* parent)
|
LinuxWindow::LinuxWindow(QVector<int> activeScreensList, QString projectPath, QString id, QString volume, const QString fillmode, QObject* parent)
|
||||||
: BaseWindow(projectPath)
|
: BaseWindow(projectPath)
|
||||||
{
|
{
|
||||||
setAppID(id);
|
setAppID(id);
|
||||||
@ -33,6 +33,3 @@ void LinuxWindow::destroyThis()
|
|||||||
QCoreApplication::quit();
|
QCoreApplication::quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinuxWindow::messageReceived(QString key, QString value)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
@ -17,14 +17,13 @@ class LinuxWindow : public BaseWindow
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit LinuxWindow(QVector<int>& activeScreensList, QString projectPath, QString id, QString volume,QObject *parent = nullptr);
|
explicit LinuxWindow(QVector<int> activeScreensList, QString projectPath, QString id, QString volume, const QString fillmode,QObject *parent = nullptr);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setVisible(bool show) override;
|
void setVisible(bool show) override;
|
||||||
void destroyThis() override;
|
void destroyThis() override;
|
||||||
void messageReceived(QString key, QString value) override;
|
|
||||||
private:
|
private:
|
||||||
QQuickView m_window;
|
QQuickView m_window;
|
||||||
};
|
};
|
||||||
|
@ -40,14 +40,21 @@ macx: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
!macx: {
|
!macx: {
|
||||||
|
|
||||||
|
|
||||||
|
install_it.path = $${OUT_PWD}/
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
LIBS += -lScreenPlaySDKd
|
install_it.files += \
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
$$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/libcrypto-1_1-x64.so \
|
||||||
} else {
|
$$PWD/../Common/vcpkg/installed/x64-linux/debug/bin/libssl-1_1-x64.so \
|
||||||
LIBS += -lScreenPlaySDK
|
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release
|
} else {
|
||||||
}
|
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK
|
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 \
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INSTALLS += install_it
|
INSTALLS += install_it
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
git submodule update --init
|
||||||
git submodule update --recursive
|
git submodule update --recursive
|
||||||
cd Common
|
cd Common
|
||||||
git clone https://github.com/microsoft/vcpkg.git
|
git clone https://github.com/microsoft/vcpkg.git
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
git submodule update --init
|
||||||
git submodule update --recursive
|
git submodule update --recursive
|
||||||
cd Common
|
cd Common
|
||||||
git clone https://github.com/microsoft/vcpkg.git
|
git clone https://github.com/microsoft/vcpkg.git
|
||||||
@ -8,4 +8,4 @@ git checkout origin/master
|
|||||||
chmod +x bootstrap-vcpkg.sh
|
chmod +x bootstrap-vcpkg.sh
|
||||||
./bootstrap-vcpkg.sh
|
./bootstrap-vcpkg.sh
|
||||||
chmod +x vcpkg
|
chmod +x vcpkg
|
||||||
./vcpkg install libzippp:x64-linux nlohmann-json:x64-linux openssl:x64-linux
|
./vcpkg install libzippp:x64-linux nlohmann-json:x64-linux openssl-unix:x64-linux libzip:x64-linux
|
||||||
|
Loading…
Reference in New Issue
Block a user