1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

More cleanup to better use debug/release builds

This commit is contained in:
kelteseth 2018-08-25 00:48:59 +02:00
parent 50dc0cddcf
commit 6d1182acba
3 changed files with 28 additions and 28 deletions

View File

@ -6,6 +6,8 @@ CONFIG += qtquickcompiler
msvc: LIBS += -luser32
TARGETPATH = ScreenPlay
ICON = favicon.ico
SOURCES += main.cpp \
src/steamworkshop.cpp \
src/installedlistmodel.cpp \
@ -25,8 +27,7 @@ SOURCES += main.cpp \
src/qmlutilities.cpp \
src/create.cpp
RESOURCES += \
Resources.qrc \
RESOURCES += Resources.qrc
TRANSLATIONS = translations/ScreenPlay_en.ts \
translations/ScreenPlay_de.ts
@ -52,7 +53,7 @@ HEADERS += \
INCLUDEPATH += \
$$PWD/ThirdParty/ \
$$PWD/src/\
$$PWD/src/
CONFIG(debug, debug|release) {
@ -72,10 +73,8 @@ installOut.files += steam_appid.txt \
INSTALLS += install_it
INSTALLS += installOut
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH += [QtAVSourceCodeDir]/qml
QML_IMPORT_PATH =
# Additional import path used to resolve QML modules just for Qt Quick Designer
# QML_DESIGNER_IMPORT_PATH =
@ -95,8 +94,6 @@ release {
}
win32 {
INCLUDEPATH += "C:\msys64\mingw64\include"
win32: LIBS += -L$$PWD/ThirdParty/Steam/redistributable_bin/win64/ -lsteam_api64
DEPENDPATH += $$PWD/ThirdParty/Steam/redistributable_bin/win64
}

BIN
ScreenPlay/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

View File

@ -1,4 +1,5 @@
#include <QDebug>
#include <QThread>
#include <QDebug>
#include <QDir>
#include <QFontDatabase>
#include <QGuiApplication>
@ -9,7 +10,7 @@
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QQmlEngine>
#include <QQuickStyle>
#include <QQuickView>
#include <QScreen>
#include <QStringList>
@ -25,25 +26,26 @@
#include <qt_windows.h>
#endif
#include "create.h"
#include "installedlistfilter.h"
#include "installedlistmodel.h"
#include "monitorlistmodel.h"
#include "profilelistmodel.h"
#include "qmlutilities.h"
#include "screenplay.h"
#include "sdkconnector.h"
#include "settings.h"
#include "startuperror.h"
#include "steam/steam_api.h"
#include "steamworkshop.h"
#include "steamworkshoplistmodel.h"
#include "src/create.h"
#include "src/installedlistfilter.h"
#include "src/installedlistmodel.h"
#include "src/monitorlistmodel.h"
#include "src/profilelistmodel.h"
#include "src/qmlutilities.h"
#include "src/screenplay.h"
#include "src/sdkconnector.h"
#include "src/settings.h"
#include "src/startuperror.h"
#include "ThirdParty/steam/steam_api.h"
#include "src/steamworkshop.h"
#include "src/steamworkshoplistmodel.h"
#include "globalconstans.h"
int main(int argc, char* argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);
QGuiApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
QGuiApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false);
@ -86,6 +88,7 @@ int main(int argc, char* argv[])
QDir SPBaseDir(QDir::currentPath());
#ifdef QT_DEBUG
qDebug() << "Starting in Debug mode!";
if (SPWorkingDir.cdUp()) {
settings.setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow/debug/ScreenPlayWindow.exe"));
settings.setScreenPlayWidgetPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWidget/debug/ScreenPlayWidget.exe"));
@ -97,8 +100,9 @@ int main(int argc, char* argv[])
SPBaseDir.cd("ScreenPlay");
SPBaseDir.cd("ScreenPlay");
settings.setScreenPlayBasePath(QUrl(SPBaseDir.path()));
#elif
#endif
#ifdef QT_NO_DEBUG
qDebug() << "Starting in Release mode!";
settings.setScreenPlayBasePath(QUrl(SPWorkingDir.path()));
// If we build in the release version we must be cautious!
@ -120,9 +124,8 @@ int main(int argc, char* argv[])
} else {
// If started by Steam
settings.setScreenPlayWindowPath(QUrl("ScreenPlayWindow.exe"));
settings.setScreenPlayWindowPath(QUrl("ScreenPlayWidget.exe"));
settings.setScreenPlayWidgetPath(QUrl("ScreenPlayWidget.exe"));
}
#endif
SteamWorkshop steamWorkshop(steamID, &steamWorkshopListModel, &settings);
Create create(&settings, &qmlUtil);