|
85 | 85 |
|
86 | 86 | <ItemGroup> |
87 | 87 | <!-- Use winnerspiros/osu-framework fork (net10.0-android, optimized) via submodule instead of ppy NuGet package --> |
88 | | - <ProjectReference Include="$(MSBuildThisFileDirectory)submodules\osu-framework\osu.Framework.Android\osu.Framework.Android.csproj" /> |
| 88 | + <ProjectReference Include="$(MSBuildThisFileDirectory)submodules/osu-framework/osu.Framework.Android/osu.Framework.Android.csproj" /> |
89 | 89 | </ItemGroup> |
90 | 90 |
|
91 | 91 | <!-- Include framework native libraries (BASS audio, FFmpeg, etc.) from the submodule. |
92 | 92 | When using a NuGet package these are bundled automatically; with a ProjectReference |
93 | 93 | they must be declared explicitly or the app crashes at startup with |
94 | | - System.DllNotFoundException: bass (or similar). --> |
| 94 | + System.DllNotFoundException: bass (or similar). |
| 95 | + Use forward slashes — backslash globs silently match zero files on Linux CI runners, |
| 96 | + which produces an APK without libbass.so (and the other native libs). --> |
95 | 97 | <ItemGroup> |
96 | | - <AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)submodules\osu-framework\osu.Framework.Android\arm64-v8a\*.so" Abi="arm64-v8a" /> |
| 98 | + <AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)submodules/osu-framework/osu.Framework.Android/arm64-v8a/*.so" Abi="arm64-v8a" /> |
97 | 99 | </ItemGroup> |
98 | 100 |
|
| 101 | + <!-- Fail the build early if libbass.so is missing. |
| 102 | + A missing libbass.so means the app will crash on startup with DllNotFoundException. |
| 103 | + This catches silent glob failures (e.g. uninitialised submodule, wrong path). --> |
| 104 | + <Target Name="ValidateFrameworkNativeLibraries" BeforeTargets="Build"> |
| 105 | + <Error Condition="!Exists('$(MSBuildThisFileDirectory)submodules/osu-framework/osu.Framework.Android/arm64-v8a/libbass.so')" |
| 106 | + Text="libbass.so not found in submodules/osu-framework/osu.Framework.Android/arm64-v8a/. Ensure the osu-framework submodule is initialised: git submodule update --init --recursive" /> |
| 107 | + </Target> |
| 108 | + |
99 | 109 | <PropertyGroup> |
100 | 110 | <!-- Fody does not handle Android build well, and warns when unchanged. |
101 | 111 | Since Realm objects are not declared directly in Android projects, simply disable Fody. --> |
|
0 commit comments