Skip to content

Commit debbfb6

Browse files
Merge remote-tracking branch 'origin/develop' into develop
2 parents 2801aa0 + eaff1cb commit debbfb6

File tree

5 files changed

+62
-22
lines changed

5 files changed

+62
-22
lines changed

.github/workflows/github-actions.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ env:
1616
LAERDAL_REPOSITORY_PATH: ${{ github.repository }}
1717

1818
# note that its vital that we use our own token here instead of GITHUB_TOKEN that is because access the
19-
# nuget repos of Laerdal.Dfu.Bindings.iOS and Laerdal.Dfu.Bindings.Android which are inaccessible to the GITHUB_TOKEN
20-
SCL_GITHUB_ACCESS_TOKEN: ${{ secrets.SCL_GITHUB_ACCESS_TOKEN }}
19+
# nuget repos of Laerdal.Dfu.Bindings.iOS and Laerdal.Dfu.Bindings.Android which are inaccessible to the GITHUB_TOKEN
2120
SCL_NUGET_ORG_FEED_API_KEY: ${{ secrets.NUGET_ORG_FEED_API_KEY }}
21+
22+
SCL_GITHUB_ACCESS_TOKEN: ${{ secrets.SCL_GITHUB_ACCESS_TOKEN }}
2223
SCL_GITHUB_NUGET_FEED_USERNAME: ${{ secrets.SCL_GITHUB_NUGET_FEED_USERNAME }}
2324

2425
SCL_DEPENDENCY_TRACKER_API_KEY: ${{ secrets.SCL_DEPENDENCY_TRACKER_API_KEY }}
2526
SCL_DEPENDENCY_TRACKER_SERVER_URL: ${{ secrets.SCL_DEPENDENCY_TRACKER_SERVER_URL }}
2627
SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY: ${{ secrets.SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY }}
2728

28-
DOTNET_TARGET_WORKLOAD_VERSION: "8.0.402" # dont upgrade this lightheartedly the workload snapshot implicitly defines which versions of Android/iOS/MacCatalyst SDKs are supported
29+
DOTNET_TARGET_WORKLOAD_VERSION: "8.0.405" # dont upgrade this lightheartedly the workload snapshot implicitly defines which versions of Android/iOS/MacCatalyst SDKs are supported
2930

3031

3132
on:
@@ -55,7 +56,9 @@ jobs:
5556
with:
5657
fetch-tags: true # https://github.com/actions/checkout/issues/1471#issuecomment-1771231294
5758
fetch-depth: 0
58-
59+
60+
# "${{ github.actor }}"
61+
# "${{ github.token }}"
5962
- name: '🛠 Setup Build Environment'
6063
shell: 'bash'
6164
run: |
@@ -64,8 +67,8 @@ jobs:
6467
"${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh" \
6568
"${{env.DOTNET_TARGET_WORKLOAD_VERSION}}" \
6669
"https://nuget.pkg.github.com/Laerdal/index.json" \
67-
"${{ github.actor }}" \
68-
"${{ github.token }}" \
70+
"${{ env.SCL_GITHUB_NUGET_FEED_USERNAME }}" \
71+
"${{ env.SCL_GITHUB_ACCESS_TOKEN }}" \
6972
"${{ env.BUILD_REPOSITORY_FOLDERPATH }}/Artifacts"
7073
7174
# we need to manually install java11 because it is needed by the latest windows vm-images that run on

Laerdal.Dfu/Laerdal.Dfu.csproj

+16-9
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@
1212

1313
<!-- ==================== TARGET FRAMEWORKS GROUP ===================== -->
1414
<PropertyGroup>
15+
16+
<!-- - note that we build against net8.0 merely as a dud-placeholder for windows in which we are bound to get not-implemented exceptions all over the place -->
17+
<!-- - the dud build for net8 also comes in handy when we want to launch an application inside an ios-simulator in the macos desktop (for UI testing purposes) -->
18+
19+
<PackageVersionPostfix Condition=" '$(BuildOnlyDudNet8)' == 'true' ">-force-dud</PackageVersionPostfix>
20+
1521
<TargetFrameworks>$(TargetFrameworks)net8.0;</TargetFrameworks>
16-
<TargetFrameworks>$(TargetFrameworks)net8.0-ios;</TargetFrameworks>
17-
<TargetFrameworks>$(TargetFrameworks)net8.0-android;</TargetFrameworks>
18-
<TargetFrameworks>$(TargetFrameworks)net8.0-maccatalyst</TargetFrameworks>
22+
<TargetFrameworks Condition=" '$(BuildOnlyDudNet8)' != 'true' ">$(TargetFrameworks)net8.0-ios;</TargetFrameworks>
23+
<TargetFrameworks Condition=" '$(BuildOnlyDudNet8)' != 'true' ">$(TargetFrameworks)net8.0-android;</TargetFrameworks>
24+
<TargetFrameworks Condition=" '$(BuildOnlyDudNet8)' != 'true' ">$(TargetFrameworks)net8.0-maccatalyst</TargetFrameworks>
25+
1926
</PropertyGroup>
2027

2128
<!-- =================== TARGET FRAMEWORK DETECTION ===================== -->
@@ -38,13 +45,13 @@
3845
<TargetPlatformMinVersion Condition=" '$(IsForAndroid)' == 'true' ">21.0</TargetPlatformMinVersion>
3946
<SupportedOSPlatformVersion Condition=" '$(IsForAndroid)' == 'true' ">21.0</SupportedOSPlatformVersion>
4047

41-
<!-- ios you will need specific workloads though dotnet workload install maui -/-version 8.0.402 -->
42-
<TargetPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">17.0</TargetPlatformVersion>
48+
<!-- ios you will need specific workloads though dotnet workload install maui -/-version 8.0.405 -->
49+
<TargetPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">18.0</TargetPlatformVersion>
4350
<TargetPlatformMinVersion Condition=" '$(IsForIOS)' == 'true' ">14.2</TargetPlatformMinVersion>
4451
<SupportedOSPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">14.2</SupportedOSPlatformVersion>
4552

46-
<!-- maccatalyst you will need specific workloads though dotnet workload install maui -/-version 8.0.402 -->
47-
<TargetPlatformVersion Condition=" '$(IsForMacCatalyst)' == 'true' ">17.0</TargetPlatformVersion>
53+
<!-- maccatalyst you will need specific workloads though dotnet workload install maui -/-version 8.0.405 -->
54+
<TargetPlatformVersion Condition=" '$(IsForMacCatalyst)' == 'true' ">18.0</TargetPlatformVersion>
4855
<TargetPlatformMinVersion Condition=" '$(IsForMacCatalyst)' == 'true' ">13.1</TargetPlatformMinVersion>
4956
<SupportedOSPlatformVersion Condition=" '$(IsForMacCatalyst)' == 'true' ">13.1</SupportedOSPlatformVersion>
5057
</PropertyGroup>
@@ -101,11 +108,11 @@
101108
</ItemGroup>
102109
<!-- iOS -->
103110
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-ios'">
104-
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.15.3.43980" />
111+
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.15.3.43995" />
105112
</ItemGroup>
106113
<!-- MacCatalyst -->
107114
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-maccatalyst'">
108-
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.15.3.43980" />
115+
<PackageReference Include="Laerdal.Dfu.Bindings.MacCatalyst" Version="4.15.3.43995" />
109116
</ItemGroup>
110117
<!-- =========================== PACKAGES ============================ -->
111118

Laerdal.Dfu/Laerdal.targets

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<PropertyGroup>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66

7+
<Deterministic>true</Deterministic>
78
<IncludeSource>true</IncludeSource>
9+
<ImplicitUsings>true</ImplicitUsings>
810
<IncludeSymbols>true</IncludeSymbols>
911
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
10-
<Deterministic>true</Deterministic>
11-
<ImplicitUsings>true</ImplicitUsings>
1212
</PropertyGroup>
1313

1414
<!-- ==================== DEFAULT CI CONFIGURATION ==================== -->
@@ -25,14 +25,15 @@
2525
<!-- ==================== PACKAGING ==================== -->
2626
<PropertyGroup>
2727
<!-- Laerdal_Package_Name -->
28-
<Title>$(Laerdal_Package_Name)</Title>
2928
<PackageId>$(Laerdal_Package_Name)</PackageId>
29+
30+
<Title>$(Laerdal_Package_Name)</Title>
3031
<AssemblyName>$(Laerdal_Package_Name)</AssemblyName>
3132
<RootNamespace>$(Laerdal_Package_Name)</RootNamespace>
3233

3334
<!-- Laerdal_Package_Copyright -->
34-
<Authors>$(Laerdal_Package_Copyright)</Authors>
3535
<Owners>$(Laerdal_Package_Copyright)</Owners>
36+
<Authors>$(Laerdal_Package_Copyright)</Authors>
3637
<Copyright>$(Laerdal_Package_Copyright)</Copyright>
3738

3839
<!-- Laerdal_Package_Description -->
@@ -56,8 +57,8 @@
5657

5758
<ItemGroup>
5859
<None Include="$(PackageIconPath)" Pack="true" PackagePath="\" Condition="Exists('$(PackageIconPath)')" />
59-
<None Include="$(PackageLicencePath)" Pack="true" PackagePath="\" Condition="Exists('$(PackageLicencePath)')" />
6060
<None Include="$(PackageReadMePath)" Pack="true" PackagePath="\" Condition="Exists('$(PackageReadMePath)')" />
61+
<None Include="$(PackageLicencePath)" Pack="true" PackagePath="\" Condition="Exists('$(PackageLicencePath)')" />
6162
</ItemGroup>
6263

6364
<!-- ==================== SOURCELINK ==================== -->
@@ -120,7 +121,8 @@
120121

121122
<!-- Apply Version parts according to packaging standards -->
122123
<Version>$(Laerdal_Version_Full)</Version>
123-
<PackageVersion>$(Laerdal_Version_Full)</PackageVersion>
124+
<!-- keep this because it is needed to generate the *-force-dud nuget packages! -->
125+
<PackageVersion>$(Laerdal_Version_Full)$(PackageVersionPostfix)</PackageVersion>
124126

125127
<AssemblyVersion>$(Laerdal_Version_Full)</AssemblyVersion>
126128
<AssemblyFileVersion>$(Laerdal_Version_Full)</AssemblyFileVersion>

Laerdal.Scripts/Laerdal.Builder.targets

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
<PackageOutputPath Condition=" '$(PackageOutputPath)' == '' ">$(BUILD_ARTIFACTSTAGINGDIRECTORY)</PackageOutputPath>
2525
<PackageOutputPath Condition=" '$(PackageOutputPath)' == '' ">$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), `..`, `Artifacts/`))</PackageOutputPath>
2626

27+
<Laerdal_Script_FolderPath>$(MSBuildThisFileDirectory)</Laerdal_Script_FolderPath>
28+
29+
<Laerdal_RootDirectory_Folderpath>$([System.IO.Path]::Combine( '$(Laerdal_Script_FolderPath)', '..' ))</Laerdal_RootDirectory_Folderpath>
30+
<Laerdal_RootDirectory_Folderpath>$([System.IO.Path]::GetFullPath( '$(Laerdal_RootDirectory_Folderpath)' ))</Laerdal_RootDirectory_Folderpath>
31+
2732
<Laerdal_Source_Branch Condition=" '$(Laerdal_Source_Branch)' == '' ">$(BUILD_SOURCEBRANCH)</Laerdal_Source_Branch>
2833
<Laerdal_Repository_Path Condition=" '$(Laerdal_Repository_Path)' == '' ">$(BUILD_REPOSITORY_NAME)</Laerdal_Repository_Path>
2934
<Laerdal_Dependency_Tracker_Server_Url Condition=" '$(Laerdal_Dependency_Tracker_Server_Url)' == '' ">https://dep-tracker.laerdal.com/api/api/v1/bom</Laerdal_Dependency_Tracker_Server_Url>
@@ -85,7 +90,10 @@
8590
</PropertyGroup>
8691

8792
<!-- RUN -->
88-
<MSBuild Projects="$(Laerdal_Project)" Properties="$(_Laerdal_Build_Parameters)" Targets="Restore;Build"/>
93+
<MSBuild Projects="$(Laerdal_Project)" Targets="Restore;Build" Properties="$(_Laerdal_Build_Parameters)" />
94+
95+
<!-- -force-dud build aiming just pure net8 without bindings this is meant for desktop simulators of android and ios for ui testing purposes of apps -->
96+
<MSBuild Projects="$(Laerdal_Project)" Targets="Restore;Rebuild" Properties="$(_Laerdal_Build_Parameters);BuildOnlyDudNet8=true;SourceRoot=$(Laerdal_RootDirectory_Folderpath)/Laerdal.Dfu/;" />
8997
</Target>
9098

9199
<!-- GITHUB RELEASE -->

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,23 @@ git clone https://github.com/Laerdal/Laerdal.Dfu.git
2222
```bash
2323
dotnet msbuild Laerdal.Scripts/Laerdal.Builder.targets /m:1 /p:Laerdal_Version=9.0.x.0 /p:Laerdal_Github_Access_Token=<place your github access token here - its needed by carthage>
2424
```
25+
26+
## Known issues
27+
28+
- Trying to use the iOS/Android flavours of this library in desktop-simulators for iOS/Android will probably result in compilation errors. If you want to perform general purpose
29+
UI-testing on your desktop using such simulators you need to tweak your nuget references to use the `-force-dud` nuget of `Laerdal.Dfu` like so:
30+
31+
```xml
32+
<PackageReference Include="Laerdal.Dfu" Version="x.y.z-force-dud">
33+
<NoWarn>$(NoWarn);NU1605</NoWarn>
34+
</PackageReference>
35+
```
36+
37+
Alternatively you can achieve the same result by overriding the reference to `Laerdal.Dfu.Bindings.iOS` like so (note: this solution is only applicable for iOS and will work only
38+
for iOS sdk 18.x or below!):
39+
40+
```xml
41+
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="x.y.z-ios-sim-arm64">
42+
<NoWarn>$(NoWarn);NU1605</NoWarn>
43+
</PackageReference>
44+
```

0 commit comments

Comments
 (0)