mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +01:00
Merge branch 'master' into 71-create-a-shader-library-subproject
This commit is contained in:
commit
561aa5770b
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,6 +1,3 @@
|
|||||||
[submodule "Common/qt-google-analytics"]
|
[submodule "Common/qt-google-analytics"]
|
||||||
path = Common/qt-google-analytics
|
path = Common/qt-google-analytics
|
||||||
url = https://github.com/HSAnet/qt-google-analytics.git
|
url = https://github.com/HSAnet/qt-google-analytics.git
|
||||||
[submodule "Common/qt-breakpad"]
|
|
||||||
path = Common/qt-breakpad
|
|
||||||
url = https://github.com/kelteseth/qt-breakpad
|
|
||||||
|
@ -16,8 +16,8 @@ elseif(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(VCPKG_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Common/vcpkg/installed/${VCPKG_ARCH}/include/)
|
set(VCPKG_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Common/vcpkg/installed/${VCPKG_ARCH}/include/)
|
||||||
|
set(VCPKG_TOOLS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Common/vcpkg/installed/${VCPKG_ARCH}/tools/)
|
||||||
set(QT_TELEMTRY_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Common/qt-google-analytics/)
|
set(QT_TELEMTRY_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Common/qt-google-analytics/)
|
||||||
set(QT_BREAKPAD_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Common/qt-breakpad/)
|
|
||||||
|
|
||||||
|
|
||||||
find_package(Git REQUIRED)
|
find_package(Git REQUIRED)
|
||||||
@ -55,7 +55,3 @@ add_subdirectory(ScreenPlayShader)
|
|||||||
add_subdirectory(ScreenPlayWallpaper)
|
add_subdirectory(ScreenPlayWallpaper)
|
||||||
add_subdirectory(ScreenPlayWidget)
|
add_subdirectory(ScreenPlayWidget)
|
||||||
add_subdirectory(ScreenPlaySysInfo)
|
add_subdirectory(ScreenPlaySysInfo)
|
||||||
add_subdirectory(Common/qt-breakpad)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit f5bf92fc2b349ca1c3c76a18a58fadfab5bb9f33
|
|
@ -21,6 +21,8 @@ find_package(
|
|||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
find_package(libzippp CONFIG REQUIRED)
|
find_package(libzippp CONFIG REQUIRED)
|
||||||
|
find_package(sentry CONFIG REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set(src main.cpp
|
set(src main.cpp
|
||||||
@ -102,13 +104,19 @@ target_link_libraries(${PROJECT_NAME}
|
|||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::WebEngine
|
Qt5::WebEngine
|
||||||
libzippp::libzippp
|
libzippp::libzippp
|
||||||
|
sentry::sentry
|
||||||
ScreenPlaySDK
|
ScreenPlaySDK
|
||||||
QTBreakpadplugin)
|
)
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME}
|
target_include_directories(${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${QT_TELEMTRY_INCLUDE}
|
${QT_TELEMTRY_INCLUDE})
|
||||||
${QT_BREAKPAD_INCLUDE})
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/assets/fonts)
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/assets/fonts)
|
||||||
configure_file(assets/fonts/NotoSansCJKkr-Regular.otf ${CMAKE_BINARY_DIR}/bin/assets/fonts COPYONLY)
|
configure_file(assets/fonts/NotoSansCJKkr-Regular.otf ${CMAKE_BINARY_DIR}/bin/assets/fonts COPYONLY)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
configure_file(${VCPKG_TOOLS_PATH}/sentry-native/crashpad_handler.exe ${CMAKE_BINARY_DIR}/bin/ COPYONLY)
|
||||||
|
else()
|
||||||
|
configure_file(${VCPKG_TOOLS_PATH}/sentry-native/crashpad_handler ${CMAKE_BINARY_DIR}/bin/ COPYONLY)
|
||||||
|
endif()
|
||||||
|
@ -50,10 +50,6 @@ App::App()
|
|||||||
QGuiApplication::setApplicationVersion("0.12.0");
|
QGuiApplication::setApplicationVersion("0.12.0");
|
||||||
QGuiApplication::setQuitOnLastWindowClosed(false);
|
QGuiApplication::setQuitOnLastWindowClosed(false);
|
||||||
|
|
||||||
#ifdef Q_OS_WINDOWS
|
|
||||||
QtBreakpad::init(QDir::current().absolutePath());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QFontDatabase::addApplicationFont(":/assets/fonts/LibreBaskerville-Italic.ttf");
|
QFontDatabase::addApplicationFont(":/assets/fonts/LibreBaskerville-Italic.ttf");
|
||||||
|
|
||||||
QFontDatabase::addApplicationFont(":/assets/fonts/Roboto-Light.ttf");
|
QFontDatabase::addApplicationFont(":/assets/fonts/Roboto-Light.ttf");
|
||||||
@ -137,9 +133,8 @@ void App::init()
|
|||||||
using std::make_shared, std::make_unique;
|
using std::make_shared, std::make_unique;
|
||||||
|
|
||||||
// Util should be created as first so we redirect qDebugs etc. into the log
|
// Util should be created as first so we redirect qDebugs etc. into the log
|
||||||
|
m_util = std::make_unique<Util>(&m_networkAccessManager);
|
||||||
m_globalVariables = make_shared<GlobalVariables>();
|
m_globalVariables = make_shared<GlobalVariables>();
|
||||||
auto* nam = new QNetworkAccessManager(this);
|
|
||||||
m_util = make_unique<Util>(nam);
|
|
||||||
m_installedListModel = make_shared<InstalledListModel>(m_globalVariables);
|
m_installedListModel = make_shared<InstalledListModel>(m_globalVariables);
|
||||||
m_installedListFilter = make_shared<InstalledListFilter>(m_installedListModel);
|
m_installedListFilter = make_shared<InstalledListFilter>(m_installedListModel);
|
||||||
m_monitorListModel = make_shared<MonitorListModel>();
|
m_monitorListModel = make_shared<MonitorListModel>();
|
||||||
@ -151,10 +146,25 @@ void App::init()
|
|||||||
// Only create tracker if user did not disallow!
|
// Only create tracker if user did not disallow!
|
||||||
if (m_settings->anonymousTelemetry()) {
|
if (m_settings->anonymousTelemetry()) {
|
||||||
m_telemetry = make_shared<GAnalytics>("UA-152830367-3");
|
m_telemetry = make_shared<GAnalytics>("UA-152830367-3");
|
||||||
m_telemetry->setNetworkAccessManager(nam);
|
m_telemetry->setNetworkAccessManager(&m_networkAccessManager);
|
||||||
m_telemetry->setSendInterval(1000);
|
m_telemetry->setSendInterval(1000);
|
||||||
m_telemetry->startSession();
|
m_telemetry->startSession();
|
||||||
m_telemetry->sendEvent("version", QApplication::applicationVersion());
|
m_telemetry->sendEvent("version", QApplication::applicationVersion());
|
||||||
|
|
||||||
|
sentry_options_t* options = sentry_options_new();
|
||||||
|
sentry_options_set_dsn(options, "https://425ea0b77def4f91a5a9decc01b36ff4@o428218.ingest.sentry.io/5373419");
|
||||||
|
|
||||||
|
QString executableSuffix;
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
executableSuffix = ".exe";
|
||||||
|
#endif
|
||||||
|
const QString appPath = QGuiApplication::applicationDirPath();
|
||||||
|
sentry_options_set_handler_path(options, QString(appPath + "/crashpad_handler" + executableSuffix).toStdString().c_str());
|
||||||
|
sentry_options_set_database_path(options, appPath.toStdString().c_str());
|
||||||
|
const int sentryInitStatus = sentry_init(options);
|
||||||
|
if (sentryInitStatus != 0) {
|
||||||
|
qWarning() << "Unable to inti sentry crashhandler with statuscode: " << sentryInitStatus;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_create = make_unique<Create>(m_globalVariables);
|
m_create = make_unique<Create>(m_globalVariables);
|
||||||
@ -180,6 +190,7 @@ void App::init()
|
|||||||
|
|
||||||
qmlRegisterSingletonInstance("ScreenPlay", 1, 0, "ScreenPlay", this);
|
qmlRegisterSingletonInstance("ScreenPlay", 1, 0, "ScreenPlay", this);
|
||||||
loadSteamPlugin();
|
loadSteamPlugin();
|
||||||
|
|
||||||
m_mainWindowEngine->load(QUrl(QStringLiteral("qrc:/main.qml")));
|
m_mainWindowEngine->load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,10 +49,6 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "ganalytics.h"
|
|
||||||
#ifdef Q_OS_WINDOWS
|
|
||||||
#include "qt_breakpad.h"
|
|
||||||
#endif
|
|
||||||
#include "src/create.h"
|
#include "src/create.h"
|
||||||
#include "src/globalvariables.h"
|
#include "src/globalvariables.h"
|
||||||
#include "src/installedlistfilter.h"
|
#include "src/installedlistfilter.h"
|
||||||
@ -63,6 +59,9 @@
|
|||||||
#include "src/settings.h"
|
#include "src/settings.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
|
|
||||||
|
#include "ganalytics.h"
|
||||||
|
#include <sentry.h>
|
||||||
|
|
||||||
class ScreenPlayWorkshopPlugin;
|
class ScreenPlayWorkshopPlugin;
|
||||||
|
|
||||||
namespace ScreenPlay {
|
namespace ScreenPlay {
|
||||||
@ -253,6 +252,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QPluginLoader m_workshopPlugin;
|
QPluginLoader m_workshopPlugin;
|
||||||
|
QNetworkAccessManager m_networkAccessManager;
|
||||||
std::unique_ptr<QQmlApplicationEngine> m_mainWindowEngine;
|
std::unique_ptr<QQmlApplicationEngine> m_mainWindowEngine;
|
||||||
|
|
||||||
std::unique_ptr<Create> m_create;
|
std::unique_ptr<Create> m_create;
|
||||||
|
@ -32,19 +32,21 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
|
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <sentry.h>
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
// Buggy with every Qt version except 5.14.0!
|
|
||||||
// Displays wrong DPI scaled monitor resolution
|
// Buggy with every Qt version except 5.14.0!
|
||||||
// 4k with 150% scaling to FULL HD on Windows
|
// Displays wrong DPI scaled monitor resolution
|
||||||
// https://bugreports.qt.io/browse/QTBUG-81694
|
// 4k with 150% scaling to FULL HD on Windows
|
||||||
#if defined(Q_OS_LINUX) || defined(Q_OS_OSX)
|
// https://bugreports.qt.io/browse/QTBUG-81694
|
||||||
|
#if defined(Q_OS_LINUX) || defined(Q_OS_OSX)
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
#endif
|
#endif
|
||||||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||||
|
|
||||||
QApplication qtGuiApp(argc, argv);
|
QApplication qtGuiApp(argc, argv);
|
||||||
@ -54,7 +56,10 @@ int main(int argc, char* argv[])
|
|||||||
if (app.m_isAnotherScreenPlayInstanceRunning) {
|
if (app.m_isAnotherScreenPlayInstanceRunning) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
app.init();
|
app.init();
|
||||||
return qtGuiApp.exec();
|
const int status = qtGuiApp.exec();
|
||||||
|
sentry_shutdown();
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ set(headers screenplaysysinfo_plugin.h
|
|||||||
mathhelper.h
|
mathhelper.h
|
||||||
storage.h)
|
storage.h)
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} ${src} ${headers})
|
add_library(${PROJECT_NAME} SHARED ${src} ${headers})
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include <QtWebEngine>
|
#include <QtWebEngine>
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
|
|
||||||
#include "src/winwindow.h"
|
#include "src/winwindow.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4,13 +4,14 @@ cd Common
|
|||||||
git clone https://github.com/microsoft/vcpkg.git
|
git clone https://github.com/microsoft/vcpkg.git
|
||||||
cd vcpkg
|
cd vcpkg
|
||||||
git pull
|
git pull
|
||||||
git checkout 2bc6cd714
|
# master 10.09.2020 - 18ab4b72a26284f0df28295ce7bf9b21c96f20f4
|
||||||
|
git checkout 18ab4b72a26284f0df28295ce7bf9b21c96f20f4
|
||||||
chmod +x bootstrap-vcpkg.sh
|
chmod +x bootstrap-vcpkg.sh
|
||||||
./bootstrap-vcpkg.sh
|
./bootstrap-vcpkg.sh
|
||||||
chmod +x vcpkg
|
chmod +x vcpkg
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
./vcpkg install zlib libzip libzippp openssl-unix libzip breakpad --triplet x64-osx --recurse
|
./vcpkg install zlib libzip libzippp openssl-unix libzip sentry-native --triplet x64-osx --recurse
|
||||||
else
|
else
|
||||||
./vcpkg install zlib libzip libzippp openssl-unix libzip breakpad --triplet x64-linux --recurse
|
./vcpkg install zlib libzip libzippp openssl-unix libzip sentry-native --triplet x64-linux --recurse
|
||||||
fi
|
fi
|
@ -4,6 +4,7 @@ cd Common
|
|||||||
git clone https://github.com/microsoft/vcpkg.git
|
git clone https://github.com/microsoft/vcpkg.git
|
||||||
cd vcpkg
|
cd vcpkg
|
||||||
git pull
|
git pull
|
||||||
git checkout 2bc6cd714
|
rem master 10.09.2020 - 18ab4b72a26284f0df28295ce7bf9b21c96f20f4
|
||||||
|
git checkout 18ab4b72a26284f0df28295ce7bf9b21c96f20f4
|
||||||
call bootstrap-vcpkg.bat
|
call bootstrap-vcpkg.bat
|
||||||
vcpkg.exe install zlib libzip libzippp openssl breakpad --triplet x64-windows --recurse
|
vcpkg.exe install zlib libzip libzippp openssl sentry-native --triplet x64-windows --recurse
|
||||||
|
Loading…
Reference in New Issue
Block a user