Skip to content

Commit

Permalink
update mod build package and migrate to new .csproj format (#74)
Browse files Browse the repository at this point in the history
The new package version...
- can add a Harmony reference automatically using <EnableHarmony>;
- deploys 'assets' folders automatically;
- sets x86 build mode by default to avoid processor architecture mismatch warnings.
  • Loading branch information
Pathoschild authored and Sakorona committed Jun 27, 2019
1 parent e131cf8 commit 75b5494
Show file tree
Hide file tree
Showing 48 changed files with 229 additions and 1,291 deletions.
54 changes: 10 additions & 44 deletions BetterShippingBox/BetterShippingBox.csproj
Original file line number Diff line number Diff line change
@@ -1,50 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ProjectGuid>{4BE4E38A-4011-4CC9-8CD0-380BD8B417F0}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<AssemblyName>BetterShippingBox</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<WarningLevel>4</WarningLevel>
<RootNamespace>BetterShippingBox</RootNamespace>
<Version>1.0.0</Version>
<TargetFramework>net452</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="BetterShippingBox.Menus\BetterShippingMenu.cs" />
<Compile Include="BetterShippingBox\BetterShippingBox.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<None Include="manifest.json" />
<None Include="README.md" />
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0-beta.4" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

<Import Project="$(SolutionDir)\deploy-mod.targets" />
</Project>

</Project>
21 changes: 0 additions & 21 deletions BetterShippingBox/Properties/AssemblyInfo.cs

This file was deleted.

108 changes: 13 additions & 95 deletions ClimatesOfFerngill/ClimatesOfFerngill.csproj
Original file line number Diff line number Diff line change
@@ -1,89 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project 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">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{251AC91D-397E-42AF-925D-3C7D1A9C72D5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClimatesOfFerngillRebuild</RootNamespace>
<AssemblyName>ClimatesOfFerngill</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</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>
<PlatformTarget>x86</PlatformTarget>
</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>
<PlatformTarget>x86</PlatformTarget>
<RootNamespace>ClimatesOfFerngillRebuild</RootNamespace>
<Version>1.0.0</Version>
<TargetFramework>net452</TargetFramework>

<EnableHarmony>true</EnableHarmony>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Enums.NET" Version="2.3.2" />
<PackageReference Include="Lib.Harmony" Version="1.2.0.1" />
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0-beta.4" />
<PackageReference Include="Platonymous.PyTK" Version="1.6.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ClimatesOfFerngillApi.cs" />
<Compile Include="Integrations\IDynamicNightAPI.cs" />
<Compile Include="Integrations\ILunarDisturbancesAPI.cs" />
<Compile Include="Integrations\ISafeLightningAPI.cs" />
<Compile Include="Patches\GameLocationPatches.cs" />
<Compile Include="Patches\SGamePatches.cs" />
<Compile Include="TestClimate.cs" />
<Compile Include="WeatherData\WeatherData.cs" />
<Compile Include="Weathers\FerngillCustomRain.cs" />
<Compile Include="Weathers\FerngillThunderFrenzy.cs" />
<Compile Include="Weathers\FerngillWhiteOut.cs" />
<Compile Include="Weathers\ForceDays.cs" />
<Compile Include="Weathers\ISDVWeather.cs" />
<Compile Include="Weathers\IWeatherEvent.cs" />
<Compile Include="Weathers\WeatherConditions.cs" />
<Compile Include="Descriptions.cs" />
<Compile Include="Weathers\CurrentWeather.cs" />
<Compile Include="Weathers\FerngillBlizzard.cs" />
<Compile Include="WeatherData\FerngillClimate.cs" />
<Compile Include="WeatherData\FerngillClimateTimeSpan.cs" />
<Compile Include="Pathoschild.Stardew.UIF\DrawHelper.cs" />
<Compile Include="Pathoschild.Stardew.UIF\FormattedText.cs" />
<Compile Include="Pathoschild.Stardew.UIF\IFormattedText.cs" />
<Compile Include="Sprites.cs" />
<Compile Include="WeatherMenu.cs" />
<Compile Include="WeatherData\WeatherParameters.cs" />
<Compile Include="ClimatesOfFerngillRebuild.cs" />
<Compile Include="Weathers\FerngillFog.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WeatherConfig.cs" />
<Compile Include="Weathers\FogType.cs" />
<Compile Include="Weathers\WeatherIcon.cs" />
<Compile Include="Weathers\WeatherNotificationArgs.cs" />
<Compile Include="Weathers\WeatherTypes.cs" />
</ItemGroup>

<ItemGroup>
<None Include="data\weather\arid.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand All @@ -103,22 +34,9 @@
<None Include="data\weather\wet.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="i18n\default.json" />
<None Include="manifest.json" />
<None Include="README.md" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\Sandstorm.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\ThickerFog.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\WeatherIcons.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Import Project="..\TwilightCoreShared\TwilightCoreShared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\deploy-mod.targets" />
</Project>

</Project>
36 changes: 0 additions & 36 deletions ClimatesOfFerngill/Properties/AssemblyInfo.cs

This file was deleted.

6 changes: 3 additions & 3 deletions ClimatesOfFerngill/Sprites.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public class Icons

public Icons(IContentHelper helper)
{
WeatherSource = helper.Load<Texture2D>(Path.Combine("Assets","WeatherIcons.png"));
FogTexture = helper.Load<Texture2D>(Path.Combine("Assets", "ThickerFog.png"));
DarudeTexture = helper.Load<Texture2D>(Path.Combine("Assets", "Sandstorm.png"));
WeatherSource = helper.Load<Texture2D>(Path.Combine("assets","WeatherIcons.png"));
FogTexture = helper.Load<Texture2D>(Path.Combine("assets", "ThickerFog.png"));
DarudeTexture = helper.Load<Texture2D>(Path.Combine("assets", "Sandstorm.png"));
source2 = Game1.mouseCursors;
}

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
65 changes: 10 additions & 55 deletions CustomizableCartRedux/CustomizableCartRedux.csproj
Original file line number Diff line number Diff line change
@@ -1,62 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project 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">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{288636BE-8AE8-4C50-A07D-18223377BF98}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CustomizableTravelingCart</RootNamespace>
<AssemblyName>CustomizableCartRedux</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</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>
<PlatformTarget>x86</PlatformTarget>
</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>
<PlatformTarget>x86</PlatformTarget>
<RootNamespace>CustomizableTravelingCart</RootNamespace>
<Version>1.0.0</Version>
<TargetFramework>net452</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CartConfig.cs" />
<Compile Include="CustomizableCartRedux.cs" />
<Compile Include="ICustomizableCart.cs" />
<Compile Include="Log.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Util.cs" />
</ItemGroup>
<ItemGroup>
<None Include="manifest.json" />
<None Include="README.md" />
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0-beta.4" />
</ItemGroup>

<Import Project="..\TwilightCoreShared\TwilightCoreShared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\deploy-mod.targets" />
</Project>

</Project>
36 changes: 0 additions & 36 deletions CustomizableCartRedux/Properties/AssemblyInfo.cs

This file was deleted.

Loading

0 comments on commit 75b5494

Please sign in to comment.