From 16c6a191905f30022b93d555ee2eab1eacc9268e Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sun, 14 Sep 2014 15:03:07 -0400 Subject: [PATCH 1/3] DolphinQt: initial commit. This adds the beginning of the DolphinQt user interface. It doesn't do anything useful yet and only builds via CMake. --- CMakeLists.txt | 10 ++- Source/Core/CMakeLists.txt | 4 + Source/Core/DolphinQt/AboutDialog.cpp | 37 +++++++++ Source/Core/DolphinQt/AboutDialog.h | 27 ++++++ Source/Core/DolphinQt/AboutDialog.ui | 103 +++++++++++++++++++++++ Source/Core/DolphinQt/CMakeLists.txt | 21 +++++ Source/Core/DolphinQt/Main.cpp | 54 ++++++++++++ Source/Core/DolphinQt/MainWindow.cpp | 44 ++++++++++ Source/Core/DolphinQt/MainWindow.h | 32 +++++++ Source/Core/DolphinQt/MainWindow.ui | 115 ++++++++++++++++++++++++++ 10 files changed, 445 insertions(+), 2 deletions(-) create mode 100644 Source/Core/DolphinQt/AboutDialog.cpp create mode 100644 Source/Core/DolphinQt/AboutDialog.h create mode 100644 Source/Core/DolphinQt/AboutDialog.ui create mode 100644 Source/Core/DolphinQt/CMakeLists.txt create mode 100644 Source/Core/DolphinQt/Main.cpp create mode 100644 Source/Core/DolphinQt/MainWindow.cpp create mode 100644 Source/Core/DolphinQt/MainWindow.h create mode 100644 Source/Core/DolphinQt/MainWindow.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index 25cac0851e..eb271feaf8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,14 @@ ######################################## # General setup # -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.8.8) option(ANDROID "Enables a build for Android" OFF) option(USE_EGL "Enables EGL OpenGL Interface" OFF) option(TRY_X11 "Enables X11 Support" ON) option(USE_UPNP "Enables UPnP port mapping support" ON) -option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF) +option(DISABLE_WX "Disable wxWidgets (use Qt or CLI interface)" OFF) +option(ENABLE_QT "Enable Qt (use the experimental Qt interface)" OFF) option(ENABLE_PCH "Use PCH to speed up compilation" ON) option(ENABLE_LTO "Enables Link Time Optimization" OFF) option(ENABLE_GENERIC "Enables generic build that should run on any little-endian host" OFF) @@ -640,6 +641,11 @@ if (ANDROID) add_subdirectory(Externals/libiconv-1.14) endif() +if(ENABLE_QT) + find_package(Qt5Widgets REQUIRED) + message("Found Qt version ${Qt5Core_VERSION}, enabling the Qt backend") +endif() + if(NOT DISABLE_WX AND NOT ANDROID) include(FindwxWidgets OPTIONAL) FIND_PACKAGE(wxWidgets COMPONENTS core aui adv) diff --git a/Source/Core/CMakeLists.txt b/Source/Core/CMakeLists.txt index 7b4042b604..2563294778 100644 --- a/Source/Core/CMakeLists.txt +++ b/Source/Core/CMakeLists.txt @@ -6,3 +6,7 @@ add_subdirectory(DolphinWX) add_subdirectory(InputCommon) add_subdirectory(VideoCommon) add_subdirectory(VideoBackends) + +if(ENABLE_QT) + add_subdirectory(DolphinQt) +endif() diff --git a/Source/Core/DolphinQt/AboutDialog.cpp b/Source/Core/DolphinQt/AboutDialog.cpp new file mode 100644 index 0000000000..afb557cb31 --- /dev/null +++ b/Source/Core/DolphinQt/AboutDialog.cpp @@ -0,0 +1,37 @@ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include +#include + +#include "AboutDialog.h" +#include "ui_AboutDialog.h" + +// TODO +#define scm_desc_str "unknown" +#define scm_branch_str "unknown" +#define scm_rev_git_str "0000000" + +DAboutDialog::DAboutDialog(QWidget *p) : + QDialog(p), + ui(new Ui::DAboutDialog) +{ + ui->setupUi(this); + ui->label->setText(ui->label->text().arg(scm_desc_str, + "2014", + scm_branch_str, + scm_rev_git_str, + __DATE__, + __TIME__)); +} + +DAboutDialog::~DAboutDialog() +{ + delete ui; +} + +void DAboutDialog::on_label_linkActivated(const QString &link) +{ + QDesktopServices::openUrl(QUrl(link)); +} diff --git a/Source/Core/DolphinQt/AboutDialog.h b/Source/Core/DolphinQt/AboutDialog.h new file mode 100644 index 0000000000..c267530249 --- /dev/null +++ b/Source/Core/DolphinQt/AboutDialog.h @@ -0,0 +1,27 @@ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include + +// Predefinitions +namespace Ui { +class DAboutDialog; +} + +class DAboutDialog : public QDialog +{ + Q_OBJECT + +public: + explicit DAboutDialog(QWidget *p = 0); + ~DAboutDialog(); + +private slots: + void on_label_linkActivated(const QString &link); + +private: + Ui::DAboutDialog *ui; +}; diff --git a/Source/Core/DolphinQt/AboutDialog.ui b/Source/Core/DolphinQt/AboutDialog.ui new file mode 100644 index 0000000000..339140d79c --- /dev/null +++ b/Source/Core/DolphinQt/AboutDialog.ui @@ -0,0 +1,103 @@ + + + DAboutDialog + + + + 0 + 0 + 375 + 534 + + + + + 0 + 0 + + + + + 375 + 0 + + + + + 375 + 16777215 + + + + About Dolphin + + + + + + + 0 + 0 + + + + <big><b>Dolphin</b></big> %1<br> +© 2003-%2 Dolphin Team<br> +Branch: %3<br> +Revision: %4<br> +Compiled: %5 @ %6<br> +Dolphin is a GameCube/Wii emulator, which was originally written by F|RES and ector. Today Dolphin is an open source project with many contributors, too many to list. If interested, just go check out <a href="https://github.com/dolphin-emu/dolphin">the project page</a>.<br> +<br> +Special thanks to Bushing, Costis, CrowTRobo, Marcan, Segher, Titanik, or9, and Hotquik for their reverse engineering and docs/demos.<br> +<br> +Big thanks to Gilles Mouchard whose Microlib PPC emulator gave our development a kickstart.<br> +<br> +Thanks to Frank Wille for his PowerPC disassembler, which or9 and we modified to include Gekko specifics.<br> +<br> +Thanks to hcs/destop for their GC ADPCM decoder.<br> +<br> +We are not affiliated with Nintendo in any way. GameCube and Wii are trademarks of Nintendo. This emulator should not be used to play games you do not legally own. + + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + DAboutDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt new file mode 100644 index 0000000000..f5d6930bba --- /dev/null +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -0,0 +1,21 @@ +include_directories(${CMAKE_CURRENT_BINARY_DIR}) # because of generated UI files +set(CMAKE_AUTOMOC ON) + +set(SRCS AboutDialog.cpp + AboutDialog.h + Main.cpp + MainWindow.cpp + MainWindow.h) + +set(UIS AboutDialog.ui + MainWindow.ui) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(DOLPHINQT_BINARY DolphinQt) +else() + set(DOLPHINQT_BINARY dolphin-emu-qt) +endif() + +qt5_wrap_ui(UI_HEADERS ${UIS}) +add_executable(${DOLPHINQT_BINARY} ${SRCS} ${UI_HEADERS}) +qt5_use_modules(${DOLPHINQT_BINARY} Widgets) diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp new file mode 100644 index 0000000000..ae72e34267 --- /dev/null +++ b/Source/Core/DolphinQt/Main.cpp @@ -0,0 +1,54 @@ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include +#include +#include +#include +#include +#include + +#include "MainWindow.h" + +static bool IsOsSupported() +{ +#ifdef Q_OS_OSX + return QSysInfo::MacVersion >= QSysInfo::MV_10_7; +#elif defined(Q_OS_WIN) + return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA; +#else + return true; +#endif +} + +static QString LowestSupportedOsVersion() +{ +#ifdef Q_OS_OSX + return QStringLiteral("Mac OS X 10.7"); +#elif defined(Q_OS_WIN) + return QStringLiteral("Windows Vista SP2"); +#else + return QStringLiteral("Unknown"); +#endif +} + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + // TODO: Add command line options + + if (!IsOsSupported()) + { + QMessageBox::critical(nullptr, QObject::tr("Unsupported OS"), + QObject::tr("Dolphin requires %1 or greater.\n" + "Please upgrade to %1 or greater to use Dolphin.") + .arg(LowestSupportedOsVersion())); + return 1; + } + + DMainWindow w; + w.show(); + + return app.exec(); +} diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp new file mode 100644 index 0000000000..9a61e2a258 --- /dev/null +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -0,0 +1,44 @@ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include +#include + +#include "AboutDialog.h" + +#include "MainWindow.h" +#include "ui_MainWindow.h" + +DMainWindow::DMainWindow(QWidget *p) : + QMainWindow(p), + ui(new Ui::DMainWindow) +{ + ui->setupUi(this); +} + +DMainWindow::~DMainWindow() +{ + delete ui; +} + +void DMainWindow::on_actWebsite_triggered() +{ + QDesktopServices::openUrl(QUrl("https://dolphin-emu.org/")); +} + +void DMainWindow::on_actOnlineDocs_triggered() +{ + QDesktopServices::openUrl(QUrl("https://dolphin-emu.org/docs/guides/")); +} + +void DMainWindow::on_actGitHub_triggered() +{ + QDesktopServices::openUrl(QUrl("https://github.com/dolphin-emu/dolphin/")); +} + +void DMainWindow::on_actAbout_triggered() +{ + DAboutDialog dlg; + dlg.exec(); +} diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h new file mode 100644 index 0000000000..14240e59c4 --- /dev/null +++ b/Source/Core/DolphinQt/MainWindow.h @@ -0,0 +1,32 @@ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include + +// Predefinitions +namespace Ui { +class DMainWindow; +} + +class DMainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit DMainWindow(QWidget *p = 0); + ~DMainWindow(); + +private slots: + + // Help menu + void on_actWebsite_triggered(); + void on_actOnlineDocs_triggered(); + void on_actGitHub_triggered(); + void on_actAbout_triggered(); + +private: + Ui::DMainWindow *ui; +}; diff --git a/Source/Core/DolphinQt/MainWindow.ui b/Source/Core/DolphinQt/MainWindow.ui new file mode 100644 index 0000000000..29200f44a5 --- /dev/null +++ b/Source/Core/DolphinQt/MainWindow.ui @@ -0,0 +1,115 @@ + + + DMainWindow + + + + 0 + 0 + 998 + 598 + + + + Dolphin + + + + 64 + 64 + + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + 0 + 0 + 998 + 24 + + + + + Fi&le + + + + + E&mulation + + + + + Optio&ns + + + + + Tools + + + + + &View + + + + + Help + + + + + + + + + + + + + + + + + + toolBar + + + TopToolBarArea + + + false + + + + + &Website + + + + + &Online Documentation + + + + + &Dolphin at GitHub + + + + + &About + + + + + + From ae3a5ce9e373ea540c33af61ad75b3f7e29bd064 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 14 Sep 2014 17:44:07 -0700 Subject: [PATCH 2/3] Qt: Add msvc support --- Source/Core/DolphinQt/AboutDialog.cpp | 26 ++-- Source/Core/DolphinQt/AboutDialog.h | 7 +- Source/Core/DolphinQt/CMakeLists.txt | 23 ++- Source/Core/DolphinQt/DolphinQt.vcxproj | 152 +++++++++++++++++++ Source/Core/DolphinQt/DolphinQt.vcxproj.user | 10 ++ Source/Core/DolphinQt/Main.cpp | 2 +- Source/Core/DolphinQt/MainWindow.cpp | 15 +- Source/Core/DolphinQt/MainWindow.h | 5 +- Source/VSProps/QtCompile.props | 133 ++++++++++++++++ Source/VSProps/QtCompile.targets | 10 ++ Source/VSProps/QtCompile.xml | 11 ++ Source/dolphin-emu.sln | 6 + 12 files changed, 363 insertions(+), 37 deletions(-) create mode 100644 Source/Core/DolphinQt/DolphinQt.vcxproj create mode 100644 Source/Core/DolphinQt/DolphinQt.vcxproj.user create mode 100644 Source/VSProps/QtCompile.props create mode 100644 Source/VSProps/QtCompile.targets create mode 100644 Source/VSProps/QtCompile.xml diff --git a/Source/Core/DolphinQt/AboutDialog.cpp b/Source/Core/DolphinQt/AboutDialog.cpp index afb557cb31..f76fe2decc 100644 --- a/Source/Core/DolphinQt/AboutDialog.cpp +++ b/Source/Core/DolphinQt/AboutDialog.cpp @@ -7,28 +7,24 @@ #include "AboutDialog.h" #include "ui_AboutDialog.h" +#include "Common/Common.h" +#include "Common/StdMakeUnique.h" -// TODO -#define scm_desc_str "unknown" -#define scm_branch_str "unknown" -#define scm_rev_git_str "0000000" - -DAboutDialog::DAboutDialog(QWidget *p) : - QDialog(p), - ui(new Ui::DAboutDialog) +DAboutDialog::DAboutDialog(QWidget* p) + : QDialog(p) { + ui = std::make_unique(); ui->setupUi(this); - ui->label->setText(ui->label->text().arg(scm_desc_str, - "2014", - scm_branch_str, - scm_rev_git_str, - __DATE__, - __TIME__)); + ui->label->setText(ui->label->text().arg(QLatin1String(scm_desc_str), + QStringLiteral("2014"), + QLatin1String(scm_branch_str), + QLatin1String(scm_rev_git_str), + QStringLiteral(__DATE__), + QStringLiteral(__TIME__))); } DAboutDialog::~DAboutDialog() { - delete ui; } void DAboutDialog::on_label_linkActivated(const QString &link) diff --git a/Source/Core/DolphinQt/AboutDialog.h b/Source/Core/DolphinQt/AboutDialog.h index c267530249..74b13e0a0a 100644 --- a/Source/Core/DolphinQt/AboutDialog.h +++ b/Source/Core/DolphinQt/AboutDialog.h @@ -4,6 +4,7 @@ #pragma once +#include #include // Predefinitions @@ -16,12 +17,12 @@ class DAboutDialog : public QDialog Q_OBJECT public: - explicit DAboutDialog(QWidget *p = 0); + explicit DAboutDialog(QWidget* p = nullptr); ~DAboutDialog(); private slots: - void on_label_linkActivated(const QString &link); + void on_label_linkActivated(const QString& link); private: - Ui::DAboutDialog *ui; + std::unique_ptr ui; }; diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index f5d6930bba..afd108efaf 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -1,14 +1,20 @@ -include_directories(${CMAKE_CURRENT_BINARY_DIR}) # because of generated UI files +# because of generated UI files +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + set(CMAKE_AUTOMOC ON) -set(SRCS AboutDialog.cpp - AboutDialog.h - Main.cpp - MainWindow.cpp - MainWindow.h) +set(SRCS + AboutDialog.cpp + AboutDialog.h + Main.cpp + MainWindow.cpp + MainWindow.h) -set(UIS AboutDialog.ui - MainWindow.ui) +set(UIS + AboutDialog.ui + MainWindow.ui) + +set(LIBS common) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(DOLPHINQT_BINARY DolphinQt) @@ -18,4 +24,5 @@ endif() qt5_wrap_ui(UI_HEADERS ${UIS}) add_executable(${DOLPHINQT_BINARY} ${SRCS} ${UI_HEADERS}) +target_link_libraries(${DOLPHINQT_BINARY} ${LIBS}) qt5_use_modules(${DOLPHINQT_BINARY} Widgets) diff --git a/Source/Core/DolphinQt/DolphinQt.vcxproj b/Source/Core/DolphinQt/DolphinQt.vcxproj new file mode 100644 index 0000000000..f137547714 --- /dev/null +++ b/Source/Core/DolphinQt/DolphinQt.vcxproj @@ -0,0 +1,152 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0} + + + + + Application + v120 + Unicode + + + true + + + false + + + + + + + + + + + + + + + 0x00400000 + false + true + $(ExternalsDir)OpenAL\$(PlatformName);%(AdditionalLibraryDirectories) + iphlpapi.lib;winmm.lib;setupapi.lib;vfw32.lib;opengl32.lib;glu32.lib;rpcrt4.lib;comctl32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {8ada04d7-6db1-4da4-ab55-64fb12a0997b} + + + {4c9f135b-a85e-430c-bad4-4c67ef5fc12c} + + + {ab993f38-c31d-4897-b139-a620c42bc565} + + + {93d73454-2512-424e-9cda-4bb357fe13dd} + + + {ff213b23-2c26-4214-9f88-85271e557e87} + + + {54aa7840-5beb-4a0c-9452-74ba4cc7fd44} + + + {2e6c348c-c75c-4d94-8d1e-9c1fcbf3efe4} + + + {41279555-f94f-4ebc-99de-af863c10c5c4} + + + {e54cf649-140e-4255-81a5-30a673c1fb36} + + + {160bdc25-5626-4b0d-bdd8-2953d9777fb5} + + + {6bbd47cf-91fd-4077-b676-8b76980178a9} + + + {96020103-4ba5-4fd2-b4aa-5b6d24492d4e} + + + {ec1a314c-5588-4506-9c1e-2e58e5817f75} + + + {a4c423aa-f57c-46c7-a172-d1a777017d29} + + + {3de9ee35-3e91-4f27-a014-2866ad8c3fe3} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/Core/DolphinQt/DolphinQt.vcxproj.user b/Source/Core/DolphinQt/DolphinQt.vcxproj.user new file mode 100644 index 0000000000..422ab248b9 --- /dev/null +++ b/Source/Core/DolphinQt/DolphinQt.vcxproj.user @@ -0,0 +1,10 @@ + + + + + $(BinaryOutputDir)$(TargetFileName) + $(BinaryOutputDir) + WindowsLocalDebugger + false + + \ No newline at end of file diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index ae72e34267..f2b034fadb 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -14,7 +14,7 @@ static bool IsOsSupported() { #ifdef Q_OS_OSX - return QSysInfo::MacVersion >= QSysInfo::MV_10_7; + return QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7; #elif defined(Q_OS_WIN) return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA; #else diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 9a61e2a258..2b82949b01 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -6,35 +6,34 @@ #include #include "AboutDialog.h" - #include "MainWindow.h" #include "ui_MainWindow.h" +#include "Common/StdMakeUnique.h" -DMainWindow::DMainWindow(QWidget *p) : - QMainWindow(p), - ui(new Ui::DMainWindow) +DMainWindow::DMainWindow(QWidget* p) + : QMainWindow(p) { + ui = std::make_unique(); ui->setupUi(this); } DMainWindow::~DMainWindow() { - delete ui; } void DMainWindow::on_actWebsite_triggered() { - QDesktopServices::openUrl(QUrl("https://dolphin-emu.org/")); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/"))); } void DMainWindow::on_actOnlineDocs_triggered() { - QDesktopServices::openUrl(QUrl("https://dolphin-emu.org/docs/guides/")); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/docs/guides/"))); } void DMainWindow::on_actGitHub_triggered() { - QDesktopServices::openUrl(QUrl("https://github.com/dolphin-emu/dolphin/")); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://github.com/dolphin-emu/dolphin/"))); } void DMainWindow::on_actAbout_triggered() diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h index 14240e59c4..5757bfe8ba 100644 --- a/Source/Core/DolphinQt/MainWindow.h +++ b/Source/Core/DolphinQt/MainWindow.h @@ -4,6 +4,7 @@ #pragma once +#include #include // Predefinitions @@ -16,7 +17,7 @@ class DMainWindow : public QMainWindow Q_OBJECT public: - explicit DMainWindow(QWidget *p = 0); + explicit DMainWindow(QWidget* p = nullptr); ~DMainWindow(); private slots: @@ -28,5 +29,5 @@ private slots: void on_actAbout_triggered(); private: - Ui::DMainWindow *ui; + std::unique_ptr ui; }; diff --git a/Source/VSProps/QtCompile.props b/Source/VSProps/QtCompile.props new file mode 100644 index 0000000000..7e7943af2c --- /dev/null +++ b/Source/VSProps/QtCompile.props @@ -0,0 +1,133 @@ + + + + $(ExternalsDir)Qt5.3.1\5.3\msvc2013_64_opengl\ + $(QTDIRDefault) + $(QTDIR)\ + false + true + $(QTDIR)include\ + $(QTDIR)lib\ + $(QTDIR)bin\ + $(IntDir) + $(QtToolOutDir)moc_ + d + + + + QT_NO_DEBUG;%(PreprocessorDefinitions) + QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions) + QT_USE_QSTRINGBUILDER;QT_NO_CAST_FROM_ASCII;QT_NO_CAST_TO_ASCII;%(PreprocessorDefinitions) + $(ProjectDir);%(AdditionalIncludeDirectories) + $(QtToolOutDir);%(AdditionalIncludeDirectories) + $(QtIncludeDir);%(AdditionalIncludeDirectories) + $(QtIncludeDir)QtCore;%(AdditionalIncludeDirectories) + $(QtIncludeDir)QtGui;%(AdditionalIncludeDirectories) + $(QtIncludeDir)QtWidgets;%(AdditionalIncludeDirectories) + + + $(QtLibDir);%(AdditionalLibraryDirectories) + qtmain$(QtLibSuffix).lib;Qt5Core$(QtLibSuffix).lib;Qt5Gui$(QtLibSuffix).lib;Qt5Widgets$(QtLibSuffix).lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_SECURE_SCL=0 -D_ARCH_64=1 -D_M_X86_64=1 -DPSAPI_VERSION=1 -D_M_X86=1 -DUSE_UPNP -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -DUNICODE + -DQT_NO_DEBUG -DNDEBUG $(MocDefines) + -I$(QtIncludeDir)QtWidgets -I$(QtIncludeDir)QtGui -I$(QtIncludeDir)QtCore -I$(QtIncludeDir) -I$(QtToolOutDir) -I. + -I$(ExternalsDir)zlib -I$(ExternalsDir)SOIL -I$(ExternalsDir)SFML\include -I$(ExternalsDir)portaudio\include -I$(ExternalsDir)polarssl\include -I$(ExternalsDir)miniupnpc\src -I$(ExternalsDir)LZO -I$(ExternalsDir)libusbx\libusb -I$(ExternalsDir)libpng -I$(ExternalsDir)GL -I$(ExternalsDir)Bochs_disasm -I$(ExternalsDir) -I$(CoreDir) $(MocIncludes) + + + + + + + + + + + + + + + + + + + + QtResource + + + QtUi + + + QtMoc + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/VSProps/QtCompile.targets b/Source/VSProps/QtCompile.targets new file mode 100644 index 0000000000..c12753982e --- /dev/null +++ b/Source/VSProps/QtCompile.targets @@ -0,0 +1,10 @@ + + + + QtResourceClean;QtUiClean;QtMocClean;$(CleanDependsOn) + + + \ No newline at end of file diff --git a/Source/VSProps/QtCompile.xml b/Source/VSProps/QtCompile.xml new file mode 100644 index 0000000000..976c2d2b82 --- /dev/null +++ b/Source/VSProps/QtCompile.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Source/dolphin-emu.sln b/Source/dolphin-emu.sln index 141580ca87..d622212281 100644 --- a/Source/dolphin-emu.sln +++ b/Source/dolphin-emu.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dolphin", "Core\DolphinWX\DolphinWX.vcxproj", "{47411FDB-1BF2-48D0-AB4E-C7C41160F898}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DolphinQt", "Core\DolphinQt\DolphinQt.vcxproj", "{69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0}" +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core\Core\Core.vcxproj", "{E54CF649-140E-4255-81A5-30A673C1FB36}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioCommon", "Core\AudioCommon\AudioCommon.vcxproj", "{54AA7840-5BEB-4A0C-9452-74BA4CC7FD44}" @@ -73,6 +75,10 @@ Global {47411FDB-1BF2-48D0-AB4E-C7C41160F898}.Debug|x64.Build.0 = Debug|x64 {47411FDB-1BF2-48D0-AB4E-C7C41160F898}.Release|x64.ActiveCfg = Release|x64 {47411FDB-1BF2-48D0-AB4E-C7C41160F898}.Release|x64.Build.0 = Release|x64 + {69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0}.Debug|x64.ActiveCfg = Debug|x64 + {69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0}.Debug|x64.Build.0 = Debug|x64 + {69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0}.Release|x64.ActiveCfg = Release|x64 + {69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0}.Release|x64.Build.0 = Release|x64 {E54CF649-140E-4255-81A5-30A673C1FB36}.Debug|x64.ActiveCfg = Debug|x64 {E54CF649-140E-4255-81A5-30A673C1FB36}.Debug|x64.Build.0 = Debug|x64 {E54CF649-140E-4255-81A5-30A673C1FB36}.Release|x64.ActiveCfg = Release|x64 From 9d57ac68a4013271e31f43cda7ef9472120a8173 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 15 Sep 2014 14:47:43 -0700 Subject: [PATCH 3/3] Add Qt submodule for windows. --- .gitmodules | 4 ++++ Externals/Qt | 1 + Source/VSProps/QtCompile.props | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 160000 Externals/Qt diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..7d8b9393f8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "Externals/Qt"] + path = Externals/Qt + url = https://github.com/dolphin-emu/ext-win-qt.git + branch = master diff --git a/Externals/Qt b/Externals/Qt new file mode 160000 index 0000000000..e2e0b15688 --- /dev/null +++ b/Externals/Qt @@ -0,0 +1 @@ +Subproject commit e2e0b15688568c58ec17b9c22a0dc1969f69b5da diff --git a/Source/VSProps/QtCompile.props b/Source/VSProps/QtCompile.props index 7e7943af2c..675787e3db 100644 --- a/Source/VSProps/QtCompile.props +++ b/Source/VSProps/QtCompile.props @@ -1,7 +1,7 @@ - $(ExternalsDir)Qt5.3.1\5.3\msvc2013_64_opengl\ + $(ExternalsDir)Qt\Qt5.3.1\5.3\msvc2013_64_opengl\ $(QTDIRDefault) $(QTDIR)\ false