Skip to content

Commit

Permalink
docs (README.md): update build instructions
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
ksidirop-laerdal committed May 13, 2024
1 parent 387bdc6 commit ea8317e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Laerdal.Dfu.Bindings.iOS/Laerdal.Dfu.Bindings.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<Target Condition=" '$(DesignTimeBuild)' != 'true' and '$(BuildingProject)' == 'true' and !Exists('Carthage\Carthage\Build\iOSDFULibrary.xcframework\Package.swift') "
Name="_DownloadIosNativeFiles"
BeforeTargets="PrepareForBuild">

<Error Condition=" '$(Laerdal_Github_Access_Token)' == '' " Text="'Laerdal_Github_Access_Token' is not defined. Please define it in your environment variables otherwise Carthage will fail most of the times." />

<Message Importance="High" Text="** Downloading Carthage iOS packages ..."/>
Expand All @@ -55,7 +55,7 @@
Lines="github &quot;NordicSemiconductor/IOS-Pods-DFU-Library&quot; &quot;$(Nordic_Package_Version)&quot;"
Overwrite="true"/>

<Exec Command="GITHUB_ACCESS_TOKEN=&quot;github.com=$(Laerdal_Github_Access_Token)&quot; carthage update --project-directory Carthage --use-xcframeworks --platform iOS --no-use-binaries" />
<Exec WorkingDirectory="$(MSBuildThisFileDirectory)" Command="GITHUB_ACCESS_TOKEN=&quot;github.com=$(Laerdal_Github_Access_Token)&quot; carthage update --project-directory Carthage --use-xcframeworks --platform iOS --no-use-binaries" />

<RemoveDir
Condition="Exists('Carthage\Carthage\Checkouts\IOS-Pods-DFU-Library\Example')"
Expand Down
26 changes: 18 additions & 8 deletions Laerdal.Scripts/Laerdal.Builder.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,25 @@
<!-- -->
<!-- - to build with an explicit version specified in the cli: -->
<!-- -->
<!-- # on macos -->
<!-- dotnet msbuild \ -->
<!-- Laerdal.Scripts/Laerdal.Builder.targets \ -->
<!-- '"/m:1"' '"/p:Laerdal_Version=1.0.x.0"' -->
<!-- -->
<!-- # on windows powershell -->
<!-- dotnet msbuild ^ -->
<!-- Laerdal.Scripts\Laerdal.Builder.targets ^ -->
<!-- /m:1 /p:Laerdal_Version=1.0.x.0 -->
<!-- # Note If carthage fails in macos try cleaning up your carthage cache like so and then try again -->
<!-- # Note -->
<!-- # Note rm -rf ~/Library/Caches/org.carthage.CarthageKit -->
<!-- # Note -->
<!-- # -->
<!-- # on macos -->
<!-- dotnet msbuild \ -->
<!-- Laerdal.Scripts/Laerdal.Builder.targets \ -->
<!-- '"/m:1"' \ -->
<!-- '"/p:Laerdal_Version=1.0.x.0"' \ -->
<!-- '"/p:Laerdal_Github_Access_Token=<place your github access token here - its needed by carthage>"' -->
<!-- -->
<!-- # on windows powershell -->
<!-- dotnet msbuild ^ -->
<!-- Laerdal.Scripts\Laerdal.Builder.targets ^ -->
<!-- /m:1 ^ -->
<!-- /p:Laerdal_Version=1.0.x.0 ^ -->
<!-- /p:Laerdal_Github_Access_Token="<place your github access token here - its needed by carthage>" -->
<!-- -->

<Project DefaultTargets="BuildProjects">
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,25 @@ git clone https://github.com/Laerdal/Laerdal.Dfu.Bindings.iOS.git
### 2) Build

```bash
dotnet build

# Note If carthage fails in macos try cleaning up your carthage cache like so and then try again
# Note
# Note rm -rf ~/Library/Caches/org.carthage.CarthageKit
# Note
#
# on macos
dotnet msbuild \
Laerdal.Scripts/Laerdal.Builder.targets \
'"/m:1"' \
'"/p:Laerdal_Version=1.0.x.0"' \
'"/p:Laerdal_Github_Access_Token=<place your github access token here - its needed by carthage>"'

# on windows powershell
dotnet msbuild ^
Laerdal.Scripts\Laerdal.Builder.targets ^
/m:1 ^
/p:Laerdal_Version=1.0.x.0 ^
/p:Laerdal_Github_Access_Token="<place your github access token here - its needed by carthage>"
```

You'll find the nuget in `Output/`
Expand Down

0 comments on commit ea8317e

Please sign in to comment.