Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build

on:
push:
branches: [master, xvtsharp/net10]
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
with:
path: idmr-platform

- uses: actions/checkout@v5
with:
repository: andy83/LdmrCommon
ref: db9b9d7af6d7946ba5d9089245ec33504bd0a586
path: idmr-common

- uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x

- name: Restore
run: dotnet restore idmr-platform/Platform.csproj

- name: Build
run: dotnet build idmr-platform/Platform.csproj --no-restore --configuration Release
14 changes: 14 additions & 0 deletions EncodingSupport.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Runtime.CompilerServices;
using System.Text;

namespace Idmr.Platform
{
internal static class EncodingSupport
{
[ModuleInitializer]
internal static void RegisterCodePages()
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
}
}
}
167 changes: 19 additions & 148 deletions Platform.csproj
Original file line number Diff line number Diff line change
@@ -1,153 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.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>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{ABE8BD2A-CFA2-4912-B635-AC7C52F81434}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Idmr.Platform</RootNamespace>
<TargetFramework>net10.0</TargetFramework>
<AssemblyName>Idmr.Platform</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<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>
<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>
<DocumentationFile>bin\Release\Idmr.Platform.XML</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
<RootNamespace>Idmr.Platform</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>

<!-- The compatibility fork keeps the upstream source unchanged where possible. -->
<EnableNETAnalyzers>false</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<NoWarn>$(NoWarn);CS0419;CS1591</NoWarn>

<IdmrCommonProject Condition="'$(IdmrCommonProject)' == ''">../idmr-common/Common.csproj</IdmrCommonProject>
</PropertyGroup>

<ItemGroup>
<Reference Include="Idmr.Common, Version=1.1.4354.13568, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Libraries\Idmr.Common.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BaseBriefing.cs" />
<Compile Include="BaseFlightGroup.cs" />
<Compile Include="BaseFlightGroup.BaseOrder.cs" />
<Compile Include="BaseFlightGroup.Waypoint.cs" />
<Compile Include="BaseMessage.cs" />
<Compile Include="BaseStrings.cs" />
<Compile Include="BaseTrigger.cs" />
<Compile Include="Briefing.EventCollection.cs" />
<Compile Include="Converter.cs" />
<Compile Include="MissionFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tie\Briefing.cs" />
<Compile Include="Tie\FlightGroup.cs" />
<Compile Include="Tie\FlightGroup.FGGoals.cs" />
<Compile Include="Tie\FlightGroup.Order.cs" />
<Compile Include="Tie\FlightGroupCollection.cs" />
<Compile Include="Tie\Globals.cs" />
<Compile Include="Tie\Globals.Goal.cs" />
<Compile Include="Tie\Message.cs" />
<Compile Include="Tie\MessageCollection.cs" />
<Compile Include="Tie\Mission.cs" />
<Compile Include="Tie\Mission.IffNameIndexer.cs" />
<Compile Include="Tie\Mission.Trigger.cs" />
<Compile Include="Tie\Questions.cs" />
<Compile Include="Tie\Strings.cs" />
<Compile Include="Xvt\Briefing.cs" />
<Compile Include="Xvt\BriefingCollection.cs" />
<Compile Include="Xvt\FlightGroup.cs" />
<Compile Include="Xvt\FlightGroup.Goal.cs" />
<Compile Include="Xvt\FlightGroup.LoadoutIndexer.cs" />
<Compile Include="Xvt\FlightGroup.Order.cs" />
<Compile Include="Xvt\FlightGroupCollection.cs" />
<Compile Include="Xvt\Globals.cs" />
<Compile Include="Xvt\Globals.Goal.cs" />
<Compile Include="Xvt\Globals.Goal.Trigger.cs" />
<Compile Include="Xvt\GlobalsCollection.cs" />
<Compile Include="Xvt\Message.cs" />
<Compile Include="Xvt\MessageCollection.cs" />
<Compile Include="Xvt\Mission.cs" />
<Compile Include="Xvt\Mission.IffNameIndexer.cs" />
<Compile Include="Xvt\Mission.Trigger.cs" />
<Compile Include="Xvt\Strings.cs" />
<Compile Include="Xvt\Team.cs" />
<Compile Include="Xvt\TeamCollection.cs" />
<Compile Include="Xwa\Briefing.cs" />
<Compile Include="Xwa\BriefingCollection.cs" />
<Compile Include="Xwa\FlightGroup.cs" />
<Compile Include="Xwa\FlightGroup.Goal.cs" />
<Compile Include="Xwa\FlightGroup.LoadoutIndexer.cs" />
<Compile Include="Xwa\FlightGroup.Order.cs" />
<Compile Include="Xwa\FlightGroup.XwaWaypoint.cs" />
<Compile Include="Xwa\FlightGroupCollection.cs" />
<Compile Include="Xwa\Globals.cs" />
<Compile Include="Xwa\Globals.Goal.cs" />
<Compile Include="Xwa\Globals.Goal.StringsIndexer.cs" />
<Compile Include="Xwa\GlobalsCollection.cs" />
<Compile Include="Xwa\Message.cs" />
<Compile Include="Xwa\MessageCollection.cs" />
<Compile Include="Xwa\Mission.cs" />
<Compile Include="Xwa\Mission.Trigger.cs" />
<Compile Include="Xwa\Strings.cs" />
<Compile Include="Xwa\Team.cs" />
<Compile Include="Xwa\Team.EomMessageIndexer.cs" />
<Compile Include="Xwa\Team.EomMessageNoteIndexer.cs" />
<Compile Include="Xwa\Team.VoiceIDIndexer.cs" />
<Compile Include="Xwa\TeamCollection.cs" />
<Compile Include="Xwing\Briefing.EventCollection.cs" />
<Compile Include="Xwing\Briefing.cs" />
<Compile Include="Xwing\FlightGroup.cs" />
<Compile Include="Xwing\FlightGroupCollection.cs" />
<Compile Include="Xwing\Mission.cs" />
<Compile Include="Xwing\Strings.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Mission_TIE95.txt" />
<None Include="Mission_XvT.txt" />
<None Include="Mission_XWA.txt" />
<None Include="Mission_XWING95.txt" />
<None Include="License.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Readme.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<ProjectReference Include="$(IdmrCommonProject)" />
</ItemGroup>
<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>
-->
<PropertyGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "C:\Users\Me\Documents\Visual Studio 2008\Libraries\"
if $(ConfigurationName) == Release copy /y "$(TargetDir)$(TargetName).xml" "C:\Users\Me\Documents\Visual Studio 2008\Libraries\"</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("7.4.1.*")]
[assembly: AssemblyVersion("7.4.1.0")]
[assembly: AssemblyFileVersion("7.4.1.0")]
[assembly: AssemblyInformationalVersion("7.4 final")]
[assembly: AssemblyInformationalVersion("7.4 final")]
6 changes: 2 additions & 4 deletions Tie/MessageCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Idmr.Platform.Tie
{
Expand All @@ -36,12 +35,11 @@ public MessageCollection()
/// <summary>Creates a new Collection with multiple initial Messages.</summary>
/// <param name="quantity">Number of Messages to start with.</param>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="quantity"/> is less than <b>0</b>.</exception>
/// <remarks>Exceeding <see cref="Common.ResizableCollection{T}.ItemLimit"/> will result in a warning and the excess ignored.</remarks>
/// <remarks>Exceeding <see cref="Common.ResizableCollection{T}.ItemLimit"/> trims the excess.</remarks>
public MessageCollection(int quantity) : this()
{
if (quantity > _itemLimit)
{
MessageBox.Show($"Maximum quantity ({_itemLimit}) exceeded, trimming excess.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
quantity = _itemLimit;
}
if (quantity < 0) throw new ArgumentOutOfRangeException("quantity", "Invalid quantity, must be 0-" + _itemLimit);
Expand Down Expand Up @@ -132,4 +130,4 @@ public override void SetCount(int value, bool allowTruncate)
else while (Count < value) Add();
}
}
}
}
6 changes: 2 additions & 4 deletions Xvt/MessageCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Idmr.Platform.Xvt
{
Expand All @@ -36,12 +35,11 @@ public MessageCollection()
/// <summary>Creates a new Collection with multiple initial Messages.</summary>
/// <param name="quantity">Number of Messages to start with.</param>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="quantity"/> is less than <b>0</b>.</exception>
/// <remarks>Exceeding <see cref="Common.ResizableCollection{T}.ItemLimit"/> will result in a warning and the excess ignored.</remarks>
/// <remarks>Exceeding <see cref="Common.ResizableCollection{T}.ItemLimit"/> trims the excess.</remarks>
public MessageCollection(int quantity) : this()
{
if (quantity > _itemLimit)
{
MessageBox.Show($"Maximum quantity ({_itemLimit}) exceeded, trimming excess.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
quantity = _itemLimit;
}
if (quantity < 0) throw new ArgumentOutOfRangeException("quantity", "Invalid quantity, must be 0-" + _itemLimit);
Expand Down Expand Up @@ -131,4 +129,4 @@ public override void SetCount(int value, bool allowTruncate)
else while (Count < value) Add();
}
}
}
}