Remove explicit mono build, update readme

With the FontUtil rewrite removing any platform specific code, there is
no need to have two separate builds.

Remove the unused ClickOnce target, never implemented.
This commit is contained in:
Kurt 2019-10-16 20:52:09 -07:00
parent cf955e9fc7
commit be26074e1a
3 changed files with 9 additions and 105 deletions

View file

@ -1,6 +1,4 @@
using Microsoft.Win32;
using System;
using System.Diagnostics;
using System;
using System.Windows.Forms;
#if !DEBUG
using System.IO;
@ -27,55 +25,15 @@ namespace PKHeX.WinForms
// Add the event handler for handling non-UI thread exceptions to the event.
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
#endif
if (!CheckNETFramework())
return;
// Run the application
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Main());
}
private static bool CheckNETFramework()
{
if (IsOnWindows())
{
#if MONO
Error("Mono version should not be used on a Windows system.");
#endif
if (GetFrameworkVersion() >= 393295)
return true;
Error(".NET Framework 4.6 needs to be installed for this version of PKHeX to run.");
Process.Start("https://www.microsoft.com/download/details.aspx?id=48130");
return false;
}
//CLR Version 4.0.30319.42000 is equivalent to .NET Framework version 4.6
if (Environment.Version.CompareTo(Version.Parse("4.0.30319.42000")) >= 0)
return true;
Error("Your version of Mono needs to target the .NET Framework 4.6 or higher for this version of PKHeX to run.");
return false;
}
private static bool IsOnWindows()
{
// 4 -> UNIX, 6 -> Mac OSX, 128 -> UNIX (old)
int p = (int)Environment.OSVersion.Platform;
return p != 4 && p != 6 && p != 128;
}
private static int GetFrameworkVersion()
{
const string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\";
using RegistryKey ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(subkey);
if (ndpKey == null)
return 0;
int releaseKey = (int)ndpKey.GetValue("Release");
return releaseKey;
}
#if !DEBUG
private static void Error(string msg) => MessageBox.Show(msg, "PKHeX Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
#if !DEBUG
// Handle the UI exceptions by showing a dialog box, and asking the user whether or not they wish to abort execution.
private static void UIThreadException(object sender, ThreadExceptionEventArgs t)
{

View file

@ -11,7 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PKHeX.WinForms", "PKHeX.WinForms\PKHeX.WinForms.csproj", "{D1B91861-A448-4762-A313-C7BC179F4415}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PKHeX.WinForms", "PKHeX.WinForms\PKHeX.WinForms.csproj", "{D1B91861-A448-4762-A313-C7BC179F4415}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PKHeX.Core", "PKHeX.Core\PKHeX.Core.csproj", "{279E59F2-50EA-475D-8BA4-FA69F0578C0D}"
EndProject
@ -21,94 +21,40 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PKHeX.Drawing", "PKHeX.Draw
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
ClickOnce|Any CPU = ClickOnce|Any CPU
ClickOnce|x86 = ClickOnce|x86
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Mono-Debug|Any CPU = Mono-Debug|Any CPU
Mono-Debug|x86 = Mono-Debug|x86
Mono-Release|Any CPU = Mono-Release|Any CPU
Mono-Release|x86 = Mono-Release|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|Any CPU.ActiveCfg = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|Any CPU.Build.0 = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|x86.ActiveCfg = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.ClickOnce|x86.Build.0 = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Debug|x86.ActiveCfg = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Debug|x86.Build.0 = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Debug|Any CPU.Build.0 = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Debug|x86.ActiveCfg = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Debug|x86.Build.0 = Debug|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Release|Any CPU.ActiveCfg = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Release|Any CPU.Build.0 = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Release|x86.ActiveCfg = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Mono-Release|x86.Build.0 = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Release|Any CPU.Build.0 = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Release|x86.ActiveCfg = Release|Any CPU
{D1B91861-A448-4762-A313-C7BC179F4415}.Release|x86.Build.0 = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.ClickOnce|Any CPU.ActiveCfg = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.ClickOnce|Any CPU.Build.0 = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.ClickOnce|x86.ActiveCfg = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.ClickOnce|x86.Build.0 = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Debug|x86.ActiveCfg = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Debug|x86.Build.0 = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Debug|Any CPU.Build.0 = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Debug|x86.ActiveCfg = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Debug|x86.Build.0 = Debug|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Release|Any CPU.ActiveCfg = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Release|Any CPU.Build.0 = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Release|x86.ActiveCfg = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Mono-Release|x86.Build.0 = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Release|Any CPU.Build.0 = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Release|x86.ActiveCfg = Release|Any CPU
{279E59F2-50EA-475D-8BA4-FA69F0578C0D}.Release|x86.Build.0 = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.ClickOnce|Any CPU.ActiveCfg = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.ClickOnce|Any CPU.Build.0 = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.ClickOnce|x86.ActiveCfg = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.ClickOnce|x86.Build.0 = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Debug|x86.ActiveCfg = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Debug|x86.Build.0 = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Debug|Any CPU.Build.0 = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Debug|x86.ActiveCfg = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Debug|x86.Build.0 = Debug|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Release|Any CPU.ActiveCfg = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Release|Any CPU.Build.0 = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Release|x86.ActiveCfg = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Mono-Release|x86.Build.0 = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Release|Any CPU.Build.0 = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Release|x86.ActiveCfg = Release|Any CPU
{C3B5B74F-ACE8-4FB2-A917-0DEDBFD5703B}.Release|x86.Build.0 = Release|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.ClickOnce|Any CPU.ActiveCfg = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.ClickOnce|Any CPU.Build.0 = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.ClickOnce|x86.ActiveCfg = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.ClickOnce|x86.Build.0 = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Debug|x86.ActiveCfg = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Debug|x86.Build.0 = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Debug|Any CPU.Build.0 = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Debug|x86.ActiveCfg = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Debug|x86.Build.0 = Debug|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Release|Any CPU.ActiveCfg = Release|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Release|Any CPU.Build.0 = Release|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Release|x86.ActiveCfg = Release|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Mono-Release|x86.Build.0 = Release|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Release|Any CPU.Build.0 = Release|Any CPU
{87976C6C-3E91-42DE-B098-1E97E42C9588}.Release|x86.ActiveCfg = Release|Any CPU

View file

@ -18,7 +18,7 @@ The interface can be translated with resource/external text files so that differ
Pokémon Showdown sets and QR codes can be imported/exported to assist in sharing.
Nintendo 3DS savedata containers use an AES MAC that cannot be emulated without the 3DS's keys, thus a resigning service is required ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), or SaveDataFiler).
PKHeX expects save files that are not encrypted with console-specific keys. Use a savedata manager to import and export savedata from the console ([Checkpoint](https://github.com/FlagBrew/Checkpoint), save_manager, [JKSM](https://github.com/J-D-K/JKSM), or SaveDataFiler).
**We do not support or condone cheating at the expense of others. Do not use significantly hacked Pokémon in battle or in trades with those who are unaware hacked Pokémon are in use.**
@ -28,13 +28,13 @@ Nintendo 3DS savedata containers use an AES MAC that cannot be emulated without
## Building
PKHeX is a Windows Forms application which requires [.NET Framework v4.6](https://www.microsoft.com/en-us/download/details.aspx?id=48137).
PKHeX is a Windows Forms application which requires [.NET Framework v4.6](https://www.microsoft.com/en-us/download/details.aspx?id=48137), with experimental support for [.NET Core 3](https://dotnet.microsoft.com/download/dotnet-core/3.0).
The executable can be built with any compiler that supports C# 7.
The executable can be built with any compiler that supports C# 8.
### Build Configurations
Use the Debug or Release build configurations when building using the .NET Framework. Use the Mono-Debug or Mono-Release build configurations when building using Mono.
Use the Debug or Release build configurations when building. There isn't any platform specific code to worry about!
## Dependencies
@ -44,8 +44,8 @@ PKHeX's shiny sprite collection is taken from [pokesprite](https://github.com/ms
### IDE
PKHeX can be opened with IDEs such as [Visual Studio](https://www.visualstudio.com/) or [MonoDevelop](http://www.monodevelop.com/) by opening the .sln or .csproj file.
PKHeX can be opened with IDEs such as [Visual Studio](https://visualstudio.microsoft.com/downloads/) by opening the .sln or .csproj file.
### GNU/Linux
Install [MonoDevelop](http://www.monodevelop.com/) and [Mono Runtime](http://www.mono-project.com/) with `flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref`. GNU/Linux is not the main Operating System of developers of this program so there may be bugs; some may come from non GNU/Linux specific code of Mono (so developers using \*BSD, Windows and macOS should be able to reproduce them).
GNU/Linux is not the main Operating System of developers of this program so there may be bugs; some may come from non GNU/Linux specific code of Mono/Wine, so other users may not be able to reproduce the error you are experiencing.