Skip to content

Commit

Permalink
Merge pull request #33 from andy840119/android-support
Browse files Browse the repository at this point in the history
Add ios support
  • Loading branch information
andy840119 authored Jul 23, 2020
2 parents 1971401 + ce0ffa2 commit d271197
Show file tree
Hide file tree
Showing 16 changed files with 665 additions and 5 deletions.
60 changes: 56 additions & 4 deletions osu-framework-microphone.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.852
# Visual Studio Version 16
VisualStudioVersion = 16.0.30309.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "osu.Framework.Microphone", "osu.Framework.Microphone\osu.Framework.Microphone.csproj", "{D0F85C61-800A-4645-8633-AC59208FA732}"
EndProject
Expand All @@ -15,24 +15,76 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
CodeAnalysis\osu-framework-microphone.ruleset = CodeAnalysis\osu-framework-microphone.ruleset
osu-framework-microphone.sln.DotSettings = osu-framework-microphone.sln.DotSettings
osu.Framework.Android.props = osu.Framework.Android.props
osu.Framework.iOS.props = osu.Framework.iOS.props
osu.Framework.Microphone.Android.props = osu.Framework.Microphone.Android.props
osu.Framework.Microphone.iOS.props = osu.Framework.Microphone.iOS.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Framework.Microphone.Tests.iOS", "osu.Framework.Microphone.Tests.iOS\osu.Framework.Microphone.Tests.iOS.csproj", "{D972753E-45FC-4B82-B017-34BDE485F1BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Framework.Microphone.Tests.Android", "osu.Framework.Microphone.Tests.Android\osu.Framework.Microphone.Tests.Android.csproj", "{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|Any CPU = Release|Any CPU
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D0F85C61-800A-4645-8633-AC59208FA732}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Debug|iPhone.Build.0 = Debug|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Release|Any CPU.Build.0 = Release|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Release|iPhone.ActiveCfg = Release|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Release|iPhone.Build.0 = Release|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{D0F85C61-800A-4645-8633-AC59208FA732}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Debug|iPhone.Build.0 = Debug|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Release|Any CPU.Build.0 = Release|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Release|iPhone.ActiveCfg = Release|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Release|iPhone.Build.0 = Release|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{C567CF87-3AD0-4FF3-B839-4502D23FD4D1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Debug|Any CPU.ActiveCfg = Debug|iPhone
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Debug|iPhone.ActiveCfg = Debug|iPhone
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Debug|iPhone.Build.0 = Debug|iPhone
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Release|Any CPU.ActiveCfg = Release|iPhone
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Release|iPhone.ActiveCfg = Release|iPhone
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Release|iPhone.Build.0 = Release|iPhone
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{D972753E-45FC-4B82-B017-34BDE485F1BB}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|iPhone.Build.0 = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|Any CPU.Build.0 = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|Any CPU.Deploy.0 = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|iPhone.ActiveCfg = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|iPhone.Build.0 = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|iPhone.Deploy.0 = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
61 changes: 61 additions & 0 deletions osu.Framework.Microphone.Android.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<Project>
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<OutputPath>bin\$(Configuration)</OutputPath>
<WarningLevel>4</WarningLevel>
<SchemaVersion>2.0</SchemaVersion>
<BundleAssemblies>false</BundleAssemblies>
<AotAssemblies>false</AotAssemblies>
<OutputType>Library</OutputType>
<FileAlignment>512</FileAlignment>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidApplication>True</AndroidApplication>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<!-- This does not take effect, unlike osu game repo. -->
<!--<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>-->
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a</AndroidSupportedAbis>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<MandroidI18n>cjk,mideast,other,rare,west</MandroidI18n>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AndroidManagedSymbols>false</AndroidManagedSymbols>
<AndroidUseSharedRuntime>true</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugSymbols>false</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<AndroidManagedSymbols>false</AndroidManagedSymbols>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<AndroidNativeLibrary Include="..\osu.Framework.Android\armeabi-v7a\*.so">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</AndroidNativeLibrary>
<AndroidNativeLibrary Include="..\osu.Framework.Android\arm64-v8a\*.so">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</AndroidNativeLibrary>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="Java.Interop" />
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="ManagedBass" Version="2.0.4" />
<PackageReference Include="ManagedBass.Fx" Version="2.0.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="osu.Framework.Tests.Android" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
<application android:label="osu!framework test" />
</manifest>
16 changes: 16 additions & 0 deletions osu.Framework.Microphone.Tests.Android/TestGameActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using Android.App;
using Android.Content.PM;
using osu.Framework.Android;

namespace osu.Framework.Tests.Android
{
[Activity(MainLauncher = true, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize, Theme = "@android:style/Theme.NoTitleBar")]
public class TestGameActivity : AndroidGameActivity
{
protected override Game CreateGame()
=> new VisualTestGame();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\osu.Framework.Microphone.Android.props" />
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{320089C6-A141-4D3E-BD5F-C4A6CE9E567B}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<RootNamespace>osu.Framework.Microphone.Tests.Android</RootNamespace>
<AssemblyName>osu.Framework.Microphone.Tests.Android</AssemblyName>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a</AndroidSupportedAbis>
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestGameActivity.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\osu.Framework.Microphone.Tests\**\*.cs" Exclude="..\osu.Framework.Microphone.Tests\Program.cs;..\osu.Framework.Microphone.Tests\obj\**\*;..\osu.Framework.Microphone.Tests\bin\**\*">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
<EmbeddedResource Include="..\osu.Framework.Microphone.Tests\Resources\**\*">
<Link>Resources\%(RecursiveDir)%(Filename)%(Extension)</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\osu.Framework.Microphone\osu.Framework.Microphone.csproj">
<Project>{D0F85C61-800A-4645-8633-AC59208FA732}</Project>
<Name>osu.Framework.Microphone</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android">
<Version>2020.722.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>
14 changes: 14 additions & 0 deletions osu.Framework.Microphone.Tests.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using Foundation;
using osu.Framework.iOS;

namespace osu.Framework.Tests
{
[Register("AppDelegate")]
public class AppDelegate : GameAppDelegate
{
protected override Game CreateGame() => new VisualTestGame();
}
}
18 changes: 18 additions & 0 deletions osu.Framework.Microphone.Tests.iOS/Application.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using UIKit;

namespace osu.Framework.Tests
{
public static class Application
{
// This is the main entry point of the application.
public static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, "GameUIApplication", "AppDelegate");
}
}
}
Loading

0 comments on commit d271197

Please sign in to comment.