Skip to content

Commit

Permalink
feat (Laerdal.Dfu.csproj): add dummy-support for net8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ksidirop-laerdal committed Oct 30, 2024
1 parent df54289 commit a2f443d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 5 deletions.
17 changes: 14 additions & 3 deletions Laerdal.Dfu/Laerdal.Dfu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

<!-- ==================== TARGET FRAMEWORKS GROUP ===================== -->
<PropertyGroup>
<EnableWindowsTargeting Condition=" '$(IsHostMachineOSX)' == 'true' ">true</EnableWindowsTargeting>

<TargetFrameworks>$(TargetFrameworks)net8.0;</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks)net8.0-ios;</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks)net8.0-android</TargetFrameworks>
</PropertyGroup>
Expand All @@ -26,6 +25,7 @@
<IsForAndroid Condition=" '$(TargetPlatformBeingBuiltNow)' == 'android' ">true</IsForAndroid>
<IsForWindows Condition=" '$(TargetPlatformBeingBuiltNow)' == 'windows' ">true</IsForWindows>
<IsForMacCatalyst Condition=" '$(TargetPlatformBeingBuiltNow)' == 'maccatalyst' ">true</IsForMacCatalyst>
<IsForPlainNetX Condition=" '$(TargetFramework)' == 'net8.0' ">true</IsForPlainNetX>

<IsForAppleStuff Condition=" '$(IsForIOS)' == 'true' or '$(IsForMacCatalyst)' == 'true' ">true</IsForAppleStuff>
</PropertyGroup>
Expand All @@ -38,11 +38,22 @@
<SupportedOSPlatformVersion Condition=" '$(IsForAndroid)' == 'true' ">21.0</SupportedOSPlatformVersion>

<!-- ios you will need specific workloads though dotnet workload install maui -/-version 8.0.402 -->
<TargetPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">17.2</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">17.5</TargetPlatformVersion>
<TargetPlatformMinVersion Condition=" '$(IsForIOS)' == 'true' ">14.2</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">14.2</SupportedOSPlatformVersion>
</PropertyGroup>

<!-- ==================== NON-NETSTANDARD ==================== -->
<ItemGroup Condition=" '$(IsForPlainNetX)' != 'true' ">
<Compile Remove="Platforms.NetX\**" />
</ItemGroup>

<!-- ===================== NETSTANDARD ======================= -->
<ItemGroup Condition=" '$(IsForPlainNetX)' == 'true' ">
<Compile Remove="Platforms\**\**" />
<!-- <Compile Include="Platforms.NetX\**" /> no need to include this explicitly -->
</ItemGroup>

<PropertyGroup>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down
1 change: 1 addition & 0 deletions Laerdal.Dfu/Laerdal.Dfu.csproj.DotSettings
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=platforms/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=platforms_002Enetx/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=platforms_005Candroid/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=platforms_005Cios/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=platforms_005Cnetstandard/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
37 changes: 37 additions & 0 deletions Laerdal.Dfu/Platforms.NetX/DfuInstallation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System;
using System.Globalization;
using System.Linq;

namespace Laerdal.Dfu
{
public partial class DfuInstallation
{
public DfuInstallation(string deviceId, string fileUrl) : base(deviceId, fileUrl)
{
}

public DfuInstallation() : base()
{
}

public override void Start()
{
}

public override void Pause()
{
}

public override void Resume()
{
}

public override void Abort()
{
}

protected override void Dispose(bool disposing)
{
}
}
}
4 changes: 2 additions & 2 deletions Laerdal.Scripts/Laerdal.Builder.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<!-- # on macos -->
<!-- dotnet msbuild \ -->
<!-- Laerdal.Scripts/Laerdal.Builder.targets \ -->
<!-- '"/m:1"' '"/p:Laerdal_Version=1.0.x.0"' -->
<!-- '"/m:1"' '"/p:Laerdal_Version_Full=1.0.x.0"' -->
<!-- -->
<!-- # on windows powershell -->
<!-- dotnet msbuild ^ -->
<!-- Laerdal.Scripts\Laerdal.Builder.targets ^ -->
<!-- /m:1 /p:Laerdal_Version=1.0.x.0 -->
<!-- /m:1 /p:Laerdal_Version_Full=1.0.x.0 -->
<!-- -->

<Project DefaultTargets="BuildProjects">
Expand Down

0 comments on commit a2f443d

Please sign in to comment.