From 9253ebee4295dc9f249956ef7ebfea25fbaf2475 Mon Sep 17 00:00:00 2001 From: hegyak Date: Tue, 14 Jul 2015 18:57:37 -0700 Subject: [PATCH 1/4] It's a Release Branch! --- Version/VersionInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version/VersionInfo.cs b/Version/VersionInfo.cs index e08f42ee47..db52407561 100644 --- a/Version/VersionInfo.cs +++ b/Version/VersionInfo.cs @@ -2,7 +2,7 @@ static class VersionInfo { public const string MAINVERSION = "1.10.0"; // Use numbers only or the new version notification won't work public static readonly string RELEASEDATE = "June 15, 2015"; - public static readonly bool DeveloperBuild = true; + public static readonly bool DeveloperBuild = false; public static readonly string HomePage = "http://tasvideos.org/BizHawk.html"; public static string GetEmuVersion() From cedc7d445144fcd5f473ad99ffd526a50cbf8998 Mon Sep 17 00:00:00 2001 From: hegyak Date: Wed, 15 Jul 2015 09:27:16 -0700 Subject: [PATCH 2/4] We are at Version 1.11.0 --- Version/VersionInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version/VersionInfo.cs b/Version/VersionInfo.cs index db52407561..5f5daf6755 100644 --- a/Version/VersionInfo.cs +++ b/Version/VersionInfo.cs @@ -1,6 +1,6 @@ static class VersionInfo { - public const string MAINVERSION = "1.10.0"; // Use numbers only or the new version notification won't work + public const string MAINVERSION = "1.11.0"; // Use numbers only or the new version notification won't work public static readonly string RELEASEDATE = "June 15, 2015"; public static readonly bool DeveloperBuild = false; public static readonly string HomePage = "http://tasvideos.org/BizHawk.html"; From 8ad8ad2c6ab3ee5cda21aed54e276a917e53b6a5 Mon Sep 17 00:00:00 2001 From: Hathor86 Date: Wed, 7 Oct 2015 23:54:57 +0200 Subject: [PATCH 3/4] Start back from initial release branch Just to have cleaner changes --- .gitignore | 1 + BizHawk.Client.Common/config/PathEntry.cs | 3 +- BizHawk.Client.EmuHawk/MainForm.cs | 2 + .../tools/ICustomGameTool.cs | 14 +++++ BizHawk.Client.EmuHawk/tools/ToolManager.cs | 62 ++++++++++++++++--- 5 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 BizHawk.Client.EmuHawk/tools/ICustomGameTool.cs diff --git a/.gitignore b/.gitignore index 317dc64c9d..d7f7d835fd 100644 --- a/.gitignore +++ b/.gitignore @@ -246,6 +246,7 @@ /References/*.xml /output/ELFSharp.dll /output/dll/ELFSharp.dll +/output/GameTools/*.dll *.opensdf *.user *.suo diff --git a/BizHawk.Client.Common/config/PathEntry.cs b/BizHawk.Client.Common/config/PathEntry.cs index 223147d8e6..9639041b59 100644 --- a/BizHawk.Client.Common/config/PathEntry.cs +++ b/BizHawk.Client.Common/config/PathEntry.cs @@ -157,8 +157,9 @@ namespace BizHawk.Client.Common new PathEntry { System = "Global_NULL", SystemDisplayName="Global", Type = "Macros", Path = Path.Combine(".", "Movies", "Macros"), Ordinal = 10 }, new PathEntry { System = "Global_NULL", SystemDisplayName="Global", Type = "TAStudio states", Path = Path.Combine(".", "Movies", "TAStudio states"), Ordinal = 11 }, new PathEntry { System = "Global_NULL", SystemDisplayName="Global", Type = "Multi-Disk Bundles", Path = Path.Combine(".", "Tools"), Ordinal = 12 }, + new PathEntry { System = "Global_NULL", SystemDisplayName="Global", Type = "GameTools", Path = Path.Combine(".", "GameTools"), Ordinal = 13 }, - new PathEntry { System = "INTV", SystemDisplayName="Intellivision", Type = "Base", Path = Path.Combine(".", "Intellivision"), Ordinal = 0 }, + new PathEntry { System = "INTV", SystemDisplayName="Intellivision", Type = "Base", Path = Path.Combine(".", "Intellivision"), Ordinal = 0 }, new PathEntry { System = "INTV", SystemDisplayName="Intellivision", Type = "ROM", Path = ".", Ordinal = 1 }, new PathEntry { System = "INTV", SystemDisplayName="Intellivision", Type = "Savestates", Path= Path.Combine(".", "State"), Ordinal = 2 }, new PathEntry { System = "INTV", SystemDisplayName="Intellivision", Type = "Save RAM", Path = Path.Combine(".", "SaveRAM"), Ordinal = 3 }, diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 9ee2275cb6..6c49265c9b 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3410,6 +3410,8 @@ namespace BizHawk.Client.EmuHawk Console.WriteLine(" {0} : {1}", f.FirmwareId, f.Hash); } } + GlobalWin.Tools.Load(); + return true; } else diff --git a/BizHawk.Client.EmuHawk/tools/ICustomGameTool.cs b/BizHawk.Client.EmuHawk/tools/ICustomGameTool.cs new file mode 100644 index 0000000000..05021ee4d3 --- /dev/null +++ b/BizHawk.Client.EmuHawk/tools/ICustomGameTool.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BizHawk.Client.EmuHawk +{ + /// + /// Interface to implements in order to make a custom tool for a specific game + /// + public interface ICustomGameTool:IToolForm + { + } +} diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index 26d4511156..b76147809a 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -69,7 +69,12 @@ namespace BizHawk.Client.EmuHawk var newTool = CreateInstance(toolType); - if (newTool is Form) + if (newTool == null) + { + return null; + } + + if (newTool is Form) { (newTool as Form).Owner = GlobalWin.MainForm; } @@ -494,16 +499,55 @@ namespace BizHawk.Client.EmuHawk return CreateInstance(typeof(T)); } - private IToolForm CreateInstance(Type toolType) - { - var tool = (IToolForm)Activator.CreateInstance(toolType); + private IToolForm CreateInstance(Type toolType) + { + IToolForm tool; - // Add to our list of tools - _tools.Add(tool); - return tool; - } + //Specific case for custom tools + if (toolType == typeof(ICustomGameTool)) + { + string path = Path.Combine(Global.Config.PathEntries["Global", "GameTools"].Path, string.Format("{0}.dll", Global.Game.Name)); + if (File.Exists(path) + && MessageBox.Show("A custom plugin has been found for the ROM you're loading. Do you want to load it?\r\nAccept ONLY if you trust the source and if you know what you're doing. In any other case, choose no." + , "Answer to life, universe and everything else?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + try + { + // As the object is "remote"(external to the project), the CreateInstanceFrom returns a handle.We need to Unwrap in order to make the casting + tool = System.Activator.CreateInstanceFrom(path, "BizHawk.Client.EmuHawk.CustomMainForm").Unwrap() as IToolForm; + if (tool == null) + { + MessageBox.Show("It seems that the object CustomMainForm does not implement IToolForm. Please review the code.", "Boom!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return null; + } + } + catch (MissingMethodException) + { + MessageBox.Show("It seems that the object CustomMainForm does not have a public default constructor. Please review the code.", "Boom!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return null; + } + catch (TypeLoadException) + { + MessageBox.Show("It seems that the object CustomMainForm does not exists. Please review the code.", "Boom!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return null; + } + } + else + { + return null; + } + } + else + { + tool = (IToolForm)Activator.CreateInstance(toolType); + } - public void UpdateToolsBefore(bool fromLua = false) + // Add to our list of tools + _tools.Add(tool); + return tool; + } + + public void UpdateToolsBefore(bool fromLua = false) { if (Has()) { From 29e4c1753ff9622c82209d077b7e9eb9bb67a1c3 Mon Sep 17 00:00:00 2001 From: Hathor86 Date: Sat, 10 Oct 2015 15:06:25 +0200 Subject: [PATCH 4/4] Add ICustomGameTool interface that I forgot --- .../BizHawk.Client.EmuHawk.csproj | 1 + BizHawk.sln | 56 +++++++++++-------- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 6d040811d6..4d845b273f 100644 --- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -762,6 +762,7 @@ HexFind.cs + diff --git a/BizHawk.sln b/BizHawk.sln index f8bb5b3247..c95daded65 100644 --- a/BizHawk.sln +++ b/BizHawk.sln @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Version", "Version\Version.csproj", "{0CE8B337-08E3-4602-BF10-C4D4C75D2F13}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.Common", "BizHawk.Client.Common\BizHawk.Client.Common.csproj", "{24A0AA3C-B25F-4197-B23D-476D6462DBA0}" @@ -96,24 +98,28 @@ Global {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|Win32.ActiveCfg = Release|x86 {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|x86.ActiveCfg = Release|x86 {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|x86.Build.0 = Release|x86 - {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Win32.ActiveCfg = Debug|Any CPU + {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Win32.ActiveCfg = Debug|x86 + {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Win32.Build.0 = Debug|x86 {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|x86.ActiveCfg = Debug|x86 {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|x86.Build.0 = Debug|x86 - {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Win32.ActiveCfg = Release|Any CPU + {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Mixed Platforms.Build.0 = Release|x86 + {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Win32.ActiveCfg = Release|x86 + {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Win32.Build.0 = Release|x86 {DD448B37-BA3F-4544-9754-5406E8094723}.Release|x86.ActiveCfg = Release|x86 {DD448B37-BA3F-4544-9754-5406E8094723}.Release|x86.Build.0 = Release|x86 - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Win32.ActiveCfg = Debug|Any CPU + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Win32.ActiveCfg = Debug|x86 + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Win32.Build.0 = Debug|x86 {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|x86.ActiveCfg = Debug|x86 {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|x86.Build.0 = Debug|x86 - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.ActiveCfg = Release|Any CPU + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Mixed Platforms.Build.0 = Release|x86 + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.ActiveCfg = Release|x86 + {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.Build.0 = Release|x86 {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|x86.ActiveCfg = Release|x86 {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|x86.Build.0 = Release|x86 {F51946EA-827F-4D82-B841-1F2F6D060312}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 @@ -166,14 +172,16 @@ Global {5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|Win32.ActiveCfg = Release|x86 {5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|x86.ActiveCfg = Release|x86 {5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|x86.Build.0 = Release|x86 - {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Win32.ActiveCfg = Debug|Any CPU + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Win32.ActiveCfg = Debug|x86 + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Win32.Build.0 = Debug|x86 {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|x86.ActiveCfg = Debug|x86 {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|x86.Build.0 = Debug|x86 - {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Win32.ActiveCfg = Release|Any CPU + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Mixed Platforms.Build.0 = Release|x86 + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Win32.ActiveCfg = Release|x86 + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Win32.Build.0 = Release|x86 {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|x86.ActiveCfg = Release|x86 {2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|x86.Build.0 = Release|x86 {337CA23E-65E7-44E1-9411-97EE08BB8116}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 @@ -211,18 +219,18 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {24A0AA3C-B25F-4197-B23D-476D6462DBA0} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} {DD448B37-BA3F-4544-9754-5406E8094723} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} {C4366030-6D03-424B-AE53-F4F43BB217C3} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {24A0AA3C-B25F-4197-B23D-476D6462DBA0} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {B95649F5-A0AE-41EB-B62B-578A2AFF5E18} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {E1A23168-B571-411C-B360-2229E7225E0E} = {3627C08B-3E43-4224-9DA4-40BD69495FBC} {F51946EA-827F-4D82-B841-1F2F6D060312} = {3627C08B-3E43-4224-9DA4-40BD69495FBC} + {E1A23168-B571-411C-B360-2229E7225E0E} = {3627C08B-3E43-4224-9DA4-40BD69495FBC} {197D4314-8A9F-49BA-977D-54ACEFAEB6BA} = {3627C08B-3E43-4224-9DA4-40BD69495FBC} {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465} = {0540A9A6-977E-466D-8BD3-1D8590BD5282} {5160CFB1-5389-47C1-B7F6-8A0DC97641EE} = {0540A9A6-977E-466D-8BD3-1D8590BD5282} + {2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} {337CA23E-65E7-44E1-9411-97EE08BB8116} = {0540A9A6-977E-466D-8BD3-1D8590BD5282} {E6B436B1-A3CD-4C9A-8F76-5D7154726884} = {0540A9A6-977E-466D-8BD3-1D8590BD5282} + {B95649F5-A0AE-41EB-B62B-578A2AFF5E18} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj