commit 2c9c623d633f85dabb90a7aa5ae4cbe6d59df6f7 Author: mikx Date: Thu Jan 29 20:19:13 2026 -0500 (1.0.0) first commit/release diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c4efe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,261 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/MxValUpdater.slnx b/MxValUpdater.slnx new file mode 100644 index 0000000..1e781b6 --- /dev/null +++ b/MxValUpdater.slnx @@ -0,0 +1,3 @@ + + + diff --git a/MxValUpdater/App.config b/MxValUpdater/App.config new file mode 100644 index 0000000..aee9adf --- /dev/null +++ b/MxValUpdater/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MxValUpdater/FodyWeavers.xml b/MxValUpdater/FodyWeavers.xml new file mode 100644 index 0000000..5029e70 --- /dev/null +++ b/MxValUpdater/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/MxValUpdater/FodyWeavers.xsd b/MxValUpdater/FodyWeavers.xsd new file mode 100644 index 0000000..f2dbece --- /dev/null +++ b/MxValUpdater/FodyWeavers.xsd @@ -0,0 +1,176 @@ + + + + + + + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead. + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + 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. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Controls if runtime assemblies are also embedded. + + + + + Controls whether the runtime assemblies are embedded with their full path or only with their assembly name. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events. + + + + + 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. + + + + + 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. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with |. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with |. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/MxValUpdater/Message.cs b/MxValUpdater/Message.cs new file mode 100644 index 0000000..b2483a4 --- /dev/null +++ b/MxValUpdater/Message.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MxValUpdater +{ + internal class Message + { + public static void CMW(string msg, bool time, int color) + { + DateTime now; + string str1; + int num; + if (DateTime.Now.Second < 10) + { + now = DateTime.Now; + str1 = string.Format("0{0}", (object)now.Second); + } + else + { + num = DateTime.Now.Second; + str1 = num.ToString(); + } + now = DateTime.Now; + string str2; + if (now.Minute < 10) + { + now = DateTime.Now; + str2 = string.Format("0{0}", (object)now.Minute); + } + else + { + now = DateTime.Now; + num = now.Minute; + str2 = num.ToString(); + } + now = DateTime.Now; + string str3; + if (now.Hour < 10) + { + now = DateTime.Now; + str3 = string.Format("0{0}", (object)now.Hour); + } + else + { + now = DateTime.Now; + num = now.Hour; + str3 = num.ToString(); + } + string str4 = string.Format("{0}:{1}:{2}", (object)str3, (object)str2, (object)str1); + ConsoleColor consoleColor = ConsoleColor.White; + switch (color) + { + case 1: + consoleColor = ConsoleColor.Cyan; + break; + case 2: + consoleColor = ConsoleColor.Green; + break; + case 3: + consoleColor = ConsoleColor.Red; + break; + } + if (time) + { + Console.ForegroundColor = consoleColor; + Console.WriteLine(string.Format("[{0}] {1}", (object)str4, (object)msg)); + } + else + { + Console.ForegroundColor = consoleColor; + Console.WriteLine(string.Format("")); + } + Console.ForegroundColor = ConsoleColor.White; + } + + public static void Splash(string progname, string dev) + { + Console.ForegroundColor = ConsoleColor.Cyan; + Console.WriteLine(""); + Console.WriteLine($"#### {progname}"); + Console.WriteLine(string.Format("#### VERSION: {0}", (object)Program.version)); + Console.WriteLine($"#### DEV: {dev}"); + Console.WriteLine("#### POWERED BY: MxMini"); + Console.WriteLine(""); + Console.ForegroundColor = ConsoleColor.White; + } + + + } +} diff --git a/MxValUpdater/MxValUpdater.csproj b/MxValUpdater/MxValUpdater.csproj new file mode 100644 index 0000000..044124c --- /dev/null +++ b/MxValUpdater/MxValUpdater.csproj @@ -0,0 +1,88 @@ + + + + + + Debug + AnyCPU + {2D00AA0A-025D-4CA0-9A91-0D3562A5912C} + Exe + MxValUpdater + MxValUpdater + v4.8.1 + 512 + true + true + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + favicon.ico + + + + ..\packages\Costura.Fody.6.0.0\lib\netstandard2.0\Costura.dll + + + ..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll + + + ..\packages\NuGet.Versioning.6.14.0\lib\net472\NuGet.Versioning.dll + + + + + + + + + + + + + ..\packages\Velopack.0.0.1298\lib\net462\Velopack.dll + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + \ No newline at end of file diff --git a/MxValUpdater/Program.cs b/MxValUpdater/Program.cs new file mode 100644 index 0000000..5650abb --- /dev/null +++ b/MxValUpdater/Program.cs @@ -0,0 +1,89 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using Velopack; + +namespace MxValUpdater +{ + public class File + { + public string name { get; set; } + } + + public class ModList + { + public string name { get; set; } + public string url { get; set; } + public List files { get; set; } + public string config { get; set; } + public bool directory { get; set; } + public string dir_name { get; set; } + } + + public class ListRoot + { + public string url { get; set; } + public List ModList { get; set; } + } + + internal class Program + { + public static string version = "1.0.0"; + static void Main(string[] args) + { + VelopackApp.Build().Run(); + + string path = @"BepInEx\plugins\"; + + WebClient wc = new WebClient(); + var RemoteList = wc.DownloadString("https://mxio.ovh/gaming/valheim/mxvalheim_updater.json"); + + ListRoot jls = JsonConvert.DeserializeObject(RemoteList); + + Message.Splash("MxValUpdater","mikx"); + + foreach (var m in jls.ModList) + { + Message.CMW($"Updating mod {m.name}...",true,1); + if (m.directory) { if (!Directory.Exists($"{path}{m.dir_name}")) { Directory.CreateDirectory($"{path}{m.dir_name}"); } } + foreach (var f in m.files) + { + if (m.directory) + { + Message.CMW($"Downloading {f.name}...", true, 2); + wc.DownloadFile($"{jls.url}{f.name}", $"{path}{m.dir_name}\\{f.name}"); + } else + { + Message.CMW($"Downloading {f.name}...", true, 2); + wc.DownloadFile($"{jls.url}{f.name}", $"{path}{f.name}"); + } + } + if (m.config != "") + { + Message.CMW($"Downloading {m.name} config(s)...", true, 2); + wc.DownloadFile($"{jls.url}config/{m.config}", $@"BepInEx\config\{m.config}"); + } + } + } + + public async Task UpdateApp() + { + var mgr = new UpdateManager("https://your-update-server.com/releases"); + var newVersion = await mgr.CheckForUpdatesAsync(); + + if (newVersion != null) + { + await mgr.DownloadUpdatesAsync(newVersion); + + // For .NET Framework, it's polite to ask the user first + // because the restart is immediate. + mgr.ApplyUpdatesAndRestart(newVersion); + } + } + } +} diff --git a/MxValUpdater/Properties/AssemblyInfo.cs b/MxValUpdater/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..24efbe1 --- /dev/null +++ b/MxValUpdater/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +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("MxValUpdater")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MxValUpdater")] +[assembly: AssemblyCopyright("Copyright © 2026")] +[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("2d00aa0a-025d-4ca0-9a91-0d3562a5912c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MxValUpdater/favicon.ico b/MxValUpdater/favicon.ico new file mode 100644 index 0000000..dde634d Binary files /dev/null and b/MxValUpdater/favicon.ico differ diff --git a/MxValUpdater/packages.config b/MxValUpdater/packages.config new file mode 100644 index 0000000..6e22fcc --- /dev/null +++ b/MxValUpdater/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2a8e48c --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +![logo](https://mxdev.ovh/wp-content/uploads/2025/09/mxdev-1.png) + +## MxValheim +Official MxValheim Mod & Config Updater. + +## Features +- Get the latest mod(s) and config(s) to play on **MxValheim**. + +## How-To Install +1. Download the latest zip. +2. Copy it to your client root dir. +3. Make a shortcut (MxValUpdater.exe) to your desktop, for faster updating. +4. Run it before launching Valheim in Steam. You will always be up-to-date! +5. Enjoy! \ No newline at end of file