forked from PCSX2/pcsx2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2ca085
commit 93f9ae8
Showing
509 changed files
with
17,724 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
!.gitignore | ||
!README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# PCSX2 Qt Binaries | ||
|
||
## Windows | ||
|
||
You can download the binaries from https://github.com/PCSX2/pcsx2-windows-dependencies | ||
|
||
Grab the latest release without symbols (or, if you want to debug Qt, with symbols), and extract it to this directory. | ||
|
||
## Linux | ||
|
||
TODO |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="UserMacros"> | ||
<BinaryOutputDir>$(SolutionDir)bin\</BinaryOutputDir> | ||
<QTDIRDefault Condition="'$(Platform)'=='x64'">$(SolutionDir)3rdparty\qt\6.2.2\msvc2019_64\</QTDIRDefault> | ||
<QTDIRDefault Condition="'$(Platform)'=='ARM64'">$(SolutionDir)3rdparty\qt\6.2.2\msvc2019_arm64\</QTDIRDefault> | ||
<QTDIR Condition="Exists('$(QTDIRDefault)') And ('$(QTDIR)'=='' Or !Exists('$(QTDIR)'))">$(QTDIRDefault)</QTDIR> | ||
<QTDIR Condition="Exists('$(QTDIR)') And !HasTrailingSlash('$(QTDIR)')">$(QTDIR)\</QTDIR> | ||
<QTDIRHost>$(SolutionDir)3rdparty\qt\6.2.2\msvc2019_64\</QTDIRHost> | ||
<QtDirValid>false</QtDirValid> | ||
<QtDirValid Condition="Exists('$(QTDIR)')">true</QtDirValid> | ||
<QtIncludeDir>$(QTDIR)include\</QtIncludeDir> | ||
<QtLibDir>$(QTDIR)lib\</QtLibDir> | ||
<QtBinDir>$(QTDIR)bin\</QtBinDir> | ||
<QtHostBinDir>$(QTDIRHost)bin\</QtHostBinDir> | ||
<QtPluginsDir>$(QTDIR)plugins\</QtPluginsDir> | ||
<QtTranslationsDir>$(QTDIR)translations\</QtTranslationsDir> | ||
<QtToolOutDir>$(IntDir)</QtToolOutDir> | ||
<QtMocOutPrefix>$(QtToolOutDir)moc_</QtMocOutPrefix> | ||
<QtTsOutDir>$(BinaryOutputDir)translations\</QtTsOutDir> | ||
<QtDebugSuffix>d</QtDebugSuffix> | ||
<QtLibSuffix Condition="$(Configuration.Contains(Debug))">$(QtDebugSuffix)</QtLibSuffix> | ||
<QtPluginFolder>QtPlugins</QtPluginFolder> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<PreprocessorDefinitions Condition="!$(Configuration.Contains(Debug))">QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<AdditionalIncludeDirectories>$(QtToolOutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<AdditionalIncludeDirectories>$(QtIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
</ClCompile> | ||
<Link> | ||
<AdditionalLibraryDirectories>$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
<AdditionalDependencies>Qt6Core$(QtLibSuffix).lib;Qt6Gui$(QtLibSuffix).lib;Qt6Widgets$(QtLibSuffix).lib;Qt6Network$(QtLibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</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).cpp')"> | ||
<Message Text="rcc %(ResFiles.Filename)" Importance="High" /> | ||
<Error Condition="!$(QtDirValid)" Text="QTDIR not valid (download/extract the zip)" /> | ||
<MakeDir Directories="$(QtToolOutDir)" /> | ||
<Exec Command=""$(QtHostBinDir)rcc.exe" "%(ResFiles.FullPath)" -o "$(QtToolOutDir)qrc_%(ResFiles.Filename).cpp"" /> | ||
</Target> | ||
|
||
<Target Name="QtResourceClean"> | ||
<Delete Files="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).cpp')" /> | ||
</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 valid (download/extract the zip)" /> | ||
<MakeDir Directories="$(QtToolOutDir)" /> | ||
<Exec Command=""$(QtHostBinDir)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></MocDefines> | ||
<MocDefines Condition="!$(Configuration.Contains(Debug))">-DQT_NO_DEBUG -DNDEBUG $(MocDefines)</MocDefines> | ||
<MocIncludes>"-I$(QtIncludeDir)" "-I$(SolutionDir)pcsx2" "-I$(SolutionDir)" -I.</MocIncludes> | ||
</PropertyGroup> | ||
<Target Name="QtMoc" | ||
BeforeTargets="ClCompile" | ||
Condition="'@(QtMoc)'!=''" | ||
Inputs="%(QtMoc.Identity);%(QtMoc.AdditionalDependencies);$(MSBuildProjectFile)" | ||
Outputs="$(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp"> | ||
<Message Text="moc %(QtMoc.Filename) $(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp" Importance="High" /> | ||
<Error Condition="!$(QtDirValid)" Text="QTDIR not set or non-existent (pull the submodule?)" /> | ||
<MakeDir Directories="$(QtToolOutDir)" /> | ||
<Exec Command=""$(QtHostBinDir)moc.exe" "%(QtMoc.FullPath)" -b "PrecompiledHeader.h" -o "$(QtToolOutDir)%(QtMoc.RelativeDir)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> | ||
<AvailableItemName Include="QtTs"> | ||
<Targets>QtTs</Targets> | ||
</AvailableItemName> | ||
</ItemGroup> | ||
|
||
<!--Copy the needed dlls--> | ||
<ItemGroup> | ||
<QtLibNames Include="Qt6Core$(QtLibSuffix);Qt6Gui$(QtLibSuffix);Qt6Widgets$(QtLibSuffix);Qt6Network$(QtLibSuffix);Qt6Svg$(QtLibSuffix)" /> | ||
<QtDlls Include="@(QtLibNames -> '$(QtBinDir)%(Identity).dll')" /> | ||
<!--Filter plugins to copy based on the observation that all debug versions end in "d"--> | ||
<QtAllPlugins Include="$(QtPluginsDir)**\*$(QtLibSuffix).dll" /> | ||
<QtPlugins Condition="$(Configuration.Contains(Debug))" Include="@(QtAllPlugins)" /> | ||
<QtPlugins Condition="!$(Configuration.Contains(Debug))" Exclude="$(QtPluginsDir)**\*$(QtDebugSuffix).dll" Include="@(QtAllPlugins)" /> | ||
<QtPluginsDest Include="@(QtPlugins -> '$(BinaryOutputDir)$(QtPluginFolder)\%(RecursiveDir)%(Filename)%(Extension)')" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<QtConfFile>$(BinaryOutputDir)qt.conf</QtConfFile> | ||
</PropertyGroup> | ||
<Target Name="QtCopyBinaries" | ||
AfterTargets="Build" | ||
Inputs="@(QtDlls);@(QtPlugins)" | ||
Outputs="@(QtDlls -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)');@(QtPlugins -> '$(BinaryOutputDir)$(QtPluginFolder)\%(RecursiveDir)%(Filename)%(Extension)')"> | ||
<Message Text="Copying Qt .dlls" Importance="High" /> | ||
<Copy | ||
SourceFiles="@(QtDlls)" | ||
DestinationFolder="$(BinaryOutputDir)" | ||
SkipUnchangedFiles="true" | ||
/> | ||
<Copy | ||
SourceFiles="@(QtPlugins)" | ||
DestinationFiles="@(QtPluginsDest)" | ||
SkipUnchangedFiles="true" | ||
/> | ||
</Target> | ||
<Target Name="QtCreateConf" | ||
BeforeTargets="QtCopyBinaries" | ||
Condition="!Exists('$(QtConfFile)')"> | ||
<!-- | ||
Create a file which tells Qt where to look for "plugins". | ||
Otherwise Qt only looks in ./<subtype>/type.dll instead of ./$(QtPluginFolder)/<subtype>/type.dll, which is messy | ||
--> | ||
<WriteLinesToFile | ||
File="$(QtConfFile)" | ||
Lines="[Paths];Plugins = ./$(QtPluginFolder)" | ||
Overwrite="true" | ||
/> | ||
</Target> | ||
|
||
<!--Copies base translation files--> | ||
<ItemGroup> | ||
<BaseTsFiles Include="$(QtTranslationsDir)\*.qm" /> | ||
</ItemGroup> | ||
<Target Name="QtCopyBaseTranslations" | ||
AfterTargets="Build" | ||
Inputs="@(BaseTsFiles)" | ||
Outputs="@(BaseTsFiles -> '$(QtTsOutDir)%(RecursiveDir)%(Filename)%(Extension)')"> | ||
<Message Text="Copying base translation files" Importance="High" /> | ||
<Copy | ||
SourceFiles="@(BaseTsFiles)" | ||
DestinationFolder="$(QtTsOutDir)" | ||
SkipUnchangedFiles="true" | ||
/> | ||
</Target> | ||
|
||
<!--Compiles all translation files--> | ||
<ItemGroup> | ||
<TsFiles Include="$(MSBuildProjectDirectory)\**\*.ts" /> | ||
</ItemGroup> | ||
<Target Name="QtTs" | ||
BeforeTargets="ClCompile" | ||
Inputs="@(TsFiles)" | ||
Condition="'@(QtTs)'!=''" | ||
Outputs="@(TsFiles->'$(QtTsOutDir)%(Filename).qm')"> | ||
<Message Text="lrelease %(TsFiles.Filename)" Importance="High" /> | ||
<Error Condition="!$(QtDirValid)" Text="QTDIR not valid (download/extract the zip)" /> | ||
<MakeDir Directories="$(QtTsOutDir)" /> | ||
<Exec Command=""$(QtHostBinDir)lrelease.exe" "%(TsFiles.FullPath)" -qm "$(QtTsOutDir)%(TsFiles.Filename).qm"" /> | ||
</Target> | ||
<ItemGroup> | ||
<TsOutputs Include="$(QtTsOutDir)*.qm" /> | ||
</ItemGroup> | ||
<Target Name="QtTsClean"> | ||
<Delete Files="@(TsOutputs)" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<CleanDependsOn>QtResourceClean;QtUiClean;QtMocClean;QtTsClean;$(CleanDependsOn)</CleanDependsOn> | ||
<!-- | ||
<ComputeLinkInputsTargets>$(ComputeLinkInputsTargets);QtComputeMocOutput;</ComputeLinkInputsTargets> | ||
<ComputeLibInputsTargets>$(ComputeLibInputsTargets);QtComputeMocOutput;</ComputeLibInputsTargets> | ||
--> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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" /> | ||
<ItemType Name="QtTs" DisplayName="Qt Translation File" /> | ||
<ContentType Name="QtUi" DisplayName="Qt User Interface Compiler" /> | ||
<ContentType Name="QtResource" DisplayName="Qt Resource Compiler" /> | ||
<ContentType Name="QtMoc" DisplayName="Qt Meta Object Compiler" /> | ||
<ContentType Name="QtTs" DisplayName="Qt Translation Compiler" /> | ||
<FileExtension Name="*.qrc" ContentType="QtResource" /> | ||
<FileExtension Name="*.ui" ContentType="QtUi" /> | ||
<FileExtension Name="*.ts" ContentType="QtTs" /> | ||
</ProjectSchemaDefinitions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* PCSX2 - PS2 Emulator for PCs | ||
* Copyright (C) 2002-2022 PCSX2 Dev Team | ||
* | ||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms | ||
* of the GNU Lesser General Public License as published by the Free Software Found- | ||
* ation, either version 3 of the License, or (at your option) any later version. | ||
* | ||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
* PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with PCSX2. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "PrecompiledHeader.h" | ||
|
||
#include "AboutDialog.h" | ||
#include "QtUtils.h" | ||
#include "svnrev.h" | ||
#include <QtCore/QString> | ||
#include <QtWidgets/QDialog> | ||
|
||
AboutDialog::AboutDialog(QWidget* parent) | ||
: QDialog(parent) | ||
{ | ||
m_ui.setupUi(this); | ||
|
||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); | ||
setFixedSize(geometry().width(), geometry().height()); | ||
|
||
m_ui.scmversion->setTextInteractionFlags(Qt::TextSelectableByMouse); | ||
m_ui.scmversion->setText(GIT_REV); | ||
|
||
m_ui.links->setTextInteractionFlags(Qt::TextBrowserInteraction); | ||
m_ui.links->setOpenExternalLinks(true); | ||
m_ui.links->setText(QStringLiteral( | ||
R"(<a href="%1">%2</a> | <a href="%3">%4</a> | <a href="%5">%6</a> | <a href="%7">%8</a>)") | ||
.arg(getWebsiteUrl()) | ||
.arg(tr("Website")) | ||
.arg(getSupportForumsUrl()) | ||
.arg(tr("Support Forums")) | ||
.arg(getGitHubRepositoryUrl()) | ||
.arg(tr("GitHub Repository")) | ||
.arg(getLicenseUrl()) | ||
.arg(tr("License"))); | ||
|
||
connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close); | ||
} | ||
|
||
AboutDialog::~AboutDialog() = default; | ||
|
||
QString AboutDialog::getWebsiteUrl() | ||
{ | ||
return QStringLiteral("https://pcsx2.net/"); | ||
} | ||
|
||
QString AboutDialog::getSupportForumsUrl() | ||
{ | ||
return QStringLiteral("https://forums.pcsx2.net/"); | ||
} | ||
|
||
QString AboutDialog::getGitHubRepositoryUrl() | ||
{ | ||
return QStringLiteral("https://github.com/PCSX2/pcsx2"); | ||
} | ||
|
||
QString AboutDialog::getLicenseUrl() | ||
{ | ||
return QStringLiteral("https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Docs/License.txt"); | ||
} | ||
|
||
QString AboutDialog::getDiscordServerUrl() | ||
{ | ||
return QStringLiteral("https://discord.com/invite/TCz3t9k"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* PCSX2 - PS2 Emulator for PCs | ||
* Copyright (C) 2002-2022 PCSX2 Dev Team | ||
* | ||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms | ||
* of the GNU Lesser General Public License as published by the Free Software Found- | ||
* ation, either version 3 of the License, or (at your option) any later version. | ||
* | ||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
* PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with PCSX2. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "ui_AboutDialog.h" | ||
#include <QtWidgets/QDialog> | ||
|
||
class AboutDialog final : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit AboutDialog(QWidget* parent = nullptr); | ||
~AboutDialog(); | ||
|
||
static QString getWebsiteUrl(); | ||
static QString getSupportForumsUrl(); | ||
static QString getGitHubRepositoryUrl(); | ||
static QString getLicenseUrl(); | ||
static QString getDiscordServerUrl(); | ||
|
||
private: | ||
Ui::AboutDialog m_ui; | ||
}; |
Oops, something went wrong.