Avalonia single project support (#9613)
* MVP SingleProject support for all supported platforms * Convert MobileSandbox to be a single project * WASM fixes * Fix SDK CI version * Use .NET 8 in build project as well * Add EnableUnsafeBinaryFormatterSerialization * Add macos workload, remove wasm-experimental * And ios * Specify TFM for single-project projects in dirs.proj * Return deleted line * Set PrivateAssets=all on MobileSandbox * Add ios target only on non-linux in MobileSandbox * Update after merges * Update browser sub-project from the templates * Don't build MobileSandbox on CI * Couple of improvements * Add android hack to run without manifest * Add tvOS support and rearrange some properties * Delete unusable Packages.targets file + related * Add global Condition for AvaloniaSingleProject.targets
@@ -128,6 +128,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{4D6F
|
|||||||
build\BuildTargets.targets = build\BuildTargets.targets
|
build\BuildTargets.targets = build\BuildTargets.targets
|
||||||
build\LegacyProject.targets = build\LegacyProject.targets
|
build\LegacyProject.targets = build\LegacyProject.targets
|
||||||
build\UnitTests.NetCore.targets = build\UnitTests.NetCore.targets
|
build\UnitTests.NetCore.targets = build\UnitTests.NetCore.targets
|
||||||
|
build\DevSingleProject.targets = build\DevSingleProject.targets
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Linux", "Linux", "{86C53C40-57AA-45B8-AD42-FAE0EFDF0F2B}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Linux", "Linux", "{86C53C40-57AA-45B8-AD42-FAE0EFDF0F2B}"
|
||||||
@@ -214,12 +215,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevGenerators", "src\tools\
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileSandbox", "samples\MobileSandbox\MobileSandbox.csproj", "{3B8519C1-2F51-4F12-A348-120AB91D4532}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileSandbox", "samples\MobileSandbox\MobileSandbox.csproj", "{3B8519C1-2F51-4F12-A348-120AB91D4532}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileSandbox.Android", "samples\MobileSandbox.Android\MobileSandbox.Android.csproj", "{C90FE60B-B01E-4F35-91D6-379D6966030F}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileSandbox.iOS", "samples\MobileSandbox.iOS\MobileSandbox.iOS.csproj", "{FED9A71D-00D7-4F40-A9E4-1229EEA28EEB}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileSandbox.Desktop", "samples\MobileSandbox.Desktop\MobileSandbox.Desktop.csproj", "{62D392C9-81CF-487F-92E8-598B2AF3FDCE}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Browser", "src\Browser\Avalonia.Browser\Avalonia.Browser.csproj", "{4A39637C-9338-4925-A4DB-D072E292EC78}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Browser", "src\Browser\Avalonia.Browser\Avalonia.Browser.csproj", "{4A39637C-9338-4925-A4DB-D072E292EC78}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Browser.Blazor", "src\Browser\Avalonia.Browser.Blazor\Avalonia.Browser.Blazor.csproj", "{47F8530C-F19B-4B1A-B4D6-EB231522AE5D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Browser.Blazor", "src\Browser\Avalonia.Browser.Blazor\Avalonia.Browser.Blazor.csproj", "{47F8530C-F19B-4B1A-B4D6-EB231522AE5D}"
|
||||||
@@ -280,8 +275,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Headless.NUnit.Uni
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Headless.XUnit.UnitTests", "tests\Avalonia.Headless.XUnit.UnitTests\Avalonia.Headless.XUnit.UnitTests.csproj", "{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Headless.XUnit.UnitTests", "tests\Avalonia.Headless.XUnit.UnitTests\Avalonia.Headless.XUnit.UnitTests.csproj", "{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileSandbox.Browser", "samples\MobileSandbox.Browser\MobileSandbox.Browser.csproj", "{43FCC14E-EEBE-44B3-BCBC-F1C537EECBF8}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tizen", "Tizen", "{D1300000-7217-4693-8B0F-57CBD5814302}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tizen", "Tizen", "{D1300000-7217-4693-8B0F-57CBD5814302}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Tizen", "src\Tizen\Avalonia.Tizen\Avalonia.Tizen.csproj", "{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Tizen", "src\Tizen\Avalonia.Tizen\Avalonia.Tizen.csproj", "{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}"
|
||||||
@@ -576,19 +569,6 @@ Global
|
|||||||
{3B8519C1-2F51-4F12-A348-120AB91D4532}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{3B8519C1-2F51-4F12-A348-120AB91D4532}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{3B8519C1-2F51-4F12-A348-120AB91D4532}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{3B8519C1-2F51-4F12-A348-120AB91D4532}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{3B8519C1-2F51-4F12-A348-120AB91D4532}.Release|Any CPU.Build.0 = Release|Any CPU
|
{3B8519C1-2F51-4F12-A348-120AB91D4532}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{C90FE60B-B01E-4F35-91D6-379D6966030F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C90FE60B-B01E-4F35-91D6-379D6966030F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C90FE60B-B01E-4F35-91D6-379D6966030F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
|
||||||
{C90FE60B-B01E-4F35-91D6-379D6966030F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C90FE60B-B01E-4F35-91D6-379D6966030F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{FED9A71D-00D7-4F40-A9E4-1229EEA28EEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{FED9A71D-00D7-4F40-A9E4-1229EEA28EEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{FED9A71D-00D7-4F40-A9E4-1229EEA28EEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{FED9A71D-00D7-4F40-A9E4-1229EEA28EEB}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{62D392C9-81CF-487F-92E8-598B2AF3FDCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{62D392C9-81CF-487F-92E8-598B2AF3FDCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{62D392C9-81CF-487F-92E8-598B2AF3FDCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{62D392C9-81CF-487F-92E8-598B2AF3FDCE}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{4A39637C-9338-4925-A4DB-D072E292EC78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{4A39637C-9338-4925-A4DB-D072E292EC78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4A39637C-9338-4925-A4DB-D072E292EC78}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4A39637C-9338-4925-A4DB-D072E292EC78}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4A39637C-9338-4925-A4DB-D072E292EC78}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{4A39637C-9338-4925-A4DB-D072E292EC78}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
@@ -673,10 +653,6 @@ Global
|
|||||||
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Release|Any CPU.Build.0 = Release|Any CPU
|
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{43FCC14E-EEBE-44B3-BCBC-F1C537EECBF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{43FCC14E-EEBE-44B3-BCBC-F1C537EECBF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{43FCC14E-EEBE-44B3-BCBC-F1C537EECBF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{43FCC14E-EEBE-44B3-BCBC-F1C537EECBF8}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
@@ -757,9 +733,6 @@ Global
|
|||||||
{EABE2161-989B-42BF-BD8D-1E34B20C21F1} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
{EABE2161-989B-42BF-BD8D-1E34B20C21F1} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
||||||
{1BBFAD42-B99E-47E0-B00A-A4BC6B6BB4BB} = {4ED8B739-6F4E-4CD4-B993-545E6B5CE637}
|
{1BBFAD42-B99E-47E0-B00A-A4BC6B6BB4BB} = {4ED8B739-6F4E-4CD4-B993-545E6B5CE637}
|
||||||
{3B8519C1-2F51-4F12-A348-120AB91D4532} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
{3B8519C1-2F51-4F12-A348-120AB91D4532} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
||||||
{C90FE60B-B01E-4F35-91D6-379D6966030F} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
|
||||||
{FED9A71D-00D7-4F40-A9E4-1229EEA28EEB} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
|
||||||
{62D392C9-81CF-487F-92E8-598B2AF3FDCE} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
|
||||||
{4A39637C-9338-4925-A4DB-D072E292EC78} = {86A3F706-DC3C-43C6-BE1B-B98F5BAAA268}
|
{4A39637C-9338-4925-A4DB-D072E292EC78} = {86A3F706-DC3C-43C6-BE1B-B98F5BAAA268}
|
||||||
{47F8530C-F19B-4B1A-B4D6-EB231522AE5D} = {86A3F706-DC3C-43C6-BE1B-B98F5BAAA268}
|
{47F8530C-F19B-4B1A-B4D6-EB231522AE5D} = {86A3F706-DC3C-43C6-BE1B-B98F5BAAA268}
|
||||||
{15B93A4C-1B46-43F6-B534-7B25B6E99932} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
{15B93A4C-1B46-43F6-B534-7B25B6E99932} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
||||||
@@ -779,7 +752,6 @@ Global
|
|||||||
{4B8EBBEB-A1AD-49EC-8B69-B93ED15BFA64} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
{4B8EBBEB-A1AD-49EC-8B69-B93ED15BFA64} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
||||||
{2999D79E-3C20-4A90-B651-CA7E0AC92D35} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
{2999D79E-3C20-4A90-B651-CA7E0AC92D35} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
||||||
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
||||||
{43FCC14E-EEBE-44B3-BCBC-F1C537EECBF8} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
|
||||||
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8} = {D1300000-7217-4693-8B0F-57CBD5814302}
|
{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8} = {D1300000-7217-4693-8B0F-57CBD5814302}
|
||||||
{A0B29221-2B6F-4B29-A4D5-2227811B5915} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
{A0B29221-2B6F-4B29-A4D5-2227811B5915} = {9B9E3891-2366-4253-A952-D08BCEB71098}
|
||||||
{B0FD6A48-FBAB-4676-B36A-DE76B0922B12} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
{B0FD6A48-FBAB-4676-B36A-DE76B0922B12} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
displayName: 'Install Workloads'
|
displayName: 'Install Workloads'
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: |
|
||||||
dotnet workload install wasm-tools wasm-experimental
|
dotnet workload install android macos wasm-tools
|
||||||
|
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
displayName: 'Install Tizen Workload'
|
displayName: 'Install Tizen Workload'
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
displayName: 'Install Workloads'
|
displayName: 'Install Workloads'
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: |
|
||||||
dotnet workload install wasm-tools wasm-experimental
|
dotnet workload install android ios macos wasm-tools
|
||||||
|
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
displayName: 'Install Tizen Workload'
|
displayName: 'Install Tizen Workload'
|
||||||
@@ -167,7 +167,7 @@ jobs:
|
|||||||
displayName: 'Install Workloads'
|
displayName: 'Install Workloads'
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: |
|
||||||
dotnet workload install android ios tvos wasm-tools wasm-experimental
|
dotnet workload install android ios tvos wasm-tools
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Install Tizen Workload'
|
displayName: 'Install Tizen Workload'
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<UsingTask TaskName="GenerateAvaloniaResourcesTask" AssemblyFile="$(AvaloniaBuildTasksLocation)" TaskFactory="TaskHostFactory"/>
|
<UsingTask TaskName="GenerateAvaloniaResourcesTask" AssemblyFile="$(AvaloniaBuildTasksLocation)" TaskFactory="TaskHostFactory"/>
|
||||||
<UsingTask TaskName="CompileAvaloniaXamlTask" AssemblyFile="$(AvaloniaBuildTasksLocation)" TaskFactory="TaskHostFactory"/>
|
<UsingTask TaskName="CompileAvaloniaXamlTask" AssemblyFile="$(AvaloniaBuildTasksLocation)" TaskFactory="TaskHostFactory"/>
|
||||||
|
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)\DevSingleProject.targets"/>
|
||||||
<Import Project="$(MSBuildThisFileDirectory)\..\packages\Avalonia\AvaloniaBuildTasks.props"/>
|
<Import Project="$(MSBuildThisFileDirectory)\..\packages\Avalonia\AvaloniaBuildTasks.props"/>
|
||||||
<Import Project="$(MSBuildThisFileDirectory)\..\packages\Avalonia\AvaloniaBuildTasks.targets"/>
|
<Import Project="$(MSBuildThisFileDirectory)\..\packages\Avalonia\AvaloniaBuildTasks.targets"/>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)\..\packages\Avalonia\AvaloniaSingleProject.targets"/>
|
||||||
|
|
||||||
|
<ItemGroup Condition=" '$(AvaloniaSingleProject)' == 'true' ">
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Skia\Avalonia.Skia\Avalonia.Skia.csproj" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Windows\Avalonia.Win32\Avalonia.Win32.csproj" Condition="'$(_AvaloniaWindowsTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Avalonia.Native\Avalonia.Native.csproj" Condition="'$(_AvaloniaMacOSTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Avalonia.X11\Avalonia.X11.csproj" Condition="'$(_AvaloniaLinuxTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Android\Avalonia.Android\Avalonia.Android.csproj" Condition="'$(_AvaloniaAndroidTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\iOS\Avalonia.iOS\Avalonia.iOS.csproj" Condition="'$(_AvaloniaIOSTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Browser\Avalonia.Browser\Avalonia.Browser.csproj" Condition="'$(_AvaloniaBrowserTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Tizen\Avalonia.Tizen\Avalonia.Tizen.csproj" Condition="'$(_AvaloniaTizenTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Tizen\Avalonia.Tizen\Avalonia.Tizen.csproj" Condition="'$(_AvaloniaTizenTarget)' == 'true'" />
|
||||||
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\Avalonia.Desktop\Avalonia.Desktop.csproj" Condition="'$(_AvaloniaDesktopTarget)' == 'true'" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)\..\src\Browser\Avalonia.Browser\build\Avalonia.Browser.props" Condition="'$(_AvaloniaBrowserTarget)' == 'true'" />
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)\..\src\Browser\Avalonia.Browser\build\Avalonia.Browser.targets" Condition="'$(_AvaloniaBrowserTarget)' == 'true'" />
|
||||||
|
</Project>
|
||||||
@@ -7,24 +7,22 @@
|
|||||||
<ProjectReference Condition="'$(SkipBuildingTests)' != 'True'" Include="tests/**/*.*proj" />
|
<ProjectReference Condition="'$(SkipBuildingTests)' != 'True'" Include="tests/**/*.*proj" />
|
||||||
<ProjectReference Include="packages/**/*.*proj" />
|
<ProjectReference Include="packages/**/*.*proj" />
|
||||||
<ProjectReference Remove="**/*.shproj" />
|
<ProjectReference Remove="**/*.shproj" />
|
||||||
<ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml/PortableXaml/**/*.*proj" />
|
|
||||||
<ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/**/*.*proj" />
|
<ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/**/*.*proj" />
|
||||||
<!-- Exclude iOS, Android and Browser samples from build -->
|
<!-- Exclude iOS, Android and Browser samples from build -->
|
||||||
<ProjectReference Remove="samples/*.iOS/*.csproj" />
|
<ProjectReference Remove="samples/*.iOS/*.csproj" />
|
||||||
<ProjectReference Remove="samples/*.Android/*.csproj" />
|
<ProjectReference Remove="samples/*.Android/*.csproj" />
|
||||||
<ProjectReference Remove="samples/*.Browser/*.csproj" />
|
<ProjectReference Remove="samples/*.Browser/*.csproj" />
|
||||||
<ProjectReference Remove="samples/*.Blazor/*.csproj" />
|
<ProjectReference Remove="samples/*.Blazor/*.csproj" />
|
||||||
|
<ProjectReference Remove="samples/*.Tizen/*.csproj" />
|
||||||
|
<ProjectReference Remove="samples/MobileSandbox/*.csproj" />
|
||||||
<ProjectReference Remove="samples/ControlCatalog.Desktop/*.*proj" />
|
<ProjectReference Remove="samples/ControlCatalog.Desktop/*.*proj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows'))">
|
|
||||||
<ProjectReference Remove="src/Windows/Avalonia.Win32.Interoperability/Avalonia.Win32.Interoperability.csproj" />
|
|
||||||
<ProjectReference Remove="samples/interop/**/*.*proj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<!-- Build android and iOS projects only on Windows, where we have installed android workload -->
|
|
||||||
<ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows'))">
|
<ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows'))">
|
||||||
|
<!-- Build mobile backends only on Windows, where we have installed android workload -->
|
||||||
<ProjectReference Remove="src/Android/**/*.*proj" />
|
<ProjectReference Remove="src/Android/**/*.*proj" />
|
||||||
<ProjectReference Remove="src/iOS/**/*.*proj" />
|
<ProjectReference Remove="src/iOS/**/*.*proj" />
|
||||||
|
<ProjectReference Remove="src/Tizen/**/*.*proj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(SkipObscurePlatforms)' == 'True'">
|
<ItemGroup Condition="'$(SkipObscurePlatforms)' == 'True'">
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
"rollForward": "latestFeature"
|
"rollForward": "latestFeature"
|
||||||
},
|
},
|
||||||
"msbuild-sdks": {
|
"msbuild-sdks": {
|
||||||
"Microsoft.Build.Traversal": "3.2.0"
|
"Microsoft.Build.Traversal": "4.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildThisFileDirectory)\AvaloniaBuildTasks.targets"/>
|
<Import Project="$(MSBuildThisFileDirectory)\AvaloniaBuildTasks.targets"/>
|
||||||
<Import Project="$(MSBuildThisFileDirectory)\AvaloniaPrivateApis.targets" />
|
<Import Project="$(MSBuildThisFileDirectory)\AvaloniaPrivateApis.targets" />
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)\AvaloniaSingleProject.targets" Condition="'$(AvaloniaSingleProject)' == 'true'"/>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,277 @@
|
|||||||
|
<Project>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- For projects that want to treat "netx.0-windows" as a "netx.0" -->
|
||||||
|
<AvaloniaSingleProjectTreatWindowsAsShared Condition="'$(AvaloniaSingleProjectTreatWindowsAsShared)' == ''">false</AvaloniaSingleProjectTreatWindowsAsShared>
|
||||||
|
<!-- "net8.0" target without specific platform should be treated as a desktop target by default for executable projects. -->
|
||||||
|
<AvaloniaSingleProjectTreatSharedAsDesktop Condition="'$(AvaloniaSingleProjectTreatSharedAsDesktop)' == '' AND ('$(OutputType)' == 'Exe' OR '$(OutputType)' == 'WinExe')">true</AvaloniaSingleProjectTreatSharedAsDesktop>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Include targets into AvaloniaSingleProjectTargets -->
|
||||||
|
<PropertyGroup Condition="'$(AvaloniaSingleProject)' == 'true'">
|
||||||
|
<_AvaloniaWindowsTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">true</_AvaloniaWindowsTarget>
|
||||||
|
<_AvaloniaMacOSTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">true</_AvaloniaMacOSTarget>
|
||||||
|
<_AvaloniaAndroidTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">true</_AvaloniaAndroidTarget>
|
||||||
|
<_AvaloniaIOSTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">true</_AvaloniaIOSTarget>
|
||||||
|
<_AvaloniaTvOSTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tvos'">true</_AvaloniaTvOSTarget>
|
||||||
|
<_AvaloniaBrowserTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'browser'">true</_AvaloniaBrowserTarget>
|
||||||
|
<_AvaloniaTizenTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">true</_AvaloniaTizenTarget>
|
||||||
|
<!-- This target isn't yet supported by .NET -->
|
||||||
|
<_AvaloniaLinuxTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'linux'" >true</_AvaloniaLinuxTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- See AvaloniaSingleProjectTreatWindowsAsShared and AvaloniaSingleProjectTreatSharedAsDesktop props comments -->
|
||||||
|
<PropertyGroup Condition="'$(AvaloniaSingleProject)' == 'true'
|
||||||
|
AND (('$(AvaloniaSingleProjectTreatSharedAsDesktop)' == 'true' AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == '')
|
||||||
|
OR ('$(AvaloniaSingleProjectTreatWindowsAsShared)' == 'true' AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'))">
|
||||||
|
<_AvaloniaDesktopTarget>true</_AvaloniaDesktopTarget>
|
||||||
|
<_AvaloniaWindowsTarget>true</_AvaloniaWindowsTarget>
|
||||||
|
<_AvaloniaMacOSTarget>true</_AvaloniaMacOSTarget>
|
||||||
|
<_AvaloniaLinuxTarget>true</_AvaloniaLinuxTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(_AvaloniaWindowsTarget)' == 'true' ">
|
||||||
|
<OutputType Condition="'$(OutputType)' == 'Exe'">WinExe</OutputType>
|
||||||
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(_AvaloniaBrowserTarget)' == 'true' ">
|
||||||
|
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">browser-wasm</RuntimeIdentifier>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(AvaloniaSingleProject)' == 'true' ">
|
||||||
|
<PlatformsProjectFolder Condition=" '$(PlatformsProjectFolder)' == '' ">Platforms\</PlatformsProjectFolder>
|
||||||
|
<PlatformsProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(PlatformsProjectFolder)'))</PlatformsProjectFolder>
|
||||||
|
<!-- Required - Enable Launch Profiles for .NET 6 iOS/Android -->
|
||||||
|
<_KeepLaunchProfiles>true</_KeepLaunchProfiles>
|
||||||
|
<!-- Android -->
|
||||||
|
<EnableDefaultAndroidItems>false</EnableDefaultAndroidItems>
|
||||||
|
<AndroidProjectFolder Condition=" '$(AndroidProjectFolder)' == '' ">$(PlatformsProjectFolder)Android\</AndroidProjectFolder>
|
||||||
|
<AndroidProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(AndroidProjectFolder)'))</AndroidProjectFolder>
|
||||||
|
<!-- iOS/tvOS -->
|
||||||
|
<EnableDefaultiOSItems>false</EnableDefaultiOSItems>
|
||||||
|
<EnableDefaulttvOSItems>false</EnableDefaulttvOSItems>
|
||||||
|
<iOSProjectFolder Condition=" '$(iOSProjectFolder)' == '' AND '$(_AvaloniaIOSTarget)' == 'true'">$(PlatformsProjectFolder)iOS\</iOSProjectFolder>
|
||||||
|
<iOSProjectFolder Condition=" '$(iOSProjectFolder)' == '' AND '$(_AvaloniaTvOSTarget)' == 'true'">$(PlatformsProjectFolder)tvOS\</iOSProjectFolder>
|
||||||
|
<iOSProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(iOSProjectFolder)'))</iOSProjectFolder>
|
||||||
|
<!-- MacCatalyst -->
|
||||||
|
<EnableDefaultMacCatalystItems>false</EnableDefaultMacCatalystItems>
|
||||||
|
<MacCatalystProjectFolder Condition=" '$(MacCatalystProjectFolder)' == '' ">$(PlatformsProjectFolder)MacCatalyst\</MacCatalystProjectFolder>
|
||||||
|
<MacCatalystProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(MacCatalystProjectFolder)'))</MacCatalystProjectFolder>
|
||||||
|
<!-- macOS -->
|
||||||
|
<EnableDefaultmacOSItems>false</EnableDefaultmacOSItems>
|
||||||
|
<macOSProjectFolder Condition=" '$(macOSProjectFolder)' == '' ">$(PlatformsProjectFolder)macOS\</macOSProjectFolder>
|
||||||
|
<macOSProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(macOSProjectFolder)'))</macOSProjectFolder>
|
||||||
|
<!-- Windows -->
|
||||||
|
<EnableDefaultWindowsItems>false</EnableDefaultWindowsItems>
|
||||||
|
<WindowsProjectFolder Condition=" '$(WindowsProjectFolder)' == '' ">$(PlatformsProjectFolder)Windows\</WindowsProjectFolder>
|
||||||
|
<WindowsProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(WindowsProjectFolder)'))</WindowsProjectFolder>
|
||||||
|
<!-- Linux -->
|
||||||
|
<LinuxProjectFolder Condition=" '$(LinuxProjectFolder)' == '' ">$(PlatformsProjectFolder)Linux\</LinuxProjectFolder>
|
||||||
|
<LinuxProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(LinuxProjectFolder)'))</LinuxProjectFolder>
|
||||||
|
<!-- Browser -->
|
||||||
|
<BrowserProjectFolder Condition=" '$(BrowserProjectFolder)' == '' ">$(PlatformsProjectFolder)Browser\</BrowserProjectFolder>
|
||||||
|
<BrowserProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(BrowserProjectFolder)'))</BrowserProjectFolder>
|
||||||
|
<!-- Tizen -->
|
||||||
|
<EnableDefaultTizenItems>false</EnableDefaultTizenItems>
|
||||||
|
<TizenProjectFolder Condition=" '$(TizenProjectFolder)' == '' ">$(PlatformsProjectFolder)Tizen\</TizenProjectFolder>
|
||||||
|
<TizenProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(TizenProjectFolder)'))</TizenProjectFolder>
|
||||||
|
<!-- Desktop (NET8.0 without specific target) -->
|
||||||
|
<DesktopProjectFolder Condition=" '$(DesktopProjectFolder)' == '' ">$(PlatformsProjectFolder)Desktop\</DesktopProjectFolder>
|
||||||
|
<DesktopProjectFolder>$([MSBuild]::EnsureTrailingSlash('$(DesktopProjectFolder)'))</DesktopProjectFolder>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition=" '$(AvaloniaSingleProject)' == 'true' ">
|
||||||
|
<!-- Compatability with VS tooling -->
|
||||||
|
<MauiPlatformSpecificFolder Include="$(AndroidProjectFolder)" TargetPlatformIdentifier="android" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(iOSProjectFolder)" TargetPlatformIdentifier="ios" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(tvOSProjectFolder)" TargetPlatformIdentifier="tvos" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(macOSProjectFolder)" TargetPlatformIdentifier="macos" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(WindowsProjectFolder)" TargetPlatformIdentifier="windows" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(LinuxProjectFolder)" TargetPlatformIdentifier="linux" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(BrowserProjectFolder)" TargetPlatformIdentifier="browser" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(TizenProjectFolder)" TargetPlatformIdentifier="tizen" />
|
||||||
|
<MauiPlatformSpecificFolder Include="$(DesktopProjectFolder)" TargetPlatformIdentifier="" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(_AvaloniaAndroidTarget)' == 'true' ">
|
||||||
|
<AndroidManifest Condition=" Exists('$(AndroidProjectFolder)AndroidManifest.xml') ">$(AndroidProjectFolder)AndroidManifest.xml</AndroidManifest>
|
||||||
|
<MonoAndroidResourcePrefix>$(AndroidProjectFolder)Resources</MonoAndroidResourcePrefix>
|
||||||
|
<MonoAndroidAssetsPrefix>$(AndroidProjectFolder)Assets</MonoAndroidAssetsPrefix>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(_AvaloniaIOSTarget)' == 'true' OR '$(_AvaloniaTvOSTarget)' == 'true'">
|
||||||
|
<IPhoneResourcePrefix>$(iOSProjectFolder)Resources</IPhoneResourcePrefix>
|
||||||
|
<CodesignEntitlements Condition=" Exists('$(iOSProjectFolder)Entitlements.plist') ">$(iOSProjectFolder)Entitlements.plist</CodesignEntitlements>
|
||||||
|
<_SingleProjectiOSExcludes>$(iOSProjectFolder)/**/.*/**</_SingleProjectiOSExcludes>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(DesktopProjectFolder)' == 'true'">
|
||||||
|
<ApplicationManifest Condition=" Exists('$(DesktopProjectFolder)app.manifest') ">$(DesktopProjectFolder)app.manifest</ApplicationManifest>
|
||||||
|
<PackageManifest Condition=" Exists('$(DesktopProjectFolder)Package.appxmanifest') ">$(DesktopProjectFolder)Package.appxmanifest</PackageManifest>
|
||||||
|
<CodesignEntitlements Condition=" Exists('$(DesktopProjectFolder)Entitlements.plist') ">$(DesktopProjectFolder)Entitlements.plist</CodesignEntitlements>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(_AvaloniaMacOSTarget)' == 'true' ">
|
||||||
|
<CodesignEntitlements Condition=" Exists('$(macOSProjectFolder)Entitlements.plist') ">$(macOSProjectFolder)Entitlements.plist</CodesignEntitlements>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(_AvaloniaWindowsTarget)' == 'true'">
|
||||||
|
<ApplicationManifest Condition=" Exists('$(WindowsProjectFolder)app.manifest') ">$(WindowsProjectFolder)app.manifest</ApplicationManifest>
|
||||||
|
<PackageManifest Condition=" Exists('$(WindowsProjectFolder)Package.appxmanifest') ">$(WindowsProjectFolder)Package.appxmanifest</PackageManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(_AvaloniaTizenTarget)' == 'true' ">
|
||||||
|
<TizenManifestFile Condition=" Exists('$(TizenProjectFolder)tizen-manifest.xml') ">$(TizenProjectFolder)tizen-manifest.xml</TizenManifestFile>
|
||||||
|
<TizenResourcePrefix>$(TizenProjectFolder)res</TizenResourcePrefix>
|
||||||
|
<TizenSharedPrefix>$(TizenProjectFolder)shared</TizenSharedPrefix>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(_AvaloniaBrowserTarget)' == 'true' ">
|
||||||
|
<WasmMainJSPath Condition=" Exists('$(BrowserProjectFolder)/wwwroot/main.js') ">$(BrowserProjectFolder)/wwwroot/main.js</WasmMainJSPath>
|
||||||
|
<WasmMainHtmlPath Condition=" Exists('$(BrowserProjectFolder)/wwwroot/index.html') ">$(BrowserProjectFolder)wwwroot/index.html</WasmMainHtmlPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition=" '$(AvaloniaSingleProject)' == 'true' ">
|
||||||
|
<!-- Add metadata indicating that the platform-specific files are not part of every build configuration. -->
|
||||||
|
<Compile Update="$(PlatformsProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>true</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
|
||||||
|
<!-- Add metadata for the files that are actually part of the current build configuration. -->
|
||||||
|
<Compile Condition=" '$(_AvaloniaAndroidTarget)' == 'true' " Update="$(AndroidProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaIOSTarget)' == 'true' OR '$(_AvaloniaTvOSTarget)' == 'true'" Update="$(iOSProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaTvOSTarget)' == 'true' " Update="$(tvOSProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaDesktopTarget)' == 'true' " Update="$(DesktopProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaMacOSTarget)' == 'true' " Update="$(macOSProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaWindowsTarget)' == 'true' " Update="$(WindowsProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaLinuxTarget)' == 'true' " Update="$(LinuxProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaBrowserTarget)' == 'true' " Update="$(BrowserProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
<Compile Condition=" '$(_AvaloniaTizenTarget)' == 'true' " Update="$(TizenProjectFolder)**/*$(DefaultLanguageSourceExtension)">
|
||||||
|
<ExcludeFromCurrentConfiguration>false</ExcludeFromCurrentConfiguration>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="_AvaloniaRemovePlatformCompileItems" BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun" Condition=" '$(EnableDefaultItems)' == 'true' and '$(AvaloniaSingleProject)' == 'true' ">
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Condition=" '%(Compile.ExcludeFromCurrentConfiguration)' == 'true' " Remove="$(PlatformsProjectFolder)**/*$(DefaultLanguageSourceExtension)" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<!-- IDE capabilities -->
|
||||||
|
<ItemGroup Condition=" '$(AvaloniaSingleProject)' == 'true' ">
|
||||||
|
<ProjectCapability Include="Msix" />
|
||||||
|
<ProjectCapability Include="MauiSingleProject" />
|
||||||
|
<ProjectCapability Include="LaunchProfiles" />
|
||||||
|
<!-- If VS is older than Dev17 -->
|
||||||
|
<ProjectCapability Include="XamarinStaticLaunchProfiles" Condition=" '$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' < '17.0' " />
|
||||||
|
<!-- Otherwise define LaunchProfilesGroupByPlatformFilters by default -->
|
||||||
|
<ProjectCapability Include="LaunchProfilesGroupByPlatformFilters" Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' >= '17.0' " />
|
||||||
|
<ProjectCapability Include="SingleTargetBuildForStartupProjects" Condition=" '$(EnableSingleTargetBuildForStartupProjects)' != 'false' " />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Android -->
|
||||||
|
<ItemGroup Condition="'$(EnableDefaultItems)' == 'true' and '$(_AvaloniaAndroidTarget)' == 'true' and '$(MonoAndroidResourcePrefix)' != '' ">
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.xml" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.axml" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.png" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.jpg" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.gif" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/font/*.ttf" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/font/*.otf" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/font/*.ttc" />
|
||||||
|
<AndroidResource Include="$(MonoAndroidResourcePrefix)/raw/*" Exclude="$(MonoAndroidResourcePrefix)/raw/.*" />
|
||||||
|
<AndroidAsset Include="$(MonoAndroidAssetsPrefix)/**/*" Exclude="$(MonoAndroidAssetsPrefix)/**/.*/**" />
|
||||||
|
<!-- <AndroidResource Condition="Exists('$(ApplicationIcon)')" Include="$(ApplicationIcon)">-->
|
||||||
|
<!-- <Link>$(MonoAndroidResourcePrefix)\drawable\Icon.png</Link>-->
|
||||||
|
<!-- </AndroidResource>-->
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- iOS -->
|
||||||
|
<ItemGroup Condition=" '$(EnableDefaulItems)' == 'true' and ('$(_AvaloniaIOSTarget)' == 'true' OR '$(_AvaloniaTvOSTarget)' == 'true') and '$(iOSProjectFolder)' != ''">
|
||||||
|
<None
|
||||||
|
Include="$(iOSProjectFolder)Info.plist"
|
||||||
|
Condition="Exists('$(iOSProjectFolder)Info.plist')"
|
||||||
|
Exclude="$(_SingleProjectiOSExcludes)"
|
||||||
|
LogicalName="Info.plist"
|
||||||
|
IsDefaultItem="true"
|
||||||
|
/>
|
||||||
|
<BundleResource
|
||||||
|
Include="$(iOSProjectFolder)Resources\**"
|
||||||
|
Exclude="$(_SingleProjectiOSExcludes)"
|
||||||
|
IsDefaultItem="true"
|
||||||
|
/>
|
||||||
|
<ImageAsset
|
||||||
|
Include="$(iOSProjectFolder)**/*.xcassets/**/*.*"
|
||||||
|
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)"
|
||||||
|
IsDefaultItem="true"
|
||||||
|
/>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Windows -->
|
||||||
|
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' and '$(_AvaloniaWindowsTarget)' == 'true' ">
|
||||||
|
<Manifest
|
||||||
|
Include="$(ApplicationManifest)"
|
||||||
|
Condition="Exists('$(ApplicationManifest)')" />
|
||||||
|
<AppxManifest
|
||||||
|
Include="$(PackageManifest)"
|
||||||
|
Condition="Exists('$(PackageManifest)')" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Browser -->
|
||||||
|
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' and '$(_AvaloniaBrowserTarget)' == 'true' and '$(BrowserProjectFolder)' != '' ">
|
||||||
|
<WasmExtraFilesToDeploy Include="$(BrowserProjectFolder)/wwwroot/**/*.*" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Tizen -->
|
||||||
|
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' and '$(_AvaloniaTizenTarget)' == 'true' and '$(TizenProjectFolder)' != '' ">
|
||||||
|
<TizenResource
|
||||||
|
Include="$(TizenResourcePrefix)\**\*"
|
||||||
|
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(TizenTpkUserExcludeFiles)" />
|
||||||
|
<TizenSharedResource
|
||||||
|
Include="$(TizenSharedPrefix)\**\*"
|
||||||
|
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(TizenTpkUserExcludeFiles)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Android workaround to allow projects without AndroidManifest.xml, as it used to be supported -->
|
||||||
|
<Target Name="BeforeGetAndroidPackageName"
|
||||||
|
BeforeTargets="_GetAndroidPackageName">
|
||||||
|
<PropertyGroup>
|
||||||
|
<_AndroidManifestAbsTemp Condition=" '$(AndroidManifest)' != '' ">$(ProjectDir)$(AndroidManifest)</_AndroidManifestAbsTemp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(_AndroidManifestAbsTemp)' != '' and !Exists ('$(_AndroidManifestAbsTemp)') ">
|
||||||
|
<AndroidManifest></AndroidManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Android.App;
|
|
||||||
using Android.Content.PM;
|
|
||||||
using Android.OS;
|
|
||||||
using Avalonia;
|
|
||||||
using Avalonia.Android;
|
|
||||||
|
|
||||||
namespace MobileSandbox.Android
|
|
||||||
{
|
|
||||||
[Activity(Label = "MobileSandbox.Android", Theme = "@style/MyTheme.NoActionBar", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)]
|
|
||||||
public class MainActivity : AvaloniaMainActivity<App>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>$(AvsCurrentAndroidTargetFramework)</TargetFramework>
|
|
||||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ApplicationId>com.Avalonia.MobileSandbox</ApplicationId>
|
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
|
||||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
|
||||||
<AndroidPackageFormat>apk</AndroidPackageFormat>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidResource Include="..\..\build\Assets\Icon.png">
|
|
||||||
<Link>Resources\drawable\Icon.png</Link>
|
|
||||||
</AndroidResource>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(AndroidEnableProfiler)'=='True'">
|
|
||||||
<IsEmulator Condition="'$(IsEmulator)' == ''">True</IsEmulator>
|
|
||||||
<DebugSymbols>True</DebugSymbols>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidEnvironment Condition="'$(IsEmulator)'=='True'" Include="environment.emulator.txt" />
|
|
||||||
<AndroidEnvironment Condition="'$(IsEmulator)'!='True'" Include="environment.device.txt" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.4" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\src\Android\Avalonia.Android\Avalonia.Android.csproj" />
|
|
||||||
<ProjectReference Include="..\MobileSandbox\MobileSandbox.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
|
||||||
in your application as resource files. Various Android APIs are designed to
|
|
||||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
|
||||||
directly.
|
|
||||||
|
|
||||||
For example, a sample Android app that contains a user interface layout (main.axml),
|
|
||||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
|
||||||
would keep its resources in the "Resources" directory of the application:
|
|
||||||
|
|
||||||
Resources/
|
|
||||||
drawable/
|
|
||||||
icon.png
|
|
||||||
|
|
||||||
layout/
|
|
||||||
main.axml
|
|
||||||
|
|
||||||
values/
|
|
||||||
strings.xml
|
|
||||||
|
|
||||||
In order to get the build system to recognize Android resources, set the build action to
|
|
||||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
|
||||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
|
||||||
the build system will package the resources for distribution and generate a class called "R"
|
|
||||||
(this is an Android convention) that contains the tokens for each one of the resources
|
|
||||||
included. For example, for the above Resources layout, this is what the R class would expose:
|
|
||||||
|
|
||||||
public class R {
|
|
||||||
public class drawable {
|
|
||||||
public const int icon = 0x123;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class layout {
|
|
||||||
public const int main = 0x456;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class strings {
|
|
||||||
public const int first_string = 0xabc;
|
|
||||||
public const int second_string = 0xbcd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
|
|
||||||
to reference the layout/main.axml file, or R.strings.first_string to reference the first
|
|
||||||
string in the dictionary file values/strings.xml.
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
<animated-vector
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt">
|
|
||||||
<aapt:attr name="android:drawable">
|
|
||||||
<vector
|
|
||||||
android:name="vector"
|
|
||||||
android:width="128dp"
|
|
||||||
android:height="128dp"
|
|
||||||
android:viewportWidth="128"
|
|
||||||
android:viewportHeight="128">
|
|
||||||
<group
|
|
||||||
android:name="wrapper"
|
|
||||||
android:translateX="21"
|
|
||||||
android:translateY="21">
|
|
||||||
<group android:name="group">
|
|
||||||
<path
|
|
||||||
android:name="path"
|
|
||||||
android:pathData="M 74.853 85.823 L 75.368 85.823 C 80.735 85.823 85.144 81.803 85.761 76.602 L 85.836 41.76 C 85.225 18.593 66.254 0 42.939 0 C 19.24 0 0.028 19.212 0.028 42.912 C 0.028 66.357 18.831 85.418 42.18 85.823 L 74.853 85.823 Z"
|
|
||||||
android:strokeWidth="1"/>
|
|
||||||
<path
|
|
||||||
android:name="path_1"
|
|
||||||
android:pathData="M 43.059 14.614 C 29.551 14.614 18.256 24.082 15.445 36.743 C 18.136 37.498 20.109 39.968 20.109 42.899 C 20.109 45.831 18.136 48.301 15.445 49.055 C 18.256 61.716 29.551 71.184 43.059 71.184 C 47.975 71.184 52.599 69.93 56.628 67.723 L 56.628 70.993 L 71.344 70.993 L 71.344 44.072 C 71.357 43.714 71.344 43.26 71.344 42.899 C 71.344 27.278 58.68 14.614 43.059 14.614 Z M 29.51 42.899 C 29.51 35.416 35.576 29.35 43.059 29.35 C 50.541 29.35 56.607 35.416 56.607 42.899 C 56.607 50.382 50.541 56.448 43.059 56.448 C 35.576 56.448 29.51 50.382 29.51 42.899 Z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:fillType="evenOdd"/>
|
|
||||||
<path
|
|
||||||
android:name="path_2"
|
|
||||||
android:pathData="M 18.105 42.88 C 18.105 45.38 16.078 47.407 13.579 47.407 C 11.079 47.407 9.052 45.38 9.052 42.88 C 9.052 40.381 11.079 38.354 13.579 38.354 C 16.078 38.354 18.105 40.381 18.105 42.88 Z"
|
|
||||||
android:strokeWidth="1"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
</aapt:attr>
|
|
||||||
<target android:name="path">
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="fillColor"
|
|
||||||
android:duration="1000"
|
|
||||||
android:valueFrom="#00ffffff"
|
|
||||||
android:valueTo="#161c2d"
|
|
||||||
android:valueType="colorType"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
|
||||||
</aapt:attr>
|
|
||||||
</target>
|
|
||||||
<target android:name="path_1">
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="fillColor"
|
|
||||||
android:duration="1000"
|
|
||||||
android:valueFrom="#00ffffff"
|
|
||||||
android:valueTo="#f9f9fb"
|
|
||||||
android:valueType="colorType"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
|
||||||
</aapt:attr>
|
|
||||||
</target>
|
|
||||||
<target android:name="path_2">
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="fillColor"
|
|
||||||
android:duration="1000"
|
|
||||||
android:valueFrom="#00ffffff"
|
|
||||||
android:valueTo="#f9f9fb"
|
|
||||||
android:valueType="colorType"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
|
||||||
</aapt:attr>
|
|
||||||
</target>
|
|
||||||
</animated-vector>
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
<animated-vector
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt">
|
|
||||||
<aapt:attr name="android:drawable">
|
|
||||||
<vector
|
|
||||||
android:name="vector"
|
|
||||||
android:width="128dp"
|
|
||||||
android:height="128dp"
|
|
||||||
android:viewportWidth="128"
|
|
||||||
android:viewportHeight="128">
|
|
||||||
<group
|
|
||||||
android:name="wrapper"
|
|
||||||
android:translateX="21"
|
|
||||||
android:translateY="21">
|
|
||||||
<group android:name="group">
|
|
||||||
<path
|
|
||||||
android:name="path"
|
|
||||||
android:pathData="M 74.853 85.823 L 75.368 85.823 C 80.735 85.823 85.144 81.803 85.761 76.602 L 85.836 41.76 C 85.225 18.593 66.254 0 42.939 0 C 19.24 0 0.028 19.212 0.028 42.912 C 0.028 66.357 18.831 85.418 42.18 85.823 L 74.853 85.823 Z"
|
|
||||||
android:fillColor="#00ffffff"
|
|
||||||
android:strokeWidth="1"/>
|
|
||||||
<path
|
|
||||||
android:name="path_1"
|
|
||||||
android:pathData="M 43.059 14.614 C 29.551 14.614 18.256 24.082 15.445 36.743 C 18.136 37.498 20.109 39.968 20.109 42.899 C 20.109 45.831 18.136 48.301 15.445 49.055 C 18.256 61.716 29.551 71.184 43.059 71.184 C 47.975 71.184 52.599 69.93 56.628 67.723 L 56.628 70.993 L 71.344 70.993 L 71.344 44.072 C 71.357 43.714 71.344 43.26 71.344 42.899 C 71.344 27.278 58.68 14.614 43.059 14.614 Z M 29.51 42.899 C 29.51 35.416 35.576 29.35 43.059 29.35 C 50.541 29.35 56.607 35.416 56.607 42.899 C 56.607 50.382 50.541 56.448 43.059 56.448 C 35.576 56.448 29.51 50.382 29.51 42.899 Z"
|
|
||||||
android:fillColor="#00ffffff"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:fillType="evenOdd"/>
|
|
||||||
<path
|
|
||||||
android:name="path_2"
|
|
||||||
android:pathData="M 18.105 42.88 C 18.105 45.38 16.078 47.407 13.579 47.407 C 11.079 47.407 9.052 45.38 9.052 42.88 C 9.052 40.381 11.079 38.354 13.579 38.354 C 16.078 38.354 18.105 40.381 18.105 42.88 Z"
|
|
||||||
android:fillColor="#00ffffff"
|
|
||||||
android:strokeWidth="1"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
</aapt:attr>
|
|
||||||
<target android:name="path_2">
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="fillColor"
|
|
||||||
android:startOffset="100"
|
|
||||||
android:duration="900"
|
|
||||||
android:valueFrom="#00ffffff"
|
|
||||||
android:valueTo="#161c2d"
|
|
||||||
android:valueType="colorType"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
|
||||||
</aapt:attr>
|
|
||||||
</target>
|
|
||||||
<target android:name="path">
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="fillColor"
|
|
||||||
android:duration="500"
|
|
||||||
android:valueFrom="#00ffffff"
|
|
||||||
android:valueTo="#f9f9fb"
|
|
||||||
android:valueType="colorType"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
|
||||||
</aapt:attr>
|
|
||||||
</target>
|
|
||||||
<target android:name="path_1">
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="fillColor"
|
|
||||||
android:startOffset="100"
|
|
||||||
android:duration="900"
|
|
||||||
android:valueFrom="#00ffffff"
|
|
||||||
android:valueTo="#161c2d"
|
|
||||||
android:valueType="colorType"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"/>
|
|
||||||
</aapt:attr>
|
|
||||||
</target>
|
|
||||||
</animated-vector>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<item>
|
|
||||||
<color android:color="@color/splash_background"/>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item android:drawable="@drawable/icon"
|
|
||||||
android:width="120dp"
|
|
||||||
android:height="120dp"
|
|
||||||
android:gravity="center" />
|
|
||||||
|
|
||||||
</layer-list>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="splash_background">#212121</color>
|
|
||||||
</resources>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<resources>
|
|
||||||
|
|
||||||
<style name="MyTheme">
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="MyTheme.NoActionBar" parent="@style/Theme.AppCompat.NoActionBar">
|
|
||||||
<item name="android:windowActionBar">false</item>
|
|
||||||
<item name="android:windowBackground">@null</item>
|
|
||||||
<item name="android:windowNoTitle">true</item>
|
|
||||||
<item name="android:windowSplashScreenBackground">@color/splash_background</item>
|
|
||||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/avalonia_anim</item>
|
|
||||||
<item name="android:windowSplashScreenAnimationDuration">1000</item>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="splash_background">#FFFFFF</color>
|
|
||||||
</resources>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<resources>
|
|
||||||
|
|
||||||
<style name="MyTheme">
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="MyTheme.NoActionBar" parent="@style/Theme.AppCompat.NoActionBar">
|
|
||||||
<item name="android:windowActionBar">false</item>
|
|
||||||
<item name="android:windowBackground">@drawable/splash_screen</item>
|
|
||||||
<item name="android:windowNoTitle">true</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
DOTNET_DiagnosticPorts=127.0.0.1:9000,suspend
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
DOTNET_DiagnosticPorts=10.0.2.2:9001,suspend
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>$(AvsCurrentBrowserTargetFramework)</TargetFramework>
|
|
||||||
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
|
||||||
<WasmMainJSPath>main.js</WasmMainJSPath>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<WasmBuildNative>true</WasmBuildNative>
|
|
||||||
<WasmRuntimeAssetsLocation>./</WasmRuntimeAssetsLocation>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\src\Browser\Avalonia.Browser\Avalonia.Browser.csproj" />
|
|
||||||
<ProjectReference Include="..\MobileSandbox\MobileSandbox.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<WasmExtraFilesToDeploy Include="index.html" />
|
|
||||||
<WasmExtraFilesToDeploy Include="main.js" />
|
|
||||||
<WasmExtraFilesToDeploy Include="favicon.ico" />
|
|
||||||
<WasmExtraFilesToDeploy Include="Logo.svg" />
|
|
||||||
<WasmExtraFilesToDeploy Include="app.css" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Import Project="..\..\src\Browser\Avalonia.Browser\build\Avalonia.Browser.props" />
|
|
||||||
<Import Project="..\..\src\Browser\Avalonia.Browser\build\Avalonia.Browser.targets" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"profiles": {
|
|
||||||
"MobileSandbox.Browser": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
},
|
|
||||||
"applicationUrl": "https://localhost:65312;http://localhost:65313;"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<!-- Licensed to the .NET Foundation under one or more agreements. -->
|
|
||||||
<!-- The .NET Foundation licenses this file to you under the MIT license. -->
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>Mobile Sandbox</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<link rel="modulepreload" href="./main.js" />
|
|
||||||
<link rel="modulepreload" href="./dotnet.js" />
|
|
||||||
<link rel="modulepreload" href="./avalonia.js" />
|
|
||||||
<link rel="stylesheet" href="./app.css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="margin: 0px">
|
|
||||||
<div id="out">
|
|
||||||
<div id="avalonia-splash">
|
|
||||||
<div class="center">
|
|
||||||
<h2>Powered by</h2>
|
|
||||||
<a class="navbar-brand" href="https://www.avaloniaui.net/" target="_blank">
|
|
||||||
<img src="Logo.svg" alt="Avalonia Logo" width="30" height="24" />
|
|
||||||
Avalonia
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script type='module' src="./main.js"></script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
|
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
|
|
||||||
<ProjectReference Include="..\..\src\Avalonia.Dialogs\Avalonia.Dialogs.csproj" />
|
|
||||||
<ProjectReference Include="..\MobileSandbox\MobileSandbox.csproj" />
|
|
||||||
<!-- For native controls test -->
|
|
||||||
<PackageReference Include="MonoMac.NetStandard" Version="0.0.4" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<!-- For Microsoft.CodeAnalysis -->
|
|
||||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Import Project="..\..\build\SampleApp.props" />
|
|
||||||
<Import Project="..\..\build\ReferenceCoreLibraries.props" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<ProvisioningType>manual</ProvisioningType>
|
|
||||||
<TargetFramework>$(AvsCurrentIOSTargetFramework)</TargetFramework>
|
|
||||||
<SupportedOSPlatformVersion>13.0</SupportedOSPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\src\iOS\Avalonia.iOS\Avalonia.iOS.csproj" />
|
|
||||||
<ProjectReference Include="..\MobileSandbox\MobileSandbox.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<Application xmlns="https://github.com/avaloniaui"
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Name="Mobile Sandbox"
|
Name="Mobile Sandbox"
|
||||||
x:Class="MobileSandbox.App"
|
x:Class="MobileSandbox.App">
|
||||||
RequestedThemeVariant="Dark">
|
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<FluentTheme />
|
<FluentTheme />
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace MobileSandbox;
|
||||||
|
|
||||||
|
public class App : Application
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted()
|
||||||
|
{
|
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime)
|
||||||
|
{
|
||||||
|
desktopLifetime.MainWindow = new MainWindow();
|
||||||
|
}
|
||||||
|
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewLifetime)
|
||||||
|
{
|
||||||
|
singleViewLifetime.MainView = new MainView();
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
using Avalonia;
|
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
|
|
||||||
namespace MobileSandbox
|
|
||||||
{
|
|
||||||
public class App : Application
|
|
||||||
{
|
|
||||||
public override void Initialize()
|
|
||||||
{
|
|
||||||
AvaloniaXamlLoader.Load(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnFrameworkInitializationCompleted()
|
|
||||||
{
|
|
||||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime)
|
|
||||||
{
|
|
||||||
desktopLifetime.MainWindow = new MainWindow();
|
|
||||||
}
|
|
||||||
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewLifetime)
|
|
||||||
{
|
|
||||||
singleViewLifetime.MainView = new MainView();
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnFrameworkInitializationCompleted();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 172 KiB |
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace MobileSandbox;
|
||||||
|
|
||||||
|
public partial class MainView : UserControl
|
||||||
|
{
|
||||||
|
public MainView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ButtonCommand()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Button pressed");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
|
|
||||||
namespace MobileSandbox
|
|
||||||
{
|
|
||||||
public class MainView : UserControl
|
|
||||||
{
|
|
||||||
public MainView()
|
|
||||||
{
|
|
||||||
AvaloniaXamlLoader.Load(this);
|
|
||||||
|
|
||||||
DataContext = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ButtonCommand()
|
|
||||||
{
|
|
||||||
Console.WriteLine("Button pressed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
<Window xmlns="https://github.com/avaloniaui"
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:local="clr-namespace:MobileSandbox"
|
xmlns:local="clr-namespace:MobileSandbox"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Name="MainWindow"
|
|
||||||
CanResize="False"
|
CanResize="False"
|
||||||
Width="720" Height="1280"
|
Width="720" Height="1280"
|
||||||
Title="Mobile Sandbox"
|
Title="Mobile Sandbox"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace MobileSandbox;
|
||||||
|
|
||||||
|
public partial class MainWindow : Window
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
|
|
||||||
namespace MobileSandbox
|
|
||||||
{
|
|
||||||
public class MainWindow : Window
|
|
||||||
{
|
|
||||||
public MainWindow()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
|
|
||||||
//Renderer.DrawFps = true;
|
|
||||||
//Renderer.DrawDirtyRects = Renderer.DrawFps = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
AvaloniaXamlLoader.Load(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +1,18 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;$(AvsCurrentTargetFramework)</TargetFrameworks>
|
<TargetFrameworks>net8.0;net8.0-android;net8.0-browser;net8.0-tizen</TargetFrameworks>
|
||||||
|
<TargetFrameworks Condition="!$([MSBuild]::IsOsPlatform('Linux'))">$(TargetFrameworks);net8.0-ios</TargetFrameworks>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<AvaloniaSingleProject>true</AvaloniaSingleProject>
|
||||||
|
<ApplicationTitle>Mobile Sandbox</ApplicationTitle>
|
||||||
|
<ApplicationId>Avalonia.MobileSandbox</ApplicationId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="**\*.xaml.cs">
|
|
||||||
<DependentUpon>%(Filename)</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<AvaloniaResource Include="**\*.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</AvaloniaResource>
|
|
||||||
<AvaloniaResource Include="Assets\*" />
|
|
||||||
<AvaloniaResource Include="Assets\Fonts\*" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Assets\Fonts\SourceSansPro-Bold.ttf" />
|
|
||||||
<EmbeddedResource Include="Assets\Fonts\SourceSansPro-BoldItalic.ttf" />
|
|
||||||
<EmbeddedResource Include="Assets\Fonts\SourceSansPro-Italic.ttf" />
|
|
||||||
<EmbeddedResource Include="Assets\Fonts\SourceSansPro-Regular.ttf" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\packages\Avalonia\Avalonia.csproj" />
|
<ProjectReference Include="..\..\packages\Avalonia\Avalonia.csproj" />
|
||||||
@@ -32,4 +25,5 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="..\..\build\BuildTargets.targets" />
|
<Import Project="..\..\build\BuildTargets.targets" />
|
||||||
|
<Import Project="..\..\build\SourceGenerators.props" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
|
||||||
<application android:label="MobileSandbox.Android" android:icon="@drawable/Icon"></application>
|
<application android:label="MobileSandbox.Android"></application>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using Android.App;
|
||||||
|
using Android.Content.PM;
|
||||||
|
using Android.OS;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Android;
|
||||||
|
|
||||||
|
namespace MobileSandbox;
|
||||||
|
|
||||||
|
[Activity(Label = "MobileSandbox.Android", Theme = "@style/Theme.AppCompat.NoActionBar", MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)]
|
||||||
|
public class MainActivity : AvaloniaMainActivity<App>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -5,24 +5,34 @@
|
|||||||
--sal: env(safe-area-inset-left);
|
--sal: env(safe-area-inset-left);
|
||||||
}
|
}
|
||||||
|
|
||||||
#out {
|
/* HTML styles for the splash screen */
|
||||||
height: 100vh;
|
|
||||||
width: 100vw
|
.highlight {
|
||||||
|
color: white;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#avalonia-splash {
|
.purple {
|
||||||
position: relative;
|
color: #8b44ac;
|
||||||
height: 100%;
|
}
|
||||||
width: 100%;
|
|
||||||
color: whitesmoke;
|
.icon {
|
||||||
background: #171C2C;
|
opacity: 0.05;
|
||||||
font-family: 'Nunito', sans-serif;
|
height: 35%;
|
||||||
background-position: center;
|
width: 35%;
|
||||||
background-size: cover;
|
position: absolute;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
margin-right: 3%;
|
||||||
|
margin-bottom: 5%;
|
||||||
|
z-index: 5000;
|
||||||
|
background-position: right bottom;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#avalonia-splash a{
|
#avalonia-splash a {
|
||||||
color: whitesmoke;
|
color: whitesmoke;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
@@ -30,27 +40,35 @@
|
|||||||
.center {
|
.center {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 250px;
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
#avalonia-splash {
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
color: whitesmoke;
|
||||||
|
background: #1b2a4e;
|
||||||
|
font-family: 'Nunito', sans-serif;
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.splash-close {
|
.splash-close {
|
||||||
animation: slide 0.5s linear 1s forwards;
|
animation: fadeout 0.25s linear forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slide {
|
@keyframes fadeout {
|
||||||
0% {
|
0% {
|
||||||
top: 0%;
|
opacity: 100%;
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
opacity: 80%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
top: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
display: none;
|
|
||||||
visibility: collapse;
|
visibility: collapse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@@ -0,0 +1,30 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>MobileSandbox.Browser</title>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<base href="/" />
|
||||||
|
<link rel="modulepreload" href="./main.js" />
|
||||||
|
<link rel="modulepreload" href="./_framework/dotnet.js" />
|
||||||
|
<link rel="modulepreload" href="./_framework/avalonia.js" />
|
||||||
|
<link rel="stylesheet" href="./app.css" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="margin: 0px; overflow: hidden">
|
||||||
|
<div id="out">
|
||||||
|
<div id="avalonia-splash">
|
||||||
|
<div class="center">
|
||||||
|
<h2 class="purple">
|
||||||
|
Powered by
|
||||||
|
<a class="highlight" href="https://www.avaloniaui.net/" target="_blank">Avalonia UI</a>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<img class="icon" src="Logo.svg" alt="Avalonia Logo" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type='module' src="./main.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
// Licensed to the .NET Foundation under one or more agreements.
|
import { dotnet } from './_framework/dotnet.js'
|
||||||
// The .NET Foundation licenses this file to you under the MIT license.
|
|
||||||
|
|
||||||
import { dotnet } from './dotnet.js'
|
|
||||||
|
|
||||||
const is_browser = typeof window != "undefined";
|
const is_browser = typeof window != "undefined";
|
||||||
if (!is_browser) throw new Error(`Expected to be running in a browser`);
|
if (!is_browser) throw new Error(`Expected to be running in a browser`);
|
||||||
@@ -13,4 +10,4 @@ const dotnetRuntime = await dotnet
|
|||||||
|
|
||||||
const config = dotnetRuntime.getConfig();
|
const config = dotnetRuntime.getConfig();
|
||||||
|
|
||||||
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, ["dotnet", "is", "great!"]);
|
await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]);
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Tizen;
|
||||||
|
using ElmSharp;
|
||||||
|
using SkiaSharp;
|
||||||
|
using Tizen.Applications;
|
||||||
|
|
||||||
|
namespace MobileSandbox;
|
||||||
|
|
||||||
|
class Program : NuiTizenApplication<App>
|
||||||
|
{
|
||||||
|
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) =>
|
||||||
|
base.CustomizeAppBuilder(builder);
|
||||||
|
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
var app = new Program();
|
||||||
|
app.Run(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest package="com.avalonia.control-catalog" version="1.0.0" api-version="8.0" xmlns="http://tizen.org/ns/packages">
|
||||||
|
<profile name="common" />
|
||||||
|
<ui-application appid="com.avalonia.mobilesandbox" exec="MobileSandbox.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" hw-acceleration="on" launch_mode="single">
|
||||||
|
<label>Avalonia</label>
|
||||||
|
<icon>Avalonia.png</icon>
|
||||||
|
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
|
||||||
|
<splash-screens />
|
||||||
|
</ui-application>
|
||||||
|
<shortcut-list />
|
||||||
|
<privileges>
|
||||||
|
<privilege>http://tizen.org/privilege/appdir.shareddata</privilege>
|
||||||
|
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
|
||||||
|
<privilege>http://tizen.org/privilege/externalstorage</privilege>
|
||||||
|
<privilege>http://tizen.org/privilege/externalstorage.appdata</privilege>
|
||||||
|
<privilege>http://tizen.org/privilege/internet</privilege>
|
||||||
|
<privilege>http://tizen.org/privilege/network.get</privilege>
|
||||||
|
</privileges>
|
||||||
|
<dependencies />
|
||||||
|
<provides-appdefined-privileges />
|
||||||
|
<feature>http://tizen.org/feature/opengles.surfaceless_context</feature>
|
||||||
|
<feature>http://tizen.org/feature/opengles.version.2_0</feature>
|
||||||
|
</manifest>
|
||||||
@@ -3,8 +3,6 @@ using UIKit;
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.iOS;
|
using Avalonia.iOS;
|
||||||
using Avalonia.Logging;
|
|
||||||
using Avalonia.Media;
|
|
||||||
|
|
||||||
namespace MobileSandbox
|
namespace MobileSandbox
|
||||||
{
|
{
|
||||||
@@ -14,9 +12,5 @@ namespace MobileSandbox
|
|||||||
[Register("AppDelegate")]
|
[Register("AppDelegate")]
|
||||||
public partial class AppDelegate : AvaloniaAppDelegate<App>
|
public partial class AppDelegate : AvaloniaAppDelegate<App>
|
||||||
{
|
{
|
||||||
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
|
||||||
{
|
|
||||||
return builder.LogToTrace(LogEventLevel.Debug, "IOSIME");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<UserControl xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
x:Class="MobileSandbox.Views.CustomNotificationView">
|
|
||||||
<Border Padding="12" MinHeight="20" Background="DodgerBlue">
|
|
||||||
<Grid ColumnDefinitions="Auto,*">
|
|
||||||
<Panel Margin="0,0,12,0" Width="25" Height="25" VerticalAlignment="Top">
|
|
||||||
<TextBlock Text="" FontFamily="Segoe UI Symbol" FontSize="20" TextAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
</Panel>
|
|
||||||
<DockPanel Grid.Column="1">
|
|
||||||
<TextBlock DockPanel.Dock="Top" Text="{ReflectionBinding Title}" FontWeight="Medium" />
|
|
||||||
<StackPanel Spacing="20" DockPanel.Dock="Bottom" Margin="0,8,0,0" Orientation="Horizontal">
|
|
||||||
<Button Content="No" DockPanel.Dock="Right" NotificationCard.CloseOnClick="True" Command="{ReflectionBinding NoCommand}" Margin="0,0,8,0" />
|
|
||||||
<Button Content="Yes" DockPanel.Dock="Right" NotificationCard.CloseOnClick="True" Command="{ReflectionBinding YesCommand}" />
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock Text="{ReflectionBinding Message}" TextWrapping="Wrap" Opacity=".8" Margin="0,8,0,0"/>
|
|
||||||
</DockPanel>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
|
|
||||||
namespace MobileSandbox.Views
|
|
||||||
{
|
|
||||||
public class CustomNotificationView : UserControl
|
|
||||||
{
|
|
||||||
public CustomNotificationView()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
AvaloniaXamlLoader.Load(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||