diff --git a/.gitignore b/.gitignore index 061e0d8a..498fc2b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ /.vs /build.bat /packages/ -/RombaSharp/obj/** +/RombaSharp/bin/ +/RombaSharp/obj/ /RombaSharp/RombaSharp.csproj.user -/SabreTools/obj/** +/SabreTools/bin/ +/SabreTools/obj/ /SabreTools/SabreTools.csproj.user -/SabreTools.Library/obj/** -/SabreTools.userprefs \ No newline at end of file +/SabreTools.Library/bin/ +/SabreTools.Library/obj/ +/SabreTools.userprefs diff --git a/RombaSharp/App.config b/RombaSharp/App.config deleted file mode 100644 index 18a33cff..00000000 --- a/RombaSharp/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/RombaSharp/Properties/AssemblyInfo.cs b/RombaSharp/Properties/AssemblyInfo.cs deleted file mode 100644 index 77f5f3c0..00000000 --- a/RombaSharp/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RombaSharp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("RombaSharp")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4728d479-8cfb-43e9-8c63-4774c6d73200")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RombaSharp/RombaSharp.csproj b/RombaSharp/RombaSharp.csproj index e7384a67..f57ed455 100644 --- a/RombaSharp/RombaSharp.csproj +++ b/RombaSharp/RombaSharp.csproj @@ -1,130 +1,58 @@ - - - + + - Debug - x64 - {4728D479-8CFB-43E9-8C63-4774C6D73200} Exe - Properties - RombaSharp - RombaSharp - v4.6.2 - 512 - true - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true + net462;netcoreapp2.1 + Debug;Release;Mono + AnyCPU;x64 - - true - ..\..\Debug-x64\ + + + DEBUG;TRACE;MONO + false + + 3 + + + + DEBUG;TRACE;MONO + + false + + + DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - true + false + + 3 - - ..\..\Release-x64\ + + + DEBUG;TRACE + + false + + + TRACE true - - - x64 - prompt - MinimumRecommendedRules.ruleset - true + + 3 - - true - ..\..\Debug-mono-x64\ - TRACE;DEBUG;MONO - full - x64 - prompt - MinimumRecommendedRules.ruleset - 0 + + + TRACE + + true + - - ..\packages\AlphaFS.2.2.1\lib\net452\AlphaFS.dll - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\Mono.Data.Sqlite.dll - True - - - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Data.Portable.dll - True - - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Transactions.Portable.dll - True - - - - - - - + + + - - - - - + - - - - - - - {225a1afd-0890-44e8-b779-7502665c23a5} - SabreTools.Library - - - - - PreserveNewest - - - - - False - Microsoft .NET Framework 4.5.2 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - - \ No newline at end of file + + diff --git a/RombaSharp/config.xml b/RombaSharp/config.xml deleted file mode 100644 index 147695d9..00000000 --- a/RombaSharp/config.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - 4 - logs - tmp - web - bad - 1 - 4 - - - dats - db - - - - depot - 40000 - true - - - - 4003 - - \ No newline at end of file diff --git a/RombaSharp/packages.config b/RombaSharp/packages.config deleted file mode 100644 index 6fc7388a..00000000 --- a/RombaSharp/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/SabreTools.Library/App.config b/SabreTools.Library/App.config deleted file mode 100644 index a6a2b7fa..00000000 --- a/SabreTools.Library/App.config +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index d10cfb96..924555b0 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -2,9 +2,9 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Text.RegularExpressions; using System.Threading.Tasks; -using System.Web; using SabreTools.Library.Data; using SabreTools.Library.FileTypes; using SabreTools.Library.DatItems; @@ -5095,7 +5095,7 @@ namespace SabreTools.Library.DatFiles string expName = name.Replace("/", " - ").Replace("\\", " - "); // Now set the new output values - datFile.FileName = HttpUtility.HtmlDecode(String.IsNullOrWhiteSpace(name) + datFile.FileName = WebUtility.HtmlDecode(String.IsNullOrWhiteSpace(name) ? FileName : (shortname ? Path.GetFileName(name) @@ -6039,7 +6039,7 @@ namespace SabreTools.Library.DatFiles DatFile lastdirdat = new DatFile { - FileName = "DIR: " + HttpUtility.HtmlEncode(lastdir), + FileName = "DIR: " + WebUtility.HtmlEncode(lastdir), _datStats = dirStats, }; @@ -6091,7 +6091,7 @@ namespace SabreTools.Library.DatFiles { DatFile dirdat = new DatFile { - FileName = "DIR: " + HttpUtility.HtmlEncode(lastdir), + FileName = "DIR: " + WebUtility.HtmlEncode(lastdir), _datStats = dirStats, }; diff --git a/SabreTools.Library/DatFiles/Listxml.cs b/SabreTools.Library/DatFiles/Listxml.cs index d10014a3..4b318808 100644 --- a/SabreTools.Library/DatFiles/Listxml.cs +++ b/SabreTools.Library/DatFiles/Listxml.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; +using System.Net; using System.Text; -using System.Web; using System.Xml; using SabreTools.Library.Data; using SabreTools.Library.DatItems; @@ -660,7 +660,7 @@ namespace SabreTools.Library.DatFiles try { string header = "\n" + - "\n\n"; @@ -694,7 +694,7 @@ namespace SabreTools.Library.DatFiles rom.MachineName = rom.MachineName.Substring(1); } - string state = "\t\n" - + (!ExcludeFields[(int)Field.Description] ? "\t\t" + HttpUtility.HtmlEncode(rom.MachineDescription) + "\n" : "") - + (!ExcludeFields[(int)Field.Year] && rom.Year != null ? "\t\t" + HttpUtility.HtmlEncode(rom.Year) + "\n" : "") - + (!ExcludeFields[(int)Field.Publisher] && rom.Publisher != null ? "\t\t" + HttpUtility.HtmlEncode(rom.Publisher) + "\n" : ""); + + (!ExcludeFields[(int)Field.Description] ? "\t\t" + WebUtility.HtmlEncode(rom.MachineDescription) + "\n" : "") + + (!ExcludeFields[(int)Field.Year] && rom.Year != null ? "\t\t" + WebUtility.HtmlEncode(rom.Year) + "\n" : "") + + (!ExcludeFields[(int)Field.Publisher] && rom.Publisher != null ? "\t\t" + WebUtility.HtmlEncode(rom.Publisher) + "\n" : ""); if (!ExcludeFields[(int)Field.Infos] && rom.Infos != null && rom.Infos.Count > 0) { foreach (Tuple kvp in rom.Infos) { - state += "\t\t\n"; + state += "\t\t\n"; } } @@ -788,15 +788,15 @@ namespace SabreTools.Library.DatFiles case ItemType.Archive: break; case ItemType.BiosSet: // TODO: Separate out MachineDescription from Description - state += "\t\t\n"; break; case ItemType.Disk: - state += "\t\t\n"; break; case ItemType.Sample: - state += "\t\t\n"; break; } diff --git a/SabreTools.Library/DatFiles/Logiqx.cs b/SabreTools.Library/DatFiles/Logiqx.cs index 39de4829..120286ef 100644 --- a/SabreTools.Library/DatFiles/Logiqx.cs +++ b/SabreTools.Library/DatFiles/Logiqx.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Text; using System.Text.RegularExpressions; -using System.Web; using System.Xml; using SabreTools.Library.Data; using SabreTools.Library.DatItems; @@ -752,18 +752,18 @@ namespace SabreTools.Library.DatFiles "\n\n" + "\n" + "\t
\n" + - "\t\t" + HttpUtility.HtmlEncode(Name) + "\n" + - "\t\t" + HttpUtility.HtmlEncode(Description) + "\n" + - (!String.IsNullOrWhiteSpace(RootDir) ? "\t\t" + HttpUtility.HtmlEncode(RootDir) + "\n" : "") + - (!String.IsNullOrWhiteSpace(Category) ? "\t\t" + HttpUtility.HtmlEncode(Category) + "\n" : "") + - "\t\t" + HttpUtility.HtmlEncode(Version) + "\n" + - (!String.IsNullOrWhiteSpace(Date) ? "\t\t" + HttpUtility.HtmlEncode(Date) + "\n" : "") + - "\t\t" + HttpUtility.HtmlEncode(Author) + "\n" + - (!String.IsNullOrWhiteSpace(Email) ? "\t\t" + HttpUtility.HtmlEncode(Email) + "\n" : "") + - (!String.IsNullOrWhiteSpace(Homepage) ? "\t\t" + HttpUtility.HtmlEncode(Homepage) + "\n" : "") + - (!String.IsNullOrWhiteSpace(Url) ? "\t\t" + HttpUtility.HtmlEncode(Url) + "\n" : "") + - (!String.IsNullOrWhiteSpace(Comment) ? "\t\t" + HttpUtility.HtmlEncode(Comment) + "\n" : "") + - (!String.IsNullOrWhiteSpace(Type) ? "\t\t" + HttpUtility.HtmlEncode(Type) + "\n" : "") + + "\t\t" + WebUtility.HtmlEncode(Name) + "\n" + + "\t\t" + WebUtility.HtmlEncode(Description) + "\n" + + (!String.IsNullOrWhiteSpace(RootDir) ? "\t\t" + WebUtility.HtmlEncode(RootDir) + "\n" : "") + + (!String.IsNullOrWhiteSpace(Category) ? "\t\t" + WebUtility.HtmlEncode(Category) + "\n" : "") + + "\t\t" + WebUtility.HtmlEncode(Version) + "\n" + + (!String.IsNullOrWhiteSpace(Date) ? "\t\t" + WebUtility.HtmlEncode(Date) + "\n" : "") + + "\t\t" + WebUtility.HtmlEncode(Author) + "\n" + + (!String.IsNullOrWhiteSpace(Email) ? "\t\t" + WebUtility.HtmlEncode(Email) + "\n" : "") + + (!String.IsNullOrWhiteSpace(Homepage) ? "\t\t" + WebUtility.HtmlEncode(Homepage) + "\n" : "") + + (!String.IsNullOrWhiteSpace(Url) ? "\t\t" + WebUtility.HtmlEncode(Url) + "\n" : "") + + (!String.IsNullOrWhiteSpace(Comment) ? "\t\t" + WebUtility.HtmlEncode(Comment) + "\n" : "") + + (!String.IsNullOrWhiteSpace(Type) ? "\t\t" + WebUtility.HtmlEncode(Type) + "\n" : "") + (ForcePacking != ForcePacking.None || ForceMerging != ForceMerging.None || ForceNodump != ForceNodump.None || !String.IsNullOrWhiteSpace(Header) ? "\t\t\n" - + (!ExcludeFields[(int)Field.Comment] && !String.IsNullOrWhiteSpace(rom.Comment) ? "\t\t" + HttpUtility.HtmlEncode(rom.Comment) + "\n" : "") - + (!ExcludeFields[(int)Field.Description] ? "\t\t" + HttpUtility.HtmlEncode((String.IsNullOrWhiteSpace(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) + "\n" : "") - + (!ExcludeFields[(int)Field.Year] && !String.IsNullOrWhiteSpace(rom.Year) ? "\t\t" + HttpUtility.HtmlEncode(rom.Year) + "\n" : "") - + (!ExcludeFields[(int)Field.Publisher] && !String.IsNullOrWhiteSpace(rom.Publisher) ? "\t\t" + HttpUtility.HtmlEncode(rom.Publisher) + "\n" : "") - + (!ExcludeFields[(int)Field.Manufacturer] && !String.IsNullOrWhiteSpace(rom.Manufacturer) ? "\t\t" + HttpUtility.HtmlEncode(rom.Manufacturer) + "\n" : ""); + + (!ExcludeFields[(int)Field.Comment] && !String.IsNullOrWhiteSpace(rom.Comment) ? "\t\t" + WebUtility.HtmlEncode(rom.Comment) + "\n" : "") + + (!ExcludeFields[(int)Field.Description] ? "\t\t" + WebUtility.HtmlEncode((String.IsNullOrWhiteSpace(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) + "\n" : "") + + (!ExcludeFields[(int)Field.Year] && !String.IsNullOrWhiteSpace(rom.Year) ? "\t\t" + WebUtility.HtmlEncode(rom.Year) + "\n" : "") + + (!ExcludeFields[(int)Field.Publisher] && !String.IsNullOrWhiteSpace(rom.Publisher) ? "\t\t" + WebUtility.HtmlEncode(rom.Publisher) + "\n" : "") + + (!ExcludeFields[(int)Field.Manufacturer] && !String.IsNullOrWhiteSpace(rom.Manufacturer) ? "\t\t" + WebUtility.HtmlEncode(rom.Manufacturer) + "\n" : ""); sw.Write(state); sw.Flush(); @@ -894,19 +894,19 @@ namespace SabreTools.Library.DatFiles switch (rom.ItemType) { case ItemType.Archive: - state += "\t\t\n"; break; case ItemType.BiosSet: - state += "\t\t\n"; break; case ItemType.Disk: - state += "\t\t\n"; break; case ItemType.Release: - state += "\t\t\n"; break; case ItemType.Rom: - state += "\t\t\n"; break; case ItemType.Sample: - state += "\t\t\n"; break; } diff --git a/SabreTools.Library/DatFiles/OfflineList.cs b/SabreTools.Library/DatFiles/OfflineList.cs index 9730e1d2..f206af4c 100644 --- a/SabreTools.Library/DatFiles/OfflineList.cs +++ b/SabreTools.Library/DatFiles/OfflineList.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; +using System.Net; using System.Text; -using System.Web; using System.Xml; using SabreTools.Library.Data; using SabreTools.Library.DatItems; @@ -856,7 +856,7 @@ namespace SabreTools.Library.DatFiles string header = "\n" + "\n" + "\t\n" - + "\t\t" + HttpUtility.HtmlEncode(Name) + "\n" + + "\t\t" + WebUtility.HtmlEncode(Name) + "\n" + "\t\t" + Count + "\n" + "\t\tnone\n" + "\t\t240\n" @@ -880,9 +880,9 @@ namespace SabreTools.Library.DatFiles + "\t\t\t.bin\n" + "\t\t\n" + "\t\t\n" - + "\t\t\t" + HttpUtility.HtmlEncode(Url) + "\n" - + "\t\t\t" + HttpUtility.HtmlEncode(Url) + "\n" - + "\t\t\t" + HttpUtility.HtmlEncode(Url) + "\n" + + "\t\t\t" + WebUtility.HtmlEncode(Url) + "\n" + + "\t\t\t" + WebUtility.HtmlEncode(Url) + "\n" + + "\t\t\t" + WebUtility.HtmlEncode(Url) + "\n" + "\t\t\n" + "\t\t\n" + "\t\t\t\n" @@ -959,7 +959,7 @@ namespace SabreTools.Library.DatFiles state += "\t\t\n" + "\t\t\t1\n" + "\t\t\t1\n" - + "\t\t\t" + (!ExcludeFields[(int)Field.Name] ? HttpUtility.HtmlEncode(rom.Name) : "") + "\n" + + "\t\t\t" + (!ExcludeFields[(int)Field.Name] ? WebUtility.HtmlEncode(rom.Name) : "") + "\n" + "\t\t\tNone\n"; if (rom.ItemType == ItemType.Rom) diff --git a/SabreTools.Library/DatFiles/OpenMSX.cs b/SabreTools.Library/DatFiles/OpenMSX.cs index ba2d176e..2991ea4f 100644 --- a/SabreTools.Library/DatFiles/OpenMSX.cs +++ b/SabreTools.Library/DatFiles/OpenMSX.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; +using System.Net; using System.Text; -using System.Web; using System.Xml; using SabreTools.Library.Data; using SabreTools.Library.DatItems; @@ -661,7 +661,7 @@ Generation MSXIDs by www.generation-msx.nl } string state = "\n" - + "\t" + (!ExcludeFields[(int)Field.MachineName] ? HttpUtility.HtmlEncode(rom.MachineName) : "") + "\n" + + "\t" + (!ExcludeFields[(int)Field.MachineName] ? WebUtility.HtmlEncode(rom.MachineName) : "") + "\n" // + "\t" + msxid + "\n" // + "\t" + system + "\n" + "\t" + (!ExcludeFields[(int)Field.Manufacturer] ? rom.Manufacturer : "") + "\n" diff --git a/SabreTools.Library/DatFiles/RomCenter.cs b/SabreTools.Library/DatFiles/RomCenter.cs index 43f7afb5..b0b16077 100644 --- a/SabreTools.Library/DatFiles/RomCenter.cs +++ b/SabreTools.Library/DatFiles/RomCenter.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; +using System.Net; using System.Text; -using System.Web; using SabreTools.Library.Data; using SabreTools.Library.DatItems; using SabreTools.Library.Tools; @@ -344,21 +344,21 @@ namespace SabreTools.Library.DatFiles if (rom.ItemType == ItemType.Rom) { - state += "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? HttpUtility.HtmlEncode(rom.CloneOf) : "") + - "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? HttpUtility.HtmlEncode(rom.CloneOf) : "") + - "¬" + (!ExcludeFields[(int)Field.MachineName] ? HttpUtility.HtmlEncode(rom.MachineName) : "") + - "¬" + (!ExcludeFields[(int)Field.Description] ? HttpUtility.HtmlEncode((String.IsNullOrWhiteSpace(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) : "") + - "¬" + (!ExcludeFields[(int)Field.Name] ? HttpUtility.HtmlEncode(rom.Name) : "") + + state += "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? WebUtility.HtmlEncode(rom.CloneOf) : "") + + "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? WebUtility.HtmlEncode(rom.CloneOf) : "") + + "¬" + (!ExcludeFields[(int)Field.MachineName] ? WebUtility.HtmlEncode(rom.MachineName) : "") + + "¬" + (!ExcludeFields[(int)Field.Description] ? WebUtility.HtmlEncode((String.IsNullOrWhiteSpace(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) : "") + + "¬" + (!ExcludeFields[(int)Field.Name] ? WebUtility.HtmlEncode(rom.Name) : "") + "¬" + (!ExcludeFields[(int)Field.CRC] ? ((Rom)rom).CRC.ToLowerInvariant() : "") + "¬" + (!ExcludeFields[(int)Field.Size] && ((Rom)rom).Size != -1 ? ((Rom)rom).Size.ToString() : "") + "¬¬¬\n"; } else if (rom.ItemType == ItemType.Disk) { - state += "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? HttpUtility.HtmlEncode(rom.CloneOf) : "") + - "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? HttpUtility.HtmlEncode(rom.CloneOf) : "") + - "¬" + (!ExcludeFields[(int)Field.MachineName] ? HttpUtility.HtmlEncode(rom.MachineName) : "") + - "¬" + (!ExcludeFields[(int)Field.Description] ? HttpUtility.HtmlEncode((String.IsNullOrWhiteSpace(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) : "") + - "¬" + (!ExcludeFields[(int)Field.Name] ? HttpUtility.HtmlEncode(rom.Name) : "") + + state += "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? WebUtility.HtmlEncode(rom.CloneOf) : "") + + "¬" + (!ExcludeFields[(int)Field.CloneOf] && String.IsNullOrWhiteSpace(rom.CloneOf) ? WebUtility.HtmlEncode(rom.CloneOf) : "") + + "¬" + (!ExcludeFields[(int)Field.MachineName] ? WebUtility.HtmlEncode(rom.MachineName) : "") + + "¬" + (!ExcludeFields[(int)Field.Description] ? WebUtility.HtmlEncode((String.IsNullOrWhiteSpace(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) : "") + + "¬" + (!ExcludeFields[(int)Field.Name] ? WebUtility.HtmlEncode(rom.Name) : "") + "¬¬¬¬¬\n"; } diff --git a/SabreTools.Library/DatFiles/SabreDat.cs b/SabreTools.Library/DatFiles/SabreDat.cs index 41f0f669..a7353c7a 100644 --- a/SabreTools.Library/DatFiles/SabreDat.cs +++ b/SabreTools.Library/DatFiles/SabreDat.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Text; -using System.Web; using System.Xml; using SabreTools.Library.Data; using SabreTools.Library.DatItems; @@ -660,17 +660,17 @@ namespace SabreTools.Library.DatFiles "\n\n" + "\n" + "\t
\n" + - "\t\t" + HttpUtility.HtmlEncode(Name) + "\n" + - "\t\t" + HttpUtility.HtmlEncode(Description) + "\n" + - (!String.IsNullOrWhiteSpace(RootDir) ? "\t\t" + HttpUtility.HtmlEncode(RootDir) + "\n" : "") + - (!String.IsNullOrWhiteSpace(Category) ? "\t\t" + HttpUtility.HtmlEncode(Category) + "\n" : "") + - "\t\t" + HttpUtility.HtmlEncode(Version) + "\n" + - (!String.IsNullOrWhiteSpace(Date) ? "\t\t" + HttpUtility.HtmlEncode(Date) + "\n" : "") + - "\t\t" + HttpUtility.HtmlEncode(Author) + "\n" + - (!String.IsNullOrWhiteSpace(Comment) ? "\t\t" + HttpUtility.HtmlEncode(Comment) + "\n" : "") + + "\t\t" + WebUtility.HtmlEncode(Name) + "\n" + + "\t\t" + WebUtility.HtmlEncode(Description) + "\n" + + (!String.IsNullOrWhiteSpace(RootDir) ? "\t\t" + WebUtility.HtmlEncode(RootDir) + "\n" : "") + + (!String.IsNullOrWhiteSpace(Category) ? "\t\t" + WebUtility.HtmlEncode(Category) + "\n" : "") + + "\t\t" + WebUtility.HtmlEncode(Version) + "\n" + + (!String.IsNullOrWhiteSpace(Date) ? "\t\t" + WebUtility.HtmlEncode(Date) + "\n" : "") + + "\t\t" + WebUtility.HtmlEncode(Author) + "\n" + + (!String.IsNullOrWhiteSpace(Comment) ? "\t\t" + WebUtility.HtmlEncode(Comment) + "\n" : "") + (!String.IsNullOrWhiteSpace(Type) || ForcePacking != ForcePacking.None || ForceMerging != ForceMerging.None || ForceNodump != ForceNodump.None ? "\t\t\n" + - (!String.IsNullOrWhiteSpace(Type) ? "\t\t\t\n" : "") + + (!String.IsNullOrWhiteSpace(Type) ? "\t\t\t\n" : "") + (ForcePacking == ForcePacking.Unzip ? "\t\t\t\n" : "") + (ForcePacking == ForcePacking.Zip ? "\t\t\t\n" : "") + (ForceMerging == ForceMerging.Full ? "\t\t\t\n" : "") + @@ -725,8 +725,8 @@ namespace SabreTools.Library.DatFiles { state += "\t"; } - state += "\n"; + state += "\n"; } depth = depth - (last == -1 ? 0 : last) + newsplit.Count; @@ -833,19 +833,19 @@ namespace SabreTools.Library.DatFiles switch (rom.ItemType) { case ItemType.Archive: - state += "\n"; break; case ItemType.BiosSet: - state += "\n"; break; case ItemType.Disk: - state += "\n" : "/>\n"); break; case ItemType.Release: - state += "\n"; break; case ItemType.Rom: - state += "\n" : "/>\n"); break; case ItemType.Sample: - state += "\n"; break; } diff --git a/SabreTools.Library/DatFiles/SoftwareList.cs b/SabreTools.Library/DatFiles/SoftwareList.cs index 0fca4983..dc40d620 100644 --- a/SabreTools.Library/DatFiles/SoftwareList.cs +++ b/SabreTools.Library/DatFiles/SoftwareList.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; +using System.Net; using System.Text; -using System.Web; using System.Xml; using SabreTools.Library.Data; using SabreTools.Library.DatItems; @@ -668,8 +668,8 @@ namespace SabreTools.Library.DatFiles { string header = "\n" + "\n\n" + - "\n" : "") - + (!ExcludeFields[(int)Field.Description] ? "\t\t" + HttpUtility.HtmlEncode(rom.MachineDescription) + "\n" : "") - + (!ExcludeFields[(int)Field.Year] && rom.Year != null ? "\t\t" + HttpUtility.HtmlEncode(rom.Year) + "\n" : "") - + (!ExcludeFields[(int)Field.Publisher] && rom.Publisher != null ? "\t\t" + HttpUtility.HtmlEncode(rom.Publisher) + "\n" : ""); + + (!ExcludeFields[(int)Field.Description] ? "\t\t" + WebUtility.HtmlEncode(rom.MachineDescription) + "\n" : "") + + (!ExcludeFields[(int)Field.Year] && rom.Year != null ? "\t\t" + WebUtility.HtmlEncode(rom.Year) + "\n" : "") + + (!ExcludeFields[(int)Field.Publisher] && rom.Publisher != null ? "\t\t" + WebUtility.HtmlEncode(rom.Publisher) + "\n" : ""); if (!ExcludeFields[(int)Field.Infos]) { foreach (Tuple kvp in rom.Infos) { - state += "\t\t\n"; + state += "\t\t\n"; } } @@ -792,7 +792,7 @@ namespace SabreTools.Library.DatFiles { foreach (Tuple kvp in rom.Features) { - state += "\t\t\t\n"; + state += "\t\t\t\n"; } } @@ -801,7 +801,7 @@ namespace SabreTools.Library.DatFiles case ItemType.Disk: state += "\t\t\t\n" - + "\t\t\t\t\n" - + "\t\t\t\t" + HttpUtility.HtmlEncode(_datFile.FileName.Remove(0, 5)) - : ">" + HttpUtility.HtmlEncode(_datFile.FileName)) + "" + ? " class=\"dir\">" + WebUtility.HtmlEncode(_datFile.FileName.Remove(0, 5)) + : ">" + WebUtility.HtmlEncode(_datFile.FileName)) + "" + "" + Utilities.GetBytesReadable(_datFile.TotalSize) + "" + "" + (game == -1 ? _datFile.Keys.Count() : game) + "" + "" + _datFile.RomCount + "" diff --git a/SabreTools.Library/SabreTools.Library.csproj b/SabreTools.Library/SabreTools.Library.csproj index 5460d906..5f4e4800 100644 --- a/SabreTools.Library/SabreTools.Library.csproj +++ b/SabreTools.Library/SabreTools.Library.csproj @@ -1,210 +1,130 @@ - - - + + - Debug - x64 - {225A1AFD-0890-44E8-B779-7502665C23A5} - Library - Properties - SabreTools.Library - SabreTools.Library - v4.6.2 - 512 - - - + net462;netstandard2.0 + Debug;Release;Mono + AnyCPU;x64 - - true - ..\..\Debug-x64 + + + DEBUG;TRACE;MONO + false + + 3 + + + + DEBUG;TRACE;MONO + + false + + + DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset + false + + 3 - - ..\..\Release-x64 + + + DEBUG;TRACE + + false + + + TRACE true - - - x64 - prompt - MinimumRecommendedRules.ruleset + + 3 - - true - ..\..\Debug-mono-x64\ - TRACE;DEBUG;MONO - full - x64 - prompt - MinimumRecommendedRules.ruleset - - - OnBuildSuccess + + + TRACE + + true + - - ..\packages\AlphaFS.2.2.1\lib\net452\AlphaFS.dll - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\Mono.Data.Sqlite.dll - True - - - ..\packages\SevenZipSharp.0.64\lib\SevenZipSharp.dll - - - ..\packages\SharpCompress.0.20.0\lib\net45\SharpCompress.dll - - - - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Data.Portable.dll - True - - - - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Transactions.Portable.dll - True - - - ..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - - Always - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - + Always - + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + Always - - - - - - - - \ No newline at end of file + + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + diff --git a/SabreTools.Library/Tools/Utilities.cs b/SabreTools.Library/Tools/Utilities.cs index 9f011b27..06a25ca5 100644 --- a/SabreTools.Library/Tools/Utilities.cs +++ b/SabreTools.Library/Tools/Utilities.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Reflection; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; -using System.Web; using System.Xml; using System.Xml.Schema; @@ -2472,7 +2472,7 @@ namespace SabreTools.Library.Tools || (c >= 0xE000 && c <= 0xFFFD) || (c >= 0x10000 && c <= 0x10FFFF) ? c - : HttpUtility.HtmlEncode(c)[0])) + : WebUtility.HtmlEncode(c.ToString())[0])) .ToArray()); } @@ -2623,7 +2623,7 @@ namespace SabreTools.Library.Tools key = "null"; } - key = HttpUtility.HtmlEncode(key); + key = WebUtility.HtmlEncode(key); break; case SortedBy.MD5: key = (item.ItemType == ItemType.Rom diff --git a/SabreTools.Library/packages.config b/SabreTools.Library/packages.config deleted file mode 100644 index d460f786..00000000 --- a/SabreTools.Library/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/SabreTools.sln b/SabreTools.sln index 14e0c1a7..4edde350 100644 --- a/SabreTools.sln +++ b/SabreTools.sln @@ -3,39 +3,63 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26228.10 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Library", "SabreTools.Library\SabreTools.Library.csproj", "{225A1AFD-0890-44E8-B779-7502665C23A5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SabreTools.Library", "SabreTools.Library\SabreTools.Library.csproj", "{CA54EDF8-100F-46E7-933C-0E081C7FCBD3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools", "SabreTools\SabreTools.csproj", "{3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RombaSharp", "RombaSharp\RombaSharp.csproj", "{99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RombaSharp", "RombaSharp\RombaSharp.csproj", "{4728D479-8CFB-43E9-8C63-4774C6D73200}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SabreTools", "SabreTools\SabreTools.csproj", "{A7F4C9D8-C086-4296-9BD3-637CF9C78F51}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + Mono|Any CPU = Mono|Any CPU Mono|x64 = Mono|x64 + Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {225A1AFD-0890-44E8-B779-7502665C23A5}.Debug|x64.ActiveCfg = Debug|x64 - {225A1AFD-0890-44E8-B779-7502665C23A5}.Debug|x64.Build.0 = Debug|x64 - {225A1AFD-0890-44E8-B779-7502665C23A5}.Mono|x64.ActiveCfg = Mono|x64 - {225A1AFD-0890-44E8-B779-7502665C23A5}.Mono|x64.Build.0 = Mono|x64 - {225A1AFD-0890-44E8-B779-7502665C23A5}.Release|x64.ActiveCfg = Release|x64 - {225A1AFD-0890-44E8-B779-7502665C23A5}.Release|x64.Build.0 = Release|x64 - {3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Debug|x64.ActiveCfg = Debug|x64 - {3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Debug|x64.Build.0 = Debug|x64 - {3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Mono|x64.ActiveCfg = Mono|x64 - {3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Mono|x64.Build.0 = Mono|x64 - {3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Release|x64.ActiveCfg = Release|x64 - {3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Release|x64.Build.0 = Release|x64 - {4728D479-8CFB-43E9-8C63-4774C6D73200}.Debug|x64.ActiveCfg = Debug|x64 - {4728D479-8CFB-43E9-8C63-4774C6D73200}.Debug|x64.Build.0 = Debug|x64 - {4728D479-8CFB-43E9-8C63-4774C6D73200}.Mono|x64.ActiveCfg = Mono|x64 - {4728D479-8CFB-43E9-8C63-4774C6D73200}.Mono|x64.Build.0 = Mono|x64 - {4728D479-8CFB-43E9-8C63-4774C6D73200}.Release|x64.ActiveCfg = Release|x64 - {4728D479-8CFB-43E9-8C63-4774C6D73200}.Release|x64.Build.0 = Release|x64 + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Debug|x64.ActiveCfg = Debug|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Debug|x64.Build.0 = Debug|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Mono|Any CPU.ActiveCfg = Mono|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Mono|Any CPU.Build.0 = Mono|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Mono|x64.ActiveCfg = Mono|x64 + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Mono|x64.Build.0 = Mono|x64 + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Release|Any CPU.Build.0 = Release|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Release|x64.ActiveCfg = Release|Any CPU + {CA54EDF8-100F-46E7-933C-0E081C7FCBD3}.Release|x64.Build.0 = Release|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Debug|x64.ActiveCfg = Debug|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Debug|x64.Build.0 = Debug|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Mono|Any CPU.ActiveCfg = Mono|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Mono|Any CPU.Build.0 = Mono|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Mono|x64.ActiveCfg = Mono|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Mono|x64.Build.0 = Mono|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Release|Any CPU.Build.0 = Release|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Release|x64.ActiveCfg = Release|Any CPU + {99B5AAC0-A92C-4FD8-82B6-F82B44D7279D}.Release|x64.Build.0 = Release|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Debug|x64.ActiveCfg = Debug|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Debug|x64.Build.0 = Debug|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Mono|Any CPU.ActiveCfg = Mono|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Mono|Any CPU.Build.0 = Mono|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Mono|x64.ActiveCfg = Mono|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Mono|x64.Build.0 = Mono|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Release|Any CPU.Build.0 = Release|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Release|x64.ActiveCfg = Release|Any CPU + {A7F4C9D8-C086-4296-9BD3-637CF9C78F51}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CACC9A3E-7E44-4480-8D6D-9EA84B789A45} + EndGlobalSection EndGlobal diff --git a/SabreTools/App.config b/SabreTools/App.config deleted file mode 100644 index 8ac9fce8..00000000 --- a/SabreTools/App.config +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/SabreTools/Properties/AssemblyInfo.cs b/SabreTools/Properties/AssemblyInfo.cs deleted file mode 100644 index 89cd2b66..00000000 --- a/SabreTools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SabreTools")] -[assembly: AssemblyDescription("DAT manipulation toolset")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SabreTools")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3b615702-1866-4d7b-8af1-7b43fd0cc1d0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SabreTools/SabreTools.csproj b/SabreTools/SabreTools.csproj index f6636536..264ec874 100644 --- a/SabreTools/SabreTools.csproj +++ b/SabreTools/SabreTools.csproj @@ -1,129 +1,57 @@ - - - + + - Debug - x64 - {3B615702-1866-4D7B-8AF1-7B43FD0CC1D0} Exe - Properties - SabreTools - SabreTools - v4.6.2 - 512 - true - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - + net462;netcoreapp2.1 + Debug;Release;Mono + AnyCPU;x64 - - true - ..\..\Debug-x64\ - TRACE;DEBUG - full - x64 - prompt - MinimumRecommendedRules.ruleset - true + + + DEBUG;TRACE;MONO + false + + 4 - - ..\..\Release-x64\ + + + DEBUG;TRACE;MONO + + false + + + + DEBUG;TRACE + false + + 3 + + + + DEBUG;TRACE + + false + + + TRACE true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - true + + 3 - - true - ..\..\Debug-mono-x64\ - TRACE;DEBUG;MONO - full - x64 - prompt - MinimumRecommendedRules.ruleset + + + TRACE + + true + - - ..\packages\AlphaFS.2.2.1\lib\net452\AlphaFS.dll - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\Mono.Data.Sqlite.dll - True - - - ..\packages\SharpCompress.0.20.0\lib\net45\SharpCompress.dll - - - - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Data.Portable.dll - True - - - - - - ..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Transactions.Portable.dll - True - - - - - - - + + - - - - + - - - - - - - {225a1afd-0890-44e8-b779-7502665c23a5} - SabreTools.Library - - - - - False - Microsoft .NET Framework 4.5.2 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - \ No newline at end of file + + diff --git a/SabreTools/packages.config b/SabreTools/packages.config deleted file mode 100644 index 9e0c4ec7..00000000 --- a/SabreTools/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 45029609..f797b0d5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ build: # post-build step after_build: -- 7z a sabretools_%CONFIGURATION%-%PLATFORM%.zip C:\projects\Debug*\ +- 7z a sabretools_%CONFIGURATION%-%PLATFORM%.zip SabreTools/bin/* # artifact linking artifacts: