Skip to content

Commit

Permalink
try fix photino and ios build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukks committed Nov 27, 2024
1 parent d2c445a commit 4257d85
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 38 deletions.
7 changes: 7 additions & 0 deletions .run/BTCPayApp.Maui.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@
<option name="Build" />
</method>
</configuration>
<configuration default="false" name="BTCPayApp.Maui" type="XamarinIOSProject" factoryName="Xamarin.iOS">
<option name="PROJECT_PATH" value="$PROJECT_DIR$/BTCPayApp.Maui/BTCPayApp.Maui.csproj" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="IS_PASS_PARENT_ENVS" value="false" />
<option name="EXTRA_MLAUNCH_PARAMETERS" value="" />
<method v="2" />
</configuration>
</component>
57 changes: 28 additions & 29 deletions BTCPayApp.Maui/BTCPayApp.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>

<EnableDefaultCssItems>false</EnableDefaultCssItems>

<!-- Display name -->
<ApplicationTitle>BTCPay Server</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>org.btcpayserver.BTCPayApp.maui</ApplicationId>
<ApplicationId>org.btcpayserver.BTCPayApp</ApplicationId>
<ApplicationIdGuid>8DD71ACC-C78F-44AB-937A-6B3A19D7E78E</ApplicationIdGuid>
<RunAOTCompilation>false</RunAOTCompilation>


<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
Expand All @@ -26,10 +29,16 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-ios'">

<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<ArchiveOnBuild>true</ArchiveOnBuild>
<RuntimeIdentifiers>ios-arm64</RuntimeIdentifiers>
<UseInterpreter>True</UseInterpreter>
</PropertyGroup>


<ItemGroup>

<!-- App Icon -->

<!-- Splash Screen -->
Expand All @@ -50,37 +59,27 @@
<ProjectReference Include="..\BTCPayApp.UI\BTCPayApp.UI.csproj"/>
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net8.0-android')) != true">
<Compile Remove="**\Android\**\*.cs"/>
<None Include="**\Android\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
<ItemGroup>
<PackageReference Include="org.ldk" Version="0.0.123"/>
<PackageReference Include="Plugin.Fingerprint" Version="3.0.0-beta.1"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.91"/>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2"/>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.91"/>
<PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.91"/>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">

<!-- Both iOS and Mac Catalyst -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net8.0-ios')) != true">
<Compile Remove="**\iOS\**\*.cs"/>
<None Include="**\iOS\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">

<ItemGroup>
<PackageReference Include="org.ldk" Version="0.0.123" />
<PackageReference Include="Plugin.Fingerprint" Version="3.0.0-beta.1"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.91" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.91" />
<PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.91" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' ">

<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.8"/>
<PackageReference Include="SQLitePCLRaw.core" Version="2.1.8"/>
<PackageReference Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="2.1.8"/>
<PackageReference Include="SQLitePCLRaw.provider.sqlite3" Version="2.1.8"/>
</ItemGroup>
<ItemGroup>
<None Remove="Platforms\Android\Resources\mipmap-hdpi\ic_launcher.png" />
<Resource Include="Platforms\Android\Resources\mipmap-hdpi\ic_launcher.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Platforms\Android\Resources\drawable\" />
<Compile Remove="**\Android\**\*.cs"/>
<None Include="**\Android\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"/>
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.10"/>
<PackageReference Include="SQLitePCLRaw.core" Version="2.1.10"/>
<PackageReference Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="2.1.10"/>
<PackageReference Include="SQLitePCLRaw.provider.sqlite3" Version="2.1.10"/>
</ItemGroup>
</Project>

</Project>
14 changes: 7 additions & 7 deletions BTCPayApp.Photino/BTCPayApp.Photino.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>WinExe</OutputType>
Expand All @@ -11,13 +10,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Photino.Blazor" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<PackageReference Include="Photino.Blazor" Version="3.2.0" />
</ItemGroup>

<ItemGroup>
<Content Update="wwwroot\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BTCPayApp.Core\BTCPayApp.Core.csproj" />
<ProjectReference Include="..\BTCPayApp.Desktop\BTCPayApp.Desktop.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion BTCPayApp.Photino/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Photino.Blazor;
using PhotinoNET;
using Photino.NET;

namespace BTCPayApp.Photino;

Expand Down
2 changes: 1 addition & 1 deletion BTCPayApp.Photino/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<a class="reload" href="">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webview.js" autostart="false"></script>
<script src="_framework/blazor.webview.js"></script>
<script src="_content/BTCPayApp.UI/bootstrap/bootstrap.bundle.min.js"></script>
<script src="_content/BTCPayApp.UI/js/global.js"></script>
</body>
Expand Down

0 comments on commit 4257d85

Please sign in to comment.