Skip to content

Commit

Permalink
Switch to more modern project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Oct 29, 2021
1 parent f2ec29d commit 940194f
Show file tree
Hide file tree
Showing 28 changed files with 290 additions and 2,679 deletions.
61 changes: 61 additions & 0 deletions Bootstrap/Bootstrap.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="Bootstrap">

<!-- This project does not need to be manually run. It is set as a dependency for the main projects and automatically takes care of all bootstrapping that needs to happen -->

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<PlatformTarget>x86</PlatformTarget>
<Platforms>x86</Platforms>
</PropertyGroup>

<Target Name="Bootstrap">
<Message Importance="normal" Text="Running Bootstrap" />
</Target>

<PropertyGroup>
<SlnDirectory>$(MSBuildProjectDirectory)/..</SlnDirectory>
<HDTDirectory>$(SlnDirectory)/Hearthstone Deck Tracker</HDTDirectory>

<HearthDbUrl>https://libs.hearthsim.net/hdt/HearthDb.dll</HearthDbUrl>
<HearthMirrorUrl>https://libs.hearthsim.net/hdt/HearthMirror.dll</HearthMirrorUrl>
<HSReplayUrl>https://libs.hearthsim.net/hdt/HSReplay.dll</HSReplayUrl>
<BobsBuddyUrl>https://libs.hearthsim.net/hdt/BobsBuddy.dll</BobsBuddyUrl>
</PropertyGroup>

<ItemGroup>
<LocalizationFiles Include="$(SlnDirectory)/HDT-Localization/*.resx" />
</ItemGroup>


<Target Name="DownloadDeps" BeforeTargets="Bootstrap">
<DownloadFile SourceUrl="$(HearthDbUrl)" DestinationFolder="$(SlnDirectory)/lib" SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile SourceUrl="$(HearthMirrorUrl)" DestinationFolder="$(SlnDirectory)/lib" SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile SourceUrl="$(HSReplayUrl)" DestinationFolder="$(SlnDirectory)/lib" SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
<DownloadFile SourceUrl="$(BobsBuddyUrl)" DestinationFolder="$(SlnDirectory)/lib" SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
</DownloadFile>
</Target>

<Target Name="CloneHDTLocalization" Condition="!Exists('$(SlnDirectory)/HDT-Localization')" BeforeTargets="Bootstrap">
<Message Importance="normal" Text="Couldn't find HDT-Localization repo." />
<Exec WorkingDirectory="$(SlnDirectory)" Command="git clone --depth=1 https://github.com/HearthSim/HDT-Localization.git HDT-Localization" />
<Copy SourceFiles="@(LocalizationFiles)" DestinationFolder="$(HDTDirectory)/Properties" SkipUnchangedFiles="true"/>
</Target>

<Target Name="UpdateHDTLocalization" Condition="Exists('$(SlnDirectory)/HDT-Localization')" BeforeTargets="Bootstrap">
<Message Importance="normal" Text="Fetching latest localizations from HDT-Localization repo." />
<Exec WorkingDirectory="$(SlnDirectory)/HDT-Localization" Command="git fetch" />
<Exec WorkingDirectory="$(SlnDirectory)/HDT-Localization" Command="git reset --hard origin/master" />
<Copy SourceFiles="@(LocalizationFiles)" DestinationFolder="$(HDTDirectory)/Properties" SkipUnchangedFiles="true"/>
</Target>

<Target Name="Changelog" BeforeTargets="Bootstrap">
<Copy SourceFiles="$(SlnDirectory)/CHANGELOG.md" DestinationFolder="$(HDTDirectory)/Resources" SkipUnchangedFiles="true"/>
</Target>
</Project>
154 changes: 19 additions & 135 deletions HDTTests/HDTTests.csproj
Original file line number Diff line number Diff line change
@@ -1,168 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A99438AD-6733-4FDA-928C-30C37255FF1B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HDTTests</RootNamespace>
<AssemblyName>HDTTests</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFramework>net472</TargetFramework>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
</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>
<LangVersion>7</LangVersion>
</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>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Squirrel|AnyCPU'">
<OutputPath>bin\Squirrel\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AssemblyTitle>HDTTests</AssemblyTitle>
<Product>HDTTests</Product>
<Copyright>Copyright © 2015</Copyright>
<Platforms>x86</Platforms>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Squirrel|x86'">
<OutputPath>bin\x86\Squirrel\</OutputPath>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<ItemGroup>
<PackageReference Include="RhinoMocks" Version="3.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="HearthDb">
<HintPath>..\lib\HearthDb.dll</HintPath>
</Reference>
<Reference Include="HearthMirror">
<HintPath>..\lib\HearthMirror.dll</HintPath>
</Reference>
<Reference Include="Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
<HintPath>..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework">
<Private>False</Private>
</Reference>
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="BoardDamage\BoardCardTest.cs" />
<Compile Include="BoardDamage\TestHelper.cs" />
<Compile Include="BoardDamage\BoardHeroTest.cs" />
<Compile Include="BoardDamage\PlayerBoardTest.cs" />
<Compile Include="BoardDamage\BoardStateTest.cs" />
<Compile Include="BoardDamage\EntityHelperTest.cs" />
<Compile Include="DeckImporting\DataGenerator.cs" />
<Compile Include="DeckImporting\DeckComparer.cs" />
<Compile Include="DeckImporting\DeckImportingTests.cs" />
<Compile Include="DeckImporting\TestData.cs" />
<Compile Include="Hearthstone\Secrets\MockArenaSettings.cs" />
<Compile Include="Hearthstone\Secrets\MockGame.cs" />
<Compile Include="Hearthstone\Secrets\SecretsManagerTest.cs" />
<Compile Include="Hearthstone\Secrets\SecretTest.cs" />
<Compile Include="Hearthstone\GameTimeTest.cs" />
<Compile Include="Hearthstone\ParseCardStringTest.cs" />
<Compile Include="Hearthstone\Secrets\SecretEventHandlerTest.cs" />
<Compile Include="Hearthstone\LogReadingTest.cs" />
<Compile Include="Hearthstone\DeckTest.cs" />
<Compile Include="Hearthstone\CardDbTest.cs" />
<Compile Include="HsReplay\Utility\ShortIdHelperTests.cs" />
<Compile Include="ImageDownloading\AssetDownloaderTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="LocUtilTests.cs" />
<Compile Include="Utility\Twitch\TwitchApiHelperTests.cs" />
<ProjectReference Include="..\Hearthstone Deck Tracker\Hearthstone Deck Tracker.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Hearthstone Deck Tracker\Hearthstone Deck Tracker.csproj">
<Project>{e63a3f1c-e662-4e62-be43-af27cb9e953d}</Project>
<Name>Hearthstone Deck Tracker</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
25 changes: 0 additions & 25 deletions HDTTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,10 @@
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("HDTTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HDTTests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[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("c081f5b1-2184-4850-810a-0a0a838df8f6")]

// 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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4 changes: 0 additions & 4 deletions HDTTests/packages.config

This file was deleted.

Loading

0 comments on commit 940194f

Please sign in to comment.