Skip to content

Commit

Permalink
- Move to MS 2019 project style
Browse files Browse the repository at this point in the history
  • Loading branch information
IceRaptor committed Apr 16, 2023
1 parent b837870 commit c50f756
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 104 deletions.
6 changes: 6 additions & 0 deletions CHANGEME.Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BattleTechGameDir>CHANGEME_TO_FULL_PATH_TO_BTG_DIR</BattleTechGameDir>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BattleTechGameDir>F:\SteamLibrary\steamapps\common\BATTLETECH</BattleTechGameDir>
</PropertyGroup>
</Project>
154 changes: 77 additions & 77 deletions DisorderlyWithdrawal/DisorderlyWithdrawal/DisorderlyWithdrawal.csproj
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<Target Name="ValidateBattleTechGameDir" Condition="'$(BattleTechGameDir)' == '' Or !Exists('$(BattleTechGameDir)')">
<Error Text="BattleTechGameDir variable not set properly" />
</Target>

<PropertyGroup Condition="'$(DeployedModPath)' == '' And Exists('$(BattleTechGameDir)\Mods\Core\DisorderlyWithdrawal')">
<!-- Modpack -->
<DeployedModPath>$(BattleTechGameDir)\Mods\Core\DisorderlyWithdrawal</DeployedModPath>
</PropertyGroup>
<PropertyGroup Condition="'$(DeployedModPath)' == '' And Exists('$(BattleTechGameDir)\Mods\DisorderlyWithdrawal')">
<!-- flat dir -->
<DeployedModPath>$(BattleTechGameDir)\Mods\DisorderlyWithdrawal</DeployedModPath>
</PropertyGroup>

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{06A08932-FD93-4E15-824C-AC77F0ADA593}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DisorderlyWithdrawal</RootNamespace>
<AssemblyName>DisorderlyWithdrawal</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<TargetFramework>net472</TargetFramework>
<AssemblySearchPaths>
$(ReferencePath);
{HintPathFromItem};
$(BattleTechGameDir)\BattleTech_Data\Managed
</AssemblySearchPaths>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>

<AssemblyTitle>DisorderlyWithdrawal</AssemblyTitle>
<Product>DisorderlyWithdrawal</Product>
<Copyright>Copyright © 2023</Copyright>
<AssemblyVersion>2.1.0</AssemblyVersion>
<FileVersion>2.1.0</FileVersion>
<LangVersion>11</LangVersion>
</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>
<Prefer32Bit>false</Prefer32Bit>
</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>
<Prefer32Bit>false</Prefer32Bit>

<Target Name="AfterBuildMigrated" AfterTargets="CopyFilesToOutputDirectory">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(BattleTechGameDir)\Mods\Core\DisorderlyWithdrawal" Condition="'$(BattleTechGameDir)' != '' And Exists('$(BattleTechGameDir)\Mods\Core\DisorderlyWithdrawal')" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(BattleTechGameDir)\Mods_CBDE\Core\DisorderlyWithdrawal" Condition="'$(BattleTechGameDir)' != '' And Exists('$(BattleTechGameDir)\Mods_CBDE\Core\DisorderlyWithdrawal')" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(RogueTechRepo)\Core\DisorderlyWithdrawal" Condition="'$(RogueTechRepo)' != '' And Exists('$(RogueTechRepo)\Core\DisorderlyWithdrawal')" />
</Target>

<PropertyGroup>
<!-- avoids IgnoresAccessChecksToAttribute warnings -->
<PublicizerRuntimeStrategies>Unsafe</PublicizerRuntimeStrategies>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\Assembly-CSharp.dll</HintPath>
<PackageReference Include="Krafs.Publicizer" Version="2.2.1" />
<Publicize Include="Assembly-CSharp;UnityEngine.UI" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="HarmonyX" Version="2.10.1">
<PrivateAssets>all</PrivateAssets>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>

<Reference Include="Assembly-CSharp">
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Reference Include="Assembly-CSharp-firstpass">
<Private>False</Private>
</Reference>
<Reference Include="CustomComponents">
<HintPath>E:\steam\SteamApps\common\BATTLETECH\Mods\CustomComponents\CustomComponents.dll</HintPath>
<HintPath>$(DeployedModPath)\..\CustomComponents\CustomComponents.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="IRBTModUtils">
<HintPath>$(DeployedModPath)\..\IRBTModUtils\IRBTModUtils.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="InControl">
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\InControl.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="IRBTModUtils">
<HintPath>E:\steam\SteamApps\common\BATTLETECH\Mods\IRBTModUtils\IRBTModUtils.dll</HintPath>
<Reference Include="Newtonsoft.Json">
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\Newtonsoft.Json.dll</HintPath>
<Reference Include="System">
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Unity.TextMeshPro">
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\Unity.TextMeshPro.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\UnityEngine.dll</HintPath>
<Reference Include="UnityEngine">
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Reference Include="UnityEngine.CoreModule">
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\UnityEngine.UI.dll</HintPath>
<Reference Include="UnityEngine.UI">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ModInit.cs" />
<Compile Include="Helper\Helper.cs" />
<Compile Include="Patches\UIPatches.cs" />
<Compile Include="Patches\Patches.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ModConfig.cs" />
<Compile Include="ModState.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy "$(TargetDir)$(TargetFileName)" "$(BattleTechGame)\Mods\DisorderlyWithdrawal" /y</PostBuildEvent>
</PropertyGroup>

</Project>
2 changes: 2 additions & 0 deletions DisorderlyWithdrawal/DisorderlyWithdrawal/GlobalUsing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global using BattleTech;
global using HarmonyLib;
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
using System.Reflection;
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("DisorderlyWithdrawal")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DisorderlyWithdrawal")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
using System.Runtime.InteropServices;

// 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
Expand All @@ -20,16 +7,3 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("06a08932-fd93-4e15-824c-ac77f0ada593")]

// 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("0.7.0.0")]
[assembly: AssemblyFileVersion("0.7.0.0")]

0 comments on commit c50f756

Please sign in to comment.