Skip to content

Commit

Permalink
Use latest Maui template
Browse files Browse the repository at this point in the history
  • Loading branch information
TimLariviere committed Jun 21, 2022
1 parent c8226ba commit 5125224
Show file tree
Hide file tree
Showing 32 changed files with 478 additions and 222 deletions.
57 changes: 57 additions & 0 deletions Fabulous-Maui.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A9556534-40E8-4C49-ADDB-AF94A3C4F95B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{332DE82F-232E-4963-9BF4-A4E9CD6A94BC}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabulous", "src\Fabulous\Fabulous.fsproj", "{08972FA6-0971-4B04-9A3F-B3C40E23F1D0}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabulous.Benchmarks", "src\Fabulous.Benchmarks\Fabulous.Benchmarks.fsproj", "{0CEFA033-9031-4754-B13A-14AD985CAE4D}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabulous.Tests", "src\Fabulous.Tests\Fabulous.Tests.fsproj", "{4EEF2FA7-0497-46AB-B102-B5BE21230ADE}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabulous.Maui", "src\Fabulous.Maui\Fabulous.Maui.fsproj", "{89A531C9-B20B-4E54-BCCA-60221601E4F9}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CounterApp", "samples\Maui\CounterApp\CounterApp.fsproj", "{CD9CD81C-99CA-441F-9EDC-37974BF04CFA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{08972FA6-0971-4B04-9A3F-B3C40E23F1D0} = {A9556534-40E8-4C49-ADDB-AF94A3C4F95B}
{0CEFA033-9031-4754-B13A-14AD985CAE4D} = {A9556534-40E8-4C49-ADDB-AF94A3C4F95B}
{4EEF2FA7-0497-46AB-B102-B5BE21230ADE} = {A9556534-40E8-4C49-ADDB-AF94A3C4F95B}
{89A531C9-B20B-4E54-BCCA-60221601E4F9} = {A9556534-40E8-4C49-ADDB-AF94A3C4F95B}
{CD9CD81C-99CA-441F-9EDC-37974BF04CFA} = {332DE82F-232E-4963-9BF4-A4E9CD6A94BC}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08972FA6-0971-4B04-9A3F-B3C40E23F1D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08972FA6-0971-4B04-9A3F-B3C40E23F1D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08972FA6-0971-4B04-9A3F-B3C40E23F1D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08972FA6-0971-4B04-9A3F-B3C40E23F1D0}.Release|Any CPU.Build.0 = Release|Any CPU
{0CEFA033-9031-4754-B13A-14AD985CAE4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CEFA033-9031-4754-B13A-14AD985CAE4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CEFA033-9031-4754-B13A-14AD985CAE4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CEFA033-9031-4754-B13A-14AD985CAE4D}.Release|Any CPU.Build.0 = Release|Any CPU
{4EEF2FA7-0497-46AB-B102-B5BE21230ADE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EEF2FA7-0497-46AB-B102-B5BE21230ADE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EEF2FA7-0497-46AB-B102-B5BE21230ADE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EEF2FA7-0497-46AB-B102-B5BE21230ADE}.Release|Any CPU.Build.0 = Release|Any CPU
{89A531C9-B20B-4E54-BCCA-60221601E4F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89A531C9-B20B-4E54-BCCA-60221601E4F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89A531C9-B20B-4E54-BCCA-60221601E4F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89A531C9-B20B-4E54-BCCA-60221601E4F9}.Release|Any CPU.Build.0 = Release|Any CPU
{CD9CD81C-99CA-441F-9EDC-37974BF04CFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD9CD81C-99CA-441F-9EDC-37974BF04CFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD9CD81C-99CA-441F-9EDC-37974BF04CFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD9CD81C-99CA-441F-9EDC-37974BF04CFA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
33 changes: 33 additions & 0 deletions Fabulous.sln
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CounterApp.Android.Mono", "
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabulous.XamarinForms.Tests", "src\Fabulous.XamarinForms.Tests\Fabulous.XamarinForms.Tests.fsproj", "{5C86CBC3-03CB-44BD-99EB-78454971E06C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Maui", "Maui", "{D10B43D6-9C1E-4A86-B30E-CA68CB406832}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CounterApp", "samples\Maui\CounterApp\CounterApp.fsproj", "{02E92D3F-97EB-45E5-A799-9FED38A779C7}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabulous.Maui", "src\Fabulous.Maui\Fabulous.Maui.fsproj", "{5E19AB20-82E4-4AD3-90FD-8B26E5146955}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -273,6 +279,30 @@ Global
{5C86CBC3-03CB-44BD-99EB-78454971E06C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{5C86CBC3-03CB-44BD-99EB-78454971E06C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{5C86CBC3-03CB-44BD-99EB-78454971E06C}.Debug|iPhone.Build.0 = Debug|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Release|Any CPU.Build.0 = Release|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Release|iPhone.ActiveCfg = Release|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Release|iPhone.Build.0 = Release|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{02E92D3F-97EB-45E5-A799-9FED38A779C7}.Debug|iPhone.Build.0 = Debug|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Release|Any CPU.Build.0 = Release|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Release|iPhone.ActiveCfg = Release|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Release|iPhone.Build.0 = Release|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{5E19AB20-82E4-4AD3-90FD-8B26E5146955}.Debug|iPhone.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -300,6 +330,9 @@ Global
{7FFFADDB-2EF4-4E63-B555-0C49D6679BC3} = {D375678C-B497-4829-BE47-97BBECEFC8BC}
{02FE7465-8523-45D1-B126-F9A4058E4012} = {C1C40071-569A-4530-8270-2D129EE598A9}
{5C86CBC3-03CB-44BD-99EB-78454971E06C} = {17D6F0FE-4DC3-4D1D-9B21-7F03C85D94CF}
{D10B43D6-9C1E-4A86-B30E-CA68CB406832} = {86E2044D-6BDD-45B4-A1A3-65386D858230}
{02E92D3F-97EB-45E5-A799-9FED38A779C7} = {D10B43D6-9C1E-4A86-B30E-CA68CB406832}
{5E19AB20-82E4-4AD3-90FD-8B26E5146955} = {17D6F0FE-4DC3-4D1D-9B21-7F03C85D94CF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EDCA34D6-C112-4886-800A-76EBF629BCC7}
Expand Down
7 changes: 4 additions & 3 deletions samples/Maui/CounterApp/App.fs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
namespace CounterApp

open Fabulous
open Fabulous.Maui

open type Fabulous.Maui.View

module App =
type Model = { Text: string }

Expand All @@ -16,7 +17,7 @@ module App =
| Nope -> model

let view model =
Unchecked.defaultof<WidgetBuilder<Msg, IApplication>>
Application()

let program =
Program.statefulApplication init update view
Program.stateful init update view
199 changes: 105 additions & 94 deletions samples/Maui/CounterApp/CounterApp.fsproj
Original file line number Diff line number Diff line change
@@ -1,94 +1,105 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>CounterApp</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<EnableDefaultItems>false</EnableDefaultItems>

<!-- Display name -->
<ApplicationTitle>CounterApp</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>org.fabulous.maui.counterapp</ApplicationId>
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">c25cd678-04b0-442e-8052-1be051052c78</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>

<ItemGroup>
<Compile Include="App.fs" />
<Compile Include="MauiProgram.fs" />
</ItemGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\appiconfg.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-ios'">
<ImageAsset Include="$(iOSProjectFolder)**/*.xcassets/**/*.png;$(iOSProjectFolder)**/*.xcassets/*/*.jpg;$(iOSProjectFolder)**/*.xcassets/**/*.pdf;$(iOSProjectFolder)**/*.xcassets/**/*.json" Exclude="$(_SingleProjectiOSExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" Visible="false" IsDefaultItem="true" />
<SceneKitAsset Include="$(iOSProjectFolder)**/*.scnassets/*" Exclude="$(_SingleProjectiOSExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" IsDefaultItem="true" />
<InterfaceDefinition Include="$(iOSProjectFolder)**/*.storyboard;$(iOSProjectFolder)**/*.xib" Exclude="$(_SingleProjectiOSExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" Visible="false" IsDefaultItem="true" />
<BundleResource Include="Platforms\iOS\Resources\**" />
<None Include="Platforms\iOS\Info.plist" />
<Compile Include="Platforms\iOS\AppDelegate.fs" />
<Compile Include="Platforms\iOS\Main.fs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">
<ImageAsset Include="$(MacCatalystProjectFolder)**/*.xcassets/**/*.png;$(MacCatalystProjectFolder)**/*.xcassets/*/*.jpg;$(MacCatalystProjectFolder)**/*.xcassets/**/*.pdf;$(MacCatalystProjectFolder)**/*.xcassets/**/*.json" Exclude="$(_SingleProjectMacCatalystExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" Visible="false" IsDefaultItem="true" />
<SceneKitAsset Include="$(MacCatalystProjectFolder)**/*.scnassets/*" Exclude="$(_SingleProjectMacCatalystExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" IsDefaultItem="true" />
<InterfaceDefinition Include="$(MacCatalystProjectFolder)**/*.storyboard;$(MacCatalystProjectFolder)**/*.xib" Exclude="$(_SingleProjectMacCatalystExcludes)" Link="%(RecursiveDir)%(FileName)%(Extension)" Visible="false" IsDefaultItem="true" />
<BundleResource Include="Platforms\MacCatalyst\Resources\**" />
<None Include="Platforms\MacCatalyst\Info.plist" />
<Compile Include="Platforms\MacCatalyst\AppDelegate.fs" />
<Compile Include="Platforms\MacCatalyst\Main.fs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android'">
<AndroidResource Include="Platforms/Android/Resources/*/*.xml" />
<AndroidResource Include="Platforms/Android/Resources/*/*.axml" />
<AndroidResource Include="Platforms/Android/Resources/*/*.png" />
<AndroidResource Include="Platforms/Android/Resources/*/*.jpg" />
<AndroidResource Include="Platforms/Android/Resources/*/*.gif" />
<AndroidResource Include="Platforms/Android/Resources/font/*.ttf" />
<AndroidResource Include="Platforms/Android/Resources/font/*.otf" />
<AndroidResource Include="Platforms/Android/Resources/font/*.ttc" />
<AndroidResource Include="Platforms/Android/Resources/raw/*" Exclude="Platforms/Android/Resources/raw/.*" />
<AndroidManifest Include="Platforms/Android/AndroidManifest.xml" />
<Compile Include="Platforms/Android/MainActivity.fs" />
<Compile Include="Platforms/Android/MainApplication.fs" />

<PackageReference Include="FSharp.Android.Resource" Version="1.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Fabulous.Maui\Fabulous.Maui.fsproj" />
<ProjectReference Include="..\..\..\src\Fabulous\Fabulous.fsproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>CounterApp</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<EnableDefaultItems>false</EnableDefaultItems>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>

<!-- Display name -->
<ApplicationTitle>CounterApp</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>org.fabulous.maui.counterapp</ApplicationId>
<ApplicationIdGuid>9ba62055-caf0-4bc6-aba6-2958ce60e04f</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<TargetPlatformIdentifier Condition=" $(TargetPlatformIdentifier) == '' ">$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>

<SupportedOSPlatformVersion Condition="$(TargetPlatformIdentifier) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetPlatformIdentifier) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetPlatformIdentifier) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetPlatformIdentifier) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetPlatformIdentifier) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$(TargetPlatformIdentifier) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
<Compile Include="App.fs" />
<Compile Include="MauiProgram.fs" />
</ItemGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\*" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
</ItemGroup>

<ItemGroup Condition="$(TargetPlatformIdentifier) == 'android'">
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*" />
<AndroidResource Remove="$(MonoAndroidResourcePrefix)/raw/.*" />
<AndroidResource Update="$(MonoAndroidResourcePrefix)/raw/*" />
<AndroidAsset Include="$(MonoAndroidAssetsPrefix)/**/*" Exclude="$(MonoAndroidAssetsPrefix)/**/.*/**" />
<AndroidManifest Include="$(AndroidProjectFolder)AndroidManifest.xml" />
<Compile Include="$(AndroidProjectFolder)MainActivity.fs" />
<Compile Include="$(AndroidProjectFolder)MainApplication.fs" />

<PackageReference Include="FSharp.Android.Resource" Version="1.0.4" />
</ItemGroup>

<ItemGroup Condition="$(TargetPlatformIdentifier) == 'ios'">
<None Include="$(iOSProjectFolder)Info.plist" />
<Compile Include="$(iOSProjectFolder)AppDelegate.fs" />
<Compile Include="$(iOSProjectFolder)Program.fs" />
</ItemGroup>

<ItemGroup Condition="$(TargetPlatformIdentifier) == 'maccatalyst'">
<None Include="$(MacCatalystProjectFolder)Info.plist" />
<Compile Include="$(MacCatalystProjectFolder)AppDelegate.fs" />
<Compile Include="$(MacCatalystProjectFolder)Program.fs" />
</ItemGroup>

<ItemGroup Condition="$(TargetPlatformIdentifier) == 'windows'">
<Manifest Include="$(WindowsProjectFolder)app.manifest" />
<AppxManifest Include="$(WindowsProjectFolder)Package.appxmanifest" />
<ApplicationDefinition Include="$(WindowsProjectFolder)App.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</ApplicationDefinition>
<Compile Include="$(WindowsProjectFolder)App.xaml.fs">
<DependentUpon>$(WindowsProjectFolder)App.xaml</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup Condition="$(TargetPlatformIdentifier) == 'tizen'">
<TizenManifestFile Include="$(TizenProjectFolder)tizen-manifest.xml" />
<Compile Include="$(TizenProjectFolder)Main.fs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Fabulous.Maui\Fabulous.Maui.fsproj" />
<PackageReference Include="FSharp.Core" Version="6.0.5" />
</ItemGroup>

</Project>
29 changes: 16 additions & 13 deletions samples/Maui/CounterApp/MauiProgram.fs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
namespace CounterApp

open Fabulous.Maui
open Microsoft.Maui.Hosting

type MauiProgram =
static member CreateMauiApp() =
MauiApp
.CreateBuilder()
.UseFabulousApp(App.program)
.ConfigureFonts(fun fonts ->
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular") |> ignore
)
namespace CounterApp

open Microsoft.Maui.Hosting
open Fabulous.Maui

type MauiProgram =
static member CreateMauiApp() =
MauiApp
.CreateBuilder()
.UseFabulousApp(App.program)
.ConfigureFonts(fun fonts ->
fonts
.AddFont("OpenSans-Regular.ttf", "OpenSansRegular")
.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold")
|> ignore
)
.Build()
Loading

0 comments on commit 5125224

Please sign in to comment.