5.2.1 - Progress + Debug Fix
This commit is contained in:
parent
55fe83c714
commit
672b2133f6
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Costura />
|
||||
</Weavers>
|
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCompression" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCleanup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -11,6 +12,8 @@
|
|||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -35,6 +38,9 @@
|
|||
<ApplicationIcon>Chaos_Orb.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Costura, Version=3.2.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Costura.Fody.3.2.1\lib\net40\Costura.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -62,4 +68,12 @@
|
|||
<Content Include="Chaos_Orb.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Fody.3.3.3\build\Fody.targets" Condition="Exists('..\packages\Fody.3.3.3\build\Fody.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Fody.3.3.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.3.3\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props'))" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -17,14 +17,20 @@ namespace PoE_MxFilterGen
|
|||
{
|
||||
private static DateTime dt = DateTime.Now;
|
||||
|
||||
public static string version = "5.0.0";
|
||||
public static string version = "5.2.1";
|
||||
public static string fDate = string.Format("{0}-{1}-{2}", dt.Day, dt.Month, dt.Year);
|
||||
|
||||
public static string section = "";
|
||||
public static string league = "";
|
||||
public static string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
|
||||
private static string giturl = json.settings.GetGIT();
|
||||
public static int fprog = 0;
|
||||
public static int ftotal = 0;
|
||||
|
||||
public static int sprog = 0;
|
||||
public static int stotal = 0;
|
||||
|
||||
private static string giturl = "";
|
||||
|
||||
public class REMVAR
|
||||
{
|
||||
|
@ -52,13 +58,21 @@ namespace PoE_MxFilterGen
|
|||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Check for the settings json
|
||||
if (!File.Exists("settings.json"))
|
||||
{
|
||||
msg.CMW("ERROR: settings.json not found! Downloading a template...", true, 3);
|
||||
web.DownloadFile("https://data.mxnet.xyz/poe/json/mxfiltergen_temp_settings.json", "settings.json");
|
||||
}
|
||||
|
||||
web.DownloadFile("https://data.mxnet.xyz/poe/bin/mxfiltergen_updater.exe", "PoE-MxFilterGen-Updater.exe");
|
||||
|
||||
msg.Splash();
|
||||
|
||||
// Get current league from MxD
|
||||
var ls = web.ReadString("https://data.mxnet.xyz/poe/json/mxfiltergen_var.json");
|
||||
REMVAR lj = JsonConvert.DeserializeObject<REMVAR>(ls);
|
||||
league = lj.league;
|
||||
msg.CMW(league, true, 1);
|
||||
league = lj.league;
|
||||
|
||||
msg.CMW(string.Format("GIT: {0}", json.settings.GetGIT()), true, 1);
|
||||
msg.CMW(string.Format("API: {0}", json.settings.GetAPI()), true, 1);
|
||||
|
@ -69,6 +83,8 @@ namespace PoE_MxFilterGen
|
|||
msg.CMW(string.Format("Verbose: {0}", json.settings.GetVerbose().ToString()), true, 1);
|
||||
msg.CMW(string.Format("Strict: {0}", json.settings.GetStrict().ToString()), true, 1);
|
||||
|
||||
giturl = json.settings.GetGIT();
|
||||
|
||||
// Check for updates
|
||||
string remote_version = web.ReadString(@"https://data.mxnet.xyz/poe/txt/mxfiltergen_version.txt");
|
||||
if (version != remote_version)
|
||||
|
@ -76,7 +92,7 @@ namespace PoE_MxFilterGen
|
|||
Process.Start("PoE-MxFilterGen-Updater.exe");
|
||||
//Process.GetCurrentProcess().Kill();
|
||||
} else
|
||||
{
|
||||
{
|
||||
// Check if all the required dir exists
|
||||
msg.CMW($"Checking for required dirs...",true,1);
|
||||
if (!Directory.Exists(@"data\"))
|
||||
|
@ -136,11 +152,14 @@ namespace PoE_MxFilterGen
|
|||
// Read the structure one by one to process gen
|
||||
// Generator (dlls) are downloaded from the web and executed in a separate AppDomain before the AD is unloaded to execute a new generator.
|
||||
// As we CAN'T unload an assembly, using AppDomains is the only way we can load/unload multiple assembly in a row.
|
||||
msg.CMW($@"Generating the filter using {j.structures.Count} data...", true, 1);
|
||||
msg.CMW($@"Generating the filter using {j.structures.Count} source(s)...", true, 1);
|
||||
ftotal = j.structures.Count;
|
||||
foreach (var sec in j.structures)
|
||||
{
|
||||
if (sec.gen == true)
|
||||
{
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW(string.Format("REMOTE_GEN {0}", sec.section), true, 1);
|
||||
web.DownloadFile($@"{giturl}/PoE-MxFilter-Structure/master/{structure_name}/{sec.section}.dll", $@"structure\{sec.section}.dll");
|
||||
json.settings.WriteSection(sec.section);
|
||||
|
@ -160,6 +179,8 @@ namespace PoE_MxFilterGen
|
|||
}
|
||||
else
|
||||
{
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW($@"REMOTE_GET {sec.section}", true, 1);
|
||||
web.SaveString($@"{giturl}/PoE-MxFilter-Structure/master/{structure_name}/{sec.section}.filter", $"structure/{sec.section}.filter");
|
||||
}
|
||||
|
@ -189,8 +210,11 @@ namespace PoE_MxFilterGen
|
|||
msg.CMW($@"Downloading the latest sound...", true, 1);
|
||||
var sl = web.ReadString("https://data.mxnet.xyz/poe/json/mxfiltergen_sound.json");
|
||||
REMSND slj = JsonConvert.DeserializeObject<REMSND>(sl);
|
||||
stotal = slj.sound.Count;
|
||||
foreach (string s in slj.sound)
|
||||
{
|
||||
sprog = sprog + 1;
|
||||
msg.drawProgress(sprog, stotal);
|
||||
if (File.Exists($@"{path}\My Games\Path of Exile\{s}")) { File.Delete($@"{path}\My Games\Path of Exile\{s}"); }
|
||||
web.DownloadFile($"https://data.mxnet.xyz/poe/mp3/{s}",$@"{path}\My Games\Path of Exile\{s}");
|
||||
}
|
||||
|
|
|
@ -144,6 +144,56 @@ namespace PoE_MxFilterGen
|
|||
Console.ForegroundColor = ConsoleColor.White;
|
||||
}
|
||||
|
||||
public static void drawProgress(int progress, int total)
|
||||
{
|
||||
string seconds = "";
|
||||
string minutes = "";
|
||||
string hours = "";
|
||||
if (DateTime.Now.Second < 10)
|
||||
{
|
||||
seconds = String.Format("0{0}", DateTime.Now.Second);
|
||||
}
|
||||
else
|
||||
{
|
||||
seconds = DateTime.Now.Second.ToString();
|
||||
}
|
||||
|
||||
if (DateTime.Now.Minute < 10)
|
||||
{
|
||||
minutes = String.Format("0{0}", DateTime.Now.Minute);
|
||||
}
|
||||
else
|
||||
{
|
||||
minutes = DateTime.Now.Minute.ToString();
|
||||
}
|
||||
|
||||
if (DateTime.Now.Hour < 10)
|
||||
{
|
||||
hours = String.Format("0{0}", DateTime.Now.Hour);
|
||||
}
|
||||
else
|
||||
{
|
||||
hours = DateTime.Now.Hour.ToString();
|
||||
}
|
||||
string date = String.Format("{0}:{1}:{2}", hours, minutes, seconds);
|
||||
string beg = String.Format("[{0}] [", date);
|
||||
Console.ForegroundColor = ConsoleColor.Cyan;
|
||||
if (progress == 1)
|
||||
{
|
||||
Console.Write(beg);
|
||||
Console.CursorLeft = total+beg.Length;
|
||||
Console.Write("]");
|
||||
}
|
||||
Console.CursorLeft = (progress + beg.Length)-1;
|
||||
Console.Write($"#");
|
||||
Console.CursorLeft = beg.Length + total + 2;
|
||||
Console.Write($"{progress}/{total}");
|
||||
if (progress == total)
|
||||
{
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Splash()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Cyan;
|
||||
|
|
Binary file not shown.
|
@ -27,7 +27,6 @@ E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
|
|||
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
|
||||
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
|
||||
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
|
||||
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.dll
|
||||
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
|
||||
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
|
||||
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Costura.Fody" version="3.2.1" targetFramework="net452" />
|
||||
<package id="Fody" version="3.3.3" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
||||
</packages>
|
Loading…
Reference in New Issue