[NAK_CVR_Mods] Update for NetStandard2.1

This commit is contained in:
NotAKidoS 2023-07-26 10:37:11 -05:00
parent 9cc9df8818
commit c83dc29f7d
2 changed files with 414 additions and 44 deletions

View file

@ -1,18 +1,14 @@
<Project> <Project>
<!-- Hack! MelonLoader is locking the Mod files, this way I can build and output the mod dll with the game running -->
<Target Name="DeleteOutputDLLIfExists" BeforeTargets="BeforeBuild">
<Exec Command="if exist &quot;$(OutputPath)$(TargetName).dll&quot; del /F /Q &quot;$(OutputPath)$(TargetName).dll&quot;" />
</Target>
<PropertyGroup> <PropertyGroup>
<!-- Put your Chillout vr path in a new environnment variable CVRPATH in Windows --> <!-- Put your Chillout vr path in a new environnment variable CVRPATH in Windows -->
<OutputPath>$(CVRPATH)\Mods\</OutputPath> <OutputPath>$(CVRPATH)\Mods\</OutputPath>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<TargetFramework>net472</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDependencyFile>false</GenerateDependencyFile>
<!-- Required for NStrip to work --> <!-- Required for NStrip to work -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
@ -34,23 +30,11 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<!-- Third-party dependencies --> <!-- Hack! MelonLoader is locking the Mod files, this way I can build and output the mod dll with the game running -->
<ItemGroup> <Target Name="DeleteOutputDLLIfExists" BeforeTargets="BeforeBuild">
<Reference Include="BTKUILib"> <Exec Command="if exist &quot;$(OutputPath)$(TargetName).dll&quot; del /F /Q &quot;$(OutputPath)$(TargetName).dll&quot;" />
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\BTKUILib.dll</HintPath> </Target>
<Private>False</Private>
</Reference>
<Reference Include="UIExpansionKit">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UIExpansionKit.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ChatBox">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\ChatBox.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- CVR base game dependencies -->
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony"> <Reference Include="0Harmony">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\0Harmony.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\0Harmony.dll</HintPath>
@ -76,10 +60,6 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Aura2_Core.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Aura2_Core.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="AVProVideo.Demos">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\AVProVideo.Demos.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="AVProVideo.Extensions.Timeline"> <Reference Include="AVProVideo.Extensions.Timeline">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\AVProVideo.Extensions.Timeline.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\AVProVideo.Extensions.Timeline.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -104,6 +84,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\AwesomeTechnologies.VegetationStudioPro.Runtime.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\AwesomeTechnologies.VegetationStudioPro.Runtime.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="BakeryRuntimeAssembly">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\BakeryRuntimeAssembly.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Bhaptics.Tact"> <Reference Include="Bhaptics.Tact">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Bhaptics.Tact.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Bhaptics.Tact.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -144,14 +128,6 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\DarkRift.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\DarkRift.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="DarkRift.Server">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\DarkRift.Server.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="DissonanceVoip">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\DissonanceVoip.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="endel.nativewebsocket"> <Reference Include="endel.nativewebsocket">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\endel.nativewebsocket.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\endel.nativewebsocket.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -160,6 +136,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\ICSharpCode.SharpZipLib.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="LibVLCSharp">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\LibVLCSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MagicaCloth"> <Reference Include="MagicaCloth">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\MagicaCloth.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\MagicaCloth.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -192,8 +172,8 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\mscorlib.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\mscorlib.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="netstandard"> <Reference Include="MTJobSystem">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\netstandard.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\MTJobSystem.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json"> <Reference Include="Newtonsoft.Json">
@ -208,18 +188,14 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Novell.Directory.Ldap.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Novell.Directory.Ldap.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Oculus.LipSync">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Oculus.LipSync.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PWCommon3DLL"> <Reference Include="PWCommon3DLL">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\PWCommon3DLL.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\PWCommon3DLL.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="QHierarchyNullable">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\QHierarchyNullable.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="QHierarchyRuntime">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\QHierarchyRuntime.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SALSA-LipSync"> <Reference Include="SALSA-LipSync">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\SALSA-LipSync.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\SALSA-LipSync.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -244,6 +220,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\SteamVR_Actions.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\SteamVR_Actions.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.Buffers">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Buffers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.ComponentModel.Composition"> <Reference Include="System.ComponentModel.Composition">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.ComponentModel.Composition.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.ComponentModel.Composition.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -260,6 +240,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Core.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Core.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.Data.DataSetExtensions">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Data.DataSetExtensions.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data"> <Reference Include="System.Data">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Data.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Data.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -304,6 +288,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.IO.Compression.FileSystem.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.IO.Compression.FileSystem.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.Memory">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Memory.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Net.Http"> <Reference Include="System.Net.Http">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Net.Http.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\System.Net.Http.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -412,6 +400,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UniTask.TextMeshPro.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UniTask.TextMeshPro.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.AI.Navigation">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.AI.Navigation.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Analytics.DataPrivacy"> <Reference Include="Unity.Analytics.DataPrivacy">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Analytics.DataPrivacy.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Analytics.DataPrivacy.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -420,6 +412,22 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Build.SlimPlayerRuntime.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Build.SlimPlayerRuntime.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.Burst.Cecil">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Burst.Cecil.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Burst.Cecil.Mdb">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Burst.Cecil.Mdb.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Burst.Cecil.Pdb">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Burst.Cecil.Pdb.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Burst.Cecil.Rocks">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Burst.Cecil.Rocks.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Burst"> <Reference Include="Unity.Burst">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Burst.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Burst.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -432,6 +440,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Collections.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Collections.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.Collections.LowLevel.ILSupport">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Collections.LowLevel.ILSupport.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Deformations"> <Reference Include="Unity.Deformations">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Deformations.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Deformations.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -444,10 +456,34 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Entities.Hybrid.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Entities.Hybrid.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.Entities.Hybrid.HybridComponents">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Entities.Hybrid.HybridComponents.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Entities.Hybrid.Tests.SeparateAssembly">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Entities.Hybrid.Tests.SeparateAssembly.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Entities.UI">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Entities.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.InputSystem">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InputSystem.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.InternalAPIEngineBridge.002">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InternalAPIEngineBridge.002.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.InternalAPIEngineBridge.003"> <Reference Include="Unity.InternalAPIEngineBridge.003">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InternalAPIEngineBridge.003.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InternalAPIEngineBridge.003.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.InternalAPIEngineBridge.012">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InternalAPIEngineBridge.012.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Jobs"> <Reference Include="Unity.Jobs">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Jobs.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Jobs.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -464,6 +500,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Mathematics.Extensions.Hybrid.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Mathematics.Extensions.Hybrid.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.MemoryProfiler">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.MemoryProfiler.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Platforms.Common"> <Reference Include="Unity.Platforms.Common">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Platforms.Common.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Platforms.Common.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -476,6 +516,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Postprocessing.Runtime.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Postprocessing.Runtime.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.ProBuilder.Csg">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.ProBuilder.Csg.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.ProBuilder"> <Reference Include="Unity.ProBuilder">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.ProBuilder.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.ProBuilder.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -492,6 +536,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.ProBuilder.Stl.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.ProBuilder.Stl.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.Profiling.Core">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Profiling.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Properties"> <Reference Include="Unity.Properties">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Properties.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Properties.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -516,6 +564,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.Scenes">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Scenes.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Scenes.Hybrid"> <Reference Include="Unity.Scenes.Hybrid">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Scenes.Hybrid.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Scenes.Hybrid.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -528,6 +580,66 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Serialization.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Serialization.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.Services.Analytics">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Analytics.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Analytics">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Analytics.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Configuration">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Configuration.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Device">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Device.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Environments">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Environments.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Environments.Internal">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Environments.Internal.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Internal">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Internal.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Networking">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Networking.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Registration">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Registration.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Scheduler">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Scheduler.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Telemetry">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Telemetry.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Core.Threading">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Core.Threading.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Services.Vivox">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Services.Vivox.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Subsystem.Registration">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.Subsystem.Registration.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.TextMeshPro"> <Reference Include="Unity.TextMeshPro">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.TextMeshPro.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.TextMeshPro.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -548,6 +660,50 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.VectorGraphics.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.VectorGraphics.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Unity.XR.Management">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.Management.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.Oculus">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.Oculus.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenVR">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenVR.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXR">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXR.Features.ConformanceAutomation">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.ConformanceAutomation.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXR.Features.MetaQuestSupport">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.MetaQuestSupport.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXR.Features.MockRuntime">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.MockRuntime.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXR.Features.OculusQuestSupport">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.OculusQuestSupport.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXR.Features.PICOSupport">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.PICOSupport.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXR.Features.RuntimeDebugger">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.RuntimeDebugger.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.XR.OpenXRPico">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXRPico.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.AccessibilityModule"> <Reference Include="UnityEngine.AccessibilityModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.AccessibilityModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.AccessibilityModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -592,6 +748,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ClusterRendererModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ClusterRendererModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.ContentLoadModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ContentLoadModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule"> <Reference Include="UnityEngine.CoreModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.CoreModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -616,6 +776,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.GameCenterModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.GameCenterModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.GIModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.GIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.GridModule"> <Reference Include="UnityEngine.GridModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.GridModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.GridModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -652,6 +816,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.Monetization.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.Monetization.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.NVIDIAModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.NVIDIAModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.ParticleSystemModule"> <Reference Include="UnityEngine.ParticleSystemModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ParticleSystemModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ParticleSystemModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -672,6 +840,14 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ProfilerModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ProfilerModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.PropertiesModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.PropertiesModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.ScreenCaptureModule"> <Reference Include="UnityEngine.ScreenCaptureModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ScreenCaptureModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.ScreenCaptureModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -680,6 +856,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.SharedInternalsModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.SharedInternalsModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.SpatialTracking">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.SpatialTracking.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.SpriteMaskModule"> <Reference Include="UnityEngine.SpriteMaskModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.SpriteMaskModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.SpriteMaskModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -708,10 +888,18 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TerrainPhysicsModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TerrainPhysicsModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.TextCoreFontEngineModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TextCoreFontEngineModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextCoreModule"> <Reference Include="UnityEngine.TextCoreModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TextCoreModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TextCoreModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.TextCoreTextEngineModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TextCoreTextEngineModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule"> <Reference Include="UnityEngine.TextRenderingModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TextRenderingModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -732,6 +920,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UIElementsModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UIElementsModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.UIElementsNativeModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UIElementsNativeModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIModule"> <Reference Include="UnityEngine.UIModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UIModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UIModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -744,6 +936,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UNETModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UNETModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.UnityAnalyticsCommonModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityAnalyticsCommonModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UnityAnalyticsModule"> <Reference Include="UnityEngine.UnityAnalyticsModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityAnalyticsModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityAnalyticsModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -752,6 +948,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityConnectModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityConnectModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.UnityCurlModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityCurlModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UnityTestProtocolModule"> <Reference Include="UnityEngine.UnityTestProtocolModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityTestProtocolModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.UnityTestProtocolModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -788,6 +988,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.VideoModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.VideoModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.VirtualTexturingModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.VirtualTexturingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.VRModule"> <Reference Include="UnityEngine.VRModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.VRModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.VRModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -796,6 +1000,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.WindModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.WindModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine.XR.LegacyInputHelpers">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.XR.LegacyInputHelpers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.XRModule"> <Reference Include="UnityEngine.XRModule">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.XRModule.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\UnityEngine.XRModule.dll</HintPath>
<Private>False</Private> <Private>False</Private>
@ -804,6 +1012,10 @@
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Valve.Newtonsoft.Json.dll</HintPath> <HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Valve.Newtonsoft.Json.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="VivoxUnity">
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\VivoxUnity.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup> </ItemGroup>
</Project> </Project>

158
copy_and_nstrip_dll.ps1 Normal file
View file

@ -0,0 +1,158 @@
# CVR and Melon Loader Dependencies
$0HarmonydllPath = "\MelonLoader\net35\0Harmony.dll"
$melonLoaderdllPath = "\MelonLoader\net35\MelonLoader.dll"
$CecilallPath = "\MelonLoader\net35\Mono.Cecil.dll"
$cvrManagedDataPath = "\ChilloutVR_Data\Managed"
$cvrPath = $env:CVRPATH
$cvrExecutable = "ChilloutVR.exe"
$cvrDefaultPath = "E:\temp\CVR_Experimental"
# Array with the dlls to strip
$dllsToStrip = @('Assembly-CSharp.dll','Assembly-CSharp-firstpass.dll','AVProVideo.Runtime.dll', 'Unity.TextMeshPro.dll', 'MagicaCloth.dll')
# Array with the mods to grab
$modNames = @("BTKUILib", "BTKSAImmersiveHud", "ActionMenu", "MenuScalePatch")
# Array with dlls to ignore from ManagedLibs
$cvrManagedLibNamesToIgnore = @("netstandard")
if ($cvrPath -and (Test-Path "$cvrPath\$cvrExecutable")) {
# Found ChilloutVR.exe in the existing CVRPATH
Write-Host ""
Write-Host "Found the ChilloutVR folder on: $cvrPath"
}
else {
# Check if ChilloutVR.exe exists in default Steam location
if (Test-Path "$cvrDefaultPath\$cvrExecutable") {
# Set CVRPATH environment variable to default Steam location
Write-Host "Found the ChilloutVR on the default steam location, setting the CVRPATH Env Var at User Level!"
[Environment]::SetEnvironmentVariable("CVRPATH", $cvrDefaultPath, "User")
$env:CVRPATH = $cvrDefaultPath
$cvrPath = $env:CVRPATH
}
else {
Write-Host "[ERROR] ChilloutVR.exe not found in CVRPATH or the default Steam location."
Write-Host " Please define the Environment Variable CVRPATH pointing to the ChilloutVR folder!"
return
}
}
$scriptDir = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
$managedLibsFolder = $scriptDir + "\.ManagedLibs"
if (!(Test-Path $managedLibsFolder)) {
New-Item -ItemType Directory -Path $managedLibsFolder
Write-Host ".ManagedLibs folder created successfully."
}
Write-Host ""
Write-Host "Copying the DLLs from the CVR, MelonLoader, and Mods folder to the .ManagedLibs"
Copy-Item $cvrPath$0HarmonydllPath -Destination $managedLibsFolder
Copy-Item $cvrPath$melonLoaderdllPath -Destination $managedLibsFolder
Copy-Item $cvrPath$CecilallPath -Destination $managedLibsFolder
Copy-Item $cvrPath$cvrManagedDataPath"\*" -Destination $managedLibsFolder
# Saving XML ready libs for the Build.props file
$lib_names_xml = "<Project><ItemGroup>"
$lib_names_xml += '<Reference Include="0Harmony"><HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\0Harmony.dll</HintPath><Private>False</Private></Reference>'
$lib_names_xml += '<Reference Include="MelonLoader"><HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\MelonLoader.dll</HintPath><Private>False</Private></Reference>'
foreach ($file in Get-ChildItem $cvrPath$cvrManagedDataPath"\*") {
if($cvrManagedLibNamesToIgnore -notcontains $file.BaseName) {
$lib_names_xml += "<Reference Include=`"$($file.BaseName)`"><HintPath>`$(MsBuildThisFileDirectory)\.ManagedLibs\$($file.BaseName).dll</HintPath><Private>False</Private></Reference>"
}
}
$lib_names_xml += "</ItemGroup></Project>"
$lib_names_xml | Out-File -Encoding UTF8 -FilePath lib_names.xml
# Third Party Dependencies
$melonModsPath="\Mods\"
$missingMods = New-Object System.Collections.Generic.List[string]
foreach ($modName in $modNames) {
$modDll = $modName + ".dll"
$modPath = $cvrPath + $melonModsPath + $modDll
$managedLibsModPath = "$managedLibsFolder\$modDll"
# Attempt to grab from the mods folder
if (Test-Path $modPath -PathType Leaf) {
Write-Host " Copying $modDll from $melonModsPath to \.ManagedLibs!"
Copy-Item $modPath -Destination $managedLibsFolder
}
# Check if they already exist in the .ManagedLibs
elseif (Test-Path $managedLibsModPath -PathType Leaf) {
Write-Host " Ignoring $modDll since already exists in \.ManagedLibs!"
}
# If we fail, lets add to the missing mods list
else {
$missingMods.Add($modName)
}
}
if ($missingMods.Count -gt 0) {
# If we have missing mods, let's fetch them from the latest CVR Modding Group API
Write-Host ""
Write-Host "Failed to find $($missingMods.Count) mods. We're going to search in CVR MG verified mods" -ForegroundColor Red
Write-Host "You can download them and move to $managedLibsFolder"
$cvrModdingApiUrl = "https://api.cvrmg.com/v1/mods"
$cvrModdingDownloadUrl = "https://api.cvrmg.com/v1/mods/download/"
$latestModsResponse = Invoke-RestMethod $cvrModdingApiUrl -UseBasicParsing
foreach ($modName in $missingMods) {
$mod = $latestModsResponse | Where-Object { $_.name -eq $modName }
if ($mod) {
$modDownloadUrl = $cvrModdingDownloadUrl + $($mod._id)
# It seems power shell doesn't like to download .dll from https://api.cvrmg.com (messes with some anti-virus)
# Invoke-WebRequest -Uri $modDownloadUrl -OutFile $managedLibsFolder -UseBasicParsing
# Write-Host " $modName was downloaded successfully to $managedLibsFolder!"
Write-Host " $modName Download Url: $modDownloadUrl"
} else {
Write-Host " $modName was not found in the CVR Modding Group verified mods!"
}
}
}
Write-Host ""
Write-Host "Copied all libraries!"
Write-Host ""
Write-Host "Press any key to strip the Dlls using NStrip"
$HOST.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | OUT-NULL
$HOST.UI.RawUI.Flushinputbuffer()
Write-Host "NStrip Convert all private/protected stuff to public. Requires <AllowUnsafeBlocks>true></AllowUnsafeBlocks>"
# Check if NStrip.exe exists in the current directory
if(Test-Path -Path ".\NStrip.exe") {
$nStripPath = ".\NStrip.exe"
}
else {
# Try to locate NStrip.exe in the PATH
$nStripPath = Get-Command -Name NStrip.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source
if($nStripPath -eq $null) {
# Display an error message if NStrip.exe could not be found
Write-Host "Could not find NStrip.exe in the current directory nor in the PATH." -ForegroundColor Red
Write-Host "Visit https://github.com/bbepis/NStrip/releases/latest to grab a copy." -ForegroundColor Red
return
}
}
# Loop through each DLL file to strip and call NStrip.exe
foreach($dllFile in $dllsToStrip) {
$dllPath = Join-Path -Path $managedLibsFolder -ChildPath $dllFile
& $nStripPath -p -n $dllPath $dllPath
}
Write-Host ""
Write-Host "Copied all libraries and stripped the DLLs!"
Write-Host ""
Write-Host "Press any key to exit"
$HOST.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | OUT-NULL
$HOST.UI.RawUI.Flushinputbuffer()