Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build.linux.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ jobs:
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list

- name: Remove windows-only qt version override in vcpkg.json
run: |
sed -i '/For Windows only/d' ${{ github.workspace }}/gui/qt/vcpkg.json

- name: Install dependencies
run: |
set -e
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build.mac.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ jobs:
with:
submodules: 'recursive'

- name: Remove windows-only qt version override in vcpkg.json
run: |
sed -i '' '/For Windows only/d' ${{ github.workspace }}/gui/qt/vcpkg.json

- name: Install dependencies
run: |
set -e
Expand Down
9 changes: 7 additions & 2 deletions gui/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ endif()
include(GNUInstallDirs)

find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt6 REQUIRED COMPONENTS DBus Gui Network Widgets)
find_package(Qt6 REQUIRED COMPONENTS Gui Network Widgets)
if(NOT WIN32)
find_package(Qt6 COMPONENTS DBus)
endif()

set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
Expand Down Expand Up @@ -284,10 +287,12 @@ endif()
target_link_libraries(CEmu PRIVATE
Qt::Core
Qt::Gui
Qt::DBus # needed at runtime by QtGui for some reason...?
Qt::Network
Qt::Widgets
)
if(TARGET Qt::DBus)
target_link_libraries(CEmu PRIVATE Qt::DBus)
endif()

include(CheckIPOSupported)
check_ipo_supported(RESULT lto_supported OUTPUT error)
Expand Down
11 changes: 11 additions & 0 deletions gui/qt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <QtCore/QCommandLineParser>
#include <QtWidgets/QApplication>
#include <QtGui/QFontDatabase>
#include <QtWidgets/QStyleFactory>

int main(int argc, char *argv[]) {

Expand All @@ -16,6 +17,16 @@ int main(int argc, char *argv[]) {
#endif
QApplication app(argc, argv);

#if defined(Q_OS_WIN)
const QString kDesiredStyle = QStringLiteral("WindowsVista");
const auto availableStyles = QStyleFactory::keys();
if (availableStyles.contains(kDesiredStyle, Qt::CaseInsensitive)) {
QApplication::setStyle(QStyleFactory::create(kDesiredStyle));
} else if (availableStyles.contains(QStringLiteral("Fusion"), Qt::CaseInsensitive)) {
QApplication::setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
}
#endif

QCoreApplication::setOrganizationName(QStringLiteral("cemu-dev"));
QCoreApplication::setApplicationName(QStringLiteral("CEmu"));
QCoreApplication::setApplicationVersion(QStringLiteral(CEMU_VERSION " (git: " CEMU_GIT_SHA ")"));
Expand Down
18 changes: 11 additions & 7 deletions gui/qt/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,21 @@
{
"name": "qtbase",
"default-features": false,
"features": [ "dbus", "gui", "network", "widgets", "png" ]
"features": [ "gui", "network", "widgets", "png" ],
"platform": "windows"
},
{
"name": "qtbase",
"default-features": false,
"features": [ "fontconfig", "xcb" ],
"features": [ "gui", "network", "widgets", "png", "dbus" ],
"platform": "osx"
},
{
"name": "qtbase",
"default-features": false,
"features": [ "gui", "network", "widgets", "png", "dbus", "fontconfig", "xcb" ],
"platform": "linux"
}
],
"builtin-baseline": "a62ce77d56ee07513b4b67de1ec2daeaebfae51a",
"overrides": [
{ "name": "qtbase", "version": "6.6.3", "$comment": "For Windows only due to UI issues later. For non-Windows, edited out in CI" }
]
}
"builtin-baseline": "a62ce77d56ee07513b4b67de1ec2daeaebfae51a"
}
Loading