mirror of
https://github.com/SourMesen/Mesen2.git
synced 2024-06-05 06:29:30 -04:00
macOS: Fix compilation scripts/errors for macOS
This commit is contained in:
parent
70404866e1
commit
9e83a29b93
|
@ -968,14 +968,14 @@
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<CodeAnalysisRuleSet>Core.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>Core.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>true</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>true</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
@ -983,7 +983,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
@ -991,7 +991,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\PGO Profile\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\PGO Profile\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
|
|
@ -62,7 +62,7 @@ bool StepBackManager::CheckStepBack()
|
||||||
|
|
||||||
if(clock < _targetClock && _targetClock - clock < _stateClockLimit) {
|
if(clock < _targetClock && _targetClock - clock < _stateClockLimit) {
|
||||||
//Create a save state every instruction for the last X clocks
|
//Create a save state every instruction for the last X clocks
|
||||||
_cache.push_back({});
|
_cache.push_back(StepBackCacheEntry());
|
||||||
_cache.back().Clock = clock;
|
_cache.back().Clock = clock;
|
||||||
_emu->Serialize(_cache.back().SaveState, true, 0);
|
_emu->Serialize(_cache.back().SaveState, true, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,12 +62,6 @@ template<class T> NesPpu<T>::NesPpu(NesConsole* console)
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> NesPpu<T>::~NesPpu()
|
|
||||||
{
|
|
||||||
delete[] _outputBuffers[0];
|
|
||||||
delete[] _outputBuffers[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class T> void NesPpu<T>::Reset()
|
template<class T> void NesPpu<T>::Reset()
|
||||||
{
|
{
|
||||||
_masterClock = 0;
|
_masterClock = 0;
|
||||||
|
|
|
@ -151,3 +151,9 @@ void NesPpu<T>::Run(uint64_t runTo)
|
||||||
_masterClock += _masterClockDivider;
|
_masterClock += _masterClockDivider;
|
||||||
} while(_masterClock + _masterClockDivider <= runTo);
|
} while(_masterClock + _masterClockDivider <= runTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T> NesPpu<T>::~NesPpu()
|
||||||
|
{
|
||||||
|
delete[] _outputBuffers[0];
|
||||||
|
delete[] _outputBuffers[1];
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~NsfPpu() { }
|
||||||
|
|
||||||
void UpdateTimings(ConsoleRegion region, bool overclockAllowed) override
|
void UpdateTimings(ConsoleRegion region, bool overclockAllowed) override
|
||||||
{
|
{
|
||||||
NesPpu<NsfPpu>::UpdateTimings(region, false);
|
NesPpu<NsfPpu>::UpdateTimings(region, false);
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
// pch.h : include file for standard system include files,
|
|
||||||
// or project specific include files that are used frequently, but
|
|
||||||
// are changed infrequently
|
|
||||||
//
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if _WIN32 || _WIN64
|
#if _WIN32 || _WIN64
|
||||||
#pragma comment(lib, "Core.lib")
|
|
||||||
#pragma comment(lib, "Utilities.lib")
|
|
||||||
#pragma comment(lib, "Windows.lib")
|
|
||||||
#pragma comment(lib, "SevenZip.lib")
|
|
||||||
#pragma comment(lib, "Lua.lib")
|
|
||||||
#pragma comment(lib, "ws2_32.lib") //Winsock Library
|
#pragma comment(lib, "ws2_32.lib") //Winsock Library
|
||||||
#define DllExport __declspec(dllexport)
|
#define DllExport __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<TargetName>MesenCore</TargetName>
|
<TargetName>MesenCore</TargetName>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetName>MesenCore</TargetName>
|
<TargetName>MesenCore</TargetName>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetName>MesenCore</TargetName>
|
<TargetName>MesenCore</TargetName>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetName>MesenCore</TargetName>
|
<TargetName>MesenCore</TargetName>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\PGO Profile\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\PGO Profile\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
@ -213,6 +213,23 @@
|
||||||
<ClCompile Include="RecordApiWrapper.cpp" />
|
<ClCompile Include="RecordApiWrapper.cpp" />
|
||||||
<ClCompile Include="TestApiWrapper.cpp" />
|
<ClCompile Include="TestApiWrapper.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Core\Core.vcxproj">
|
||||||
|
<Project>{78fef1a1-6df1-4cbb-a373-ae6fa7ce5ce0}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Lua\Lua.vcxproj">
|
||||||
|
<Project>{b609e0a0-5050-4871-91d6-e760633bcdd1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\SevenZip\SevenZip.vcxproj">
|
||||||
|
<Project>{52c4ba3a-e699-4305-b23f-c9083fd07ab6}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Utilities\Utilities.vcxproj">
|
||||||
|
<Project>{b5330148-e8c7-46ba-b54e-69be59ea337d}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Windows\Windows.vcxproj">
|
||||||
|
<Project>{7761e790-b42c-4179-8550-8365ff9eb23e}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
#include "Core/Shared/Emulator.h"
|
#include "Core/Shared/Emulator.h"
|
||||||
#include "Core/Shared/EmuSettings.h"
|
#include "Core/Shared/EmuSettings.h"
|
||||||
#include "LinuxGameController.h"
|
#include "LinuxGameController.h"
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
bool LinuxGameController::IsButtonPressed(int buttonNumber) { return 0; }
|
||||||
|
int LinuxGameController::GetDeviceID() { return _deviceID; }
|
||||||
|
bool LinuxGameController::IsDisconnected() { return _disconnected; }
|
||||||
|
std::shared_ptr<LinuxGameController> LinuxGameController::GetController(Emulator* emu, int deviceID, bool logInformation) { return nullptr; }
|
||||||
|
#else
|
||||||
#include "libevdev/libevdev.h"
|
#include "libevdev/libevdev.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -229,3 +236,4 @@ static int print_event(struct input_event *ev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
#endif
|
||||||
|
|
|
@ -166,22 +166,22 @@
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\PGO Profile\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\PGO Profile\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -70,25 +70,25 @@
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\PGO Profile\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\PGO Profile\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -112,22 +112,22 @@
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\PGO Profile\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\PGO Profile\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
xmlns:l="using:Mesen.Localization"
|
xmlns:l="using:Mesen.Localization"
|
||||||
xmlns:u="using:Mesen.Utilities"
|
xmlns:u="using:Mesen.Utilities"
|
||||||
x:Class="Mesen.App"
|
x:Class="Mesen.App"
|
||||||
|
Name="Mesen"
|
||||||
>
|
>
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<FontFamily x:Key="MesenFont">Microsoft Sans Serif</FontFamily>
|
<FontFamily x:Key="MesenFont">Microsoft Sans Serif</FontFamily>
|
||||||
|
@ -50,4 +51,9 @@
|
||||||
|
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
|
|
||||||
|
<NativeMenu.Menu>
|
||||||
|
<NativeMenu>
|
||||||
|
</NativeMenu>
|
||||||
|
</NativeMenu.Menu>
|
||||||
</Application>
|
</Application>
|
||||||
|
|
|
@ -126,16 +126,22 @@ namespace Mesen
|
||||||
private static IntPtr DllImportResolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
|
private static IntPtr DllImportResolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
|
||||||
{
|
{
|
||||||
if(libraryName.Contains("Mesen") || libraryName.Contains("SkiaSharp") || libraryName.Contains("HarfBuzz")) {
|
if(libraryName.Contains("Mesen") || libraryName.Contains("SkiaSharp") || libraryName.Contains("HarfBuzz")) {
|
||||||
|
if(libraryName.EndsWith(".dll")) {
|
||||||
|
libraryName = libraryName.Substring(0, libraryName.Length - 4);
|
||||||
|
}
|
||||||
|
|
||||||
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
|
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
|
||||||
if(!libraryName.StartsWith("lib")) {
|
if(!libraryName.EndsWith(".so")) {
|
||||||
libraryName = "lib" + libraryName;
|
|
||||||
}
|
|
||||||
if(!libraryName.EndsWith(".so") && !libraryName.EndsWith(".dll")) {
|
|
||||||
libraryName = libraryName + ".so";
|
libraryName = libraryName + ".so";
|
||||||
}
|
}
|
||||||
}
|
} else if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
||||||
if(!libraryName.EndsWith("dll") && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
if(!libraryName.EndsWith(".dll")) {
|
||||||
libraryName = libraryName + ".dll";
|
libraryName = libraryName + ".dll";
|
||||||
|
}
|
||||||
|
} else if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
|
||||||
|
if(!libraryName.EndsWith(".dylib")) {
|
||||||
|
libraryName = libraryName + ".dylib";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return NativeLibrary.Load(Path.Combine(ConfigManager.HomeFolder, libraryName));
|
return NativeLibrary.Load(Path.Combine(ConfigManager.HomeFolder, libraryName));
|
||||||
}
|
}
|
||||||
|
|
21
UI/UI.csproj
21
UI/UI.csproj
|
@ -17,11 +17,14 @@
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(RuntimeIdentifier)'=='osx-x64' Or '$(RuntimeIdentifier)'=='osx-arm64' Or '$(RuntimeIdentifier)'=='linux-x64'">
|
||||||
|
<SolutionDir>..</SolutionDir>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||||
<OutputPath>$(SolutionDir)\bin\x64\Debug\</OutputPath>
|
<OutputPath>$(SolutionDir)\bin\$(RuntimeIdentifier)\Debug\</OutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||||
<OutputPath>$(SolutionDir)\bin\x64\Release\</OutputPath>
|
<OutputPath>$(SolutionDir)\bin\$(RuntimeIdentifier)\Release\</OutputPath>
|
||||||
<Optimize>False</Optimize>
|
<Optimize>False</Optimize>
|
||||||
<DefineConstants>DEBUG</DefineConstants>
|
<DefineConstants>DEBUG</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -530,14 +533,16 @@
|
||||||
<EmbeddedResource Include="Localization\resources.en.xml" WithCulture="false" Type="Non-Resx" />
|
<EmbeddedResource Include="Localization\resources.en.xml" WithCulture="false" Type="Non-Resx" />
|
||||||
<EmbeddedResource Include="Utilities\DipSwitchDefinitions.xml" />
|
<EmbeddedResource Include="Utilities\DipSwitchDefinitions.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Target Name="PreBuildWindows" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'!='linux-x64'">
|
|
||||||
|
<Target Name="PreBuildWindows" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='win-x64'">
|
||||||
<Exec Command="cd $(OutDir)
rd Dependencies /s /q
md Dependencies
xcopy /s $(ProjectDir)Dependencies\* Dependencies
copy libHarfBuzzSharp.dll Dependencies
copy libSkiaSharp.dll Dependencies
copy MesenCore.dll Dependencies
cd Dependencies
del ..\Dependencies.zip
powershell Compress-Archive -Path * -DestinationPath '..\Dependencies.zip' -Force
copy ..\Dependencies.zip $(ProjectDir)" />
|
<Exec Command="cd $(OutDir)
rd Dependencies /s /q
md Dependencies
xcopy /s $(ProjectDir)Dependencies\* Dependencies
copy libHarfBuzzSharp.dll Dependencies
copy libSkiaSharp.dll Dependencies
copy MesenCore.dll Dependencies
cd Dependencies
del ..\Dependencies.zip
powershell Compress-Archive -Path * -DestinationPath '..\Dependencies.zip' -Force
copy ..\Dependencies.zip $(ProjectDir)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(RuntimeIdentifier)'=='linux-x64'">
|
|
||||||
<OutputPath>..\bin\x64\Release\</OutputPath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Target Name="PreBuildLinux" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='linux-x64'">
|
<Target Name="PreBuildLinux" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='linux-x64'">
|
||||||
<Exec Command="cd $(OutDir)
rm Dependencies -r
mkdir Dependencies
cp -R $(ProjectDir)/Dependencies/* Dependencies
cp libHarfBuzzSharp.so Dependencies
cp libSkiaSharp.so Dependencies
cp libMesenCore.dll Dependencies
cd Dependencies
rm ../Dependencies.zip
zip -r ../Dependencies.zip *
cp ../Dependencies.zip $(ProjectDir)" />
|
<Exec Command="cd $(OutDir)
rm -r Dependencies
mkdir Dependencies
cp -R $(ProjectDir)/Dependencies/* Dependencies
cp libHarfBuzzSharp.so Dependencies
cp libSkiaSharp.so Dependencies
cp MesenCore.so Dependencies
cd Dependencies
rm ../Dependencies.zip
zip -r ../Dependencies.zip *
cp ../Dependencies.zip $(ProjectDir)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="PreBuildOsx" BeforeTargets="PreBuildEvent" Condition="'$(RuntimeIdentifier)'=='osx-x64' Or '$(RuntimeIdentifier)'=='osx-arm64'">
|
||||||
|
<Exec Command="cd $(OutDir)
rm -R Dependencies
mkdir Dependencies
cp -R $(ProjectDir)/Dependencies/* Dependencies
cp libHarfBuzzSharp.dylib Dependencies
cp libSkiaSharp.dylib Dependencies
cp MesenCore.dylib Dependencies
cd Dependencies
rm ../Dependencies.zip
zip -r ../Dependencies.zip *
cp ../Dependencies.zip $(ProjectDir)" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace Mesen.ViewModels
|
||||||
[Reactive] public string InstallLocation { get; set; }
|
[Reactive] public string InstallLocation { get; set; }
|
||||||
|
|
||||||
[Reactive] public bool CreateShortcut { get; set; } = true;
|
[Reactive] public bool CreateShortcut { get; set; } = true;
|
||||||
|
[Reactive] public bool IsOsx { get; set; } = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
|
||||||
|
|
||||||
public SetupWizardViewModel()
|
public SetupWizardViewModel()
|
||||||
{
|
{
|
||||||
|
@ -95,6 +96,11 @@ namespace Mesen.ViewModels
|
||||||
|
|
||||||
private void CreateShortcutFile()
|
private void CreateShortcutFile()
|
||||||
{
|
{
|
||||||
|
if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
|
||||||
|
//TODO OSX
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
||||||
Type? t = Type.GetTypeFromCLSID(new Guid("72C24DD5-D70A-438B-8A42-98424B88AFB8"));
|
Type? t = Type.GetTypeFromCLSID(new Guid("72C24DD5-D70A-438B-8A42-98424B88AFB8"));
|
||||||
if(t == null) {
|
if(t == null) {
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
</c:OptionSection>
|
</c:OptionSection>
|
||||||
|
|
||||||
<c:OptionSection Header="{l:Translate lblMiscOptions}" Margin="0 25 0 0">
|
<c:OptionSection Header="{l:Translate lblMiscOptions}" Margin="0 25 0 0" IsVisible="{CompiledBinding !IsOsx}">
|
||||||
<CheckBox Content="{l:Translate chkCreateShortcut}" IsChecked="{CompiledBinding CreateShortcut}" />
|
<CheckBox Content="{l:Translate chkCreateShortcut}" IsChecked="{CompiledBinding CreateShortcut}" />
|
||||||
</c:OptionSection>
|
</c:OptionSection>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
@ -69,25 +69,25 @@
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\PGO Profile\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\PGO Profile\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir);$(SolutionDir);$(IncludePath)</IncludePath>
|
||||||
|
|
|
@ -69,25 +69,25 @@
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Profile|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGO Optimize|x64'">
|
||||||
<OutDir>$(SolutionDir)\bin\$(PlatformTarget)\PGO Profile\</OutDir>
|
<OutDir>$(SolutionDir)\bin\win-$(PlatformTarget)\PGO Profile\</OutDir>
|
||||||
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
<IntDir>obj\$(Platform)\PGO Profile\</IntDir>
|
||||||
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
<EnableMicrosoftCodeAnalysis>false</EnableMicrosoftCodeAnalysis>
|
||||||
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir)/Core;$(SolutionDir);$(ProjectDir);$(IncludePath)</IncludePath>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# ROM files must be copied to the PGOHelper/PGOGames folder beforehand - all supported rom files in that folder will be executed as part of the profiling process.
|
# ROM files must be copied to the PGOHelper/PGOGames folder beforehand - all supported rom files in that folder will be executed as part of the profiling process.
|
||||||
# Using a variety of roms is recommended (e.g different consoles/mappers, etc.)
|
# Using a variety of roms is recommended (e.g different consoles/mappers, etc.)
|
||||||
#
|
#
|
||||||
# This will produce the following binary: bin/x64/Release/linux-x64/publish/Mesen
|
# This will produce the following binary: bin/linux-x64/Release/linux-x64/publish/Mesen
|
||||||
PLAT="x64"
|
PLAT="x64"
|
||||||
TARG="core"
|
TARG="core"
|
||||||
|
|
||||||
|
|
65
makefile
65
makefile
|
@ -20,9 +20,38 @@ endif
|
||||||
|
|
||||||
CXXFLAGS=-fPIC -Wall --std=c++17 -O3 $(MESENFLAGS) -I/usr/include/SDL2 -I $(realpath ./) -I $(realpath ./Core) -I $(realpath ./Utilities) -I $(realpath ./Linux)
|
CXXFLAGS=-fPIC -Wall --std=c++17 -O3 $(MESENFLAGS) -I/usr/include/SDL2 -I $(realpath ./) -I $(realpath ./Core) -I $(realpath ./Utilities) -I $(realpath ./Linux)
|
||||||
CFLAGS=-fPIC -Wall -O3 $(MESENFLAGS)
|
CFLAGS=-fPIC -Wall -O3 $(MESENFLAGS)
|
||||||
LINKOPTIONS=
|
|
||||||
|
|
||||||
MESENPLATFORM=x64
|
LINKCHECKUNRESOLVED=-Wl,-z,defs
|
||||||
|
|
||||||
|
LINKOPTIONS=
|
||||||
|
MESENOS=
|
||||||
|
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
|
||||||
|
ifeq ($(UNAME_S),Linux)
|
||||||
|
MESENOS=linux
|
||||||
|
SHAREDLIB=MesenCore.so
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
MESENOS=osx
|
||||||
|
SHAREDLIB=MesenCore.dylib
|
||||||
|
LTO=false
|
||||||
|
STATICLINK := false
|
||||||
|
LINKCHECKUNRESOLVED=
|
||||||
|
endif
|
||||||
|
|
||||||
|
UNAME_P := $(shell uname -p)
|
||||||
|
ifeq ($(UNAME_P),x86_64)
|
||||||
|
MESENPLATFORM=$(MESENOS)-x64
|
||||||
|
endif
|
||||||
|
ifneq ($(filter %86,$(UNAME_P)),)
|
||||||
|
MESENPLATFORM=$(MESENOS)-x64
|
||||||
|
endif
|
||||||
|
ifneq ($(filter arm%,$(UNAME_P)),)
|
||||||
|
MESENPLATFORM=$(MESENOS)-arm64
|
||||||
|
endif
|
||||||
|
|
||||||
CXXFLAGS += -m64
|
CXXFLAGS += -m64
|
||||||
CFLAGS += -m64
|
CFLAGS += -m64
|
||||||
|
|
||||||
|
@ -46,7 +75,6 @@ ifneq ($(STATICLINK),false)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJFOLDER=obj.$(MESENPLATFORM)
|
OBJFOLDER=obj.$(MESENPLATFORM)
|
||||||
SHAREDLIB=libMesenCore.dll
|
|
||||||
RELEASEFOLDER=bin/$(MESENPLATFORM)/Release
|
RELEASEFOLDER=bin/$(MESENPLATFORM)/Release
|
||||||
|
|
||||||
CORESRC := $(shell find Core -name '*.cpp')
|
CORESRC := $(shell find Core -name '*.cpp')
|
||||||
|
@ -80,27 +108,27 @@ SDL2LIB=$(shell sdl2-config --libs)
|
||||||
SDL2INC=$(shell sdl2-config --cflags)
|
SDL2INC=$(shell sdl2-config --cflags)
|
||||||
FSLIB=-lstdc++fs
|
FSLIB=-lstdc++fs
|
||||||
|
|
||||||
|
ifeq ($(MESENOS),osx)
|
||||||
|
LIBEVDEVOBJ :=
|
||||||
|
LIBEVDEVINC :=
|
||||||
|
LIBEVDEVSRC :=
|
||||||
|
FSLIB :=
|
||||||
|
endif
|
||||||
|
|
||||||
all: ui
|
all: ui
|
||||||
|
|
||||||
ui: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
ui: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
||||||
mkdir -p $(RELEASEFOLDER)/Dependencies
|
mkdir -p $(RELEASEFOLDER)/Dependencies
|
||||||
rm -fr $(RELEASEFOLDER)/Dependencies/*
|
rm -fr $(RELEASEFOLDER)/Dependencies/*
|
||||||
cp InteropDLL/$(OBJFOLDER)/$(SHAREDLIB) bin/x64/Release/$(SHAREDLIB)
|
cp InteropDLL/$(OBJFOLDER)/$(SHAREDLIB) bin/$(MESENPLATFORM)/Release/$(SHAREDLIB)
|
||||||
cd UI && dotnet publish -c Release -r linux-x64 -p:Platform="$(MESENPLATFORM)" -p:OptimizeUi="true" --no-self-contained true -p:PublishSingleFile=true
|
#Called twice because the first call copies native libraries to the bin folder which need to be included in Dependencies.zip
|
||||||
rm $(RELEASEFOLDER)/linux-x64/publish/lib*
|
cd UI && dotnet publish -c Release -r $(MESENPLATFORM) -p:Platform="x64" -p:OptimizeUi="true" --no-self-contained true -p:PublishSingleFile=true
|
||||||
|
cd UI && dotnet publish -c Release -r $(MESENPLATFORM) -p:Platform="x64" -p:OptimizeUi="true" --no-self-contained true -p:PublishSingleFile=true
|
||||||
|
|
||||||
core: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
core: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
||||||
|
|
||||||
runtests:
|
|
||||||
cd TestHelper/$(OBJFOLDER) && ./testhelper
|
|
||||||
|
|
||||||
testhelper: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
|
||||||
mkdir -p TestHelper/$(OBJFOLDER)
|
|
||||||
$(CXX) $(CXXFLAGS) -Wl,-z,defs -o testhelper TestHelper/*.cpp InteropDLL/ConsoleWrapper.cpp $(SEVENZIPOBJ) $(LUAOBJ) $(LINUXOBJ) $(LIBEVDEVOBJ) $(UTILOBJ) $(COREOBJ) -pthread $(FSLIB) $(SDL2LIB) $(LIBEVDEVLIB)
|
|
||||||
mv testhelper TestHelper/$(OBJFOLDER)
|
|
||||||
|
|
||||||
pgohelper: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
pgohelper: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
||||||
mkdir -p PGOHelper/$(OBJFOLDER) && cd PGOHelper/$(OBJFOLDER) && $(CXX) $(CXXFLAGS) -Wl,-z,defs -o pgohelper ../PGOHelper.cpp ../../bin/pgohelperlib.so -pthread $(FSLIB) $(SDL2LIB) $(LIBEVDEVLIB)
|
mkdir -p PGOHelper/$(OBJFOLDER) && cd PGOHelper/$(OBJFOLDER) && $(CXX) $(CXXFLAGS) $(LINKCHECKUNRESOLVED) -o pgohelper ../PGOHelper.cpp ../../bin/pgohelperlib.so -pthread $(FSLIB) $(SDL2LIB) $(LIBEVDEVLIB)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
@ -111,18 +139,15 @@ pgohelper: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
|
||||||
InteropDLL/$(OBJFOLDER)/$(SHAREDLIB): $(SEVENZIPOBJ) $(LUAOBJ) $(UTILOBJ) $(COREOBJ) $(LIBEVDEVOBJ) $(LINUXOBJ) $(DLLOBJ)
|
InteropDLL/$(OBJFOLDER)/$(SHAREDLIB): $(SEVENZIPOBJ) $(LUAOBJ) $(UTILOBJ) $(COREOBJ) $(LIBEVDEVOBJ) $(LINUXOBJ) $(DLLOBJ)
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
mkdir -p InteropDLL/$(OBJFOLDER)
|
mkdir -p InteropDLL/$(OBJFOLDER)
|
||||||
$(CXX) $(CXXFLAGS) $(LINKOPTIONS) -Wl,-z,defs -shared -o $(SHAREDLIB) $(DLLOBJ) $(SEVENZIPOBJ) $(LUAOBJ) $(LINUXOBJ) $(LIBEVDEVOBJ) $(UTILOBJ) $(COREOBJ) $(SDL2INC) -pthread $(FSLIB) $(SDL2LIB) $(LIBEVDEVLIB)
|
$(CXX) $(CXXFLAGS) $(LINKOPTIONS) $(LINKCHECKUNRESOLVED) -shared -o $(SHAREDLIB) $(DLLOBJ) $(SEVENZIPOBJ) $(LUAOBJ) $(LINUXOBJ) $(LIBEVDEVOBJ) $(UTILOBJ) $(COREOBJ) $(SDL2INC) -pthread $(FSLIB) $(SDL2LIB) $(LIBEVDEVLIB)
|
||||||
cp $(SHAREDLIB) bin/pgohelperlib.so
|
cp $(SHAREDLIB) bin/pgohelperlib.so
|
||||||
mv $(SHAREDLIB) InteropDLL/$(OBJFOLDER)
|
mv $(SHAREDLIB) InteropDLL/$(OBJFOLDER)
|
||||||
|
|
||||||
pgo:
|
pgo:
|
||||||
./buildPGO.sh
|
./buildPGO.sh
|
||||||
|
|
||||||
official:
|
|
||||||
./build.sh
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
./UI/bin/x64/Release/linux-x64/publish/Mesen
|
./UI/bin/$(MESENPLATFORM)/Release/$(MESENPLATFORM)/publish/Mesen
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -r -f $(COREOBJ)
|
rm -r -f $(COREOBJ)
|
||||||
|
|
Loading…
Reference in a new issue