-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add targets with common data and references
- Loading branch information
1 parent
c71f363
commit 501bdb2
Showing
2 changed files
with
261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,260 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup> | ||
<AssemblyName>$(ProjectName)</AssemblyName> | ||
<RootNamespace>$(ProjectName)</RootNamespace> | ||
<TargetFramework>net452</TargetFramework> | ||
<Platforms>AnyCPU</Platforms> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<GamePath><!-- Set GamePath manually --></GamePath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<!-- Find GamePath --> | ||
<Choose> | ||
<When Condition="($(OS) == 'Unix' OR $(OS) == 'OSX') AND $(GamePath) == ''"> | ||
<PropertyGroup> | ||
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.steam/steam/steamapps/common/Valheim</GamePath> | ||
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Valheim/Contents/MacOS</GamePath> | ||
</PropertyGroup> | ||
</When> | ||
<When Condition="($(OS) == 'Windows_NT') AND $(GamePath) == ''"> | ||
<PropertyGroup> | ||
<GamePath Condition="!Exists('$(GamePath)')">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 892970', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32))</GamePath> | ||
<_SteamLibraryPath>$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\SOFTWARE\Valve\Steam', 'SteamPath', null, RegistryView.Registry32))</_SteamLibraryPath> | ||
<GamePath Condition="!Exists('$(GamePath)') AND '$(_SteamLibraryPath)' != ''">$(_SteamLibraryPath)\steamapps\common\Valheim</GamePath> | ||
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\Steam\steamapps\common\Valheim</GamePath> | ||
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Valheim</GamePath> | ||
</PropertyGroup> | ||
</When> | ||
</Choose> | ||
|
||
<!-- Add BepInEx references --> | ||
<ItemGroup Label="BepInEx"> | ||
<Reference Include="0Harmony20"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\BepInEx\core\0Harmony20.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="BepInEx"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\BepInEx\core\BepInEx.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
<!-- Add valheim_data references --> | ||
<ItemGroup Label="Valheim_Data"> | ||
<Reference Include="assembly_valheim"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\valheim_Data\Managed\assembly_valheim.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="assembly_googleanalytics"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\valheim_Data\Managed\assembly_googleanalytics.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="assembly_guiutils"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\valheim_Data\Managed\assembly_guiutils.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="assembly_postprocessing"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\valheim_Data\Managed\assembly_postprocessing.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="assembly_steamworks"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\valheim_Data\Managed\assembly_steamworks.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="assembly_sunshafts"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\valheim_Data\Managed\assembly_sunshafts.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="assembly_utils"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\valheim_Data\Managed\assembly_utils.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
<!-- Add Unity references --> | ||
<ItemGroup Label="Unity"> | ||
<Reference Include="UnityEngine"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.AccessibilityModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.AccessibilityModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.AIModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.AIModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.AnimationModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.AnimationModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.AudioModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.AudioModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.ClothModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.ClothModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.CoreModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.InputLegacyModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.InputLegacyModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.ParticleSystemModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.ParticleSystemModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.PhysicsModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.PhysicsModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.ScreenCaptureModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.ScreenCaptureModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UI"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.UI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UIModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.UIModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UIElementsModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.UIElementsModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.InputModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.InputModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.JSONSerializeModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.JSONSerializeModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.IMGUIModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.IMGUIModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.ImageConversionModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.ImageConversionModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.TerrainModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.TerrainModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.TextCoreModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.TextCoreModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.TextRenderingModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.TextRenderingModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UnityWebRequestAudioModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.UnityWebRequestAudioModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UnityWebRequestModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.UnityWebRequestModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UnityWebRequestWWWModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.UnityWebRequestWWWModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UnityWebRequestTextureModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.UnityWebRequestTextureModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.AssetBundleModule"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>$(GamePath)\unstripped_corlib\UnityEngine.AssetBundleModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="*.cfg"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<MainDLL Include="$(TargetDir)$(TargetName).dll" /> | ||
<AllCFG Include="$(TargetDir)**\*.cfg" /> | ||
</ItemGroup> | ||
|
||
<!-- Copy to plugins folder and zip --> | ||
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> | ||
<Copy SourceFiles="@(MainDLL)" DestinationFolder="$(GamePath)\BepInEx\plugins\%(RecursiveDir)"></Copy> | ||
<Copy SourceFiles="@(AllCFG)" DestinationFolder="$(GamePath)\BepInEx\plugins\%(RecursiveDir)"></Copy> | ||
<Copy Condition="@(AditionalFiles) != ''" SourceFiles="@(AditionalFiles)" DestinationFolder="$(GamePath)\BepInEx\plugins\%(RecursiveDir)"></Copy> | ||
<Delete Files="$(TargetDir)$(TargetName).zip" /> | ||
<Copy SourceFiles="@(MainDLL)" DestinationFolder="$(TargetDir)Release\%(RecursiveDir)"></Copy> | ||
<Copy SourceFiles="@(AllCFG)" DestinationFolder="$(TargetDir)Release\%(RecursiveDir)"></Copy> | ||
<Copy Condition="@(AditionalFiles) != ''" SourceFiles="@(AditionalFiles)" DestinationFolder="$(TargetDir)Release\%(RecursiveDir)"></Copy> | ||
<ZipDirectory SourceDirectory="$(TargetDir)Release" DestinationFile="$(TargetDir)$(TargetName).zip" /> | ||
<RemoveDir Directories="$(TargetDir)Release" /> | ||
</Target> | ||
</Project> |