mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 15:55:39 +00:00
Basic support for building as UWP app
This commit is contained in:
parent
b1de8b703b
commit
9288cfa684
29
app/app.pro
29
app/app.pro
@ -92,7 +92,10 @@ unix:!macx {
|
|||||||
}
|
}
|
||||||
win32 {
|
win32 {
|
||||||
LIBS += -llibssl -llibcrypto -lSDL2 -lSDL2_ttf -lavcodec -lavutil -lopus -ld3dx9
|
LIBS += -llibssl -llibcrypto -lSDL2 -lSDL2_ttf -lavcodec -lavutil -lopus -ld3dx9
|
||||||
CONFIG += ffmpeg soundio
|
CONFIG += ffmpeg
|
||||||
|
}
|
||||||
|
win32:!winrt {
|
||||||
|
CONFIG += soundio
|
||||||
}
|
}
|
||||||
macx {
|
macx {
|
||||||
LIBS += -lssl -lcrypto -lavcodec.58 -lavutil.56 -lopus -framework SDL2 -framework SDL2_ttf
|
LIBS += -lssl -lcrypto -lavcodec.58 -lavutil.56 -lopus -framework SDL2 -framework SDL2_ttf
|
||||||
@ -211,7 +214,7 @@ config_SLVideo {
|
|||||||
SOURCES += streaming/video/sl.cpp
|
SOURCES += streaming/video/sl.cpp
|
||||||
HEADERS += streaming/video/sl.h
|
HEADERS += streaming/video/sl.h
|
||||||
}
|
}
|
||||||
win32 {
|
win32:!winrt {
|
||||||
message(DXVA2 renderer selected)
|
message(DXVA2 renderer selected)
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
@ -265,12 +268,14 @@ else:unix: LIBS += -L$$OUT_PWD/../qmdnsengine/ -lqmdnsengine
|
|||||||
INCLUDEPATH += $$PWD/../qmdnsengine/qmdnsengine/src/include $$PWD/../qmdnsengine
|
INCLUDEPATH += $$PWD/../qmdnsengine/qmdnsengine/src/include $$PWD/../qmdnsengine
|
||||||
DEPENDPATH += $$PWD/../qmdnsengine/qmdnsengine/src/include $$PWD/../qmdnsengine
|
DEPENDPATH += $$PWD/../qmdnsengine/qmdnsengine/src/include $$PWD/../qmdnsengine
|
||||||
|
|
||||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../soundio/release/ -lsoundio
|
!winrt {
|
||||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../soundio/debug/ -lsoundio
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../soundio/release/ -lsoundio
|
||||||
else:unix: LIBS += -L$$OUT_PWD/../soundio/ -lsoundio
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../soundio/debug/ -lsoundio
|
||||||
|
else:unix: LIBS += -L$$OUT_PWD/../soundio/ -lsoundio
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../soundio/libsoundio
|
INCLUDEPATH += $$PWD/../soundio/libsoundio
|
||||||
DEPENDPATH += $$PWD/../soundio/libsoundio
|
DEPENDPATH += $$PWD/../soundio/libsoundio
|
||||||
|
}
|
||||||
|
|
||||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../h264bitstream/release/ -lh264bitstream
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../h264bitstream/release/ -lh264bitstream
|
||||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../h264bitstream/debug/ -lh264bitstream
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../h264bitstream/debug/ -lh264bitstream
|
||||||
@ -279,11 +284,13 @@ else:unix: LIBS += -L$$OUT_PWD/../h264bitstream/ -lh264bitstream
|
|||||||
INCLUDEPATH += $$PWD/../h264bitstream/h264bitstream
|
INCLUDEPATH += $$PWD/../h264bitstream/h264bitstream
|
||||||
DEPENDPATH += $$PWD/../h264bitstream/h264bitstream
|
DEPENDPATH += $$PWD/../h264bitstream/h264bitstream
|
||||||
|
|
||||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/release/ -lAntiHooking
|
!winrt {
|
||||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/debug/ -lAntiHooking
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/release/ -lAntiHooking
|
||||||
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/debug/ -lAntiHooking
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../AntiHooking
|
INCLUDEPATH += $$PWD/../AntiHooking
|
||||||
DEPENDPATH += $$PWD/../AntiHooking
|
DEPENDPATH += $$PWD/../AntiHooking
|
||||||
|
}
|
||||||
|
|
||||||
defineTest(copyToDestDir) {
|
defineTest(copyToDestDir) {
|
||||||
files = $$1
|
files = $$1
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
|
|
||||||
void showMessage(QString message, MessageType type) const
|
void showMessage(QString message, MessageType type) const
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN32)
|
||||||
UINT flags = MB_OK | MB_TOPMOST | MB_SETFOREGROUND;
|
UINT flags = MB_OK | MB_TOPMOST | MB_SETFOREGROUND;
|
||||||
flags |= (type == Info ? MB_ICONINFORMATION : MB_ICONERROR);
|
flags |= (type == Info ? MB_ICONINFORMATION : MB_ICONERROR);
|
||||||
QString title = "Moonlight";
|
QString title = "Moonlight";
|
||||||
|
@ -345,10 +345,17 @@ int main(int argc, char *argv[])
|
|||||||
return new AutoUpdateChecker();
|
return new AutoUpdateChecker();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#ifndef Q_OS_WINRT
|
||||||
// Use the dense material dark theme by default
|
// Use the dense material dark theme by default
|
||||||
if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE")) {
|
if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE")) {
|
||||||
qputenv("QT_QUICK_CONTROLS_STYLE", "Material");
|
qputenv("QT_QUICK_CONTROLS_STYLE", "Material");
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// Use universal dark on WinRT
|
||||||
|
if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE")) {
|
||||||
|
qputenv("QT_QUICK_CONTROLS_STYLE", "Universal");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MATERIAL_THEME")) {
|
if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MATERIAL_THEME")) {
|
||||||
qputenv("QT_QUICK_CONTROLS_MATERIAL_THEME", "Dark");
|
qputenv("QT_QUICK_CONTROLS_MATERIAL_THEME", "Dark");
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,18 @@ SUBDIRS = \
|
|||||||
moonlight-common-c \
|
moonlight-common-c \
|
||||||
qmdnsengine \
|
qmdnsengine \
|
||||||
app \
|
app \
|
||||||
soundio \
|
|
||||||
h264bitstream
|
h264bitstream
|
||||||
|
|
||||||
# Build the dependencies in parallel before the final app
|
# Build the dependencies in parallel before the final app
|
||||||
app.depends = qmdnsengine moonlight-common-c soundio h264bitstream
|
app.depends = qmdnsengine moonlight-common-c h264bitstream
|
||||||
win32 {
|
win32:!winrt {
|
||||||
SUBDIRS += AntiHooking
|
SUBDIRS += AntiHooking
|
||||||
app.depends += AntiHooking
|
app.depends += AntiHooking
|
||||||
}
|
}
|
||||||
|
!winrt {
|
||||||
|
SUBDIRS += soundio
|
||||||
|
app.depends += soundio
|
||||||
|
}
|
||||||
|
|
||||||
# Support debug and release builds from command line for CI
|
# Support debug and release builds from command line for CI
|
||||||
CONFIG += debug_and_release
|
CONFIG += debug_and_release
|
||||||
|
Loading…
x
Reference in New Issue
Block a user