port to androids ?

This commit is contained in:
Bluzume 2022-03-14 21:21:16 +13:00 committed by GitHub
parent 7941fbd881
commit c8d381791a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 138 additions and 2 deletions

View file

@ -73,6 +73,17 @@ jobs:
run: |
dotnet publish -p:PublishProfile=OsxARM64.pubxml
- name: Build android-arm
continue-on-error: false
run: |
dotnet publish -p:PublishProfile=AndroidARM.pubxml
- name: Build android-arm64
continue-on-error: false
run: |
dotnet publish -p:PublishProfile=AndroidARM64.pubxml
- name: Upload win-x64
uses: actions/upload-artifact@v2
with:
@ -138,7 +149,20 @@ jobs:
with:
name: HISP-MacARM64
path: HorseIsleServer/HISP/bin/arm64/MacOS/net6.0/osx-arm64/publish/
- name: Upload android-arm
uses: actions/upload-artifact@v2
with:
name: HISP-AndroidARM
path: HorseIsleServer/HISP/bin/arm/Android/net6.0/android-arm/publish/
- name: Upload android-arm64
uses: actions/upload-artifact@v2
with:
name: HISP-AndroidARM64
path: HorseIsleServer/HISP/bin/arm64/Android/net6.0/android-arm64/publish/
- name: Upload Website (master)
uses: actions/upload-artifact@v2
with:

View file

@ -70,6 +70,23 @@
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Android|ARM'">
<RuntimeIdentifier>android-arm</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>ARM32</PlatformTarget>
<DefineConstants>OS_ANDROID;ARCH_ARM</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Android|ARM64'">
<RuntimeIdentifier>android-arm64</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>ARM64</PlatformTarget>
<DefineConstants>OS_ANDROID;ARCH_ARM64</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Linux|x64'">
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0">
<PropertyGroup>
<Configuration>Android</Configuration>
<Platform>ARM</Platform>
<PublishDir>bin\arm\Android\net6.0\android-arm\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>android-arm</RuntimeIdentifier>
<SelfContained>True</SelfContained>
<!-- <PublishSingleFile>True</PublishSingleFile> -->
<PublishReadyToRun>True</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
<DefineConstants>OS_ANDROID;ARCH_ARM</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0">
<PropertyGroup>
<Configuration>Android</Configuration>
<Platform>ARM64</Platform>
<PublishDir>bin\arm64\Android\net6.0\android-arm64\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>android-arm64</RuntimeIdentifier>
<SelfContained>True</SelfContained>
<!-- <PublishSingleFile>True</PublishSingleFile> -->
<PublishReadyToRun>True</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
<DefineConstants>OS_ANDROID;ARCH_ARM64</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -4,7 +4,7 @@
<RootNamespace>HISP</RootNamespace>
<LangVersion>10.0</LangVersion>
<Platforms>x64;x86;ARM;ARM64;AnyCPU</Platforms>
<Configurations>Debug;Windows;Linux;MacOS</Configurations>
<Configurations>Debug;Windows;Linux;MacOS;Android</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
@ -87,6 +87,23 @@
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Android|ARM'">
<RuntimeIdentifier>android-arm</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>ARM32</PlatformTarget>
<DefineConstants>OS_ANDROID;ARCH_ARM</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Android|ARM64'">
<RuntimeIdentifier>android-arm64</RuntimeIdentifier>
<Optimize>true</Optimize>
<PlatformTarget>ARM64</PlatformTarget>
<DefineConstants>OS_ANDROID;ARCH_ARM64</DefineConstants>
<WarningLevel>3</WarningLevel>
<NoWarn>1701;1702;2026</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Linux|x64'">
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0">
<PropertyGroup>
<Configuration>Android</Configuration>
<Platform>ARM</Platform>
<PublishDir>bin\arm\Linux\net6.0\android-arm\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>android-arm</RuntimeIdentifier>
<SelfContained>True</SelfContained>
<!-- <PublishSingleFile>True</PublishSingleFile> -->
<PublishReadyToRun>True</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
<DefineConstants>OS_ANDROID;ARCH_ARM</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0">
<PropertyGroup>
<Configuration>Android</Configuration>
<Platform>ARM64</Platform>
<PublishDir>bin\arm\Linux\net6.0\android-arm64\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>android-arm64</RuntimeIdentifier>
<SelfContained>True</SelfContained>
<!-- <PublishSingleFile>True</PublishSingleFile> -->
<PublishReadyToRun>True</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
<DefineConstants>OS_ANDROID;ARCH_ARM64</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -29,6 +29,8 @@ namespace HISP.Server
return "DEBUG";
#elif OS_WINDOWS
return "WINDOWS";
#elif OS_ANDROID
return "ANDROID";
#elif OS_LINUX
return "LINUX";
#elif OS_MACOS