Qt: Add msvc support
This commit is contained in:
parent
16c6a19190
commit
ae3a5ce9e3
|
@ -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::DAboutDialog>();
|
||||
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)
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QDialog>
|
||||
|
||||
// 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::DAboutDialog> ui;
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0}</ProjectGuid>
|
||||
<!--
|
||||
Enable this once wxwidgets is completely removed
|
||||
<ProjectName>Dolphin</ProjectName>
|
||||
-->
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\VSProps\Base.props" />
|
||||
<Import Project="..\..\VSProps\PCHUse.props" />
|
||||
<Import Project="..\..\VSProps\QtCompile.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<BaseAddress>0x00400000</BaseAddress>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<FixedBaseAddress>true</FixedBaseAddress>
|
||||
<AdditionalLibraryDirectories>$(ExternalsDir)OpenAL\$(PlatformName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>iphlpapi.lib;winmm.lib;setupapi.lib;vfw32.lib;opengl32.lib;glu32.lib;rpcrt4.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!--QRC and UI files are handled automatically-->
|
||||
<ItemGroup>
|
||||
<QtResource Include="*.qrc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUi Include="*.ui" />
|
||||
</ItemGroup>
|
||||
<!--MOC files need to be listed. Perhaps scan for Q_OBJECT in the future? (like automoc)-->
|
||||
<!--NOTE: When adding moc'd files, you must list the outputs in the following ItemGroup!-->
|
||||
<ItemGroup>
|
||||
<QtMoc Include="AboutDialog.h" />
|
||||
<QtMoc Include="MainWindow.h" />
|
||||
</ItemGroup>
|
||||
<!--TODO figure out how to get QtMoc to add outputs to ClCompile's inputs...-->
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(QtMocOutPrefix)AboutDialog.cpp" />
|
||||
<ClCompile Include="$(QtMocOutPrefix)MainWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AboutDialog.cpp" />
|
||||
<ClCompile Include="Main.cpp" />
|
||||
<ClCompile Include="MainWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<!--Put standard C/C++ headers here-->
|
||||
<!--
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Main.h" />
|
||||
</ItemGroup>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Text Include="CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(ExternalsDir)Bochs_disasm\Bochs_disasm.vcxproj">
|
||||
<Project>{8ada04d7-6db1-4da4-ab55-64fb12a0997b}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)libpng\png\png.vcxproj">
|
||||
<Project>{4c9f135b-a85e-430c-bad4-4c67ef5fc12c}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)LZO\LZO.vcxproj">
|
||||
<Project>{ab993f38-c31d-4897-b139-a620c42bc565}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)SFML\build\vc2010\SFML_Network.vcxproj">
|
||||
<Project>{93d73454-2512-424e-9cda-4bb357fe13dd}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)zlib\zlib.vcxproj">
|
||||
<Project>{ff213b23-2c26-4214-9f88-85271e557e87}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)AudioCommon\AudioCommon.vcxproj">
|
||||
<Project>{54aa7840-5beb-4a0c-9452-74ba4cc7fd44}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)Common\Common.vcxproj">
|
||||
<Project>{2e6c348c-c75c-4d94-8d1e-9c1fcbf3efe4}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)Common\SCMRevGen.vcxproj">
|
||||
<Project>{41279555-f94f-4ebc-99de-af863c10c5c4}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)Core\Core.vcxproj">
|
||||
<Project>{e54cf649-140e-4255-81a5-30a673c1fb36}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)DiscIO\DiscIO.vcxproj">
|
||||
<Project>{160bdc25-5626-4b0d-bdd8-2953d9777fb5}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)InputCommon\InputCommon.vcxproj">
|
||||
<Project>{6bbd47cf-91fd-4077-b676-8b76980178a9}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoBackends\D3D\D3D.vcxproj">
|
||||
<Project>{96020103-4ba5-4fd2-b4aa-5b6d24492d4e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoBackends\OGL\OGL.vcxproj">
|
||||
<Project>{ec1a314c-5588-4506-9c1e-2e58e5817f75}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoBackends\Software\Software.vcxproj">
|
||||
<Project>{a4c423aa-f57c-46c7-a172-d1a777017d29}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoCommon\VideoCommon.vcxproj">
|
||||
<Project>{3de9ee35-3e91-4f27-a014-2866ad8c3fe3}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\VSProps\QtCompile.targets" />
|
||||
</ImportGroup>
|
||||
<!--Copy Exe, Data directory and DLLs which should be located in the executable directory-->
|
||||
<ItemGroup>
|
||||
<DataDirFiles Include="$(DolphinRootDir)Data\**\*.*" />
|
||||
<ExternalDlls Include="$(ExternalsDir)OpenAL\$(PlatformName)\*.dll;$(ExternalsDir)msvcrt\$(PlatformName)\*.dll" />
|
||||
<BinaryFiles Include="$(TargetPath)" />
|
||||
<AllInputFiles Include="@(DataDirFiles);@(ExternalDlls);@(BinaryFiles)" />
|
||||
</ItemGroup>
|
||||
<!--Disable copying to binary dir for now on the buildbot to prevent packaging of the outputs-->
|
||||
<Target Name="AfterBuild" Inputs="@(AllInputFiles)" Outputs="@(AllInputFiles -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
Condition="'$(I_AM_BUILDACUS)'==''">
|
||||
<Message Text="Copying Data directory..." Importance="High" />
|
||||
<Copy SourceFiles="@(DataDirFiles)" DestinationFolder="$(BinaryOutputDir)%(RecursiveDir)" Condition="!Exists('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(DataDirFiles.Extension)') OR $([System.DateTime]::Parse('%(ModifiedTime)').Ticks) > $([System.IO.File]::GetLastWriteTime('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(DataDirFiles.Extension)').Ticks)" />
|
||||
<Message Text="Copying External .dlls" Importance="High" />
|
||||
<Copy SourceFiles="@(ExternalDlls)" DestinationFolder="$(BinaryOutputDir)" Condition="!Exists('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(ExternalDlls.Extension)') OR $([System.DateTime]::Parse('%(ModifiedTime)').Ticks) > $([System.IO.File]::GetLastWriteTime('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(ExternalDlls.Extension)').Ticks)" />
|
||||
<Message Text="Copy: @(BinaryFiles) -> $(BinaryOutputDir)" Importance="High" />
|
||||
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(BinaryOutputDir)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<!--For some stupid reason this has to be in the .user file...-->
|
||||
<LocalDebuggerCommand>$(BinaryOutputDir)$(TargetFileName)</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>$(BinaryOutputDir)</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<ShowAllFiles>false</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -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
|
||||
|
|
|
@ -6,35 +6,34 @@
|
|||
#include <QUrl>
|
||||
|
||||
#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::DMainWindow>();
|
||||
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()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QMainWindow>
|
||||
|
||||
// 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::DMainWindow> ui;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<QTDIRDefault>$(ExternalsDir)Qt5.3.1\5.3\msvc2013_64_opengl\</QTDIRDefault>
|
||||
<QTDIR Condition="Exists('$(QTDIRDefault)') And '$(QTDIR)'==''">$(QTDIRDefault)</QTDIR>
|
||||
<QTDIR Condition="Exists('$(QTDIR)') And !HasTrailingSlash('$(QTDIR)')">$(QTDIR)\</QTDIR>
|
||||
<QtDirValid>false</QtDirValid>
|
||||
<QtDirValid Condition="Exists('$(QTDIR)')">true</QtDirValid>
|
||||
<QtIncludeDir>$(QTDIR)include\</QtIncludeDir>
|
||||
<QtLibDir>$(QTDIR)lib\</QtLibDir>
|
||||
<QtBinDir>$(QTDIR)bin\</QtBinDir>
|
||||
<QtToolOutDir>$(IntDir)</QtToolOutDir>
|
||||
<QtMocOutPrefix>$(QtToolOutDir)moc_</QtMocOutPrefix>
|
||||
<QtLibSuffix Condition="'$(Configuration)'=='Debug'">d</QtLibSuffix>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)'=='Release'">QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>QT_USE_QSTRINGBUILDER;QT_NO_CAST_FROM_ASCII;QT_NO_CAST_TO_ASCII;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtToolOutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir)QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir)QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(QtIncludeDir)QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>qtmain$(QtLibSuffix).lib;Qt5Core$(QtLibSuffix).lib;Qt5Gui$(QtLibSuffix).lib;Qt5Widgets$(QtLibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<!--
|
||||
<AdditionalOptions>"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\" %(AdditionalOptions)</AdditionalOptions>
|
||||
-->
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<!--Passes all .qrc files to rcc and puts output in the build directory-->
|
||||
<ItemGroup>
|
||||
<ResFiles Include="$(MSBuildProjectDirectory)\**\*.qrc" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtResource"
|
||||
BeforeTargets="ClCompile"
|
||||
Inputs="@(ResFiles)"
|
||||
Condition="'@(QtResource)'!=''"
|
||||
Outputs="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).h')">
|
||||
<Message Text="rcc %(ResFiles.Filename)" Importance="High" />
|
||||
<Error Condition="!$(QtDirValid)" Text="QTDIR not set or non-existent (pull the submodule?)" />
|
||||
<MakeDir Directories="$(QtToolOutDir)" />
|
||||
<Exec Command="$(QtBinDir)rcc.exe %(ResFiles.FullPath) -o $(QtToolOutDir)qrc_%(ResFiles.Filename).h" />
|
||||
</Target>
|
||||
|
||||
<Target Name="QtResourceClean">
|
||||
<Delete Files="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).h')" />
|
||||
</Target>
|
||||
|
||||
<!--Passes all .ui files to uic and puts output in the build directory-->
|
||||
<ItemGroup>
|
||||
<UiFiles Include="$(MSBuildProjectDirectory)\**\*.ui" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtUi"
|
||||
BeforeTargets="ClCompile"
|
||||
Inputs="@(UiFiles)"
|
||||
Condition="'@(QtUi)'!=''"
|
||||
Outputs="@(UiFiles->'$(QtToolOutDir)ui_%(Filename).h')">
|
||||
<Message Text="uic %(UiFiles.Filename)" Importance="High" />
|
||||
<Error Condition="!$(QtDirValid)" Text="QTDIR not set or non-existent (pull the submodule?)" />
|
||||
<MakeDir Directories="$(QtToolOutDir)" />
|
||||
<Exec Command="$(QtBinDir)uic.exe %(UiFiles.FullPath) -o $(QtToolOutDir)ui_%(UiFiles.Filename).h" />
|
||||
</Target>
|
||||
|
||||
<Target Name="QtUiClean">
|
||||
<Delete Files="@(UiFiles->'$(QtToolOutDir)ui_%(Filename).h')" />
|
||||
</Target>
|
||||
|
||||
<!--Compile files needed to MOC and output in the build directory-->
|
||||
<!--TODO find a way to autocreate from ClCompile settings-->
|
||||
<PropertyGroup>
|
||||
<MocDefines>-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</MocDefines>
|
||||
<MocDefines Condition="'$(Configuration)'=='Release'">-DQT_NO_DEBUG -DNDEBUG $(MocDefines)</MocDefines>
|
||||
<MocIncludes>-I$(QtIncludeDir)QtWidgets -I$(QtIncludeDir)QtGui -I$(QtIncludeDir)QtCore -I$(QtIncludeDir) -I$(QtToolOutDir) -I.</MocIncludes>
|
||||
<MocIncludes>-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)</MocIncludes>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMoc"
|
||||
BeforeTargets="ClCompile"
|
||||
Condition="'@(QtMoc)'!=''"
|
||||
Inputs="%(QtMoc.Identity);%(QtMoc.AdditionalDependencies);$(MSBuildProjectFile)"
|
||||
Outputs="$(QtToolOutDir)moc_%(QtMoc.Filename).cpp">
|
||||
<Message Text="moc %(QtMoc.Filename)" Importance="High" />
|
||||
<Error Condition="!$(QtDirValid)" Text="QTDIR not set or non-existent (pull the submodule?)" />
|
||||
<MakeDir Directories="$(QtToolOutDir)" />
|
||||
<Exec Command="$(QtBinDir)moc.exe %(QtMoc.FullPath) -o $(QtToolOutDir)moc_%(QtMoc.Filename).cpp -f%(QtMoc.Filename)%(QtMoc.Extension) $(MocDefines) $(MocIncludes)" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<MocOutputs Include="$(QtToolOutDir)moc_*.cpp" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtMocClean">
|
||||
<Delete Files="@(MocOutputs)" />
|
||||
</Target>
|
||||
|
||||
<!--Expose the new targets to VS-->
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
||||
<AvailableItemName Include="QtResource">
|
||||
<Targets>QtResource</Targets>
|
||||
</AvailableItemName>
|
||||
<AvailableItemName Include="QtUi">
|
||||
<Targets>QtUi</Targets>
|
||||
</AvailableItemName>
|
||||
<AvailableItemName Include="QtMoc">
|
||||
<Targets>QtMoc</Targets>
|
||||
</AvailableItemName>
|
||||
</ItemGroup>
|
||||
|
||||
<!--Copy the needed dlls-->
|
||||
<ItemGroup>
|
||||
<IcuDlls Include="icudt52;icuin52;icuuc52" />
|
||||
<QtLibNames Include="@(IcuDlls);Qt5Core$(QtLibSuffix);Qt5Gui$(QtLibSuffix);Qt5Widgets$(QtLibSuffix)" />
|
||||
<QtDlls Include="@(QtLibNames -> '$(QtBinDir)%(Identity).dll')" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtCopyBinaries"
|
||||
AfterTargets="Build"
|
||||
Condition="'$(I_AM_BUILDACUS)'==''"
|
||||
Inputs="@(QtDlls)"
|
||||
Outputs="@(QtDlls -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
<Message Text="Copying Qt .dlls" Importance="High" />
|
||||
<Copy
|
||||
SourceFiles="@(QtDlls)"
|
||||
DestinationFolder="$(BinaryOutputDir)"
|
||||
Condition="!Exists('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(QtDlls.Extension)') OR $([System.DateTime]::Parse('%(ModifiedTime)').Ticks) > $([System.IO.File]::GetLastWriteTime('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(QtDlls.Extension)').Ticks)"
|
||||
/>
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CleanDependsOn>QtResourceClean;QtUiClean;QtMocClean;$(CleanDependsOn)</CleanDependsOn>
|
||||
<!--
|
||||
<ComputeLinkInputsTargets>$(ComputeLinkInputsTargets);QtComputeMocOutput;</ComputeLinkInputsTargets>
|
||||
<ComputeLibInputsTargets>$(ComputeLibInputsTargets);QtComputeMocOutput;</ComputeLibInputsTargets>
|
||||
-->
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProjectSchemaDefinitions xmlns="http://schemas.microsoft.com/build/2009/properties">
|
||||
<ItemType Name="QtResource" DisplayName="Qt Resource File" />
|
||||
<ItemType Name="QtUi" DisplayName="Qt User Interface File" />
|
||||
<ItemType Name="QtMoc" DisplayName="Qt Meta Object File" />
|
||||
<ContentType Name="QtUi" DisplayName="Qt User Interface Compiler" />
|
||||
<ContentType Name="QtResource" DisplayName="Qt Resource Compiler" />
|
||||
<ContentType Name="QtMoc" DisplayName="Qt Meta Object Compiler" />
|
||||
<FileExtension Name="*.qrc" ContentType="QtResource" />
|
||||
<FileExtension Name="*.ui" ContentType="QtUi" />
|
||||
</ProjectSchemaDefinitions>
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue