1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +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 msvc: LIBS += -luser32
TARGETPATH = ScreenPlay TARGETPATH = ScreenPlay
ICON = favicon.ico
SOURCES += main.cpp \ SOURCES += main.cpp \
src/steamworkshop.cpp \ src/steamworkshop.cpp \
src/installedlistmodel.cpp \ src/installedlistmodel.cpp \
@ -25,8 +27,7 @@ SOURCES += main.cpp \
src/qmlutilities.cpp \ src/qmlutilities.cpp \
src/create.cpp src/create.cpp
RESOURCES += \ RESOURCES += Resources.qrc
Resources.qrc \
TRANSLATIONS = translations/ScreenPlay_en.ts \ TRANSLATIONS = translations/ScreenPlay_en.ts \
translations/ScreenPlay_de.ts translations/ScreenPlay_de.ts
@ -52,7 +53,7 @@ HEADERS += \
INCLUDEPATH += \ INCLUDEPATH += \
$$PWD/ThirdParty/ \ $$PWD/ThirdParty/ \
$$PWD/src/\ $$PWD/src/
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
@ -72,10 +73,8 @@ installOut.files += steam_appid.txt \
INSTALLS += install_it INSTALLS += install_it
INSTALLS += installOut INSTALLS += installOut
# Additional import path used to resolve QML modules in Qt Creator's code model # 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 # Additional import path used to resolve QML modules just for Qt Quick Designer
# QML_DESIGNER_IMPORT_PATH = # QML_DESIGNER_IMPORT_PATH =
@ -95,8 +94,6 @@ release {
} }
win32 { win32 {
INCLUDEPATH += "C:\msys64\mingw64\include"
win32: LIBS += -L$$PWD/ThirdParty/Steam/redistributable_bin/win64/ -lsteam_api64 win32: LIBS += -L$$PWD/ThirdParty/Steam/redistributable_bin/win64/ -lsteam_api64
DEPENDPATH += $$PWD/ThirdParty/Steam/redistributable_bin/win64 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 <QDir>
#include <QFontDatabase> #include <QFontDatabase>
#include <QGuiApplication> #include <QGuiApplication>
@ -9,7 +10,7 @@
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QQmlContext> #include <QQmlContext>
#include <QQmlEngine> #include <QQmlEngine>
#include <QQuickStyle>
#include <QQuickView> #include <QQuickView>
#include <QScreen> #include <QScreen>
#include <QStringList> #include <QStringList>
@ -25,25 +26,26 @@
#include <qt_windows.h> #include <qt_windows.h>
#endif #endif
#include "create.h" #include "src/create.h"
#include "installedlistfilter.h" #include "src/installedlistfilter.h"
#include "installedlistmodel.h" #include "src/installedlistmodel.h"
#include "monitorlistmodel.h" #include "src/monitorlistmodel.h"
#include "profilelistmodel.h" #include "src/profilelistmodel.h"
#include "qmlutilities.h" #include "src/qmlutilities.h"
#include "screenplay.h" #include "src/screenplay.h"
#include "sdkconnector.h" #include "src/sdkconnector.h"
#include "settings.h" #include "src/settings.h"
#include "startuperror.h" #include "src/startuperror.h"
#include "steam/steam_api.h" #include "ThirdParty/steam/steam_api.h"
#include "steamworkshop.h" #include "src/steamworkshop.h"
#include "steamworkshoplistmodel.h" #include "src/steamworkshoplistmodel.h"
#include "globalconstans.h"
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseOpenGLES); QGuiApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
QGuiApplication app(argc, argv); QGuiApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false); app.setQuitOnLastWindowClosed(false);
@ -86,6 +88,7 @@ int main(int argc, char* argv[])
QDir SPBaseDir(QDir::currentPath()); QDir SPBaseDir(QDir::currentPath());
#ifdef QT_DEBUG #ifdef QT_DEBUG
qDebug() << "Starting in Debug mode!";
if (SPWorkingDir.cdUp()) { if (SPWorkingDir.cdUp()) {
settings.setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow/debug/ScreenPlayWindow.exe")); settings.setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow/debug/ScreenPlayWindow.exe"));
settings.setScreenPlayWidgetPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWidget/debug/ScreenPlayWidget.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");
SPBaseDir.cd("ScreenPlay"); SPBaseDir.cd("ScreenPlay");
settings.setScreenPlayBasePath(QUrl(SPBaseDir.path())); settings.setScreenPlayBasePath(QUrl(SPBaseDir.path()));
#endif
#elif #ifdef QT_NO_DEBUG
qDebug() << "Starting in Release mode!";
settings.setScreenPlayBasePath(QUrl(SPWorkingDir.path())); settings.setScreenPlayBasePath(QUrl(SPWorkingDir.path()));
// If we build in the release version we must be cautious! // If we build in the release version we must be cautious!
@ -120,9 +124,8 @@ int main(int argc, char* argv[])
} else { } else {
// If started by Steam // If started by Steam
settings.setScreenPlayWindowPath(QUrl("ScreenPlayWindow.exe")); settings.setScreenPlayWindowPath(QUrl("ScreenPlayWindow.exe"));
settings.setScreenPlayWindowPath(QUrl("ScreenPlayWidget.exe")); settings.setScreenPlayWidgetPath(QUrl("ScreenPlayWidget.exe"));
} }
#endif #endif
SteamWorkshop steamWorkshop(steamID, &steamWorkshopListModel, &settings); SteamWorkshop steamWorkshop(steamID, &steamWorkshopListModel, &settings);
Create create(&settings, &qmlUtil); Create create(&settings, &qmlUtil);