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 += \
|
||||
$$PWD/src/\
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
install_it.path = $${OUT_PWD}/debug/
|
||||
} else {
|
||||
install_it.path = $${OUT_PWD}/release/
|
||||
}
|
||||
|
||||
|
||||
|
||||
win32 {
|
||||
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
|
||||
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
|
||||
|
||||
|
@ -14,8 +14,9 @@
|
||||
#include "screenplaywallpaper.h"
|
||||
#include "screenplaywidget.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <qt_windows.h>
|
||||
|
||||
#endif
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
|
@ -322,12 +322,14 @@ void Util::downloadFFMPEG()
|
||||
|
||||
string path = QGuiApplication::instance()->applicationDirPath().toStdString() + "/";
|
||||
|
||||
ZipEntry entryFFMPEG;
|
||||
std::string entryFFMPEGPath;
|
||||
#ifdef Q_OS_WIN
|
||||
ZipEntry entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffmpeg.exe");
|
||||
std::string entryFFMPEGPath = path + "ffmpeg.exe";
|
||||
entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffmpeg.exe");
|
||||
entryFFMPEGPath = path + "ffmpeg.exe";
|
||||
#elif defined(Q_OS_OSX)
|
||||
ZipEntry entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffmpeg");
|
||||
std::string entryFFMPEGPath = path + "ffmpeg";
|
||||
entryFFMPEG = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffmpeg");
|
||||
entryFFMPEGPath = path + "ffmpeg";
|
||||
#endif
|
||||
|
||||
if (entryFFMPEG.isNull()) {
|
||||
@ -344,12 +346,14 @@ void Util::downloadFFMPEG()
|
||||
return;
|
||||
}
|
||||
|
||||
ZipEntry entryFFPROBE;
|
||||
std::string entryFFPROBEPath;
|
||||
#ifdef Q_OS_WIN
|
||||
ZipEntry entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffprobe.exe");
|
||||
std::string entryFFPROBEPath = path + "ffprobe.exe";
|
||||
entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() + "-win64-static/bin/ffprobe.exe");
|
||||
entryFFPROBEPath = path + "ffprobe.exe";
|
||||
#elif defined(Q_OS_OSX)
|
||||
ZipEntry entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffprobe");
|
||||
std::string entryFFPROBEPath = path + "ffprobe";
|
||||
entryFFPROBE = archive->getEntry(ffmpegVersion.toStdString() +"-macos64-static/bin/ffprobe");
|
||||
entryFFPROBEPath = path + "ffprobe";
|
||||
#endif
|
||||
if (entryFFPROBE.isNull()) {
|
||||
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 {
|
||||
|
||||
install_it.path = $${OUT_PWD}/
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS += -lScreenPlaySDKd
|
||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
||||
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 {
|
||||
LIBS += -lScreenPlaySDK
|
||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release
|
||||
|
||||
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 \
|
||||
}
|
||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK
|
||||
}
|
||||
|
||||
install_it.files += index.html \
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
#include <QtWebEngine>
|
||||
#include <QVector>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include "src/winwindow.h"
|
||||
@ -44,10 +45,10 @@ int main(int argc, char* argv[])
|
||||
//WinWindow window(list, "D:/672870/827874818", "appid", "1", "fill");
|
||||
#endif
|
||||
#if defined(Q_OS_LINUX)
|
||||
LinuxWindow window(list, "test", "appid", "1");
|
||||
LinuxWindow window(QVector<int>{ 0 }, "test", "appid", "1", "fill");
|
||||
#endif
|
||||
#if defined(Q_OS_OSX)
|
||||
MacWindow window(list, "test", "appid", "1");
|
||||
MacWindow window({ 0 }, "test", "appid", "1", "fill");
|
||||
#endif
|
||||
|
||||
return app.exec();
|
||||
@ -103,7 +104,7 @@ int main(int argc, char* argv[])
|
||||
#endif
|
||||
|
||||
#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::incommingMessage, &window, &LinuxWindow::messageReceived);
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
#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)
|
||||
{
|
||||
setAppID(id);
|
||||
@ -33,6 +33,3 @@ void LinuxWindow::destroyThis()
|
||||
QCoreApplication::quit();
|
||||
}
|
||||
|
||||
void LinuxWindow::messageReceived(QString key, QString value)
|
||||
{
|
||||
}
|
||||
|
@ -17,14 +17,13 @@ class LinuxWindow : public BaseWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
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:
|
||||
|
||||
public slots:
|
||||
void setVisible(bool show) override;
|
||||
void destroyThis() override;
|
||||
void messageReceived(QString key, QString value) override;
|
||||
private:
|
||||
QQuickView m_window;
|
||||
};
|
||||
|
@ -40,14 +40,21 @@ macx: {
|
||||
}
|
||||
|
||||
!macx: {
|
||||
|
||||
|
||||
install_it.path = $${OUT_PWD}/
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS += -lScreenPlaySDKd
|
||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
||||
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 {
|
||||
LIBS += -lScreenPlaySDK
|
||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/release
|
||||
|
||||
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 \
|
||||
}
|
||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK
|
||||
}
|
||||
|
||||
INSTALLS += install_it
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
git submodule update --init
|
||||
git submodule update --recursive
|
||||
cd Common
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
git submodule update --init
|
||||
git submodule update --recursive
|
||||
cd Common
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
@ -8,4 +8,4 @@ git checkout origin/master
|
||||
chmod +x bootstrap-vcpkg.sh
|
||||
./bootstrap-vcpkg.sh
|
||||
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